2
0

pr_post.php 836 B

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