示例#1
0
	        $stmt->bind_param("s", $order_id);
	        $stmt->execute(); 
		 }
	  
	     $stmt->close();
	  }
	  
   }
   
   $_ajax = new AJAX_CLASS();
   
   $ajx_code   = filter_var($_POST['voucher'], FILTER_SANITIZE_STRING);
   $ajx_status = '1';
   
   
   $count = $_ajax->count_voucher($ajx_code, '1');
   
   
   /* --- LOGIC --- */
   if($count->rows > 0){
      $data  = $_ajax->get_voucher($ajx_code);
	  
	  /*
	  * TYPE: $data->voucher_usability
	  * 1 => One Time
	  * 2 => Unlimited
	  *
	  *
	  * USABILITY: $data->voucher_validity
	  * 1 => Discount Purchase
	  * 2 => Free Shipping