묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
고수님~ 갤러리 이미지 클릭 → 로그인 해 주세요를 띄우고 싶은데요
2009.11.24 19:22
등급을 정해 놔서 로그인을 하지 않았을 때 내용을 볼 수 없습니다
갤러리 게시판(http://themaktoob.com/bbs/zboard.php?id=vintage)을 만들고 있는데
로그인을 안 하고 게시물을 눌렀을 때
'로그인 해 주세요'라는 경고창을 띄우고 싶습니다
subject는 bbs/include/list_check.php에서 해결 봤는데, 이미지는 어떻게 해야 되는 지 모르겠습니다
뭘 고쳐야 될 지 모르겠네요
위 게시판에 해당 되는 list_main.php 부분입니다
어디를 고쳐야 되는 건지 고수님 부탁 드립니당
<?
if($member[level]<=$setup[grant_view]||$is_admin) {
$comment_num="$data[total_comment]";
/* Check New Comment <?=$comment_new?> */
if(!$comment_num==0) {
$last_comment = mysql_fetch_array(mysql_query("select * from $t_comment"."_$id where parent='$data[no]' order by reg_date desc limit 1"));
$last_comment_time = $last_comment['reg_date'];
if(time()-$last_comment_time<60*60*12) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=orange class=icon4 style=\"cursor:hand\" title=\"".cut_str(stripslashes($last_comment['memo']),30)."\">*</font>";
elseif(time()-$last_comment_time<60*60*24) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=gray class=icon4 style=\"cursor:hand\" title=\"".cut_str(stripslashes($last_comment['memo']),30)."\">*</font>";
else $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font>";
}
else $comment_new = "";
} else {
$comment_num="$data[total_comment]";
/* Check New Comment <?=$comment_new?> */
if(!$comment_num==0) {
$last_comment = mysql_fetch_array(mysql_query("select * from $t_comment"."_$id where parent='$data[no]' order by reg_date desc limit 1"));
$last_comment_time = $last_comment['reg_date'];
if(time()-$last_comment_time<60*60*12) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=orange class=icon4 style=\"cursor:hand\">*</font>";
elseif(time()-$last_comment_time<60*60*24) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=gray class=icon4 style=\"cursor:hand\">*</font>";
else $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font>";
}
else $comment_new = "";
}
$subject = str_replace(">","><font class=list_han>",$subject);
$name= str_replace(">","><font class=list_han>",$name);
$date="<span title='".date("Y년 m월 d일 D H시 i분 s초", $data[reg_date])."'><font class=list_eng2>".date("m-d", $data[reg_date])."</font></span>";
if(eregi("\.jpg|\.png|\.gif|\.jpeg",$data['file_name1'])&&@file_exists($data['file_name1'])) {
$screenshot = $data['file_name1'];
$image_info = @getimagesize($screenshot);
if($image_info[0]>110) {
$_x = 110;
$_y = 110;
}
else {
$_x = $image_info[0];
$_y = $image_info[1];
}
if($member[level]<=$setup[grant_view]||$is_admin) {
$img_a = "<a href='view.php?id=$id&no=$data[no]' onFocus='this.blur()'>";
$img_a2 = "</a>";
} else {
$img_a = "";
$img_a2 = "";
}
} elseif(eregi("\.jpg|\.png|\.gif|\.jpeg",$data['file_name2'])&&@file_exists($data['file_name2'])) {
$screenshot = $data['file_name2'];
$image_info = @getimagesize($screenshot);
if($image_info[0]>110) {
$_x = 110;
$_y = 110;
}
else {
$_x = $image_info[0];
$_y = $image_info[1];
}
if($member[level]<=$setup[grant_view]||$is_admin) {
$img_a = "<a href='view.php?id=$id&no=$data[no]' onFocus='this.blur()'>";
$img_a2 = "</a>";
} else {
$img_a = "";
$img_a2 = "";
}
} else {
$screenshot=$dir."/t.gif";
$_x = 110;
$_y = 110;
$img_a = $img_a2 = "";
}
?>
<th class=thm8 width=<?echo (100 / $max_show_image);?>% valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=<?=$size_factor*1.01?> style='table-layout:fixed;'>
<tr>
<td align=center style='padding:10;'>
<table border=0 cellspacing=0 cellpadding=0 width=122 style='table-layout:fixed;'>
<tr><td widh=122 height=122 style='padding:5;border:1 #F0F0F0 solid;' bgcolor=#FAFAFA style='FILTER:dropshadow(color=#e6b1b7,offX=1,offY=1,positive=1);'>
<?=$img_a?><img src="<?=$screenshot?>" width=<?=$_x?> height=<?=$_y?> border=0 onMouseOver="this.className='imgover'" onMouseOut="this.className='imgbase'" class="imgbase"></td>
</tr>
<tr><td align=center style='word-break:break-all;padding:5 0 0 0;'><?=$hide_cart_start?><input type=checkbox name=cart value="<?=$data[no]?>"><?=$hide_cart_end?><?=$icon?><?=$subject?> <?=$comment_new?></td>
</table>
</td>
</tr>
</table></th>
<?
$image_loop++;
if($image_loop>=$max_show_image)
{
echo"
</tr>
<tr>
<td colspan=$max_show_image class='line1'></td>
</tr>";
$image_loop=0;
}
?>
갤러리 게시판(http://themaktoob.com/bbs/zboard.php?id=vintage)을 만들고 있는데
로그인을 안 하고 게시물을 눌렀을 때
'로그인 해 주세요'라는 경고창을 띄우고 싶습니다
subject는 bbs/include/list_check.php에서 해결 봤는데, 이미지는 어떻게 해야 되는 지 모르겠습니다
뭘 고쳐야 될 지 모르겠네요
위 게시판에 해당 되는 list_main.php 부분입니다
어디를 고쳐야 되는 건지 고수님 부탁 드립니당
<?
if($member[level]<=$setup[grant_view]||$is_admin) {
$comment_num="$data[total_comment]";
/* Check New Comment <?=$comment_new?> */
if(!$comment_num==0) {
$last_comment = mysql_fetch_array(mysql_query("select * from $t_comment"."_$id where parent='$data[no]' order by reg_date desc limit 1"));
$last_comment_time = $last_comment['reg_date'];
if(time()-$last_comment_time<60*60*12) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=orange class=icon4 style=\"cursor:hand\" title=\"".cut_str(stripslashes($last_comment['memo']),30)."\">*</font>";
elseif(time()-$last_comment_time<60*60*24) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=gray class=icon4 style=\"cursor:hand\" title=\"".cut_str(stripslashes($last_comment['memo']),30)."\">*</font>";
else $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font>";
}
else $comment_new = "";
} else {
$comment_num="$data[total_comment]";
/* Check New Comment <?=$comment_new?> */
if(!$comment_num==0) {
$last_comment = mysql_fetch_array(mysql_query("select * from $t_comment"."_$id where parent='$data[no]' order by reg_date desc limit 1"));
$last_comment_time = $last_comment['reg_date'];
if(time()-$last_comment_time<60*60*12) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=orange class=icon4 style=\"cursor:hand\">*</font>";
elseif(time()-$last_comment_time<60*60*24) $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font><font color=gray class=icon4 style=\"cursor:hand\">*</font>";
else $comment_new = "<font color=#800080 class=ve8>".$comment_num."</font>";
}
else $comment_new = "";
}
$subject = str_replace(">","><font class=list_han>",$subject);
$name= str_replace(">","><font class=list_han>",$name);
$date="<span title='".date("Y년 m월 d일 D H시 i분 s초", $data[reg_date])."'><font class=list_eng2>".date("m-d", $data[reg_date])."</font></span>";
if(eregi("\.jpg|\.png|\.gif|\.jpeg",$data['file_name1'])&&@file_exists($data['file_name1'])) {
$screenshot = $data['file_name1'];
$image_info = @getimagesize($screenshot);
if($image_info[0]>110) {
$_x = 110;
$_y = 110;
}
else {
$_x = $image_info[0];
$_y = $image_info[1];
}
if($member[level]<=$setup[grant_view]||$is_admin) {
$img_a = "<a href='view.php?id=$id&no=$data[no]' onFocus='this.blur()'>";
$img_a2 = "</a>";
} else {
$img_a = "";
$img_a2 = "";
}
} elseif(eregi("\.jpg|\.png|\.gif|\.jpeg",$data['file_name2'])&&@file_exists($data['file_name2'])) {
$screenshot = $data['file_name2'];
$image_info = @getimagesize($screenshot);
if($image_info[0]>110) {
$_x = 110;
$_y = 110;
}
else {
$_x = $image_info[0];
$_y = $image_info[1];
}
if($member[level]<=$setup[grant_view]||$is_admin) {
$img_a = "<a href='view.php?id=$id&no=$data[no]' onFocus='this.blur()'>";
$img_a2 = "</a>";
} else {
$img_a = "";
$img_a2 = "";
}
} else {
$screenshot=$dir."/t.gif";
$_x = 110;
$_y = 110;
$img_a = $img_a2 = "";
}
?>
<th class=thm8 width=<?echo (100 / $max_show_image);?>% valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=<?=$size_factor*1.01?> style='table-layout:fixed;'>
<tr>
<td align=center style='padding:10;'>
<table border=0 cellspacing=0 cellpadding=0 width=122 style='table-layout:fixed;'>
<tr><td widh=122 height=122 style='padding:5;border:1 #F0F0F0 solid;' bgcolor=#FAFAFA style='FILTER:dropshadow(color=#e6b1b7,offX=1,offY=1,positive=1);'>
<?=$img_a?><img src="<?=$screenshot?>" width=<?=$_x?> height=<?=$_y?> border=0 onMouseOver="this.className='imgover'" onMouseOut="this.className='imgbase'" class="imgbase"></td>
</tr>
<tr><td align=center style='word-break:break-all;padding:5 0 0 0;'><?=$hide_cart_start?><input type=checkbox name=cart value="<?=$data[no]?>"><?=$hide_cart_end?><?=$icon?><?=$subject?> <?=$comment_new?></td>
</table>
</td>
</tr>
</table></th>
<?
$image_loop++;
if($image_loop>=$max_show_image)
{
echo"
</tr>
<tr>
<td colspan=$max_show_image class='line1'></td>
</tr>";
$image_loop=0;
}
?>