diff --git a/src/admin/controllers/clients/view.php b/src/admin/controllers/clients/view.php index 0824898..4d45321 100755 --- a/src/admin/controllers/clients/view.php +++ b/src/admin/controllers/clients/view.php @@ -25,5 +25,5 @@ foreach ($countries as $country) { } $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'])); +$count_ssl = $DB->count('ssl', array('ssl_client_id' => $ClientInfo['client_id'])); +$count_tickets = $DB->count('tickets', array('ticket_client_id' => $ClientInfo['client_id'])); diff --git a/src/admin/controllers/tickets/close.php b/src/admin/controllers/tickets/close.php index 8e323bc..71f5955 100755 --- a/src/admin/controllers/tickets/close.php +++ b/src/admin/controllers/tickets/close.php @@ -9,7 +9,7 @@ if (!$ticket_id) { } // 查找工单信息 -$TicketInfo = $DB->find('tickets', 'ticket_email, ticket_for', array('ticket_id' => $ticket_id), null, 1); +$TicketInfo = $DB->find('tickets', 'ticket_email, ticket_client_id', array('ticket_id' => $ticket_id), null, 1); if (!$TicketInfo) { setMessage('Ticket Not Found !'); @@ -17,7 +17,7 @@ if (!$TicketInfo) { } // 查找客户信息 -$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $TicketInfo['ticket_for'])); +$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $TicketInfo['ticket_client_id'])); if (!$ClientInfo) { setMessage('Client Not Found !'); diff --git a/src/admin/controllers/tickets/reply.php b/src/admin/controllers/tickets/reply.php index 2fa0d4d..4448481 100755 --- a/src/admin/controllers/tickets/reply.php +++ b/src/admin/controllers/tickets/reply.php @@ -12,7 +12,7 @@ if (!$ticket_id) { exit('Access Denied'); } -$TicketInfo = $DB->find('tickets', 'ticket_email, ticket_for', array('ticket_id' => $ticket_id)); +$TicketInfo = $DB->find('tickets', 'ticket_email, ticket_client_id', array('ticket_id' => $ticket_id)); if (!$TicketInfo) { exit('Access Denied'); @@ -46,7 +46,7 @@ if ($resault) { // 'email_subject' => 'Ticket Reply #' . $ticket_id, // 'email_date' => date('Y-m-d H:i:s'), // 'email_body' => $email_body, - // 'email_for' => $TicketInfo['ticket_for'], + // 'email_client_id' => $TicketInfo['ticket_client_id'], // 'email_read' => 0 // ); // print_r($email_insert); diff --git a/src/clientarea/controllers/dashboard/view.php b/src/clientarea/controllers/dashboard/view.php index f7aeb7a..422a9f9 100755 --- a/src/clientarea/controllers/dashboard/view.php +++ b/src/clientarea/controllers/dashboard/view.php @@ -1,12 +1,12 @@ count('account', array('account_client_id' => $ClientInfo['client_id'], 'account_status' => 1)); -$count_ssl = $DB->count('ssl', array('ssl_for' => $ClientInfo['client_id'])); +$count_ssl = $DB->count('ssl', array('ssl_client_id' => $ClientInfo['client_id'])); -// $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_tic1 = $DB->count('tickets', array('ticket_client_id' => $ClientInfo['client_id'], 'ticket_status' => 0)); +// $count_tic2 = $DB->count('tickets', array('ticket_client_id' => $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['client_id'] . "' AND `ticket_status`=0 OR `ticket_for`='" . $ClientInfo['client_id'] . "' AND `ticket_status`=1"); +$count_tic = $DB->getColumn("SELECT COUNT(*) FROM `pre_tickets` WHERE `ticket_client_id`='" . $ClientInfo['client_id'] . "' AND `ticket_status`=0 OR `ticket_client_id`='" . $ClientInfo['client_id'] . "' AND `ticket_status`=1"); $PageInfo['title'] = 'Dashboard'; diff --git a/src/clientarea/controllers/myssl/list.php b/src/clientarea/controllers/myssl/list.php index fb62f25..899ce66 100755 --- a/src/clientarea/controllers/myssl/list.php +++ b/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['client_id'])); +$count = $DB->count('ssl', array('ssl_client_id' => $ClientInfo['client_id'])); if ($count > 0) { - $rows = $DB->findAll('ssl', '*', array('ssl_for' => $ClientInfo['client_id']), "`ssl_id` DESC"); + $rows = $DB->findAll('ssl', '*', array('ssl_client_id' => $ClientInfo['client_id']), "`ssl_id` DESC"); require_once ROOT . '/core/handler/SSLHandler.php'; require_once ROOT . '/modules/GoGetSSL/GoGetSSLApi.php'; diff --git a/src/clientarea/controllers/myssl/new.php b/src/clientarea/controllers/myssl/new.php index 6f18d4f..abc62bc 100755 --- a/src/clientarea/controllers/myssl/new.php +++ b/src/clientarea/controllers/myssl/new.php @@ -78,7 +78,7 @@ $result = $apiClient->addSSLOrder($FormData); if (count($result) > 4) { $data = array( 'ssl_key' => $result['order_id'], - 'ssl_for' => $ClientInfo['client_id'], + 'ssl_client_id' => $ClientInfo['client_id'], ); $res = $DB->insert('ssl', $data); diff --git a/src/clientarea/controllers/tickets/add.php b/src/clientarea/controllers/tickets/add.php index 485d9a0..f31e2af 100755 --- a/src/clientarea/controllers/tickets/add.php +++ b/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['client_id'], + 'ticket_client_id' => $ClientInfo['client_id'], 'ticket_date' => date('Y-m-d H:i:s'), 'ticket_status' => 0, ); diff --git a/src/clientarea/controllers/tickets/list.php b/src/clientarea/controllers/tickets/list.php index 364770e..0701db8 100755 --- a/src/clientarea/controllers/tickets/list.php +++ b/src/clientarea/controllers/tickets/list.php @@ -4,8 +4,8 @@ $PageInfo['title'] = $lang->I18N('My Tickets'); require_once ROOT . '/core/library/userinfo.class.php'; -$count = $DB->count('tickets', array('ticket_for' => $ClientInfo['client_id'])); +$count = $DB->count('tickets', array('ticket_client_id' => $ClientInfo['client_id'])); if ($count > 0) { - $rows = $DB->findAll('tickets', '*', array('ticket_for' => $ClientInfo['client_id']), "`ticket_id` DESC"); + $rows = $DB->findAll('tickets', '*', array('ticket_client_id' => $ClientInfo['client_id']), "`ticket_id` DESC"); } diff --git a/src/clientarea/controllers/tickets/view.php b/src/clientarea/controllers/tickets/view.php index 069bd54..bf09d39 100755 --- a/src/clientarea/controllers/tickets/view.php +++ b/src/clientarea/controllers/tickets/view.php @@ -11,7 +11,7 @@ if (!$ticket_id) { $where = array( 'ticket_id' => $ticket_id, - 'ticket_for' => $ClientInfo['client_id'], + 'ticket_client_id' => $ClientInfo['client_id'], ); $TicketInfo = $DB->find('tickets', '*', $where, null, 1); diff --git a/src/core/application.php b/src/core/application.php index 8d6ee11..45a62bd 100755 --- a/src/core/application.php +++ b/src/core/application.php @@ -18,9 +18,11 @@ date_default_timezone_set('Asia/Shanghai'); session_start(); define('IN_CRONLITE', true); -define('APP_VERSION', '1.1.0'); -define('DB_VERSION', '2020'); +define('APP_MODE', 'prod'); // prod, demo +define('APP_VERSION', '2.0.3'); +define('DB_VERSION', '2021'); define('APP_BRAND', 'UIISC'); +define('APP_DEBUG', false); define('APP_ROOT', dirname(__FILE__) . '/'); define('ROOT', dirname(APP_ROOT)); @@ -65,7 +67,8 @@ define('DB_PREFIX', $dbconfig['prefix']); // Detect installation status 1 if (!$dbconfig['username'] || !$dbconfig['password'] || !$dbconfig['dbname']) { header('Content-type:text/html;charset=utf-8'); - exit('The system is not installed !Click to Install'); + echo '
The system is not installed ! (error code: 1002)
'; + exit(); } $DB = new \lib\PdoHelper($dbconfig); @@ -73,7 +76,8 @@ $DB = new \lib\PdoHelper($dbconfig); // Detect installation status 2 if ($DB->query("SELECT * FROM `pre_admin` WHERE 1") == false) { header('Content-type:text/html;charset=utf-8'); - exit(`The system is not installed !Click to Install`); + echo 'The system is not installed ! (error code: 1003)
'; + exit(); } $PageInfo = array('title' => 'UIISC', 'rel' => ''); @@ -98,7 +102,8 @@ $PageInfo = array('title' => 'UIISC', 'rel' => ''); // include_once APP_ROOT . 'member.php'; if (!file_exists(ROOT . '/data/install.lock') && file_exists(ROOT . '/install/index.php')) { - exit('