?? index.php
字號:
<?php
include("../../class/connect.php");
$id=(int)$_GET['id'];
$classid=(int)$_GET['classid'];
if(empty($id)||empty($classid))
{
exit();
}
$num=(int)$_GET['num'];
if(empty($num))
{
$num=10;
}
$pldate="m-d H:i";//時間格式化
$tbcolor=empty($_GET['tbcolor'])?'CCCCCC':$_GET['tbcolor'];
$tdcolor=empty($_GET['tdcolor'])?'FFFFFF':$_GET['tdcolor'];
$tbwidth=empty($_GET['tbwidth'])?'100%':$_GET['tbwidth'];
$tdheight=empty($_GET['tdheight'])?'20':$_GET['tdheight'];
//截取數
$sub=(int)$_GET['sub'];
if($sub>500)
{
$sub=0;
}
include("../../class/config.php");
include("../../class/db_sql.php");
include("../../class/q_functions.php");
//去掉原引用
function RepYPlQuote($text){
$preg_str="/<table (.+?)<\/table>/is";
$text=preg_replace($preg_str,"",$text);
return $text;
}
$link=db_connect();
$empire=new mysqlquery();
$sql=$empire->query("select username,saytime,saytext from {$dbtbpre}enewspl where id='$id' and classid='$classid' and checked=0 order by plid desc limit ".$num);
$t="<table width='$tbwidth' border=0 cellpadding=2 cellspacing=1 bgcolor='$tbcolor' align='center' style='WORD-BREAK: break-all; WORD-WRAP: break-word'>";
while($r=$empire->fetch($sql))
{
if(empty($r[username]))
{
$r[username]="匿名";
}
$saytime=format_datetime($r['saytime'],$pldate);
$saytext=str_replace("\r\n","",$r[saytext]);
if($sub)
{
$saytext=RepYPlQuote($saytext);//去掉引用
$saytext=sub($saytext,0,$sub,false);
}
$saytext=RepPltextFace($saytext);//替換表情
$t.="<tr bgcolor='$tdcolor'><td height='$tdheight' width='20%' align=center>$r[username]</td><td width='62%' style='cursor:crosshair'><div>".$saytext."</div></td><td width='18%' align=center>$saytime</td></tr>";
}
$t.="</table>";
$t=addslashes(stripSlashes($t));
db_close();
$empire=null;
echo"document.write(\"".$t."\");";
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -