Browse Source

Squashed commit of the following:

commit 63cc6c5fcbd449875cba4ab497683ed4382983e5
Author: Jackson Dou <jksdou@qq.com>
Date:   Sun Dec 11 23:16:17 2022 +0800

    update

commit 78197bce95a197d5b9c4e018c5ab60ec2a988c0b
Author: Jackson Dou <jksdou@qq.com>
Date:   Sun Dec 11 22:43:10 2022 +0800

    update: 调整数据表结构
Jackson Dou 2 years ago
parent
commit
242662fd83
56 changed files with 268 additions and 268 deletions
  1. 3 3
      src/admin/controllers/accounts/deactivate.php
  2. 1 1
      src/admin/controllers/accounts/edit.php
  3. 3 3
      src/admin/controllers/accounts/reactivate.php
  4. 1 1
      src/admin/controllers/clients/activate.php
  5. 3 3
      src/admin/controllers/clients/login.php
  6. 1 1
      src/admin/controllers/clients/suspend.php
  7. 5 5
      src/admin/controllers/clients/view.php
  8. 7 7
      src/admin/controllers/tickets/close.php
  9. 4 4
      src/admin/views/accounts/edit.php
  10. 12 8
      src/admin/views/clients/list.php
  11. 12 12
      src/admin/views/clients/view.php
  12. 2 2
      src/admin/views/common/header.php
  13. 3 3
      src/callback/myownfreehost/activate.php
  14. 3 3
      src/callback/myownfreehost/suspend.php
  15. 4 4
      src/clientarea/controllers/accounts/add.php
  16. 3 3
      src/clientarea/controllers/accounts/deactivate.php
  17. 1 1
      src/clientarea/controllers/accounts/edit.php
  18. 1 1
      src/clientarea/controllers/accounts/goftp.php
  19. 3 3
      src/clientarea/controllers/accounts/list.php
  20. 1 1
      src/clientarea/controllers/accounts/login.php
  21. 1 1
      src/clientarea/controllers/accounts/password.php
  22. 1 1
      src/clientarea/controllers/accounts/view.php
  23. 3 3
      src/clientarea/controllers/clients/forgetpassword.php
  24. 5 5
      src/clientarea/controllers/clients/login.php
  25. 1 1
      src/clientarea/controllers/clients/profile.php
  26. 4 4
      src/clientarea/controllers/clients/resendcode.php
  27. 4 4
      src/clientarea/controllers/clients/resetpassword.php
  28. 19 19
      src/clientarea/controllers/clients/signup.php
  29. 3 3
      src/clientarea/controllers/clients/validate.php
  30. 5 5
      src/clientarea/controllers/dashboard/view.php
  31. 2 2
      src/clientarea/controllers/myssl/list.php
  32. 39 39
      src/clientarea/controllers/myssl/new.php
  33. 10 10
      src/clientarea/controllers/settings/edit.php
  34. 7 11
      src/clientarea/controllers/settings/password.php
  35. 4 4
      src/clientarea/controllers/tickets/add.php
  36. 1 1
      src/clientarea/controllers/tickets/close.php
  37. 2 2
      src/clientarea/controllers/tickets/list.php
  38. 2 2
      src/clientarea/controllers/tickets/reply.php
  39. 1 1
      src/clientarea/controllers/tickets/view.php
  40. 4 4
      src/clientarea/views/accounts/add.php
  41. 4 4
      src/clientarea/views/accounts/edit.php
  42. 8 8
      src/clientarea/views/clients/profile.php
  43. 2 2
      src/clientarea/views/clients/suspended.php
  44. 2 2
      src/clientarea/views/clients/validate.php
  45. 2 2
      src/clientarea/views/common/sidebar.php
  46. 4 4
      src/clientarea/views/csr/decode.php
  47. 7 7
      src/clientarea/views/csr/new.php
  48. 4 4
      src/clientarea/views/myssl/add.php
  49. 10 10
      src/clientarea/views/settings.php
  50. 2 2
      src/clientarea/views/tickets/add.php
  51. 3 3
      src/clientarea/views/tickets/view.php
  52. 4 4
      src/clientarea/views/tools/dnslookup.php
  53. 4 4
      src/clientarea/views/tools/whois.php
  54. 4 4
      src/core/clientarea.php
  55. 1 1
      src/core/library/lib/MailSMTP.class.php
  56. 16 16
      src/install/function/Database.php

+ 3 - 3
src/admin/controllers/accounts/deactivate.php

