require('../../include/common.inc.php'); if(trim($_POST['content'])){ $_POST['content']=strip_tags($_POST['content']); $q=$db->query("insert into spe_liuyan(id,catid,content,date,ip) values('','".$_POST['catid']."','".$_POST['content']."','".date("Y-m-j H:i:s")."','".$_POST['ip']."')"); echo 'ok'; } if($_GET['action']=='num' && is_numeric($catid)){ $num=$db->get_one("select count(*) as num from spe_liuyan where shenhe='1' and catid=$catid"); echo 'document.write("'.$num[num].'");'; } if($_GET['action']=='list' && is_numeric($catid)){ $infos=$db->select("select * from spe_liuyan where catid=$catid and shenhe='1' order by id desc limit 3"); $num=count($infos); for($i=0;$i<$num;$i++){ echo 'document.write("