document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  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. ?>
');