관리자가 아니어도 카테고리가 나오게 하고 싶네요.
본문
관리자가 아니어도 카테고리가 나오게 하고 싶네요.
skin에 list.skin.php파일에서
이부분을 수정해 주면 될것 같은데 어떤부분을 수정해야 할지 모르겠네요.
로그인을 하면 카테고리가 나오는데 로그인을 하지 않은 상태에서는 카테고리가 나오지 않습니다.
답변좀 부탁드려요.
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 시작 -->
<? if ($admin_href) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" height=50>
<div style="float:left;height:22px;">
<? if ($is_category) { ?>
<? if (!$wr_id) { ?>
<?
$cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 8; // 한줄당 분류 갯수(현재:10)
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$b_s=""; $b_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = " <span style='font-family: Tahoma; font-size:10px; color:#D2D2D2;'>|</span> ";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b>"; $b_e="</b>"; } else {$b_s=""; $b_e="";}
$str .= " <a href='./board.php?bo_table=$bo_table&sca=".urlencode($arr[$i])."'>$b_s$arr[$i]$b_e</a> <span style='font-family: Tahoma; font-size:10px; color:#D2D2D2;'>|</span> ";
<? if ($admin_href) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" height=50>
<div style="float:left;height:22px;">
<? if ($is_category) { ?>
<? if (!$wr_id) { ?>
<?
$cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 8; // 한줄당 분류 갯수(현재:10)
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$b_s=""; $b_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = " <span style='font-family: Tahoma; font-size:10px; color:#D2D2D2;'>|</span> ";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b>"; $b_e="</b>"; } else {$b_s=""; $b_e="";}
$str .= " <a href='./board.php?bo_table=$bo_table&sca=".urlencode($arr[$i])."'>$b_s$arr[$i]$b_e</a> <span style='font-family: Tahoma; font-size:10px; color:#D2D2D2;'>|</span> ";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "<br>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
?>
<?echo " ";echo $bb_s;?><a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'>전체</a><?=$bb_e?> <span style="font-size:8pt; color=#AEAEAE;">(<?=number_format($total_count)?>)</span>
<?=$str?>
<? } ?>
<? } ?>
</div>
</td>
<td height=25 align="right"><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a></td>
</tr>
</table>
<? } ?>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 끝 -->
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
?>
<?echo " ";echo $bb_s;?><a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'>전체</a><?=$bb_e?> <span style="font-size:8pt; color=#AEAEAE;">(<?=number_format($total_count)?>)</span>
<?=$str?>
<? } ?>
<? } ?>
</div>
</td>
<td height=25 align="right"><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a></td>
</tr>
</table>
<? } ?>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 끝 -->
답변 3
관리자가 아니어도 카테고리가 나온다는 말을 정확하게 이해하고 싶어요 ㅠㅠ
<? if ($admin_href) { ?> <---요걸 이렇게 바꾸세요
<? { ?>
요즘 저도 그런 느낌이 들때가 있어요.
답변을 작성하시기 전에 로그인 해주세요.