autostripslashes = true; $db->use_persistent = true; $db->connectdb($dblogin, $dblogin["database"]); $azureProductId = $_REQUEST["AzureProductId"]; error_log("BAAAAAAAAAAAAAAAAAAAAAAA"); $db->OpenEx("SELECT cpp.cpID FROM client_product_preorder cpp JOIN client_product cp ON cp.ID = cpp.cpID WHERE cpp.preorder_cpID=$azureProductId"); if ($db->num_rows() <= 0) { Header('HTTP/1.1 400 Bad Request'); Header('Content-Type: text/plain'); print ('AzureProductId is invalid. The DJSeat product does not exist.'); exit; } else { $client = $db->row(); $cli = new TLegacyDjSeat($db, getcwd()); $product = $cli->Extend_DJSeat($client["cpID"], false); if ($product) { Header('HTTP/1.1 200 OK'); Header('Content-Type: text/plain'); print ($product['regkey'] . "|" . $product['date_expire']); exit; } else { Header('HTTP/1.1 500 Internal Server Error'); Header('Content-Type: text/plain'); print ('There was an error creating the product. Please try again later.'); exit; } }