hit수 모두 보이게 하려면 > 그누4 질문답변

그누4 질문답변

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

hit수 모두 보이게 하려면 정보

hit수 모두 보이게 하려면

본문

리스트 화면에서 지금은 관리자만 hit수를 볼수 있는데요
이걸 회원이 아닌 사람들도 보이게 하려면 어디를 수정해야 하죠^^;;
짧은 지식에 이것 저것 해보았는데 오류만 나네요..
도와주세요 고수님들~

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

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 10;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
if ($is_admin) $colspan++;  // 관리자이면 '조회' 표시


// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<?
include_once("$g4[path]/lib/latest_wr.lib.php");
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/bstyle.css'>
<!----------- { 레이아웃 테이블 시작 } --------------------------------------//-->
<style type="text/css">
<!--
.style3 {font-size: 12}
.style4 {font-size: 12px}
-->
</style>


<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>


<? //---------- 일정기간이 지나면 '급매물,추천/굵게표시' 게시물 모두 '일반게시물'로 전환

$day_chk = "7";  // 체크 기간 날짜
$cnd_chk = " wr_1 <> '3' ";  // 쿼리 추가 조건 설정
$sql_chk = " update $write_table set wr_1='3' where $cnd_chk and date_add(wr_datetime, INTERVAL '$day_chk' DAY) < now() ";
sql_query($sql_chk);


if ($board['bo_notice']) {
$bo_notice = '';
$notice_array = explode("\n", trim($board['bo_notice'])); // 공지사항의 wr_id를 배열로 저장합니다.

for ($i = 0; $i < count($notice_array); $i++) {
$wr_qry = "select count(wr_id) as cnt from $write_table where wr_id = $notice_array[$i] and wr_1 = '3'";
$rs = mysql_query($wr_qry);
if ($rs) {
$rs_cnt = mysql_fetch_array($rs);
if ($rs_cnt[0] == 1) {
} else {
$bo_notice .= $notice_array[$i] . '\n';
}
}
}

sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}'");
}
//---------- 일정기간이 지나면 '급매물,추천/굵게표시' 게시물 모두 '일반게시물'로 전환 끝
?>

<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr height="25">

    <? if ($is_category) { ?>
<form name="fcategory" method="get">
<td align='left' width='221' nowrap>+분류 :
  <select name=sca onchange="location='<?=$category_location?>'+this.value;">
<option value=''>전체</option>
<?=$category_option?></select>
</td></form>
<? } ?>

<td align='left'>

<!------- 지역카테고리별 검색 처리 시작 -->
<? include "{$board_skin_path}/config.list_select2.php"?>
</td>

    <td align="right" width='173' nowrap>
        게시물 <?=number_format($total_count)?>건
        <? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
        <? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" width="54" height="18" border="0" align="absmiddle"></a><? } ?></td>
</tr>
<tr><td height=5></td></tr>
</table>


<!-- 제목 테이블 -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="3" bgcolor="#8fabd0"></td>
  </tr>
</table>
      <table width="100%" cellspacing="1" cellpadding="0" border="0">
        <form name="fboardlist" method="post">
          <input type="hidden" name="bo_table" value="<?=$bo_table?>">
          <input type="hidden" name="sfl"  value="<?=$sfl?>">
          <input type="hidden" name="stx"  value="<?=$stx?>">
          <input type="hidden" name="spt"  value="<?=$spt?>">
          <input type="hidden" name="page" value="<?=$page?>">
          <input type="hidden" name="sw"  value="">
          <tr bgcolor="#FAFAFA" height="28">
            <td width="45" align="center" class="b_bg"><div align="center" class="style4"><span class='b_tit '>                번호</span></div></td>
            <td width="79" align="center" class="b_bg"><div align="left" class="style4">
              <div align="center"><span class='b_tit '>                지역분류</span></div>
            </div></td>
            <!--
    <? if ($is_category) { ?><td width="100" align="center" class="b_bg"><span class='b_tit'>분류</span></td><? } ?>
