view_comment_skin.php 에 다음글 추가
※ 로그인 하시면 원본파일을 볼 수 있습니다. ※
<!-- 코멘트 리스트 -->
<div id="commentContents" class="commentContents">
<? if (trim($board[bo_comment_notice])) { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td></td>
<td width="100%">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<!-- 이름, 아이피 -->
<td>
<span class=mw_basic_comment_name><img src="<?=$board_skin_path?>/img/icon_notice.gif"></span>
</td>
<!-- 링크 버튼, 코멘트 작성시간 -->
<td align=right>
<span class=mw_basic_comment_datetime><?=substr($view[wr_datetime],2,14)?></span>
</td>
</tr>
<tr height=5><td></td></tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 class=mw_basic_comment_content>
<tr>
<td colspan=2>
<div><?=get_text($board[bo_comment_notice], 1)?></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<? } ?>
<?
for ($i=0; $i<count($list); $i++) {
$comment_id = $list[$i][wr_id];
$mb_id = $list[$i][mb_id];
$mb_dir = substr($list[$i][mb_id],0,2);
$profile_image = "$g4[path]/memberimg/$mb_dir/$mb_id.gif";
if (file_exists($profile_image)) { // 회원이 아니거나, 파일이 없으면 noimage 출력
}
else{
$profile_image = "$board_skin_path/img/noimage.gif";
}
?>
<a name="c_<?=$comment_id?>"></a>
<table width=100% cellpadding=0 cellspacing=0 border=0 id=view_<?=$wr_id?> >
<tr>
<td><? for ($k=0; $k<strlen($list[$i][wr_comment_reply]); $k++) echo " "; ?></td>
<td width='100%'>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td height=1 colspan=3 bgcolor="#dddddd"><td>
</tr>
<tr>
<td height=1 colspan=3></td>
</tr>
<tr>
<td width=70 valign=top style="padding-top:6px;">
<img src="<?=$profile_image?>" width=58 height=58 style="border:3px solid #f2f2f2">
</td>
<td valign=top>
<div style="height:28px; background:url(<?=$board_skin_path?>/img/co_title_bg.gif); clear:both; line-height:28px;">
<div style="float:left; margin:2px 0 0 2px;">
<strong><?=$list[$i][name]?></strong>
<span style="color:#888888; font-size:11px;"><?=$list[$i][datetime]?></span>
</div>
<div style="float:right; margin-top:5px;">
<? if ($is_ip_view) { echo " <span style="color:#B2B2B2; font-size:11px;\">{$list[$i][ip]}</span>"; } ?>
<? if ($list[$i][is_reply] && $check_comment_allow) { echo "<a href=\"javascript:comment_box('{$comment_id}','c');\"><img src='$board_skin_path/img/co_btn_reply.gif' border=0 align=absmiddle alt='답변'></a> "; } ?>
<? if ($list[$i][is_edit]) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'cu');\"><img src='$board_skin_path/img/co_btn_modify.gif' border=0 align=absmiddle alt='수정'></a> "; } ?>
<? if ($list[$i][is_del]) { echo "<a href=\"javascript:comment_delete('{$list[$i][del_link]}');\"><img src='$board_skin_path/img/co_btn_delete.gif' border=0 align=absmiddle alt='삭제'></a> "; } ?>
<? if ($list[$i][singo_href]) { ?> <a href="javascript:;" onclick="win_singo('<?=$list[$i][singo_href]?>');"><img src='<?=$board_skin_path?>/img/icon_singo.gif'></a><?}?>
<? if ($list[$i][secret_href]) { ?> <a href="<?=$list[$i][secret_href]?>"><img src='<?=$board_skin_path?>/img/icon_comment_secret.gif' border='0' align='absmiddle'></a><?}?>
<? if ($list[$i][nosecret_href]) { ?> <a href="<?=$list[$i][nosecret_href]?>"><img src='<?=$board_skin_path?>/img/icon_comment_nosecret.gif' border='0' align='absmiddle'></a><?}?>
</div>
</div>
<!-- 코멘트 출력 -->
<div style='line-height:20px; padding:7px; word-break:break-all; overflow:hidden; clear:both; '>
<?
//if (strstr($list[$i][wr_option], "secret") and ($list[$i][mb_id] == $member[mb_id] or $is_admin or $member[mb_id] == $write[mb_id])) echo "<span style='color:#ff6600;FONT-WEIGHT:bold'>*비밀글입니다</span><BR> ";
if (strstr($list[$i][wr_option], "secret")) echo "<span style='color:#ff6600;FONT-WEIGHT:bold'>*비밀글입니다</span><BR> ";
if (strstr($list[$i][wr_option], "html"))
$str = $list[$i][content];
else if ($is_dhtml_editor) {
$str = nl2br($list[$i][content]);
} else {
$str = $list[$i][content];
}
if (strstr($list[$i][wr_option], "secret"))
$str = "<span class='small'>$str</span>";
if (strstr($list[$i][wr_option], "html")) {
$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
} else {
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
// FLASH XSS 공격에 의해 주석 처리 - 110406
//$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
//$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
// resize code는 view_comment.php로 이동
//$str = preg_replace("/(\<img )([^\>]*)(\>)/i", "\\1 name='target_resize_image[]' onclick='image_window(this)' style='cursor:pointer;' \\2 \\3", $str);
}
//if (strstr($list[$i][wr_option], "secret")) $str = "<span class='secret'>$str</span>";
//echo resize_content($str, $board[bo_image_width] - 50 * strlen($list[$i][wr_comment_reply]));
echo resize_content($str, $board[bo_image_width] - 150);
?>
</div>
<? if ($list[$i][trackback]) { echo "<p>".$list[$i][trackback]."</p>"; } ?>
<span id='edit_<?=$comment_id?>' style='display:none;'></span><!-- 수정 -->
<span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 -->
</div>
<input type=hidden id='secret_comment_<?=$comment_id?>' value="<?=strstr($list[$i][wr_option],"secret")?>">
<textarea id='save_comment_<?=$comment_id?>' style='display:none;'><? if (strstr($list[$i][wr_option], "html")) {if ($is_dhtml_editor) echo get_text($list[$i][content1],0); else echo $list[$i][wr_content0]; } else if ($is_dhtml_editor) echo get_text(nl2br($list[$i][content1]),0); else echo get_text($list[$i][content1], 0)?></textarea></td>
</td>
</tr>
<tr>
<td height=5 colspan=3></td>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
</div>
※ 로그인 하시면 원본파일을 볼 수 있습니다. ※
관리자 2011-06-21 23:54:26
0
답글달기