최근게시물 제목에 첨부파일 히트수를 넣고 싶은데요.. > 그누4 질문답변

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최근게시물 제목에 첨부파일 히트수를 넣고 싶은데요.. 정보

최근게시물 제목에 첨부파일 히트수를 넣고 싶은데요..

본문

첨부파일이 있는 이미지는 저렇게 아이콘이 뜨잖아요?
저 옆에 저 첨부파일이 몇개 다운로드 됐는지 히트수를 넣고 싶은데...
사이트를 뒤져봐도 잘 모르겠네요ㅠ.ㅠ...
고수분들 알려주세요~~~ㅠㅠ

댓글 전체

사용 최신글 소스 중

<? for ($i=0; $i<count($list); $i++) {  // 이 영역 아래에 구성
  $file = get_file($bo_table, $list[$i][wr_id]);    // 다운횟수 처리 위한 시작
    if(!$file[count]) $file[0][download] = 0; // 첫번째 파일 없으면 0회
    if(!$file[count])  $file[1][download] = 0; // 두번째 파일 없으면 0회
  $download_cnt = $file[0][download] + $file[1][download]; // 첫번째 + 두번째
  if($download_cnt > "0") $download_cnt = "(".$download_cnt."회 다운)"; else  $download_cnt = "";
  echo $download_cnt; // 적용 확인 후 echo 부분을 원하는 위치에 적용
 ?>
Parse error: syntax error, unexpected $end in /home/hosting_users/house10/www/manager/skin/latest/basic/latest.skin.php on line 67


이런 오류가 뜨는데요..ㅠ.ㅠ
이렇게 넣는거 아닌가요?ㅠ


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td><img src='<?=$latest_skin_path?>/img/latest_t01.gif' /></td>
    <td width='999' height="35" background='<?=$latest_skin_path?>/img/bg_latest.gif'>&nbsp;&nbsp;<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'></a>NS COMUNICATION DOWNLOAD</strong></td>
    <td width=32 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border="0" /></a></td>
    <td width=32><img src='<?=$latest_skin_path?>/img/latest_t02.gif' /></td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td height="6">&nbsp;</td>
  <td width=32>&nbsp;</td>
  <td width=32>&nbsp;</td>
</tr>
</table>

<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=95%>
        <tr>
            <td width="10" height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle></td>
            <td width="60" align="center"><?=str_replace("-",".",$list[$i][datetime])?><br /></td>
            <td width="400"><?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
            echo "</a>";

            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";

            // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

            echo " " . $list[$i]['icon_new'];
            echo " " . $list[$i]['icon_file'];
            echo " " . $list[$i]['icon_link'];
            echo " " . $list[$i]['icon_hot'];
            echo " " . $list[$i]['icon_secret'];
            ?> <? for ($i=0; $i<count($list); $i++) {  // 이 영역 아래에 구성
  $file = get_file($bo_table, $list[$i][wr_id]);    // 다운횟수 처리 위한 시작
    if(!$file[count]) $file[0][download] = 0; // 첫번째 파일 없으면 0회
    if(!$file[count])  $file[1][download] = 0; // 두번째 파일 없으면 0회
  $download_cnt = $file[0][download] + $file[1][download]; // 첫번째 + 두번째
  if($download_cnt > "0") $download_cnt = "(".$download_cnt."회 다운)"; else  $download_cnt = "";
  echo $download_cnt; // 적용 확인 후 echo 부분을 원하는 위치에 적용
 ?></td>
            <td width="15%">&nbsp;</td>
        </tr>
        <tr><td height=1 colspan="4" bgcolor=#EBEBEB></td></tr>
        </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>
추가 하신 부분 말고 23행 부분에

<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { // 이 부분 이미 있지요......★★★★
 $file = get_file($bo_table, $list[$i][wr_id]);    // 다운횟수 처리 위한 시작
  if(!$file[count]) $file[0][download] = 0; // 첫번째 파일 없으면 0회
  if(!$file[count])  $file[1][download] = 0; // 두번째 파일 없으면 0회
  $download_cnt = $file[0][download] + $file[1][download]; // 첫번째 + 두번째
  if($download_cnt > "0") $download_cnt = "(".$download_cnt."회 다운)"; else  $download_cnt = "";
  echo $download_cnt; // 적용 확인 후 echo 부분을 원하는 위치에 적용
 ?>
<tr>
    <td colspan=4 align=center>
        <table width=95%>

적용 후 위와 같은 구성
감사합니다. 그렇게 하니까 뜨긴 뜨는데 다운로드 횟수가 가장 위쪽에 가버리는데요...
저 첨부 표시 아이콘 바로 옆에다 표시할 순 없을까요?

<? for ($i=0; $i<count($list); $i++) { // 이 부분 이미 있지요......★★★★
 $file = get_file($bo_table, $list[$i][wr_id]);    // 다운횟수 처리 위한 시작
  if(!$file[count]) $file[0][download] = 0; // 첫번째 파일 없으면 0회
  if(!$file[count])  $file[1][download] = 0; // 두번째 파일 없으면 0회
  $download_cnt = $file[0][download] + $file[1][download]; // 첫번째 + 두번째
  if($download_cnt > "0") $download_cnt = "(".$download_cnt."회 다운)"; else  $download_cnt = "";
  echo $download_cnt; // 적용 확인 후 echo 부분을 원하는 위치에 적용
 ?>

이것만 이동시키니까 테이블이 이상하게 되네요...ㅠ

<? for ($i=0; $i<count($list); $i++) { ?>

이것만 이동 시켜도 테이블이 깨지고..... 방법이 없을까요?ㅠㅠ
echo $download_cnt;  // 이게 출력이니까 이 부분만 원하는 곳으로 옮겨서 꾸미세요..


echo " " . $list[$i]['icon_file'].$download_cnt; // 파일 아이콘
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT