pr_post.php 878 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. include("../log/pref_log.php");
  3. require_once "../usent/function.php";
  4. require_once "../channal/function.php";
  5. require_once "../ucenter/function.php";
  6. require_once "../redis/function.php";
  7. //回传数据
  8. $respond = array("status" => 0, "message" => "");
  9. $respond['id'] = $_POST["id"];
  10. $respond['book'] = $_POST["book"];
  11. $respond['para'] = $_POST["para"];
  12. $respond['begin'] = $_POST["begin"];
  13. $respond['end'] = $_POST["end"];
  14. $respond['channal'] = $_POST["channel"];
  15. $respond['text'] = $_POST["text"];
  16. $respond['editor'] = $_COOKIE["userid"];
  17. $respond['commit_type'] = 1;
  18. $redis = redis_connect();
  19. $channel_info = new Channal();
  20. $user_info = new UserInfo();
  21. $pr = new SentPr($redis);
  22. $result = $pr->setPrData($_POST["id"],$_POST["text"]);
  23. if(!$result){
  24. $respond['status']=1;
  25. $respond['message']="error";
  26. }
  27. echo json_encode($respond, JSON_UNESCAPED_UNICODE);
  28. PrefLog();