assign("urlroot", "../"); if($_POST[action]){ $name = $_POST['urlname']; $url = $_POST['url']; $pid = implode(",", $_POST['pid']); $info = $_POST['info']; if ( empty( $name ) || empty( $pid ) || empty( $info ) ) { msg( "网站名称,所属分类,网站介绍介绍不能为空!" ); exit( ); } $sql3 = "select * from ".$fordb."pd where url='".$url."'"; $rs3 = $db->execute( $sql3 ); while ( !$rs3->EOF ) { $jiaoji=array_uintersect($_POST['pid'],explode(",",$rs3->fields['pid']),"strcasecmp"); if(count($jiaoji)>0){ $msgcon=""; foreach($jiaoji as $key=>$val){ $msgcon.=$classpt[$val].";"; } msg( "".$msgcon."下面已经有该域名" ); exit(); } $rs3->movenext(); } $sql ="insert into ".$fordb."pd set name='$name',url='$url',pid='$pid',info='$info',pbls=-1"; $db->execute( $sql ); $db->close( ); $submitcg="提交成功,感谢您的提交,我们审核以后会发布!"; $tpl->assign("submitcg", $submitcg); } $tpl->assign("temp", "default"); $classes=""; foreach($classpt as $key=>$val){ $classes.="$val"; } $tpl->assign("classes", $classes); $rlblist=lblist(200,1000); $tpl->assign("rlblist", $rlblist); $llblist=lblist(0,200); $tpl->assign("llblist", $llblist); $tpl->display("submit.html"); ?>