if($_list_check_included) return;
$_list_check_included = true;
/*********************************************************************************************
* ³Ñ°ÜÁö´Â µ¥ÀÌŸ¿¡ ´ëÇÑ ÀÏ°ý Á¤¸®
********************************************************************************************/
# modified by terzeron
#function list_check(&$data,$view_check=0) {
function list_check(&$data, $view_check, $connect) {
global $keyword, $sn, $ss, $sc, $setup, $member, $href, $id, $dir, $category_data, $is_admin, $_zbResizeCheck,
$name,$email,$subject, $sort, $prev_no, $no,$homepage, $memo, $hit, $vote, $ip, $comment_num, $sitelink1, $sitelink2,
$file_name1, $file_name2, $file_download1, $file_download2, $file_size1, $file_size2,
$upload_image1, $upload_image2, $category_name, $date, $reg_date, $insert, $icon, $face_image,$number,$loop_number,
$a_file_link1, $a_file_link2, $a_reply, $a_delete, $a_modify, $zbLayer, $_zbCheckNum,
$_listCheckTime;
$_listCheckTimeStart = getmicrotime();
if($view_check) $setup[only_board]=0;
// Á¦¸ñ¿¡ 5ÁÙ·Î Åø¹Ù ¸¸µë
if($setup[use_status]) {
# modified by terzeron
#$tmpData = explode("\n",stripslashes($data[memo]));
$t_board = "zetyx_board";
$article_num = $data[no];
$comment_query = "select * from " . $t_board . "_comment_" . $id .
" where parent = " . $article_num . " order by no";
$comment_result = mysql_query($comment_query, $connect)
or error(mysql_error());
while ($comment_data = mysql_fetch_array($comment_result)) {
$comment_string = $comment_string . "
" . $comment_data[name] .
":" . $comment_data[memo];
}
$tmpData2 = preg_replace("/\n|\r|\t/", "", $data[memo]);
$tmpData3 = preg_replace("/\n|\r|\t/", "", $comment_string);
$tmpData3 = preg_replace("/\
/", "\n", $tmpData3);
#$tmpData = $tmpData2 . "\n" . $tmpData3;
$tmpData = $tmpData3;
$tmpData = explode("\n", stripslashes($tmpData));
$totalCommentLineNum = count($tmpData);
# modified by terzeron
#if($totalCommentLineNum>10) {
# $showCommentStr_tail.="\n".($totalCommentLineNum - 10)." lines more... (total : $totalCommentLineNum lines)";
# $tmpData_Count = 10;
#} else {
$tmpData_Count = $totalCommentLineNum;
#}
$showCommentStr = "";
for($i=0;$i<$tmpData_Count;$i++) {
$tmpStr = trim($tmpData[$i]);
if($tmpStr) $showCommentStr .= $tmpStr."\n";
}
$showCommentStr = str_replace("'","",$showCommentStr);
$showCommentStr = str_replace("\"","",$showCommentStr);
$showCommentStr .= $showCommentStr_tail;
}
$_zbCount = check_zbLayer($data);
// HTML »ç¿ëÀÏ °æ¿ì ÇöÀç ȸ¿øÀÇ html ±ÇÇÑÀÌ ¾ø°Å³ª °ü¸®ÀÚ°¡ ¾Æ´Ï¶ó¸é style ¼Ó¼ºÀ» Á¦°Å
if($data[use_html]&&$data[islevel]>$setup[grant_html]) {
$style_pattern = "/(\<.*?)style=(.*?)(\>?)/i";
$data[memo]=preg_replace($style_pattern,"\\1\\3",$data[memo]);
}
// °Ë»ö¾î¿¡ ÇØ´çÇÏ´Â ±ÛÀÚ¸¦ »¡°£;; »öÀ¸·Î ¹Ù²Ù¾îÁÜ;;
if($keyword) {
$keyword_pattern = "/$keyword/i";
if($sn=="on") $data[name] = preg_replace($keyword_pattern, "$keyword", $data[name]);
if($ss=="on") $data[subject] = preg_replace($keyword_pattern, "$keyword", $data[subject]);
if($ss=="on"&&$setup[cut_length]>0) $setup[cut_length]=$setup[cut_length]+52;
}
// ' µîÀÇ Æ¯¼ö¹®ÀÚ¶§¹®¿¡ ºÙÀÎ \(¿ª½½·¡½¬)¸¦ ¶¼¾î³½´Ù
$name=$data[name]=stripslashes($data[name]); // À̸§
$temp_name = get_private_icon($data[ismember], "2");
if($temp_name) $name="";
$subject=$data[subject]=stripslashes($data[subject]); // Á¦¸ñ
//$subject=$data[subject];
$subject=cut_str($subject,$setup[cut_length]); // Á¦¸ñ ÀÚ¸£´Â ºÎºÐ
$hit=$data[hit]; // Á¶È¸¼ö
$vote=$data[vote]; // ÅõÇ¥¼ö
$comment_num="[".$data[total_comment]."]"; // °£´ÜÇÑ ´ä±Û ¼ö
if($data[total_comment]==0) $comment_num="";
if($setup[use_alllist]) $view_file="zboard.php"; else $view_file="view.php";
// Á¦¸ñ¿¡ ¸µÅ© °Å´Â ºÎºÐ;
if($member[level]<=$setup[grant_view]||$is_admin) {
//if($setup[use_status]&&!$data[is_secret]) $addShowComment = " onMouseOver=\"showComment('$showCommentStr',true)\" onMouseOut=\"showComment('',false)\" ";
if($setup[use_status]&&!$data[is_secret]) $addShowComment = " title=\"$showCommentStr\" ";
$subject="".$subject."";
}
if(!$setup[only_board]) {
$homepage=$data[homepage]=stripslashes($data[homepage]);
if($homepage) $homepage="$homepage";
// À̹ÌÁö ¹Ú½º »ç¿ëÀ» À§Çؼ Á¤±ÔÇ¥Çö½Ä »ç¿ë
if($data[ismember]) {
$imageBoxPattern = "/\[img\:(.+?)\.(jpg|gif)\,align\=([a-z]){0,}\,width\=([0-9]+)\,height\=([0-9]+)\,vspace\=([0-9]+)\,hspace\=([0-9]+)\,border\=([0-9]+)\]/i";
$data[memo]=preg_replace($imageBoxPattern,"", stripslashes($data[memo]));
} else {
$data[memo]=stripslashes($data[memo]);
}
if($data[use_html]<2) $memo=$data[memo]=nl2br($data[memo]);
$memo=$data[memo];
// ÀÚµ¿¸µÅ© °Å´Â ºÎºÐ;;
if($setup[use_autolink]) $memo=autolink($memo);
$memo .= "";
// °Ë»ö¾î°¡ ÀÖÀ»°æ¿ì ³»¿ëÀÇ Å°¿öµå¸¦ º¯°æ
if($sc=="on" && $keyword) {
$keyword_pattern = "/([^<]*)$keyword([^>]*)/i";
$memo = preg_replace($keyword_pattern, "\\1$keyword\\2", $memo);
$keyword_pattern2 = "/$keyword<\/font>(.*)>/i";
$memo = preg_replace($keyword_pattern2, "", $memo);
}
// À̹ÌÁö ¸®»çÀÌÁ À§Çؼ ó¸®ÇÏ´Â ºÎºÐ
$memo = preg_replace("/(\?)/i","\\1 name=zb_target_resize style=\"cursor:hand\" onclick=window.open(this.src) \\2 \\3", $memo);
$memo = "
".$memo." |