게시판 리스트 링크를 관리자만 링크활성화 하도록 하고 싶습니다. > 그누4 질문답변

그누4 질문답변

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

게시판 리스트 링크를 관리자만 링크활성화 하도록 하고 싶습니다. 정보

게시판 리스트 링크를 관리자만 링크활성화 하도록 하고 싶습니다.

본문

게시판 리스트에서 리스트는 비회원/회원 다보이게 하고
마우스를 게시글리스트에 올렸을때 관리자만 링크가 되게 하고 싶습니다.
회원/비회원은 아무 반응이 없구요..
 
 
아래 소스중 어느부분을 어떡해 설정해야할지 몰라서요 ㅡ.ㅡ;
<?if($member[mb_level]>=5){?>     제목  </a>
 
부탁드립니다.~~
위 사이트 입니다.
 
          <!-- 목록 -->
          <? for ($i=0; $i<count($list); $i++) { ?>
          <tr height=28 >
            <td colspan="4" style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-BOTTOM: 3px; PADDING-TOP: 15px">             <a href="<?=$list[$i][ca_name_href]?>"><font color=gray><span class=small>
            </span></font></a>
              <?=$list[$i][wr_2]?>              </td>
            <? if ($is_category) { ?>
            <? } ?>
            <? if ($is_checkbox) { ?>
            <? } ?>
            <td  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-BOTTOM: 3px; PADDING-TOP: 15px"> <?
        echo $nobr_begin;
        echo $list[$i][reply];
        echo $list[$i][icon_reply];
        echo "<a href='{$list[$i][href]}'>";
        if ($list[$i][is_notice])
            //echo "<font color='#AF6BE3'><strong>{$list[$i][subject]}</strong></font>";
            echo "<font color='#333333'><strong>{$list[$i][subject]}</strong></font>";
        else
        {
            $style1 = $style2 = "";
            // 최신글은 검정
            //if ($list[$i][icon_new]) $style1 = "color:#222222;";
            // 코멘트 없는것만 굵게
            //if (!$list[$i][comment_cnt]) $style2 = "color:#268800;";
            echo "<span style='$style1 $style2'>{$list[$i][subject]}</span>";
        }
        echo "</a>";
        if ($list[$i][comment_cnt])
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;color:#ff6600;'>{$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;
        ?>
            </td>
            <td align="center"> </td>
            <? if ($is_good) { ?>
            <? } ?>
            <? if ($is_nogood) { ?>
            <? } ?>
          </tr>
          <tr>
            <td colspan=<?=$colspan?> height=1 bgcolor=#E7E7E7></td>
          </tr>
          <?}?>
          <? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
          <tr>
            <td colspan=<?=$colspan?> bgcolor=#CCCCCC height=1></td>
          </tr>
        </table>
  • 복사

댓글 전체

--------------------------------------------
실제 게시판 리스트의 링크되는곳은 여기입니다.
--------------------------------------------

        echo "<a href='{$list[$i][href]}'>";    ☜ // #01 """"  바로 이부분입니다.""""""
        if ($list[$i][is_notice])
            //echo "<font color='#AF6BE3'><strong>{$list[$i][subject]}</strong></font>";
            echo "<font color='#333333'><strong>{$list[$i][subject]}</strong></font>";
        else
        {
            $style1 = $style2 = "";
            // 최신글은 검정
            //if ($list[$i][icon_new]) $style1 = "color:#222222;";
            // 코멘트 없는것만 굵게
            //if (!$list[$i][comment_cnt]) $style2 = "color:#268800;";
            echo "<span style='$style1 $style2'>{$list[$i][subject]}</span>";
        }
        echo "</a>";  ☜ // #02 """"  바로 이부분입니다.""""""
----------------------------------------

손가락 표시한부분을 아래와 같이 바꾸어주세요
[[변경전]]
#01 echo "<a href='{$list[$i][href]}'>";   
#02 echo "</a>";
[[변경후]]

#01
if($member[mb_level] == 관리자 레벨숫자) {
echo "<a href='{$list[$i][href]}'>";   
}

#02
if($member[mb_level] == 관리자 레벨숫자) {
echo "</a>";
}
<td  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-BOTTOM: 3px; PADDING-TOP: 15px"> <?
        echo $nobr_begin;
        echo $list[$i][reply];
        echo $list[$i][icon_reply];
if($is_admin){
        echo "<a href='{$list[$i][href]}'>";
}
else
{
echo "";
}
        if ($list[$i][is_notice])
            //echo "<font color='#AF6BE3'><strong>{$list[$i][subject]}</strong></font>";
            echo "<font color='#333333'><strong>{$list[$i][subject]}</strong></font>";
        else
        {
            $style1 = $style2 = "";
            // 최신글은 검정
            //if ($list[$i][icon_new]) $style1 = "color:#222222;";
            // 코멘트 없는것만 굵게
            //if (!$list[$i][comment_cnt]) $style2 = "color:#268800;";
            echo "<span style='$style1 $style2'>{$list[$i][subject]}</span>";
        }
if($is_admin){
        echo "</a>";
}
else
{
echo "";
}
        if ($list[$i][comment_cnt])
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;color:#ff6600;'>{$list[$i][comment_cnt]}</span></a>";

이렇게 하셔도 됩니다^^
© SIRSOFT
현재 페이지 제일 처음으로