Ejemplo n.º 1
0
    $a = mysql_fetch_array($r);
    $q = "INSERT INTO {$pro_mysql_vps_server_lists_table} (id,hostname,list_name) VALUES ('','" . $a["hostname"] . "','" . $_REQUEST["name"] . "');";
    $r = mysql_query($q) or die("Cannot execute query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
    resubscribe_VPS_server_list_users($_REQUEST["name"]);
}
/////////////////////////
// Renewal managements //
/////////////////////////
// Delete a pending
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "delete_renewal") {
    $q = "DELETE FROM {$pro_mysql_pending_renewal_table} WHERE id='" . $_REQUEST["id"] . "';";
    $r = mysql_query($q) or die("Cannot execute query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
}
// Validate a renew
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "validate_renewal") {
    validateRenewal($_REQUEST["id"]);
}
// action=add_vps_to_user&vps_server_ip=66.251.193.60&vps_mem=1&vps_hdd=1&vps_duration=0000-01-00
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "add_vps_to_user") {
    $q = "SELECT * FROM {$pro_mysql_vps_ip_table} WHERE ip_addr='" . $_REQUEST["vps_server_ip"] . "' AND available='yes';";
    $r = mysql_query($q) or die("Cannot execute query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
    $n = mysql_num_rows($r);
    if ($n != 1) {
        die("Didn't find the IP address you want to add line " . __LINE__ . " file " . __FILE__);
    }
    $a = mysql_fetch_array($r);
    $q = "UPDATE {$pro_mysql_vps_ip_table} SET available='no' WHERE vps_xen_name='" . $a["vps_xen_name"] . "' AND vps_server_hostname='" . $a["vps_server_hostname"] . "';";
    $r = mysql_query($q) or die("Cannot execute query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
    $q = "SELECT * FROM {$pro_mysql_product_table} WHERE id='" . $_REQUEST["product_id"] . "';";
    $r = mysql_query($q) or die("Cannot execute query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
    $n = mysql_num_rows($r);
Ejemplo n.º 2
0
                     //"Cannot reselect user: registration failed!";
                 } else {
                     $a2 = mysql_fetch_array($r2);
                     validateWaitingUser($a2["id"]);
                     $form .= "Your account has just been created. Please login <a href=\"/dtc\">here</a> to\n\t\t\t\t\tstart using your account.<br><br>\n\t\t\t\t\tIf you have registered your domain name yourself, then you should set the\n\t\t\t\t\twhois to point to the following name servers:<br>\n\t\t\t\t\tns1: {$conf_addr_primary_dns}<br>\n\t\t\t\t\tns2: {$conf_addr_secondary_dns}";
                 }
                 // If it's not a new account, then it's a renewal and there must be a record of it
             } else {
                 $q2 = "SELECT * FROM {$pro_mysql_pending_renewal_table} WHERE pay_id='{$extapi_pay_id}';";
                 $r2 = mysql_query($q2) or die("Cannot query \"{$q2}\" ! line: " . __LINE__ . " file: " . __FILE__ . " sql said: " . mysql_error());
                 $n2 = mysql_num_rows($r2);
                 if ($n2 != 1) {
                     $form .= "Could not find your renewal order in the database!";
                 } else {
                     $a2 = mysql_fetch_array($r2);
                     $ret = validateRenewal($a2["id"]);
                     if ($ret != true) {
                         $form .= $submit_err;
                     } else {
                         $form .= "Your renewal order has been processed!";
                     }
                 }
             }
         }
     }
     break;
     // A cancel occured (currently only from eNETS)
 // A cancel occured (currently only from eNETS)
 case "enets-cancel":
     $form .= "<h3><font color=\"red\">" . _("PAYMENT CANCELLED") . "<!-- PAYMENT CANCELED --></font></h3>" . _("You have canceled the payment, your account wont be validated. To start again the registration procedure, follow the link here:") . "<br>\n<a href=\"new_account.php\">" . _("Register a new account") . "</a>";
     break;