@@ -59,13 +59,13 @@ if ($Result['status'] == 0 && !is_array($Result['message'])) {
     $sql = $DB->update('account', array('account_status' => '0'), array('account_id' => $account_id));
     if ($sql) {
         // 本地同步成功
-        $ClientInfo = $DB->find('clients', 'hosting_client_email, hosting_client_fname', array('hosting_client_id' => $AccountInfo['account_client_id']), null, 1);
+        $ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']), null, 1);
         $EmailContent = '<p>We had a good time with you while you were with us. </p>';
         $EmailDescription = 'Your account(# ' . $account_id . ') have been deactivate successfully and all files and database will be deleted within 30 days.';
-        $email_body = email_build_body('Hosting Account Deactivated', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+        $email_body = email_build_body('Hosting Account Deactivated', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
         send_mail(array(
-            'to' => $ClientInfo['hosting_client_email'],
+            'to' => $ClientInfo['client_email'],
             'message' => $email_body,
             'subject' => 'Hosting Account Deactivated'
         ));

+ 1 - 1
src/admin/controllers/accounts/edit.php

@@ -4,6 +4,6 @@
 $account_id = get('account_id');
 
 $AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
-$ClientInfo = $DB->find('clients', '*', array('hosting_client_id' => $AccountInfo['account_client_id']), null, 1);
+$ClientInfo = $DB->find('clients', '*', array('client_id' => $AccountInfo['account_client_id']), null, 1);
 
 $PageInfo['title'] = 'Edit Account #' . $account_id;

+ 3 - 3
src/admin/controllers/accounts/reactivate.php

@@ -51,13 +51,13 @@ if ($Result['status'] == 0 && !is_array($Result['message'])) {
     $sql = $DB->update('account', array('account_status' => '1'), array('account_id' => $account_id));
     if ($sql) {
         // 本地同步成功
-        $ClientInfo = $DB->find('clients', 'hosting_client_email, hosting_client_fname', array('hosting_client_id' => $AccountInfo['account_client_id']), null, 1);
+        $ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']), null, 1);
         $EmailContent = 'Your account(# ' . $account_id . ') have been activated successfully.';
         $EmailDescription = '<p><a href="' . setURL('clientarea/login') . '" target="_blank">Login to Clientarea</a></p>';
-        $email_body = email_build_body('Hosting Account Activated', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+        $email_body = email_build_body('Hosting Account Activated', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
         send_mail(array(
-            "to" => $ClientInfo['hosting_client_email'],
+            "to" => $ClientInfo['client_email'],
             "message" => $email_body,
             "subject" => 'Activate Hosting Account',
         ));

+ 1 - 1
src/admin/controllers/clients/activate.php

@@ -8,7 +8,7 @@ if (!$client_id) {
     exit('Access Denied');
 }
 
-$resault = $DB->update('clients', array('hosting_client_status' => 1), array('hosting_client_id' => $client_id));
+$resault = $DB->update('clients', array('client_status' => 1), array('client_id' => $client_id));
 
 if ($resault) {
     setMessage('Client activated successfully !');

+ 3 - 3
src/admin/controllers/clients/login.php

@@ -8,11 +8,11 @@ if (empty($client_id)) {
     redirect('admin/clients');
 }
 
-$ClientInfo = $DB->find('clients', '*', array('hosting_client_id' => $client_id), null, 1);
+$ClientInfo = $DB->find('clients', '*', array('client_id' => $client_id), null, 1);
 
 $key = rand(000000, 999999);
-$email = $ClientInfo['hosting_client_email'];
-$token = hash('sha256', json_encode([$email, $ClientInfo['hosting_client_key'], $key]));
+$email = $ClientInfo['client_email'];
+$token = hash('sha256', json_encode([$email, $ClientInfo['client_key'], $key]));
 $times = 1;
 
 setcookie('UIISC_MEMBER', base64_encode(gzcompress(json_encode(array('email' => $email, 'token' => $token, 'key' => $key)))), time() + $times * 86400, '/');

+ 1 - 1
src/admin/controllers/clients/suspend.php

@@ -8,7 +8,7 @@ if (!$client_id) {
     exit('Access Denied');
 }
 
-$resault = $DB->update('clients', array('hosting_client_status' => 2), array('hosting_client_id' => $client_id));
+$resault = $DB->update('clients', array('client_status' => 2), array('client_id' => $client_id));
 
 if ($resault) {
     setMessage('Client suspended successfully !');

+ 5 - 5
src/admin/controllers/clients/view.php

@@ -13,17 +13,17 @@ if (empty($client_id)) {
 
 $PageInfo['title'] = 'View client (' . $client_id . ')';
 
-$ClientInfo = $DB->find('clients', '*', array('hosting_client_id' => $client_id), null, 1);
+$ClientInfo = $DB->find('clients', '*', array('client_id' => $client_id), null, 1);
 
 $CountryName = 'Not Defined';
 
 foreach ($countries as $country) {
-    if ($ClientInfo['hosting_client_country'] == $country['code']) {
+    if ($ClientInfo['client_country'] == $country['code']) {
         $CountryName = $country['name'];
         break;
     }
 }
 
-$count_account = $DB->count('account', array('account_client_id' => $ClientInfo['hosting_client_id']));
-$count_ssl = $DB->count('ssl', array('ssl_for' => $ClientInfo['hosting_client_id']));
-$count_tickets = $DB->count('tickets', array('ticket_for' => $ClientInfo['hosting_client_id']));
+$count_account = $DB->count('account', array('account_client_id' => $ClientInfo['client_id']));
+$count_ssl = $DB->count('ssl', array('ssl_for' => $ClientInfo['client_id']));
+$count_tickets = $DB->count('tickets', array('ticket_for' => $ClientInfo['client_id']));

+ 7 - 7
src/admin/controllers/tickets/close.php

@@ -9,18 +9,18 @@ if (!$ticket_id) {
 }
 
 // 查找工单信息
-$TicketInfo = $DB->find('tickets', 'ticket_email', array('ticket_id' => $ticket_id));
+$TicketInfo = $DB->find('tickets', 'ticket_email, ticket_for', array('ticket_id' => $ticket_id), null, 1);
 
 if (!$TicketInfo) {
-    setMessage('Not Found !');
+    setMessage('Ticket Not Found !');
     redirect('admin/tickets');
 }
 
 // 查找客户信息
-$ClientInfo = $DB->find('clients', 'hosting_client_email, hosting_client_fname', array('hosting_client_id' => $TicketInfo['ticket_for']));
+$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $TicketInfo['ticket_for']));
 
 if (!$ClientInfo) {
-    setMessage('Not Found !');
+    setMessage('Client Not Found !');
     redirect('admin/tickets');
 }
 
@@ -29,15 +29,15 @@ $resault = $DB->update('tickets', array('ticket_status' => 3), array('ticket_id'
 if ($resault) {
     $ticket_url = setURL('admin/tickets', '', array('action' => 'view', 'ticket_id' => $ticket_id));
     $email_body = email_build_body('Ticket Closed',
-        $ClientInfo['hosting_client_fname'],
-        '<p>The ticket ("' . $ticket_id . '") had been closed.</p>',
+        $ClientInfo['client_fname'],
+        '<p>The ticket ("ID: ' . $ticket_id . '") had been closed.</p>',
         '<p>Click <a href="' . $ticket_url . '" target="_blank">here</a> for details.</p>'
     );
 
     send_mail(array(
         'to' => $TicketInfo['ticket_email'],
         'message' => $email_body,
-        'subject' => 'Ticket Closed',
+        'subject' => 'Ticket Closed ("ID: ' . $ticket_id . '")',
     ));
 
     setMessage('Ticket closed successfully !');

+ 4 - 4
src/admin/views/accounts/edit.php

@@ -12,25 +12,25 @@
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Name</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Email</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Phone Number</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_phone']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Billing Address</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
             </div>

+ 12 - 8
src/admin/views/clients/list.php

@@ -19,23 +19,27 @@
 <?php if ($count > 0): ?>
     <?php foreach ($rows as $value): ?>
                     <tr>
-                        <td># <?php echo $value['hosting_client_id']; ?></td>
-                        <td><?php echo $value['hosting_client_fname'] . " " . $value['hosting_client_lname']; ?></td>
-                        <td><?php echo $value['hosting_client_email']; ?></td>
-                        <td><?php echo $value['hosting_client_date']; ?></td>
+                        <td># <?php echo $value['client_id']; ?></td>
+                        <td><?php echo $value['client_fname'] . " " . $value['client_lname']; ?></td>
+                        <td><?php echo $value['client_email']; ?></td>
+                        <td><?php echo $value['client_date']; ?></td>
                         <td><?php
-if ($value['hosting_client_status'] == '0') {
+if ($value['client_status'] == '0') {
     $btn = ['secondary', 'cog'];
     echo '<span class="badge bg-secondary badge-pill">Inactive</span>';
-} elseif ($value['hosting_client_status'] == '1') {
+} elseif ($value['client_status'] == '1') {
     $btn = ['success', 'globe'];
     echo '<span class="badge bg-success badge-pill">Active</span>';
-} elseif ($value['hosting_client_status'] == '2') {
+} elseif ($value['client_status'] == '2') {
     $btn = ['danger', 'lock'];
     echo '<span class="badge bg-danger badge-pill">Suspended</span>';
 }
 ?></td>
-                        <td><a href="clients.php?action=view&client_id=<?php echo $value['hosting_client_id']; ?>" class="btn btn-sm btn-<?php echo $btn[0] ?> btn-rounded"><i class="fa fa-<?php echo $btn[1]; ?>"></i> Manage</a></td>
+                        <td>
+                            <a href="clients.php?action=view&client_id=<?php echo $value['client_id']; ?>" class="btn btn-sm btn-<?php echo $btn[0] ?> btn-rounded">
+                                <i class="fa fa-<?php echo $btn[1]; ?>"></i> Manage
+                            </a>
+                        </td>
                     </tr>
     <?php endforeach;?>
 <?php else: ?>

+ 12 - 12
src/admin/views/clients/view.php

@@ -10,31 +10,31 @@
         <hr />
         <div class="row">
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $ClientInfo['hosting_client_fname']; ?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $ClientInfo['client_fname']; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $ClientInfo['hosting_client_lname']; ?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $ClientInfo['client_lname']; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $ClientInfo['hosting_client_email']; ?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $ClientInfo['client_email']; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b>Phone Number:</b> <?php echo $ClientInfo['hosting_client_phone']; ?></h6>
+                <h6 class="mb-0"><b>Phone Number:</b> <?php echo $ClientInfo['client_phone']; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Billing Address'); ?>:</b> <?php echo $ClientInfo['hosting_client_address']; ?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Billing Address'); ?>:</b> <?php echo $ClientInfo['client_address']; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Company'); ?>:</b> <?php echo $ClientInfo['hosting_client_company']; ?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Company'); ?>:</b> <?php echo $ClientInfo['client_company']; ?></h6>
             </div>
             <div class="col-md-6">
                 <h6 class="mb-0"><b><?php echo $lang->I18N('Country'); ?>:</b> <?php echo $CountryName; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('City'); ?>:</b> <?php echo $ClientInfo['hosting_client_city']; ?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('City'); ?>:</b> <?php echo $ClientInfo['client_city']; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b>Postal Code:</b> <?php echo $ClientInfo['hosting_client_pcode']; ?></h6>
+                <h6 class="mb-0"><b>Postal Code:</b> <?php echo $ClientInfo['client_pcode']; ?></h6>
             </div>
             <div class="col-md-6">
                 <h6 class="mb-0"><b><?php echo $lang->I18N('Hosting Accounts'); ?>:</b> <?php echo $count_account; ?></h6>
@@ -46,11 +46,11 @@
                 <h6 class="mb-0"><b>Support Tickets:</b> <?php echo $count_tickets; ?></h6>
             </div>
             <div class="col-md-12 py-5">
-                <a href="clients.php?action=login&client_id=<?php echo $ClientInfo['hosting_client_id'] ?>" target="_blank" class="btn m5t btn-sm btn-primary">Login as <?php echo $ClientInfo['hosting_client_fname'] ?></a>
-                <?php if ($ClientInfo['hosting_client_status'] !== '1'): ?>
-                <a href="controllers/clients/activate.php?client_id=<?php echo $ClientInfo['hosting_client_id']; ?>" class="btn m5t btn-sm btn-success text-white">Mark as Active</a>
+                <a href="clients.php?action=login&client_id=<?php echo $ClientInfo['client_id'] ?>" target="_blank" class="btn m5t btn-sm btn-primary">Login as <?php echo $ClientInfo['client_fname'] ?></a>
+                <?php if ($ClientInfo['client_status'] !== '1'): ?>
+                <a href="controllers/clients/activate.php?client_id=<?php echo $ClientInfo['client_id']; ?>" class="btn m5t btn-sm btn-success text-white">Mark as Active</a>
                 <?php else: ?>
-                <a href="controllers/clients/suspend.php?client_id=<?php echo $ClientInfo['hosting_client_id']; ?>" class="btn m5t btn-sm btn-secondary">Mark as Suspended</a>
+                <a href="controllers/clients/suspend.php?client_id=<?php echo $ClientInfo['client_id']; ?>" class="btn m5t btn-sm btn-secondary">Mark as Suspended</a>
                 <?php endif; ?>
             </div>
         </div>

+ 2 - 2
src/admin/views/common/header.php

@@ -29,5 +29,5 @@
         var ifastnet_aff = "<?php echo $ifastnet_aff; ?>";
     </script>
 </head>
-<body>
-<!-- <body class="with-custom-webkit-scrollbars with-custom-css-scrollbars" data-dm-shortcut-enabled="true" data-sidebar-shortcut-enabled="true" data-set-preferred-theme-onload="true"> -->
+
+<body class="with-custom-webkit-scrollbars with-custom-css-scrollbars" data-dm-shortcut-enabled="true" data-sidebar-shortcut-enabled="true" data-set-preferred-theme-onload="true">

+ 3 - 3
src/callback/myownfreehost/activate.php

@@ -19,11 +19,11 @@ if ($AccountInfo) {
     $res = $DB->update('account', array('account_sql' => $status, 'account_status' => '1'), array('account_id' => $AccountInfo['account_id']));
 
     // 查找客户信息
-    $ClientInfo = $DB->find('clients', 'hosting_client_email, hosting_client_fname', array('hosting_client_id' => $AccountInfo['account_client_id']));
+    $ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']));
     if ($ClientInfo) {
-        $EmailTo = $ClientInfo['hosting_client_email'];
+        $EmailTo = $ClientInfo['client_email'];
         $EmailSubject = 'New Hosting Account';
-        $EmailToPeople = $ClientInfo['hosting_client_fname'];
+        $EmailToPeople = $ClientInfo['client_fname'];
     } else {
         $EmailTo = $SiteConfig['site_email'];
         $EmailToPeople = 'Administrator';

+ 3 - 3
src/callback/myownfreehost/suspend.php

@@ -17,14 +17,14 @@ $DB->update('account', array('account_status' => '2'), array('account_id' => $Ac
 // $DB->query("CREATE EVENT " . $username . "_delete ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 30 DAY DO DELETE FROM `hosting_account` WHERE `account_id`='" . $AccountInfo['account_id'] . "'");
 
 // 查找客户信息
-$ClientInfo = $DB->find('clients', 'hosting_client_email, hosting_client_fname', array('hosting_client_id' => $AccountInfo['account_client_id']));
+$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']));
 
 $EmailContent = '<p>We had a good time with you while you were with us. </p>';
 $EmailDescription = '<p>Your account(' . $username . ') have been deactivate successfully and all files and database will be deleted within 30 days.</p><br>';
-$email_body = email_build_body('Hosting Account Deactivated', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+$email_body = email_build_body('Hosting Account Deactivated', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
 send_mail(array(
-    'to' => $ClientInfo['hosting_client_email'],
+    'to' => $ClientInfo['client_email'],
     'message' => $email_body,
     'subject' => 'Hosting Account Deactivated'
 ));

+ 4 - 4
src/clientarea/controllers/accounts/add.php

@@ -16,14 +16,14 @@ if (isset($_POST['submit'])) {
         'username' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
         'password' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 16),
         'account_domain' => post('domain'),
-        'email' => $ClientInfo['hosting_client_email'],
+        'email' => $ClientInfo['client_email'],
         'plan' => post('package'),
     );
     if (empty($FormData['account_domain'])) {
         setMessage('Domain cannot be <b>empty</b> !', 'danger');
         redirect('clientarea/accounts', '', array('action' => 'add'));
     } else {
-        $AccountList = $DB->findAll('account', '*', array('account_client_id' => $ClientInfo['hosting_client_id']));
+        $AccountList = $DB->findAll('account', '*', array('account_client_id' => $ClientInfo['client_id']));
         if (count($AccountList) < 3) {
             $client = Client::create($HostingApiConfig);
             $request = $client->createAccount(array(
@@ -53,7 +53,7 @@ if (isset($_POST['submit'])) {
                     'account_domain' => $Result['account_domain'],
                     'account_status' => '1',
                     'account_date' => $Result['date'],
-                    'account_client_id' => $ClientInfo['hosting_client_id'],
+                    'account_client_id' => $ClientInfo['client_id'],
                     'account_sql' => 'NULL',
                 ));
                 if ($account_id) {
@@ -78,7 +78,7 @@ if (isset($_POST['submit'])) {
 <p>Next, </p>
 <br />';
                     $EmailDescription .= '<p><a href="' . setURL('clientarea/login') . '" target="_blank">Login to Clientarea</a></p>';
-                    $email_body = email_build_body('New Hosting Account', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+                    $email_body = email_build_body('New Hosting Account', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
                     send_mail(array(
                         'to' => $EmailTo,

+ 3 - 3
src/clientarea/controllers/accounts/deactivate.php

@@ -20,7 +20,7 @@ if (strlen($reason) < 8) {
     redirect('clientarea/accounts', '', array('action' => 'edit', 'account_id' => $account_id));
 }
 
-$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['hosting_client_id']), null, 1);
+$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['client_id']), null, 1);
 
 if (empty($AccountInfo)) {
     setMessage('Account not found', 'danger');
@@ -61,10 +61,10 @@ if ($Result['status'] == 0 && !is_array($Result['message'])) {
         // 本地同步成功
         $EmailContent = '<p>We had a good time with you while you were with us. </p>';
         $EmailDescription = 'Your account(# ' . $account_id . ') have been deactivate successfully and all files and database will be deleted within 30 days.';
-        $email_body = email_build_body('Hosting Account Deactivated', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+        $email_body = email_build_body('Hosting Account Deactivated', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
         send_mail(array(
-            'to' => $ClientInfo['hosting_client_email'],
+            'to' => $ClientInfo['client_email'],
             'message' => $email_body,
             'subject' => 'Hosting Account Deactivated'
         ));

+ 1 - 1
src/clientarea/controllers/accounts/edit.php

@@ -9,7 +9,7 @@ if (empty($account_id)) {
     redirect('clientarea/accounts');
 }
 
-$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['hosting_client_id']), null, 1);
+$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['client_id']), null, 1);
 
 if (empty($AccountInfo)) {
     setMessage('not found', 'danger');

+ 1 - 1
src/clientarea/controllers/accounts/goftp.php

@@ -9,7 +9,7 @@ if (empty($account_id)) {
     redirect('clientarea/accounts');
 }
 
-$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['hosting_client_id']), null, 1);
+$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['client_id']), null, 1);
 
 if (empty($AccountInfo)) {
     setMessage('Account not found', 'danger');

+ 3 - 3
src/clientarea/controllers/accounts/list.php

@@ -8,7 +8,7 @@ require_once __DIR__ . '/../../application.php';
 
 $PageInfo['title'] = $lang->I18N('Hosting Accounts');
 
-$total_count = $DB->count('account', array('account_client_id' => $ClientInfo['hosting_client_id']));
-$active_count = $DB->count('account', array('account_client_id' => $ClientInfo['hosting_client_id'], 'account_status' => '1'));
+$total_count = $DB->count('account', array('account_client_id' => $ClientInfo['client_id']));
+$active_count = $DB->count('account', array('account_client_id' => $ClientInfo['client_id'], 'account_status' => '1'));
 
-$rows = $DB->findAll('account', '*', array('account_client_id' => $ClientInfo['hosting_client_id']), "`account_id` DESC");
+$rows = $DB->findAll('account', '*', array('account_client_id' => $ClientInfo['client_id']), "`account_id` DESC");

+ 1 - 1
src/clientarea/controllers/accounts/login.php

@@ -9,7 +9,7 @@ if (empty($account_id)) {
     redirect('clientarea/accounts');
 }
 
-$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['hosting_client_id']), null, 1);
+$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['client_id']), null, 1);
 
 if (empty($AccountInfo)) {
     setMessage('not found', 'danger');

+ 1 - 1
src/clientarea/controllers/accounts/password.php

@@ -13,7 +13,7 @@ if (empty($account_id)) {
     redirect('clientarea/accounts');
 }
 
-$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['hosting_client_id']), null, 1);
+$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id, 'account_client_id' => $ClientInfo['client_id']), null, 1);
 
 if (empty($AccountInfo)) {
     setMessage('Account not found', 'danger');

+ 1 - 1
src/clientarea/controllers/accounts/view.php

@@ -10,7 +10,7 @@ if (empty($account_id)) {
 
 $_where = array(
     'account_id' => $account_id,
-    'account_client_id' => $ClientInfo['hosting_client_id'],
+    'account_client_id' => $ClientInfo['client_id'],
 );
 $AccountInfo = $DB->find('account', '*', $_where, null, 1);
 

+ 3 - 3
src/clientarea/controllers/clients/forgetpassword.php

@@ -14,16 +14,16 @@ if (isset($_POST['reset'])) {
         redirect('clientarea/forgetpassword');
     }
 
-    $ClientInfo = $DB->find('clients', 'hosting_client_key, hosting_client_fname', array('hosting_client_email' => $post_mail), null, 1);
+    $ClientInfo = $DB->find('clients', 'client_key, client_fname', array('client_email' => $post_mail), null, 1);
     if ($ClientInfo) {
-        $TokenId = password_hash($ClientInfo['hosting_client_key'], PASSWORD_DEFAULT);
+        $TokenId = password_hash($ClientInfo['client_key'], PASSWORD_DEFAULT);
         $TokenData = [['token' => str_replace('$2y$10$', '', $TokenId), 'email' => $post_mail]];
         $Token = base64_encode(json_encode($TokenData));
 
         $EmailContent = '<p>You have requested a password reset. If you have not requested a password reset please let us know by opening a support ticket in the clientarea.</p>';
         $EmailDescription = '<div style="padding:1rem;background:#e6e6e6;overflow-x:auto;">' . $Token . '</div>';
         $EmailDescription .= '<p><a href="' . setURL('clientarea/resetpassword') . '" target="_blank">Reset Password</a></p>';
-        $email_body = email_build_body('Reset Password', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+        $email_body = email_build_body('Reset Password', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
         send_mail(array(
             'to' => $post_mail,

+ 5 - 5
src/clientarea/controllers/clients/login.php

@@ -23,9 +23,9 @@ if (isset($_POST['login'])) {
 
     $password_hash = hash('sha256', $password);
 
-    $ClientInfo = $DB->find('clients', 'hosting_client_id, hosting_client_password, hosting_client_key', array(
-        'hosting_client_email' => $email,
-        'hosting_client_password' => $password_hash,
+    $ClientInfo = $DB->find('clients', 'client_id, client_password, client_key', array(
+        'client_email' => $email,
+        'client_password' => $password_hash,
     ), null, 1);
 
     if (!$ClientInfo || empty($ClientInfo)) {
@@ -33,9 +33,9 @@ if (isset($_POST['login'])) {
         redirect('clientarea/login');
     }
 
-    if ($password_hash == $ClientInfo['hosting_client_password']) {
+    if ($password_hash == $ClientInfo['client_password']) {
         $key = rand(000000, 999999);
-        $token = hash('sha256', json_encode([$email, $ClientInfo['hosting_client_key'], $key]));
+        $token = hash('sha256', json_encode([$email, $ClientInfo['client_key'], $key]));
         $times = isset($_POST['remember']) ? 30 : 1;
         $token2 = ['email' => $email, 'token' => $token, 'key' => $key];
         setcookie('UIISC_MEMBER', base64_encode(gzcompress(json_encode($token2))), time() + $times * 86400, '/');

+ 1 - 1
src/clientarea/controllers/clients/profile.php

@@ -6,7 +6,7 @@ require_once ROOT . '/core/library/countries.php';
 $CountryName = 'Not Defined';
 
 foreach ($countries as $country) {
-    if ($ClientInfo['hosting_client_country'] == $country['code']) {
+    if ($ClientInfo['client_country'] == $country['code']) {
         $CountryName = $country['name'];
         break;
     }

+ 4 - 4
src/clientarea/controllers/clients/resendcode.php

@@ -3,18 +3,18 @@
 $current_route = 'clientarea/validate'; // TODO: make it automation
 require_once __DIR__ . '/../../application.php';
 
-if ($ClientInfo['hosting_client_status'] == 1) {
+if ($ClientInfo['client_status'] == 1) {
     setMessage('Your account has been <b>verified</b> !');
     redirect('clientarea/index');
 }
 
 if (isset($_POST['resendcode'])) {
-    $Token = str_replace('$2y$10$', '', password_hash($ClientInfo['hosting_client_key'], PASSWORD_DEFAULT));
+    $Token = str_replace('$2y$10$', '', password_hash($ClientInfo['client_key'], PASSWORD_DEFAULT));
     $EmailContent = '<p>We\'ll like you to be a member of our service. Please copy the code from below in order to verify your account.</p>';
     $EmailDescription = '<div style="padding:1rem;background:#e6e6e6;overflow-x:auto;">' . $Token . '</div>';
-    $email_body = email_build_body('Verify Email', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+    $email_body = email_build_body('Verify Email', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
     send_mail(array(
-        'to' => $ClientInfo['hosting_client_email'],
+        'to' => $ClientInfo['client_email'],
         'message' => $email_body,
         'subject' => 'Verify Email'
     ));

+ 4 - 4
src/clientarea/controllers/clients/resetpassword.php

@@ -20,7 +20,7 @@ if (isset($_POST['reset'])) {
 
     $ClientEmail = $TokenInfo[0]->email;
 
-    $ClientInfo = $DB->find('clients', 'hosting_client_id, hosting_client_key, hosting_client_fname', array('hosting_client_email' => $ClientEmail), null, 1);
+    $ClientInfo = $DB->find('clients', 'client_id, client_key, client_fname', array('client_email' => $ClientEmail), null, 1);
 
     if (!$ClientInfo) {
         setMessage('Invalid reset <b>token</b> !', 'danger');
@@ -29,14 +29,14 @@ if (isset($_POST['reset'])) {
 
     $Key = '$2y$10$' . $TokenInfo[0]->token;
 
-    if (password_verify($ClientInfo['hosting_client_key'], $Key)) {
+    if (password_verify($ClientInfo['client_key'], $Key)) {
         $hashed_password = hash('sha256', $new_password);
-        $result = $DB->update('clients', array('hosting_client_password' => $hashed_password), array('hosting_client_id' => $ClientInfo['hosting_client_id']));
+        $result = $DB->update('clients', array('client_password' => $hashed_password), array('client_id' => $ClientInfo['client_id']));
 
         if ($result) {
             $EmailContent = '<p>Your account password has been reset successfully. Please login to clientarea to use our services again.</p>';
             $EmailDescription = '<p>Click <a href="' . setURL('clientarea/login') . '">here</a> to login.</p>';
-            $email_body = email_build_body('Reset Password', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+            $email_body = email_build_body('Reset Password', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
             send_mail(array(
                 'to' => $ClientEmail,

+ 19 - 19
src/clientarea/controllers/clients/signup.php

@@ -9,39 +9,39 @@ if (isset($_COOKIE['UIISC_MEMBER']) && $_COOKIE['UIISC_MEMBER'] != 'NULL') {
 
 if (isset($_POST['signup'])) {
     $FormData = array(
-        'hosting_client_fname' => post('first'),
-        'hosting_client_lname' => post('last'),
-        'hosting_client_email' => post('email'),
-        'hosting_client_company' => '',
-        'hosting_client_country' => '',
-        'hosting_client_city' => '',
-        'hosting_client_address' => '',
-        'hosting_client_pcode' => '',
-        'hosting_client_phone' => '',
-        'hosting_client_state' => '',
-        'hosting_client_password' => hash('sha256', post('password')),
-        'hosting_client_date' => date('Y-m-d H:i:s'),
-        'hosting_client_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
-        'hosting_client_status' => 0,
+        'client_fname' => post('first'),
+        'client_lname' => post('last'),
+        'client_email' => post('email'),
+        'client_company' => '',
+        'client_country' => '',
+        'client_city' => '',
+        'client_address' => '',
+        'client_pcode' => '',
+        'client_phone' => '',
+        'client_state' => '',
+        'client_password' => hash('sha256', post('password')),
+        'client_date' => date('Y-m-d H:i:s'),
+        'client_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
+        'client_status' => 0,
     );
 
-    $where = "`hosting_client_email`='" . $FormData['hosting_client_email'] . "' OR `hosting_client_key`='" . $FormData['hosting_client_key'] . "'";
+    $where = "`client_email`='" . $FormData['client_email'] . "' OR `client_key`='" . $FormData['client_key'] . "'";
 
-    $has = $DB->find('clients', 'hosting_client_id', $where);
+    $has = $DB->find('clients', 'client_id', $where);
     if ($has) {
         setMessage('Account already <b>exsits!</b> or invalid <b>token</b>', 'danger');
         redirect('clientarea/login');
     }
     $result = $DB->insert('clients', $FormData);
 
-    $Token = str_replace('$2y$10$', '', password_hash($FormData['hosting_client_key'], PASSWORD_DEFAULT));
+    $Token = str_replace('$2y$10$', '', password_hash($FormData['client_key'], PASSWORD_DEFAULT));
 
     $EmailContent = '<p>Your new account has been registered. </p><p>Please copy the code below to verify your account.</p>';
     $EmailDescription = '<div style="padding:1rem;background:#e6e6e6;overflow-x:auto;">' . $Token . '</div>';
-    $email_body = email_build_body('Verify Email', $FormData['hosting_client_fname'], $EmailContent, $EmailDescription);
+    $email_body = email_build_body('Verify Email', $FormData['client_fname'], $EmailContent, $EmailDescription);
 
     send_mail(array(
-        'to' => $FormData['hosting_client_email'],
+        'to' => $FormData['client_email'],
         'message' => $email_body,
         'subject' => 'Verify Account'
     ));

+ 3 - 3
src/clientarea/controllers/clients/validate.php

@@ -12,10 +12,10 @@ if (isset($_POST['validate'])) {
     }
 
     $token = '$2y$10$' . post('validation_code');
-    $client_key = $ClientInfo['hosting_client_key'];
+    $client_key = $ClientInfo['client_key'];
 
     if (password_verify($client_key, $token)) {
-        $resault = $DB->update('clients', ['hosting_client_status' => '1'], ['hosting_client_key' => $client_key]);
+        $resault = $DB->update('clients', array('client_status' => '1'), array('client_key' => $client_key));
         if ($resault) {
             setMessage('validated <b>successfully</b> !', 'success');
             redirect('clientarea/index');
@@ -28,7 +28,7 @@ if (isset($_POST['validate'])) {
     redirect('clientarea/validate');
 }
 
-if ($ClientInfo['hosting_client_status'] == 1) {
+if ($ClientInfo['client_status'] == 1) {
     setMessage('Your account has been <b>verified</b> !');
     redirect('clientarea/index');
 }

+ 5 - 5
src/clientarea/controllers/dashboard/view.php

@@ -1,12 +1,12 @@
 <?php
 
-$count_acc = $DB->count('account', array('account_client_id' => $ClientInfo['hosting_client_id'], 'account_status' => 1));
-$count_ssl = $DB->count('ssl', array('ssl_for' => $ClientInfo['hosting_client_id']));
+$count_acc = $DB->count('account', array('account_client_id' => $ClientInfo['client_id'], 'account_status' => 1));
+$count_ssl = $DB->count('ssl', array('ssl_for' => $ClientInfo['client_id']));
 
-// $count_tic1 = $DB->count('tickets', array('ticket_for' => $ClientInfo['hosting_client_id'], 'ticket_status' => 0));
-// $count_tic2 = $DB->count('tickets', array('ticket_for' => $ClientInfo['hosting_client_id'], 'ticket_status' => 1));
+// $count_tic1 = $DB->count('tickets', array('ticket_for' => $ClientInfo['client_id'], 'ticket_status' => 0));
+// $count_tic2 = $DB->count('tickets', array('ticket_for' => $ClientInfo['client_id'], 'ticket_status' => 1));
 // $count_tic = $count_tic1 + $count_tic2;
 
-$count_tic = $DB->getColumn("SELECT COUNT(*) FROM `pre_tickets` WHERE `ticket_for`='" . $ClientInfo['hosting_client_id'] . "' AND `ticket_status`=0 OR `ticket_for`='" . $ClientInfo['hosting_client_id'] . "' AND `ticket_status`=1");
+$count_tic = $DB->getColumn("SELECT COUNT(*) FROM `pre_tickets` WHERE `ticket_for`='" . $ClientInfo['client_id'] . "' AND `ticket_status`=0 OR `ticket_for`='" . $ClientInfo['client_id'] . "' AND `ticket_status`=1");
 
 $PageInfo['title'] = 'Dashboard';

+ 2 - 2
src/clientarea/controllers/myssl/list.php

@@ -2,10 +2,10 @@
 
 require ROOT . '/core/library/userinfo.class.php';
 
-$count = $DB->count('ssl', array('ssl_for' => $ClientInfo['hosting_client_id']));
+$count = $DB->count('ssl', array('ssl_for' => $ClientInfo['client_id']));
 
 if ($count > 0) {
-    $rows = $DB->findAll('ssl', '*', array('ssl_for' => $ClientInfo['hosting_client_id']), "`ssl_id` DESC");
+    $rows = $DB->findAll('ssl', '*', array('ssl_for' => $ClientInfo['client_id']), "`ssl_id` DESC");
 
     require_once ROOT . '/core/handler/SSLHandler.php';
     require_once ROOT . '/modules/GoGetSSL/GoGetSSLApi.php';

+ 39 - 39
src/clientarea/controllers/myssl/new.php

@@ -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'],

+ 10 - 10
src/clientarea/controllers/settings/edit.php

@@ -7,18 +7,18 @@ if (!isset($_POST['submit'])) {
 }
 
 $form_data = array(
-    'hosting_client_fname' => post('fname'),
-    'hosting_client_lname' => post('lname'),
-    'hosting_client_phone' => post('phone'),
-    'hosting_client_company' => post('company'),
-    'hosting_client_address' => post('address'),
-    'hosting_client_country' => post('country'),
-    'hosting_client_city' => post('city'),
-    'hosting_client_pcode' => post('postal'),
-    'hosting_client_state' => post('state')
+    'client_fname'   => post('fname'),
+    'client_lname'   => post('lname'),
+    'client_phone'   => post('phone'),
+    'client_company' => post('company'),
+    'client_address' => post('address'),
+    'client_country' => post('country'),
+    'client_city'    => post('city'),
+    'client_pcode'   => post('postal'),
+    'client_state'   => post('state')
 );
 
-$where_data = array('hosting_client_key' => $ClientInfo['hosting_client_key']);
+$where_data = array('client_id' => $ClientInfo['client_id']);
 
 $data = $DB->update('clients', $form_data, $where_data);
 

+ 7 - 11
src/clientarea/controllers/settings/password.php

@@ -6,18 +6,14 @@ if (!isset($_POST['submit'])) {
     redirect('clientarea/settings');
 }
 
-$form_data = array(
-    'old_password' => post('old_password'),
-    'new_password' => post('new_password'),
-    'hashed_password' => hash('sha256', post('new_password')),
-    'user_key' => $ClientInfo['hosting_client_key'],
-    'user_password' => $ClientInfo['hosting_client_password'],
-);
+$old_password = post('old_password');
+$old_password = hash('sha256', $old_password);
+$new_password = post('new_password');
+$new_password = hash('sha256', $new_password);
 
-if (hash('sha256', $form_data['old_password']) == $form_data['user_password']) {
-
-    $update_data = array('hosting_client_password' => $form_data['hashed_password']);
-    $where_data = array('hosting_client_key' => $form_data['user_key']);
+if ($old_password == $ClientInfo['client_password']) {
+    $update_data = array('client_password' => $new_password);
+    $where_data = array('client_id' => $ClientInfo['client_id']);
     $result = $DB->update('clients', $update_data, $where_data);
 
     if ($result) {

+ 4 - 4
src/clientarea/controllers/tickets/add.php

@@ -8,7 +8,7 @@ if (isset($_POST['submit'])) {
         'ticket_email' => post('email'),
         'ticket_content' => post('editor'),
         'ticket_department' => post('department'),
-        'ticket_for' => $ClientInfo['hosting_client_id'],
+        'ticket_for' => $ClientInfo['client_id'],
         'ticket_date' => date('Y-m-d H:i:s'),
         'ticket_status' => 0,
     );
@@ -20,9 +20,9 @@ if (isset($_POST['submit'])) {
         // to customer
         send_mail(array(
             'to' => $FormData['ticket_email'],
-            'subject' => 'New Ticket (#' . $ClientInfo['hosting_client_id'] . ')',
+            'subject' => 'New Ticket (#' . $ClientInfo['client_id'] . ')',
             'message' => email_build_body('New Ticket',
-                $ClientInfo['hosting_client_fname'],
+                $ClientInfo['client_fname'],
                 '<p>You have opened a support ticket which will be processed soon. It can take up to 2 hours.</p>',
                 '<p>Click <a href="' . $ticket_url . '" target="_blank">here</a> for details.</p>'
             ),
@@ -31,7 +31,7 @@ if (isset($_POST['submit'])) {
         // to Administrator
         send_mail(array(
             'to' => $SiteConfig['site_email'],
-            'subject' => 'New Ticket (#' . $ClientInfo['hosting_client_id'] . ')',
+            'subject' => 'New Ticket (#' . $ClientInfo['client_id'] . ')',
             'message' => email_build_body('New Ticket',
                 'Administrator',
                 '<p>We have received a new support ticket request, please handle it in time.</p>',

+ 1 - 1
src/clientarea/controllers/tickets/close.php

@@ -15,7 +15,7 @@ if ($resault) {
     $TicketUrl = setURL('clientarea/tickets', '', array('action' => 'view', 'ticket_id' => $ticket_id));
     $EmailContent = '<p>You have closed a ticket(' . $ticket_id . ') .</p>';
     $EmailDescription = '<p>Click <a href="' . $TicketUrl . '" target="_blank">here</a> for details.</p>';
-    $email_body = email_build_body('Ticket Closed', $ClientInfo['hosting_client_fname'], $EmailContent, $EmailDescription);
+    $email_body = email_build_body('Ticket Closed', $ClientInfo['client_fname'], $EmailContent, $EmailDescription);
 
     send_mail(array(
         'to' => $TicketInfo['ticket_email'],

+ 2 - 2
src/clientarea/controllers/tickets/list.php

@@ -4,8 +4,8 @@ $PageInfo['title'] = 'My Tickets';
 
 require_once ROOT . '/core/library/userinfo.class.php';
 
-$count = $DB->count('tickets', array('ticket_for' => $ClientInfo['hosting_client_id']));
+$count = $DB->count('tickets', array('ticket_for' => $ClientInfo['client_id']));
 
 if ($count > 0) {
-    $rows = $DB->findAll('tickets', '*', array('ticket_for' => $ClientInfo['hosting_client_id']), "`ticket_id` DESC");
+    $rows = $DB->findAll('tickets', '*', array('ticket_for' => $ClientInfo['client_id']), "`ticket_id` DESC");
 }

+ 2 - 2
src/clientarea/controllers/tickets/reply.php

@@ -18,7 +18,7 @@ $resault = $DB->update('tickets', array('ticket_status' => '2'), array('ticket_i
 if ($resault) {
     $FormData = array(
         'reply_for' => $ticket_id,
-        'reply_from' => $ClientInfo['hosting_client_id'],
+        'reply_from' => $ClientInfo['client_id'],
         'reply_content' => post('editor'),
         'reply_date' => date('Y-m-d H:i:s'),
     );
@@ -26,7 +26,7 @@ if ($resault) {
     if ($resault_insert) {
         $ticket_url = setURL('clientarea/tickets', '', array('action' => 'view', 'ticket_id' => $ticket_id));
 
-        $email_content = '<p>You have received a reply from ' . $ClientInfo['hosting_client_fname'] . '.</p>';
+        $email_content = '<p>You have received a reply from ' . $ClientInfo['client_fname'] . '.</p>';
         $email_description = '<center><a href="' . $ticket_url . '" style="text-decoration:none;border:white;color:#fff;padding:10px 20px 10px 20px;background:orange;border-radius:5px;">View Ticket</a></center>';
 
         $email_body = email_build_body('Ticket Reply', 'there', $email_content, $email_description);

+ 1 - 1
src/clientarea/controllers/tickets/view.php

@@ -11,7 +11,7 @@ if (!$ticket_id) {
 
 $where = array(
     'ticket_id' => $ticket_id,
-    'ticket_for' => $ClientInfo['hosting_client_id'],
+    'ticket_for' => $ClientInfo['client_id'],
 );
 
 $TicketInfo = $DB->find('tickets', '*', $where, null, 1);

+ 4 - 4
src/clientarea/views/accounts/add.php

@@ -11,25 +11,25 @@
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Your Name</label>
-                    <input type="text" name="name" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" readonly>
+                    <input type="text" name="name" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Your Email</label>
-                    <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" readonly>
+                    <input type="text" name="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Phone Number</label>
-                    <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_phone']; ?>" class="form-control disabled" readonly>
+                    <input type="text" name="email" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control disabled" readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Billing Address</label>
-                    <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled" readonly>
+                    <input type="text" name="email" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled" readonly>
                 </div>
             </div>
         </div>

+ 4 - 4
src/clientarea/views/accounts/edit.php

@@ -13,25 +13,25 @@
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Your Name</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Your Email</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" readonly disabled>
+                        <input type="text" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" readonly disabled>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Phone Number</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_phone']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Billing Address</label>
-                        <input type="text" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled" readonly>
+                        <input type="text" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled" readonly>
                     </div>
                 </div>
             </div>

+ 8 - 8
src/clientarea/views/clients/profile.php

@@ -7,31 +7,31 @@
         <hr>
         <div class="row">
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $ClientInfo['hosting_client_fname'];?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $ClientInfo['client_fname'];?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $ClientInfo['hosting_client_lname'];?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $ClientInfo['client_lname'];?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $ClientInfo['hosting_client_email'];?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $ClientInfo['client_email'];?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b>Phone Number:</b> <?php echo $ClientInfo['hosting_client_phone'];?></h6>
+                <h6 class="mb-0"><b>Phone Number:</b> <?php echo $ClientInfo['client_phone'];?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Billing Address'); ?>:</b> <?php echo $ClientInfo['hosting_client_address'];?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Billing Address'); ?>:</b> <?php echo $ClientInfo['client_address'];?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('Company'); ?>:</b> <?php echo $ClientInfo['hosting_client_company'];?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('Company'); ?>:</b> <?php echo $ClientInfo['client_company'];?></h6>
             </div>
             <div class="col-md-6">
                 <h6 class="mb-0"><b><?php echo $lang->I18N('Country'); ?>:</b> <?php echo $CountryName; ?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b><?php echo $lang->I18N('City'); ?>:</b> <?php echo $ClientInfo['hosting_client_city'];?></h6>
+                <h6 class="mb-0"><b><?php echo $lang->I18N('City'); ?>:</b> <?php echo $ClientInfo['client_city'];?></h6>
             </div>
             <div class="col-md-6">
-                <h6 class="mb-0"><b>Postal Code:</b> <?php echo $ClientInfo['hosting_client_pcode'];?></h6>
+                <h6 class="mb-0"><b>Postal Code:</b> <?php echo $ClientInfo['client_pcode'];?></h6>
             </div>
             <div class="col-md-6">
                 <h6 class="mb-0"><b><?php echo $lang->I18N('IP Address'); ?>:</b> <?php echo UserInfo::get_ip();?></h6>

+ 2 - 2
src/clientarea/views/clients/suspended.php

@@ -31,10 +31,10 @@
                 <i class="fa fa-user-circle" aria-hidden="true"></i>
                 </span>
                 <?php
-if ($ClientInfo['hosting_client_status'] == 1) {
+if ($ClientInfo['client_status'] == 1) {
     header("location: index.php");
 }
-echo $ClientInfo['hosting_client_fname'] . " " . $ClientInfo['hosting_client_lname'];
+echo $ClientInfo['client_fname'] . " " . $ClientInfo['client_lname'];
 ?>
 
             </a>

+ 2 - 2
src/clientarea/views/clients/validate.php

@@ -31,7 +31,7 @@
                 <span class="sidebar-icon bg-secondary text-dark rounded-circle">
                     <i class="fa fa-user-circle" aria-hidden="true"></i>
                 </span>
-                <?php echo $ClientInfo['hosting_client_fname'] . " " . $ClientInfo['hosting_client_lname']; ?>
+                <?php echo $ClientInfo['client_fname'] . " " . $ClientInfo['client_lname']; ?>
 
             </a>
             <h5 class="sidebar-title"><?php echo $lang->I18N('Main Menu'); ?></h5>
@@ -51,7 +51,7 @@
             <div class="card p-15">
                 <h5 class="mb-0 px-5"><?php echo $lang->I18N('Validate Account'); ?></h5><hr>
                 <div>
-                    <p><b>Note:</b> You need to verify this account in order to use our free hosting and ssl services. An email has been sent to your submitted email address(<samp><?php echo $ClientInfo['hosting_client_email']; ?></samp>) with validation code.</p>
+                    <p><b>Note:</b> You need to verify this account in order to use our free hosting and ssl services. An email has been sent to your submitted email address(<samp><?php echo $ClientInfo['client_email']; ?></samp>) with validation code.</p>
                     <form action="controllers/clients/validate.php" method="post">
                         <div class="form-group">
                             <label class="form-label"><?php echo $lang->I18N('Validation Code'); ?></label>

+ 2 - 2
src/clientarea/views/common/sidebar.php

@@ -1,5 +1,5 @@
 <?php
-$avatar_path = $ClientInfo['hosting_client_email'] ? md5($ClientInfo['hosting_client_email']) : 'default';
+$avatar_path = $ClientInfo['client_email'] ? md5($ClientInfo['client_email']) : 'default';
 ?>
 
 <div class="sidebar-overlay" onclick="halfmoon.toggleSidebar()"></div>
@@ -13,7 +13,7 @@ $avatar_path = $ClientInfo['hosting_client_email'] ? md5($ClientInfo['hosting_cl
                 <!-- <i class="fa fa-user-circle" aria-hidden="true"></i> -->
                 <img class="rounded-circle" src="https://dn-qiniu-avatar.qbox.me/avatar/<?php echo $avatar_path; ?>?s=30" height="30px" width="30px">
             </span>
-            <?php echo $ClientInfo['hosting_client_fname'] . " " . $ClientInfo['hosting_client_lname']; ?>
+            <?php echo $ClientInfo['client_fname'] . " " . $ClientInfo['client_lname']; ?>
 
         </a>
 

+ 4 - 4
src/clientarea/views/csr/decode.php

@@ -12,25 +12,25 @@
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Your Name</label>
-                    <input type="text" name="name" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" name="name" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Email Address</label>
-                    <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" name="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Company Name</label>
-                    <input type="text" name="company" value="<?php echo $ClientInfo['hosting_client_company']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" name="company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Billing Address</label>
-                    <input type="text" name="address" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" name="address" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-12">

+ 7 - 7
src/clientarea/views/csr/new.php

@@ -12,21 +12,21 @@
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Your Name</label>
-                    <input type="text" id="name" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" id="name" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Email Address</label>
-                    <input type="text" id="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" id="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Country Name</label>
                     <input type="text" id="country" value="<?php
-if ($ClientInfo['hosting_client_country'] != 'NULL') {
-echo $ClientInfo['hosting_client_country'];
+if ($ClientInfo['client_country'] != 'NULL') {
+echo $ClientInfo['client_country'];
 } else {
 echo 'NULL';
 }
@@ -36,19 +36,19 @@ echo 'NULL';
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">State Name</label>
-                    <input type="text" id="state" class="form-control disabled" value="<?php echo $ClientInfo['hosting_client_state']; ?>" required readonly>
+                    <input type="text" id="state" class="form-control disabled" value="<?php echo $ClientInfo['client_state']; ?>" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">City Name</label>
-                    <input type="text" id="city" value="<?php echo $ClientInfo['hosting_client_city']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" id="city" value="<?php echo $ClientInfo['client_city']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Company Name</label>
-                    <input type="text" id="company" value="<?php echo $ClientInfo['hosting_client_company']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" id="company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-6">

+ 4 - 4
src/clientarea/views/myssl/add.php

@@ -16,25 +16,25 @@ if (!defined('IN_CRONLITE')) {
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('Your Name'); ?></label>
-                        <input type="text" name="name" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" required readonly>
+                        <input type="text" name="name" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" required readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('Email Address'); ?></label>
-                        <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" required readonly>
+                        <input type="text" name="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" required readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('Company Name'); ?></label>
-                        <input type="text" name="company" value="<?php echo $ClientInfo['hosting_client_company']; ?>" class="form-control disabled"  required readonly>
+                        <input type="text" name="company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control disabled"  required readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('Billing Address'); ?></label>
-                        <input type="text" name="address" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled"  required readonly>
+                        <input type="text" name="address" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled"  required readonly>
                     </div>
                 </div>
                 <div class="col-md-12">

+ 10 - 10
src/clientarea/views/settings.php

@@ -12,37 +12,37 @@
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('First Name'); ?></label>
-                        <input type="text" name="fname" value="<?php echo $ClientInfo['hosting_client_fname']; ?>" class="form-control" required>
+                        <input type="text" name="fname" value="<?php echo $ClientInfo['client_fname']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('Last Name'); ?></label>
-                        <input type="text" name="lname" value="<?php echo $ClientInfo['hosting_client_lname']; ?>" class="form-control" required>
+                        <input type="text" name="lname" value="<?php echo $ClientInfo['client_lname']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required"><?php echo $lang->I18N('Email Address'); ?></label>
-                        <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" required readonly>
+                        <input type="text" name="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" required readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Phone Number</label>
-                        <input type="text" name="phone" value="<?php echo $ClientInfo['hosting_client_phone']; ?>" class="form-control" required>
+                        <input type="text" name="phone" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Company Name</label>
-                        <input type="text" name="company" value="<?php echo $ClientInfo['hosting_client_company']; ?>" class="form-control" required>
+                        <input type="text" name="company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Billing Address</label>
-                        <input type="text" name="address" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control" required>
+                        <input type="text" name="address" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
@@ -51,7 +51,7 @@
                         <select class="form-control" id="area-of-specialization" name="country" required="required">
                           <?php
 foreach ($countries as $State) {
-    if ($State['code'] == $ClientInfo['hosting_client_country']) {
+    if ($State['code'] == $ClientInfo['client_country']) {
         echo '<option value="' . $State['code'] . '" selected>' . $State['name'] . '</option>';
     } elseif ($State['code'] == 'NULL') {
         echo '<option value="NULL" disabled="disabled" selected="selected">Select your country</option>';
@@ -66,19 +66,19 @@ foreach ($countries as $State) {
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">State Name</label>
-                        <input type="text" name="state" value="<?php echo $ClientInfo['hosting_client_state']; ?>" class="form-control" required>
+                        <input type="text" name="state" value="<?php echo $ClientInfo['client_state']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">City Name</label>
-                        <input type="text" name="city" value="<?php echo $ClientInfo['hosting_client_city']; ?>" class="form-control" required>
+                        <input type="text" name="city" value="<?php echo $ClientInfo['client_city']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Postal Code</label>
-                        <input type="text" name="postal" value="<?php echo $ClientInfo['hosting_client_pcode']; ?>" class="form-control" required>
+                        <input type="text" name="postal" value="<?php echo $ClientInfo['client_pcode']; ?>" class="form-control" required>
                     </div>
                 </div>
                 <div class="col-md-12">

+ 2 - 2
src/clientarea/views/tickets/add.php

@@ -13,13 +13,13 @@
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Your Name</label>
-                        <input type="text" name="name" value="<?php echo $ClientInfo['hosting_client_fname'].' '.$ClientInfo['hosting_client_lname'];?>" class="form-control disabled" required readonly>
+                        <input type="text" name="name" value="<?php echo $ClientInfo['client_fname'].' '.$ClientInfo['client_lname'];?>" class="form-control disabled" required readonly>
                     </div>
                 </div>
                 <div class="col-md-6">
                     <div class="mb-10 px-10">
                         <label class="form-label required">Email Address</label>
-                        <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email'];?>" class="form-control disabled" required readonly>
+                        <input type="text" name="email" value="<?php echo $ClientInfo['client_email'];?>" class="form-control disabled" required readonly>
                     </div>
                 </div>
                 <div class="col-md-6">

+ 3 - 3
src/clientarea/views/tickets/view.php

@@ -39,7 +39,7 @@
 
     <div class="card py-10">
         <div class="d-flex justify-content-between align-items-center px-5">
-            <b class="py-5"><?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?></b>
+            <b class="py-5"><?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?></b>
             <span><?php echo $TicketInfo['ticket_date']; ?></span>
         </div>
         <hr>
@@ -51,8 +51,8 @@
 <?php foreach ($ReplyInfo as $value): ?>
         <div class="card py-10">
             <div class="d-flex justify-content-between align-items-center px-5">
-                <b class="py-5"><?php if ($value['reply_from'] == $ClientInfo['hosting_client_id']) {
-    echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname'];
+                <b class="py-5"><?php if ($value['reply_from'] == $ClientInfo['client_id']) {
+    echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname'];
 } else {
     echo 'Staff Member';
 }?></b>

+ 4 - 4
src/clientarea/views/tools/dnslookup.php

@@ -12,25 +12,25 @@
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Your Name</label>
-                    <input type="text" name="name" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" name="name" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Email Address</label>
-                    <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" name="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Company Name</label>
-                    <input type="text" name="company" value="<?php echo $ClientInfo['hosting_client_company']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" name="company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Billing Address</label>
-                    <input type="text" name="address" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" name="address" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-12">

+ 4 - 4
src/clientarea/views/tools/whois.php

@@ -10,25 +10,25 @@
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Your Name</label>
-                    <input type="text" name="name" value="<?php echo $ClientInfo['hosting_client_fname'] . ' ' . $ClientInfo['hosting_client_lname']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" name="name" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Email Address</label>
-                    <input type="text" name="email" value="<?php echo $ClientInfo['hosting_client_email']; ?>" class="form-control disabled" required readonly>
+                    <input type="text" name="email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Company Name</label>
-                    <input type="text" name="company" value="<?php echo $ClientInfo['hosting_client_company']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" name="company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-6">
                 <div class="mb-10 px-10">
                     <label class="form-label required">Billing Address</label>
-                    <input type="text" name="address" value="<?php echo $ClientInfo['hosting_client_address']; ?>" class="form-control disabled"  required readonly>
+                    <input type="text" name="address" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled"  required readonly>
                 </div>
             </div>
             <div class="col-md-12">

+ 4 - 4
src/core/clientarea.php

@@ -9,22 +9,22 @@ if ($SiteConfig['site_status'] != 1) {
     $token = $data['token'];
     $email = $data['email'];
     $key = $data['key'];
-    $ClientInfo = $DB->find('clients', '*', array('hosting_client_email' => $email), null, 1);
+    $ClientInfo = $DB->find('clients', '*', array('client_email' => $email), null, 1);
 
     if ($ClientInfo) {
-        if ($ClientInfo['hosting_client_status'] == '0') {
+        if ($ClientInfo['client_status'] == '0') {
             if (empty($current_route) || $current_route != 'clientarea/validate') {
                 // redirect to clientarea/validate
                 redirect('clientarea/validate');
             }
-        } elseif ($ClientInfo['hosting_client_status'] == '2') {
+        } elseif ($ClientInfo['client_status'] == '2') {
             if (empty($current_route) || $current_route != 'clientarea/suspended') {
                 // redirect to clientarea/suspended
                 redirect('clientarea/suspended');
             }
         }
 
-        $verify = hash('sha256', json_encode([$email, $ClientInfo['hosting_client_key'], $key]));
+        $verify = hash('sha256', json_encode([$email, $ClientInfo['client_key'], $key]));
         if (trim($token) !== trim($verify)) {
             setcookie('UIISC_MEMBER', '', -1, '/');
             setMessage('Login to <b>continue!</b>', 'danger');

+ 1 - 1
src/core/library/lib/MailSMTP.class.php

@@ -30,7 +30,7 @@ class MailSMTP
      * @param bool   $debug     是否调试模式显示发送的调试信息
      * @return void
      */
-    public function __construct($smtp_host, $smtp_user, $smtp_pass, $smtp_port = 25, $auth = false, $debug = false)
+    public function __construct($smtp_host, $smtp_user, $smtp_pass, $smtp_port = 25, $auth = true, $debug = false)
     {
         $this->debug = $debug;
         $this->smtp_host = $smtp_host;

+ 16 - 16
src/install/function/Database.php

@@ -45,22 +45,22 @@ $sql = mysqli_query($connect, 'CREATE TABLE IF NOT EXISTS `hosting_builder_api`
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;');
 
 $sql = mysqli_query($connect, 'CREATE TABLE IF NOT EXISTS `hosting_clients` (
-  `hosting_client_id` INT(11) unsigned NOT NULL AUTO_INCREMENT,
-  `hosting_client_fname` VARCHAR(30) NOT NULL,
-  `hosting_client_lname` VARCHAR(30) NOT NULL,
-  `hosting_client_email` VARCHAR(70) NOT NULL,
-  `hosting_client_phone` VARCHAR(30) NOT NULL,
-  `hosting_client_address` VARCHAR(50) NOT NULL,
-  `hosting_client_country` VARCHAR(40) NOT NULL,
-  `hosting_client_city` VARCHAR(30) NOT NULL,
-  `hosting_client_pcode` VARCHAR(20) NOT NULL,
-  `hosting_client_key` VARCHAR(8) NOT NULL,
-  `hosting_client_state` VARCHAR(30) NOT NULL,
-  `hosting_client_date` VARCHAR(30) NOT NULL,
-  `hosting_client_status` INT(1) NOT NULL,
-  `hosting_client_company` VARCHAR(50) NOT NULL,
-  `hosting_client_password` VARCHAR(64) NOT NULL,
-  PRIMARY KEY (`hosting_client_id`)
+  `client_id` INT(11) unsigned NOT NULL AUTO_INCREMENT,
+  `client_fname` VARCHAR(30) NOT NULL,
+  `client_lname` VARCHAR(30) NOT NULL,
+  `client_email` VARCHAR(70) NOT NULL,
+  `client_phone` VARCHAR(30) NOT NULL,
+  `client_address` VARCHAR(50) NOT NULL,
+  `client_country` VARCHAR(40) NOT NULL,
+  `client_city` VARCHAR(30) NOT NULL,
+  `client_pcode` VARCHAR(20) NOT NULL,
+  `client_key` VARCHAR(8) NOT NULL,
+  `client_state` VARCHAR(30) NOT NULL,
+  `client_date` VARCHAR(30) NOT NULL,
+  `client_status` INT(1) NOT NULL,
+  `client_company` VARCHAR(50) NOT NULL,
+  `client_password` VARCHAR(64) NOT NULL,
+  PRIMARY KEY (`client_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8mb4;');
 
 $sql = mysqli_query($connect, 'CREATE TABLE IF NOT EXISTS `hosting_domain_extensions` (