session_start();
include("common.inc");
$db=new DB_sql;
$db->connect();
?>
if($submit){
if($neirong)$error="评论内容不能为空";
if ($HTTP_POST_VARS['authnum'] == $HTTP_POST_VARS['authinput'])
{
if ($action=="add")
{
$wjid = zttcl10;
$currenttime = date('Y-m-d H:i:s', time());
$strQuery="insert into cheaapl
(xdwjid,name,time,neirong)
values
('$wjid','$name','$currenttime','$neirong')";
$db->query($strQuery);
for ($i=0;$i<3;$i++) {echo " ";}
echo ("");
}
}
}
?>
$strQuery="select pl_id,neirong,name,time from cheaapl where sfxs='Y' and xdwjid='zttcl10'";
$db->query($strQuery);
while ($db->next_record()){
list($this_id,$this_neirong,$this_name,$this_time)=$db->Record;
if (strlen($this_neirong,$this_name,$this_time)>500){$this_neirong=substr($this_neirong,1,499);}
echo "  $this_name  在 $this_time  说:    $this_neirong";
}
?>
|
|
|