<?php if ($webdb['run_time'] == 1) { $speed_endtime = explode(' ', microtime()); $speed_totaltime .= "TIME " . number_format(($speed_endtime[0] + $speed_endtime[1] - $speed_headtime) / 1, 6) . " second(s)"; } if ($webdb[AvoidGather]) { echo "<SCRIPT LANGUAGE='JavaScript'>avoidgather('{$webdb['AvoidGatherPre']}');</SCRIPT>"; } require html("foot", $foot_tpl); $content = ob_get_contents(); $content = str_replace("<!---->", "", $content); $content = preg_replace("/<!--include(.*?)include-->/is", "\\1", $content); ob_end_clean(); ob_start(); /*方便后面再次调用*/ $content = kill_badword($content); if ($webdb[cookieDomain] && strstr($content, 'ewebeditor/ewebeditor.php?')) { $content = preg_replace("/document.domain([^<]+)/is", "", $content); } if ($webdb[www_url] == '/.') { $content = str_replace('/./', '/', $content); } if ($webdb[RewriteUrl] == 1) { //全站伪静态 rewrite_url($content); } echo $content;
$min = ($page - 1) * $rows; /*评论字数再多也只限制显示1000个字*/ $leng = 10000; $query = $db->query("SELECT A.*,B.icon FROM `{$_pre}comments` A LEFT JOIN {$pre}memberdata B ON A.uid=B.uid WHERE A.id={$id} {$SQL} ORDER BY A.cid DESC LIMIT {$min},{$rows}"); while ($rs = $db->fetch_array($query)) { if (!$rs[username]) { $detail = explode(".", $rs[ip]); $rs[username] = "{$detail['0']}.{$detail['1']}.{$detail['2']}.*"; } if ($rs[icon]) { $rs[icon] = tempdir($rs[icon]); } $rs[posttime] = date("Y-m-d H:i:s", $rs[posttime]); $rs[full_content] = $rs[content]; $rs[content] = kill_badword($rs[content]); $rs[username] = kill_badword($rs[username]); $rs[title] = preg_replace("/\\[quote\\](.*)\\[\\/quote\\]/", "", $rs[content]); $rs[title] = get_word($rs[title], 50); $rs[content] = get_word($rs[content], $leng); $rs[content] = preg_replace("/\\[quote\\](.*)\\[\\/quote\\]/", "<div class='quotecomment_div'>\\1</div>", $rs[content]); $rs[content] = str_replace("\n", "<br>", $rs[content]); if ($lfjuid) { if ($lfjuid === $rs[cuid] || $web_admin || $lfjuid === $rs[uid] || in_array($lfjid, explode(",", $rsdb[admin]))) { $rs[ifadmin] = 1; } else { $rs[ifadmin] = 0; } } else { $rs[ifadmin] = 0; } $listdb[] = $rs;