--//-->
            <? if ($is_checkbox) { ?>
            <td width="20" align="center" class="b_bg"><INPUT type=checkbox onclick="if (this.checked) all_checked(true); else all_checked(false);"></td>
            <? } ?>
            <td width="100" align="center" class="b_bg"><div align="left" class="style4"><span class='b_tit '>                제목</span></div></td>
            <td width="70" align="center" class="b_bg"><div align="left" class="style4"><span class='b_tit '>                매물종류</span></div></td>
            <td width="65" align="center" class="b_bg"><div align="left" class="style4">
              <div align="center"><span class='b_tit '>                전용면적</span></div>
            </div></td>
            <td width="65" align="center" class="b_bg"><div align="left" class="style4">
              <div align="center"><span class='b_tit '>                실입주금</span></div>
            </div></td>
            <td width="65" align="center" class="b_bg"><div align="left" class="style4">
              <div align="center"><span class='b_tit '>                총분양가</span></div>
            </div></td>
            <!--<td width="90" align="center" class="b_bg"><span class='b_tit'>글쓴이</span></td>--//-->
            <td width="65" align="center" class="b_bg style3"><div align="left" class="style4">
                <?=subject_sort_link('wr_datetime', $qstr2, 1)?>
                <div align="center"><span class='b_tit'>등록일</span></a></span></div>
            </div></td>
            <td width="41" align="center" class="b_bg"><div align="left" class="style4">
              <div align="center"><span class='b_tit '>                현상태</span></div>
            </div></td>
            <? if ($is_admin) { ?>
            <td width="42" align="center" class="b_bg style3"><div align="left" class="style4">
                <?=subject_sort_link('wr_hit', $qstr2, 1)?>
                <div align="center"><span class='b_tit'>조회</span></div>
                </a></div></td>
            <? } ?>
            <? if ($is_good) { ?>
            <td width="49" align="center" class="b_bg style3"><div align="left" class="style4">
                <?=subject_sort_link('wr_good', $qstr2, 1)?>
                <div align="center"><span class='b_tit'>추천</span></div>
                </a></div></td>
            <? } ?>
            <? if ($is_nogood) { ?>
            <td width="43" align="center" class="b_bg style3"><div align="left" class="style4">
                <?=subject_sort_link('wr_nogood', $qstr2, 1)?>
                <div align="center"><span class='b_tit'>비추천</span></div>
                </a></div></td>
            <? } ?>
          </tr>
          <!-- 게시판 목록 시작 -->
          <? for ($i=0; $i<count($list); $i++) { ?>
          <!--------------- 여유필드 변수값 -----------------------//-->
          <?
// 주소입력값을 다시 쪼개어, '지역구'까지만 출력토록 함.
$ex3_filed = explode("|", $list[$i][wr_3]);
$ext3_02  = explode(" ", $ex3_filed[2]);
//echo $ext3_02[0] . "-" . $ext3_02[1]; {아래 주소표시부분에 위치)

//--보증금/월세/권리금
$ex5_filed = explode("|",$list[$i][wr_5]);
$ext5_06  = $ex5_filed[6];
$ex7_filed = explode("|",$list[$i][wr_7]);
$ext7_00  = $ex7_filed[0];
$ext5_06  = $ex5_filed[6];
$ext7_02  = $ex7_filed[2];
$ext6_01  = $ex6_filed[1];
$ext7_03  = $ex7_filed[3];
$ext7_05  = $ex7_filed[5];
 

//-- 학원분류
$ex6_filed = explode("|",$list[$i][wr_6]);
$ex8_filed = explode("|",$list[$i][wr_8]);
$ext6_00  = $ex6_filed[0];
$ext8_02  = $ex8_filed[2];
//$ext6_01  = $ex6_filed[1]; {원생수}
?>
          <!--------------- 여유필드 변수값 끝 -----------------------//-->
          <tr height="26">
            <td align="center">
              <?
        if ($list[$i][is_notice]) // '급매'(공지)일경우,
            echo "<img src=\"$board_skin_path/img/notice_icon.gif\" width=30 height=16>";
        else if ($wr_id == $list[$i][wr_id]) // 현재위치
            echo "<span class='b_num'><b><font color='#FF0000'>{$list[$i][num]}</font></b></class>";
        else
            echo "<span class='b_num'>{$list[$i][num]}</class>";
        ?>
            </td>
            <!--------------- 여유필드(주소출력) 추가 1 -----------------------//-->
            <td align="center"> <?echo $ext3_02[0] . "-" . $ext3_02[1]; ?>
              <div align="center"></div>
              <div align="left"></div>
              <div align="left"></div>
              <div align="left"></div></td>
            <!--------------- 여유필드 추가 1 끝-----------------------//-->
            <!--
    <? if ($is_category) { ?><td width="100" align="center"><a class='b_ca' href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a></td><? } ?>
--//-->
            <? if ($is_checkbox) { ?>
            <td width="20" align="center"><div align="left">
                <input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>">
              </div></td>
            <? } ?>
            <td height="32" style='word-break:break-all;'>
              <?
        echo $nobr_begin;
        echo $list[$i][reply];
        echo $list[$i][icon_reply];
        if ($list[$i][is_notice]) {  // 급매물(공지)
        echo "<a class='notice' href='{$list[$i][href]}'>";
            echo "<img src=\"$board_skin_path/img/icon_level01.gif\" width=15 height=15 align='absmiddle'>&nbsp;{$list[$i][subject]}";
        echo "</a>";
}
        else if ($list[$i][wr_1] == "1") {  // 추천매물
        echo "<a class='notice2' href='{$list[$i][href]}'>";
echo "<img src=\"$board_skin_path/img/icon_level02.gif\" width=15 height=15 align='absmiddle'>&nbsp;{$list[$i][subject]}";
echo "</a>";
}
    else if ($list[$i][wr_1] == "2") {  // 굵게
echo "<a class='notice3' href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
}
        else {  // 일반 게시물
echo "<a class='b1' href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
}



        if ($list[$i][comment_cnt])
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$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];
        echo $nobr_end;
        ?>
              <div align="left"></div></td>
            <!--------------- 여유필드(학원분류/보/임/권) 추가 2 ---//-->
            <td align="center"><div align="left"><span class='b2'>
                <?=$ext8_02?>
                </span></div></td>
            <td align="center"><div align="center">                            <p><span class='b2'>
