fetch1("select bid,checked,groupid from {$dbtbpre}enewsgbookclass where bid='$bid';"); if(empty($br[bid])) { printerror("EmptyGbook","history.go(-1)",1); } //权限 $user=array(); if($br['groupid']) { $user=islogin(); if($level_r[$br[groupid]][level]>$level_r[$user[groupid]][level]) { printerror("HaveNotEnLevel","history.go(-1)",1); } } //实名验证 eCheckHaveTruename('gb',$user['userid'],$user['username'],$user['isern'],$user['checked'],0); $lytime=date("Y-m-d H:i:s"); $ip=egetip(); $eipport=egetipport(); $userid=(int)getcvar('mluserid'); $username=RepPostVar(getcvar('mlusername')); $sql=$empire->query("insert into {$dbtbpre}enewsgbook(name,email,`mycall`,lytime,lytext,retext,bid,ip,checked,userid,username,eipport) values('$name','$email','$mycall','$lytime','$lytext','','$bid','$ip','$br[checked]','$userid','$username','$eipport');"); ecmsEmptyShowKey($keyvname);//清空验证码 if($sql) { esetcookie("lastgbooktime",time(),time()+3600*24);//设置最后发表时间 $reurl=DoingReturnUrl("../tool/gbook/?bid=$bid",$add['ecmsfrom']); printerror("AddGbookSuccess",$reurl,1); } else {printerror("DbError","history.go(-1)",1);} } ?>