갤러리를 관리자만 클릭할수 있나요? 채택완료
뚱땡22
11년 전
조회 3,677
<?
for ($i=0; $i<count($list); $i++)
{
$title = "자세히보기";
$content = cut_str(get_text($list[$i][wr_content]), 80);
$subject = cut_str(get_text($list[$i][subject]), 30, '...'); //제목길이
$img_width = '110'; // 이미지 가로크기
$img_height = '140'; // 이미지 세로크기
for ($i=0; $i<count($list); $i++)
{
$title = "자세히보기";
$content = cut_str(get_text($list[$i][wr_content]), 80);
$subject = cut_str(get_text($list[$i][subject]), 30, '...'); //제목길이
$img_width = '110'; // 이미지 가로크기
$img_height = '140'; // 이미지 세로크기
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$board_skin_path/img/noimage.jpg";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
if ($is_admin)
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$board_skin_path/img/noimage.jpg";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
if ($is_admin)
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
$checkbox = "";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:10px;'><font face='Tahoma' color='#EE5A00'>{$list[$i][comment_cnt]}</span></a>";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:10px;'><font face='Tahoma' color='#EE5A00'>{$list[$i][comment_cnt]}</span></a>";
$tr = "";
if ($i && $i%$board[bo_gallery_cols]==0)
$tr = "</tr><tr>";
echo "$tr";
if ($i && $i%$board[bo_gallery_cols]==0)
$tr = "</tr><tr>";
echo "$tr";
echo <<<HEREDOC
<td width="{$td_width}%" valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style='word-break:break-all; padding-bottom:4px;'><a href="{$href}"><img src="{$img}" width='{$img_width}' border="0" title="$title" style="border:0px solid #ccc"></a>
</td>
<td width="{$td_width}%" valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style='word-break:break-all; padding-bottom:4px;'><a href="{$href}"><img src="{$img}" width='{$img_width}' border="0" title="$title" style="border:0px solid #ccc"></a>
</td>
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
11년 전
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
if ($is_admin)
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
if ($is_admin)
$view_href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";
이 코드를 보면
기본으로 위에 코드를 실행하고 관리자 일때 아래코드인데 두개의 코드가 동일한 경로를 가르키니
관리자나 일반 유저나 동일한 곳으로 이동하겠네요
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
뚱땡22
11년 전
오호~ 그러네요... 적용해볼께요
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인