<?=$ext7_05?>
</span>㎡</p>
</div></td>
            <td align="center"><div align="center"><span class='b2'>
<span style="font-family:굴림;font-size:12px;COLOR=00CC99"><?=$ext7_03?>
                </span>만원</div></td>
            <td align="center"><div align="center"><span class='b2'>
<span style="font-family:굴림;font-size:12px;COLOR=FF6633"><?=$ext7_02?>
                </span>만원</div></td>
            <!--------------- 여유필드 추가 2 끝 --------------------//-->
            <!--<td align="center"><span class='b2'><?=$list[$i][name]?></span></td>--//-->
            <td align="center"><div align="center"><span class='b2'>
                <?=$list[$i][datetime2]?>
                </span></div></td>
            <td align="center">
              <!-- // 거래상태 아이콘 출력 --//-->
              <? if($list[$i][wr_4] == "on")  {
echo "<img src='{$board_skin_path}/img/icon_on.gif' border='0'  align='absmiddle'>";
}
?>
              <? if($list[$i][wr_4] == "off") {
echo "<img src='{$board_skin_path}/img/icon_off.gif' border='0'  align='absmiddle'>";
}
?>
              <div align="left"></div></td>
            <? if ($is_admin) { ?>
            <td align="center"><div align="center"><span class='b2'>
                <?=$list[$i][wr_hit]?>
                </span></div></td>
            <? } ?>
            <? if ($is_good) { ?>
            <td align="center"><div align="center"><span class='b2'>
                <?=$list[$i][wr_good]?>
                </span></div></td>
            <? } ?>
            <? if ($is_nogood) { ?>
            <td align="center"><div align="center"><span class='b2'>
                <?=$list[$i][wr_nogood]?>
                </span></div></td>
            <? } ?>
          </tr>
          <tr>
            <td colspan="<?=$colspan?>" height="1" bgcolor="#ebebeb"></td>
          </tr>
          <? } ?>
          <? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
        </form>
      </table>

<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
    <td height="37" align="center">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td width="100%" align="center">
                <? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=54 height=18 border=0 align=absmiddle title='이전검색'></a>"; } ?>
                <?
                // 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
                //echo $write_pages;
                $write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
                $write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
                $write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
                $write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
                $write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:Tahoma, Seoul,굴림; font-size:10pt; color:#797979\">$1</font>", $write_pages);
                $write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:Tahoma, Seoul,굴림; font-size:10pt; color:orange;\">$1</font>", $write_pages);
                ?>
                <strong><?=$write_pages?></strong>
                <? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' width=54 height=18 border=0 align=absmiddle title='다음검색'></a>"; } ?>
            </td>
        </tr>
        </table></td>
</tr>
</table>

<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca      value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td width="50%" height="40">
        <? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a><? } ?>
        <? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a><? } ?>
        <? if ($is_checkbox) { ?>
            <a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
            <a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
            <a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
        <? } ?>
    </td>
    <td width="50%" align="right">
        <select name=sfl>
            <option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
            <option value='wr_content'>내용</option>
            <option value='mb_id'>회원아이디</option>
            <option value='wr_name'>이름</option>
        </select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
            <option value=and>and</option>
            <option value=or>or</option>
        </select>
        <input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>

<!----------- { 레이아웃 테이블 아래. 끝 } --------------------------------------//-->
</td></tr></table>


<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
    document.fsearch.sfl.value = "<?=$sfl?>";
    document.fsearch.sop.value = "<?=$sop?>";
}
</script>

<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function check_confirm(str)
{
    var f = document.fboardlist;
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(str + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }
    return true;
}

// 선택한 게시물 삭제
function select_delete()
{
    var f = document.fboardlist;

    str = "삭제";
    if (!check_confirm(str))
        return;

    if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
        return;

    f.action = "./delete_all.php";
    f.submit();
}

// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";
                     
    if (!check_confirm(str))
        return;

    var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->

댓글 전체

<? if ($is_admin) { ?>
            <td width="42" align="center" class="b_bg style3"><div align="left" class="style4">
                <?=subject_sort_link('wr_hit', $qstr2, 1)?>
                <div align="center"><span class='b_tit'>조회</span></div>
                </a></div></td>
            <? } ?>


            <td width="42" align="center" class="b_bg style3"><div align="left" class="style4">
                <?=subject_sort_link('wr_hit', $qstr2, 1)?>
                <div align="center"><span class='b_tit'>조회</span></div>
                </a></div></td>
 으로


<? if ($is_admin) { ?>
            <td align="center"><div align="center"><span class='b2'>
                <?=$list[$i][wr_hit]?>
                </span></div></td>
            <? } ?>



            <td align="center"><div align="center"><span class='b2'>
                <?=$list[$i][wr_hit]?>
                </span></div></td>

  으로 수정하시면 됩니다..
전체 9 |RSS
그누4 질문답변 내용 검색

회원로그인

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