newspj.php 1.1 KB

12345678910111213141516171819202122
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. zwzr();
  5. $bh=sqlzhuru($_POST[bh]);
  6. $pjt=sqlzhuru($_POST[pjt]);
  7. while0("id,bh,userid","yjcode_news where bh='".$bh."'");if(!$row=mysql_fetch_array($res)){Audit_alert("信息不存在!","./");}
  8. $_SESSION["tzURL"]=weburl."news/"."txtlist_i".$row[id]."v.html#pj";
  9. if(empty($_SESSION["SHOPUSER"])){Audit_alert("请先登录!","../reg/");}
  10. if(empty($pjt)){Audit_alert("评价内容不得为空!","txtlist_i".$row[id]."v.html");}
  11. $userid=returnuserid($_SESSION["SHOPUSER"]);
  12. $fbuserid=returnjgdw($row[userid],"",0);
  13. while1("*","yjcode_newspj where newsbh='".$bh."' and userid=".$userid." order by sj desc");if($row1=mysql_fetch_array($res1)){
  14. $sj1=date("Y-m-d H:i:s",strtotime("-60 second"));
  15. if($row1[sj]>$sj1){Audit_alert("评价太过频繁,先休息一下!","txtlist_i".$row[id]."v.html");}
  16. }
  17. $sj=date("Y-m-d H:i:s");
  18. $uip=$_SERVER["REMOTE_ADDR"];
  19. intotable("yjcode_newspj","newsbh,fbuserid,userid,sj,uip,txt,hf,zt","'".$bh."',".$fbuserid.",".$userid.",'".$sj."','".$uip."','".$pjt."','',1");
  20. php_toheader("pjlist_i".$row[id]."v.html#pj");
  21. ?>