Guest User

Untitled

a guest
Jun 1st, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2.     public function status() {
  3.         $t = new template;
  4.         $n = new network;
  5.  
  6.         $ret = ["success"=>true];
  7.         $n->enableCOR();
  8.  
  9.         foreach (["status","order_id"] as $k) $$k = (isset(JSONDATA_CLEAN[$k])) ? JSONDATA_CLEAN[$k]:"";
  10.  
  11.         $sql = "UPDATE wp_posts SET post_status = :order_status WHERE ID = :order_id";
  12.         $res = $this->conn->query($sql,[
  13.             "order_status"  => $status,
  14.             "order_id"      => $order_id
  15.         ]);
  16.  
  17.         $t->setView("json",$ret)->output();
  18.     }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment