|
@@ -6,65 +6,65 @@ if (!isset($_POST['submit'])) {
|
|
|
exit();
|
|
|
}
|
|
|
|
|
|
-if ($ClientInfo['hosting_client_country'] == 'NULL') {
|
|
|
+if (empty($ClientInfo['client_country'])) {
|
|
|
$Country = 'CN';
|
|
|
} else {
|
|
|
- $Country = ucwords($ClientInfo['hosting_client_country']);
|
|
|
+ $Country = ucwords($ClientInfo['client_country']);
|
|
|
}
|
|
|
|
|
|
-if ($ClientInfo['hosting_client_company'] == 'NULL') {
|
|
|
+if (empty($ClientInfo['client_company'])) {
|
|
|
$Company = 'UIISC';
|
|
|
} else {
|
|
|
- $Company = $ClientInfo['hosting_client_company'];
|
|
|
+ $Company = $ClientInfo['client_company'];
|
|
|
}
|
|
|
|
|
|
-if ($ClientInfo['hosting_client_phone'] == 'NULL') {
|
|
|
- $Phone = '02151351888';
|
|
|
+if (empty($ClientInfo['client_phone'])) {
|
|
|
+ $Phone = '021-51351888';
|
|
|
} else {
|
|
|
- $Phone = $ClientInfo['hosting_client_phone'];
|
|
|
+ $Phone = $ClientInfo['client_phone'];
|
|
|
}
|
|
|
|
|
|
-if ($ClientInfo['hosting_client_city'] == 'NULL') {
|
|
|
+if (empty($ClientInfo['client_city'])) {
|
|
|
$City = 'Lahore';
|
|
|
} else {
|
|
|
- $City = $ClientInfo['hosting_client_city'];
|
|
|
+ $City = $ClientInfo['client_city'];
|
|
|
}
|
|
|
|
|
|
-if ($ClientInfo['hosting_client_pcode'] == 'NULL') {
|
|
|
+if (empty($ClientInfo['client_pcode'])) {
|
|
|
$Postal = '200000';
|
|
|
} else {
|
|
|
- $Postal = $ClientInfo['hosting_client_pcode'];
|
|
|
+ $Postal = $ClientInfo['client_pcode'];
|
|
|
}
|
|
|
|
|
|
$FormData = array(
|
|
|
- 'product_id' => 65, // the GoGetSSL® 90-day Trial SSL ID: 65
|
|
|
- 'csr' => $_POST['csr'],
|
|
|
- 'server_count' => "-1",
|
|
|
- 'period' => 3,
|
|
|
- 'approver_email' => 'uiisc@qq.com',
|
|
|
- 'webserver_type' => "1",
|
|
|
- 'admin_firstname' => $ClientInfo['hosting_client_fname'],
|
|
|
- 'admin_lastname' => $ClientInfo['hosting_client_lname'],
|
|
|
- 'admin_phone' => $Phone,
|
|
|
- 'admin_title' => "Mr",
|
|
|
- 'admin_email' => $ClientInfo['hosting_client_email'],
|
|
|
- 'tech_firstname' => $ClientInfo['hosting_client_fname'],
|
|
|
- 'tech_lastname' => $ClientInfo['hosting_client_lname'],
|
|
|
- 'tech_phone' => $Phone,
|
|
|
- 'tech_title' => "Mr",
|
|
|
- 'tech_email' => $ClientInfo['hosting_client_email'],
|
|
|
- 'org_name' => $Company,
|
|
|
- 'org_division' => "Hosting",
|
|
|
- 'org_addressline1' => $ClientInfo['hosting_client_address'],
|
|
|
- 'org_city' => $City,
|
|
|
- 'org_country' => $Country,
|
|
|
- 'org_phone' => $Phone,
|
|
|
- 'org_postalcode' => $Postal,
|
|
|
- 'org_region' => "None",
|
|
|
- 'dcv_method' => "dns",
|
|
|
+ 'product_id' => 65, // the GoGetSSL® 90-day Trial SSL ID: 65
|
|
|
+ 'csr' => $_POST['csr'],
|
|
|
+ 'server_count' => '-1',
|
|
|
+ 'period' => 3,
|
|
|
+ 'approver_email' => 'uiisc@qq.com',
|
|
|
+ 'webserver_type' => '1',
|
|
|
+ 'admin_firstname' => $ClientInfo['client_fname'],
|
|
|
+ 'admin_lastname' => $ClientInfo['client_lname'],
|
|
|
+ 'admin_phone' => $Phone,
|
|
|
+ 'admin_title' => 'Mr',
|
|
|
+ 'admin_email' => $ClientInfo['client_email'],
|
|
|
+ 'tech_firstname' => $ClientInfo['client_fname'],
|
|
|
+ 'tech_lastname' => $ClientInfo['client_lname'],
|
|
|
+ 'tech_phone' => $Phone,
|
|
|
+ 'tech_title' => 'Mr',
|
|
|
+ 'tech_email' => $ClientInfo['client_email'],
|
|
|
+ 'org_name' => $Company,
|
|
|
+ 'org_division' => 'Hosting',
|
|
|
+ 'org_addressline1' => $ClientInfo['client_address'],
|
|
|
+ 'org_city' => $City,
|
|
|
+ 'org_country' => $Country,
|
|
|
+ 'org_phone' => $Phone,
|
|
|
+ 'org_postalcode' => $Postal,
|
|
|
+ 'org_region' => 'None',
|
|
|
+ 'dcv_method' => 'dns',
|
|
|
);
|
|
|
|
|
|
-echo "<pre>";
|
|
|
+echo '<pre>';
|
|
|
print_r($FormData);
|
|
|
|
|
|
$SSLApi = $DB->find('ssl_api', '*', array('api_key' => 'FREESSL'), null, 1);
|
|
@@ -78,7 +78,7 @@ $result = $apiClient->addSSLOrder($FormData);
|
|
|
if (count($result) > 4) {
|
|
|
$data = array(
|
|
|
'ssl_key' => $result['order_id'],
|
|
|
- 'ssl_for' => $ClientInfo['hosting_client_id'],
|
|
|
+ 'ssl_for' => $ClientInfo['client_id'],
|
|
|
);
|
|
|
$res = $DB->insert('ssl', $data);
|
|
|
|
|
@@ -87,7 +87,7 @@ if (count($result) > 4) {
|
|
|
|
|
|
$EmailContent = '<p>You have successfully created a new ssl and you need to verify your domain using dns record in order to issue an ssl certificate.</p>';
|
|
|
$EmailDescription = '<a href="' . $ssl_url . '" target="_blank">View SSL</a>';
|
|
|
- $email_body = email_build_body('New SSL', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
|
|
|
+ $email_body = email_build_body('New SSL', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
|
|
|
|
|
|
send_mail(array(
|
|
|
'to' => $FormData['email'],
|