Compare commits

...

14 commits

Author SHA1 Message Date
Jackson Dou
ecc42caf98
Delete install.lock 2023-07-12 00:44:42 +08:00
Jackson Dou
28c9ef0a2a update: 添加停放域名添加/删除的回调处理 2023-06-13 20:20:01 +08:00
Jackson Dou
2cd4637d26 update: 1. 新增:账号删除同步到本地回调处理,2. 新增:域名增删同步到本地的回调 2023-06-13 20:08:26 +08:00
Jackson Dou
3df3d25422 新增托管账户域名的同步和本地缓存机制 2023-06-02 01:46:24 +08:00
Jackson Dou
663ea7dd4d 修复回调token不对的问题:区分路径字符大小写 2023-06-01 18:54:19 +08:00
Jackson Dou
a3374a79da 新增托管服务回调功能:账号激活、暂停deng,支持多个托管服务 2023-06-01 12:28:11 +08:00
Jackson Dou
60169378f7
Update README.md 2023-05-30 10:44:48 +08:00
Jackson Dou
7fe0145c72 1. 解决语言设置可能不生效得问题
2. 添加对托管服务商的配置功能,支持多个服务商
3. 代码单词规范处理
2023-05-30 10:40:06 +08:00
Jackson Dou
a7f7814e74 修复:新用户注册失败 2023-05-29 18:30:40 +08:00
Jackson Dou
9eee69b7fc update:
1. Database field improvement
2. fixed #4, fixed #7, fixed #8
2023-05-22 02:03:15 +08:00
Jackson Dou
87929ce135 update:
1. support custom language config
2023-05-20 11:59:27 +08:00
Jackson Dou
097726c785 update to v2.0.2 2023-05-20 10:37:56 +08:00
Jackson Dou
589d349226
Update README.md 2023-02-14 09:51:13 +08:00
Jackson Dou
2b3178cb4e update 2022-12-13 22:42:14 +08:00
215 changed files with 8361 additions and 2157 deletions

View file

@ -2,16 +2,17 @@
An Open Source Web Hosting Account and Support Management System for MyOwnFreeHost
* Official Site : [uiisc.com](http://uiisc.com "UIISC")
* Author : [Jackson Dou](https://github.com/jksdou "Jackson Dou")
- Demo : [demo.uiisc.com](http://demo.uiisc.com)
- Official Site : [uiisc.org](http://uiisc.org "UIISC")
- Author : [Jackson Dou](https://github.com/jksdou "Jackson Dou")
## Functions
### multi-language module
- [x] Load default language
- [x] Load default language config (/core/language/)
- [x] Change language
- [x] Load custom language config (/data/language/)
### ClientArea module
@ -19,24 +20,24 @@ An Open Source Web Hosting Account and Support Management System for MyOwnFreeHo
- [x] Account verification
- [x] Account cancellation
- [x] Email verification
- [x] Login / Logout
- [x] Profile modification
- [x] Forget / Reset / Change password
- [x] Login / Logout, Forget / Reset / Change password
- [x] Apply for a web hosting account
- [x] Hosting account deletion / deactivation
- [x] Login to hosting control panel
- [x] Web hosting account deletion / deactivation
- [x] Login to web hosting control panel
### admin module
### AdminArea module
- [x] Verify if a domain is available
- [x] Creation of account hosting from the panel
- [x] Creation of hosting account
- [x] Change password to hosting account
- [x] Deactivate or disable a hosting account
- [x] Activate or enable hosting account
- [x] Verify how many domain and state of the hosting account
- [x] Members management
- [x] Site configuration
- [ ] API configuration
- [x] API configuration
- [x] multi hosting provider management
- [x] News management
- [ ] Translation file management
@ -44,21 +45,16 @@ An Open Source Web Hosting Account and Support Management System for MyOwnFreeHo
- [ ] Add/edit/delete posts
## Screenshot
##### <u>Solution Page</u>
>
> ![Solution Page](screenshot/solution.png)
##### <u>Login Page</u>
>
> ![Login Page](screenshot/login.png)
##### <u>Register Page</u>
>
> ![Register Page](screenshot/register.png)

3
nginx.conf Normal file
View file

@ -0,0 +1,3 @@
location /callback {
rewrite ^(.*)$ /callback/index.php?s=$1 last; break;
}

View file

@ -1,8 +1,3 @@
<?php
require __DIR__ . '/core/application.php';
require __DIR__ . '/core/controllers/about.php';
require __DIR__ . '/core/views/common/header.php';
require __DIR__ . '/core/views/common/navbar.php';
require __DIR__ . '/core/views/about.php';
require __DIR__ . '/core/views/common/footer.php';
require __DIR__ . '/public/controllers/about.php';

View file

@ -4,7 +4,7 @@ require_once __DIR__ . '/application.php';
$action = get('action', 'list');
if (!in_array($action, array('list', 'add', 'edit', 'view', 'goftp', 'login'))) {
if (!in_array($action, array('list', 'add', 'edit', 'view', 'goftp', 'login', 'sync'))) {
$action = 'list';
}

View file

@ -32,12 +32,20 @@ if (empty($AccountInfo)) {
// redirect('admin/accounts', '', array('action' => 'view', 'account_id' => $account_id));
// }
require_once ROOT . '/core/handler/HostingHandler.php';
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
$AccountApiConfig = array(
'apiUsername' => $AccountApi['api_username'],
'apiPassword' => $AccountApi['api_password'],
// 'apiUrl' => 'https://panel.myownfreehost.net/xml-api/',
'plan' => $AccountApi['api_package'],
);
require_once ROOT . '/modules/autoload.php';
use \InfinityFree\MofhClient\Client;
$client = Client::create($HostingApiConfig);
$client = Client::create($AccountApiConfig);
$request = $client->suspend(array(
'username' => $AccountInfo['account_key'],
'reason' => $reason,

View file

@ -2,19 +2,19 @@
require_once __DIR__ . '/../../application.php';
$account_id = get('id');
$account_id = get('account_id');
if (empty($account_id)) {
redirect('admin/accounts');
}
$data = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
if (empty($data)) {
if (empty($AccountInfo)) {
redirect('admin/accounts');
}
require_once ROOT . '/core/handler/HostingHandler.php';
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
$filemanager_url = get_filemanager_url($HostingApi['api_cpanel_url'], $data['account_username'], $data['account_password']);
$filemanager_url = get_filemanager_url($AccountApi['api_server_ftp_domain'], $AccountInfo['account_username'], $AccountInfo['account_password']);
header("Location: " . $filemanager_url);

View file

@ -14,4 +14,4 @@ if (empty($AccountInfo)) {
redirect('admin/accounts');
}
require_once ROOT . '/core/handler/HostingHandler.php';
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);

View file

@ -32,12 +32,20 @@ if ($AccountInfo['account_status'] != 1) {
redirect('admin/accounts', '', array('action' => 'edit', 'account_id' => $account_id));
}
require_once ROOT . '/core/handler/HostingHandler.php';
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
$AccountApiConfig = array(
'apiUsername' => $AccountApi['api_username'],
'apiPassword' => $AccountApi['api_password'],
// 'apiUrl' => 'https://panel.myownfreehost.net/xml-api/',
'plan' => $AccountApi['api_package'],
);
require_once ROOT . '/modules/autoload.php';
use \InfinityFree\MofhClient\Client;
$client = Client::create($HostingApiConfig);
$client = Client::create($AccountApiConfig);
$request = $client->password([
'username' => $AccountInfo['account_key'],
'password' => $new_password,

View file

@ -25,12 +25,20 @@ if ($AccountInfo['account_status'] == 1) {
redirect('admin/accounts', '', array('action' => 'view', 'account_id' => $account_id));
}
require_once ROOT . '/core/handler/HostingHandler.php';
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
$AccountApiConfig = array(
'apiUsername' => $AccountApi['api_username'],
'apiPassword' => $AccountApi['api_password'],
// 'apiUrl' => 'https://panel.myownfreehost.net/xml-api/',
'plan' => $AccountApi['api_package'],
);
require_once ROOT . '/modules/autoload.php';
use \InfinityFree\MofhClient\Client;
$client = Client::create($HostingApiConfig);
$client = Client::create($AccountApiConfig);
$request = $client->unsuspend(array(
'username' => $AccountInfo['account_key'],
));

View file

@ -0,0 +1,51 @@
<?php
require_once __DIR__ . '/../../application.php';
$account_id = get('account_id', 0);
if (empty($account_id)) {
redirect('clientarea/accounts');
}
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
if (empty($AccountInfo)) {
setMessage('not found', 'danger');
redirect('clientarea/accounts');
}
// TODO: Change to an asynchronous request
require_once ROOT . '/modules/autoload.php';
use \InfinityFree\MofhClient\Client;
if ($AccountInfo['account_status'] == 1) {
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
$AccountApiConfig = array(
'apiUsername' => $AccountApi['api_username'],
'apiPassword' => $AccountApi['api_password'],
// 'apiUrl' => 'https://panel.myownfreehost.net/xml-api/',
'plan' => $AccountApi['api_package'],
);
$client = Client::create($AccountApiConfig);
$request = $client->getUserDomains(array('username' => $AccountInfo['account_username']));
$response = $request->send();
$DomainList = $response->getDomains();
} else {
// inactive
$DomainList = array();
}
if (count($DomainList) > 0) {
foreach($DomainList as &$item) {
// 格式 ("abc.com",1234)
$item = '("' . $item . '",' .$account_id . ')';
}
// 清理
$result = $DB->delete('account_domain', array('domain_account_id' => $account_id));
// 同步到本地
// $result = $DB->insert('account_domain', $DomainList);
$sql = "INSERT INTO `hosting_account_domain` (domain_name,domain_account_id) VALUES " . implode(',', $DomainList);
$result = $DB->query($sql);
}
redirect('admin/accounts', '', array('action' => 'view', 'account_id' => $account_id));

View file

@ -10,13 +10,14 @@ if (empty($account_id)) {
redirect('admin/accounts');
}
require_once ROOT . '/core/handler/HostingHandler.php';
$PageInfo['title'] = 'View Account (#' . $account_id . ')';
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
if (empty($AccountInfo)) {
setMessage('not found', 'danger');
redirect('admin/accounts');
}
$PageInfo['title'] = 'View Account (#' . $account_id . ')';
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
$AccountDomainList = $DB->findAll('account_domain', '*', array('domain_account_id' => $account_id));

View file

@ -8,9 +8,9 @@ if (!$client_id) {
exit('Access Denied');
}
$resault = $DB->update('clients', array('client_status' => 1), array('client_id' => $client_id));
$result = $DB->update('clients', array('client_status' => 1), array('client_id' => $client_id));
if ($resault) {
if ($result) {
setMessage('Client activated successfully !');
} else {
setMessage("Something went's wrong !", 'danger');

View file

@ -1,6 +1,6 @@
<?php
$PageInfo['title'] = 'My Clients';
$PageInfo['title'] = $lang->I18N('Clients List');
$count = $DB->count('clients');

View file

@ -15,7 +15,7 @@ $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, '/');
setcookie('UIISC_MEMBER', base64_encode(gzcompress(json_encode(array('email' => $email, 'token' => $token, 'key' => $key)))), time() + $times * 86400, '/', $site_domain);
setMessage('Logged in as ' . $email . ' <b>successfully!</b>', 'success');

View file

@ -8,9 +8,9 @@ if (!$client_id) {
exit('Access Denied');
}
$resault = $DB->update('clients', array('client_status' => 2), array('client_id' => $client_id));
$result = $DB->update('clients', array('client_status' => 2), array('client_id' => $client_id));
if ($resault) {
if ($result) {
setMessage('Client suspended successfully !');
} else {
setMessage("Something went's wrong !", 'danger');

View file

@ -1,17 +1,13 @@
<?php
require_once ROOT . '/core/handler/HostingHandler.php';
require_once ROOT . '/core/library/userinfo.class.php';
require_once ROOT . '/core/library/countries.php';
$client_id = get('client_id');
if (empty($client_id)) {
redirect('admin/clients');
exit();
}
$PageInfo['title'] = 'View client (' . $client_id . ')';
$ClientInfo = $DB->find('clients', '*', array('client_id' => $client_id), null, 1);
@ -24,6 +20,7 @@ foreach ($countries as $country) {
}
}
$PageInfo['title'] = 'View client (' . $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']));
$count_ssl = $DB->count('ssl', array('ssl_client_id' => $ClientInfo['client_id']));
$count_tickets = $DB->count('tickets', array('ticket_client_id' => $ClientInfo['client_id']));

View file

@ -9,7 +9,7 @@ if (!isset($_POST['submit'])) {
$domain = post('domain');
if (!$domain) {
redirect('admin/settings', 'domain');
redirect('admin/domain');
}
$domain = strtolower($domain);
@ -26,12 +26,12 @@ $has = $DB->count('domain_extensions', $data);
if ($has && $has > 0) {
setMessage('Extension aleady <b>exsist!</b>', 'danger');
} else {
$resault = $DB->insert('domain_extensions', $data);
if ($resault) {
$result = $DB->insert('domain_extensions', $data);
if ($result) {
setMessage('Extension added <b>successfully!</b>');
} else {
setMessage('Something went' . "'" . 's <b>wrong!</b>', 'danger');
}
}
redirect('admin/settings', 'domain');
redirect('admin/domain');

View file

@ -9,7 +9,7 @@ if (!isset($_POST['submit'])) {
$extension = post('extension');
if (!$extension) {
redirect('admin/settings', 'domain');
redirect('admin/domain');
}
$extension = strtolower($extension);
@ -35,4 +35,4 @@ if (!$count > 0) {
}
}
redirect('admin/settings', 'domain');
redirect('admin/domain');

View file

@ -0,0 +1,97 @@
<?php
if (isset($_POST['submit'])) {
require '../../application.php';
if (!post('api_type')) {
setMessage('need field: api_type', 'danger');
redirect('admin/hosting');
}
if (!post('api_key')) {
setMessage('need field: api_key', 'danger');
redirect('admin/hosting');
}
if (!post('api_username')) {
setMessage('need field: api_username', 'danger');
redirect('admin/hosting');
}
if (!post('api_password')) {
setMessage('need field: api_password', 'danger');
redirect('admin/hosting');
}
if (!post('api_server_domain')) {
setMessage('need field: api_server_domain', 'danger');
redirect('admin/hosting');
}
if (!post('api_cpanel_url')) {
setMessage('need field: api_cpanel_url', 'danger');
redirect('admin/hosting');
}
if (!post('api_server_ip')) {
setMessage('need field: api_server_ip', 'danger');
redirect('admin/hosting');
}
if (!post('api_server_ftp_domain')) {
setMessage('need field: api_server_ftp_domain', 'danger');
redirect('admin/hosting');
}
if (!post('api_server_sql_domain')) {
setMessage('need field: api_server_sql_domain', 'danger');
redirect('admin/hosting');
}
if (!post('api_ns_1')) {
setMessage('need field: api_ns_1', 'danger');
redirect('admin/hosting');
}
if (!post('api_ns_2')) {
setMessage('need field: api_ns_2', 'danger');
redirect('admin/hosting');
}
if (!post('api_package')) {
setMessage('need field: api_package', 'danger');
redirect('admin/hosting');
}
if (!post('api_callback_token')) {
setMessage('need field: api_callback_token', 'danger');
redirect('admin/hosting');
}
$data = array(
'api_username' => post('api_username'),
'api_password' => post('api_password'),
'api_type' => post('api_type'),
'api_key' => post('api_key'),
'api_server_domain' => post('api_server_domain'),
'api_cpanel_url' => post('api_cpanel_url'),
'api_server_ftp_domain' => post('api_server_ftp_domain'),
'api_server_sql_domain' => post('api_server_sql_domain'),
'api_server_ip' => post('api_server_ip'),
'api_ns_1' => post('api_ns_1'),
'api_ns_2' => post('api_ns_2'),
'api_package' => post('api_package'),
'api_callback_token' => post('api_callback_token')
);
$result = $DB->insert('account_api', $data);
if ($result) {
setMessage('Hosting Provider added successfully !');
} else {
setMessage("Something went's wrong !", 'danger');
}
redirect('admin/hosting');
}

View file

@ -1,28 +1,113 @@
<?php
require '../../application.php';
if (isset($_POST['submit'])) {
require '../../application.php';
$api_id = post('api_id');
if (!$api_id) {
setMessage('need field: api_id', 'danger');
redirect('admin/hosting');
}
if (!isset($_POST['submit'])) {
exit('Access Denied');
}
if (!post('api_type')) {
setMessage('need field: api_type', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
$data = array(
'api_username' => post('api_username'),
'api_password' => post('api_password'),
'api_cpanel_url' => post('api_cpanel_url'),
'api_server_ip' => post('api_server_ip'),
'api_ns_1' => post('api_ns_1'),
'api_ns_2' => post('api_ns_2'),
'api_package' => post('api_package'),
'api_callback_token' => post('api_callback_token')
);
if (!post('api_key')) {
setMessage('need field: api_key', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
$resault = $DB->update('account_api', $data, array('api_key' => 'myownfreehost'));
if (!post('api_username')) {
setMessage('need field: api_username', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if ($resault) {
setMessage('Hosting Server updated successfully !');
if (!post('api_password')) {
setMessage('need field: api_password', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_server_domain')) {
setMessage('need field: api_server_domain', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_cpanel_url')) {
setMessage('need field: api_cpanel_url', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_server_ip')) {
setMessage('need field: api_server_ip', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_server_ftp_domain')) {
setMessage('need field: api_server_ftp_domain', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_server_sql_domain')) {
setMessage('need field: api_server_sql_domain', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_ns_1')) {
setMessage('need field: api_ns_1', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_ns_2')) {
setMessage('need field: api_ns_2', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_package')) {
setMessage('need field: api_package', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
if (!post('api_callback_token')) {
setMessage('need field: api_callback_token', 'danger');
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
}
$data = array(
'api_username' => post('api_username'),
'api_password' => post('api_password'),
'api_type' => post('api_type'),
'api_key' => post('api_key'),
'api_server_domain' => post('api_server_domain'),
'api_cpanel_url' => post('api_cpanel_url'),
'api_server_ftp_domain' => post('api_server_ftp_domain'),
'api_server_sql_domain' => post('api_server_sql_domain'),
'api_server_ip' => post('api_server_ip'),
'api_ns_1' => post('api_ns_1'),
'api_ns_2' => post('api_ns_2'),
'api_package' => post('api_package'),
'api_callback_token' => post('api_callback_token')
);
$result = $DB->update('account_api', $data, array('api_id' => $api_id));
if ($result) {
setMessage('Hosting Provider updated successfully !');
} else {
setMessage("Something went's wrong !", 'danger');
}
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
} else {
setMessage("Something went's wrong !", 'danger');
if (!defined('IN_CRONLITE')) {
exit('Access Denied');
}
$id = get('id');
if ($id > 0) {
$data = $DB->find('account_api', '*', array('api_id' => $id), null, 1);
$PageInfo = ['title' => 'Edit Hosting Provider #' . $id, 'rel' => ''];
} else {
setMessage('need field: id', 'danger');
redirect('admin/hosting');
}
}
redirect('admin/settings', 'hosting');

View file

@ -0,0 +1,10 @@
<?php
if (!defined('IN_CRONLITE')) {
exit('Access Denied');
}
$count = $DB->count('account_api');
if ($count > 0) {
$rows = $DB->findAll('account_api', '*', array(), "`api_id` DESC");
}

View file

@ -1,6 +1,21 @@
<?php
require_once ROOT . '/core/library/userinfo.class.php';
require_once ROOT . '/core/handler/HostingHandler.php';
if (!defined('IN_CRONLITE')) {
exit('Access Denied');
}
$PageInfo['title'] = 'Hosting Settings';
$api_id = get('id');
$api_key = get('api_key');
if ($api_id > 0) {
$data = $DB->find('account_api', '*', array('api_id' => $api_id), null, 1);
$api_callback_url = "{$site_url}/callback/{$data['api_key']}/{$data['api_callback_token']}";
$PageInfo = ['title' => 'View Hosting Provider', 'rel' => ''];
} else if (!empty($api_key)) {
$data = $DB->find('account_api', '*', array('api_key' => $api_key), null, 1);
$api_callback_url = "{$site_url}/callback/{$data['api_key']}/{$data['api_callback_token']}";
$PageInfo = ['title' => 'View Hosting Provider', 'rel' => ''];
} else {
$PageInfo = ['title' => 'Unathorized Access', 'rel' => ''];
$data = null;
}

View file

@ -9,8 +9,8 @@ if (isset($_POST['submit'])) {
'knowledgebase_date' => date('Y-m-d H:i:s'),
);
$resault = $DB->insert('knowledgebase', $data);
if ($resault) {
$result = $DB->insert('knowledgebase', $data);
if ($result) {
setMessage('Knowledgebase added successfully !');
} else {
setMessage("Something went's wrong !", 'danger');

View file

@ -23,9 +23,9 @@ if (isset($_POST['submit'])) {
'knowledgebase_content' => $editor,
'knowledgebase_date' => date('Y-m-d H:i:s'),
);
$resault = $DB->update('knowledgebase', $FormData, array('knowledgebase_id' => $id));
$result = $DB->update('knowledgebase', $FormData, array('knowledgebase_id' => $id));
if ($resault) {
if ($result) {
setMessage('Knowledgebase updated successfully !');
} else {
setMessage("Something went's wrong !", 'danger');

View file

@ -10,16 +10,16 @@ if (isset($_POST['submit'])) {
'news_date' => date('Y-m-d H:i:s'),
);
$resault = $DB->insert('news', $data);
$result = $DB->insert('news', $data);
if ($resault) {
if ($result) {
setMessage('News added <b>successfully!</b>');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');
}
redirect('admin/news');
} else {
$PageInfo['title'] = 'Add News';
$PageInfo['title'] = $lang->I18N('News Add');
$status_types = array(
"关闭",
"打开",

View file

@ -13,9 +13,9 @@ if (isset($_POST['submit'])) {
'news_lastupdated' => date('Y-m-d H:i:s'),
);
$resault = $DB->update('news', $data, array('news_id' => $id));
$result = $DB->update('news', $data, array('news_id' => $id));
if ($resault) {
if ($result) {
setMessage('News update <b>successfully!</b>');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');
@ -45,3 +45,5 @@ if ($id > 0) {
$news = $DB->find('news', '*', array('news_id' => $id), null, 1);
}
$load_editor = 1;
$PageInfo['title'] = $lang->I18N('News Edit');

View file

@ -12,3 +12,5 @@ $status_types = array(
"关闭",
"打开",
);
$PageInfo['title'] = $lang->I18N('News List');

View file

@ -20,3 +20,5 @@ $data = null;
if ($id > 0) {
$data = $DB->find('news', '*', array('news_id' => $id), null, 1);
}
$PageInfo['title'] = $lang->I18N('News Details');

View file

@ -9,8 +9,8 @@ if (isset($_POST['submit'])) {
'admin_key' => $AdminInfo['admin_key']
);
$resault = $DB->update('admin', $data, $where);
if ($resault) {
$result = $DB->update('admin', $data, $where);
if ($result) {
setMessage('Profile updated successfully !');
} else {
setMessage("Something went's wrong !", 'danger');

View file

@ -15,8 +15,8 @@ $FormData = array(
);
if (hash('sha256', $FormData['old_password']) == $FormData['user_password']) {
$resault = $DB->update('admin', array('admin_password' => $FormData['hashed_password']), array('admin_key' => $FormData['user_key']));
if ($resault) {
$result = $DB->update('admin', array('admin_password' => $FormData['hashed_password']), array('admin_key' => $FormData['user_key']));
if ($result) {
setMessage('Password changed successfully !');
unset($_SESSION['UIISC_ADMIN']);
redirect('admin/login');

View file

@ -1,5 +1,3 @@
<?php
$PageInfo['title'] = $lang->I18N('My Profile');
require_once ROOT . '/core/library/userinfo.class.php';

View file

@ -22,9 +22,9 @@ if (isset($_POST['submit'])) {
'site_key' => 'UIISC',
);
$resault = $DB->update('config', $data, $where);
$result = $DB->update('config', $data, $where);
if ($resault) {
if ($result) {
setMessage('Clientarea updated <b>successfully!</b>');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');

View file

@ -1,7 +1,5 @@
<?php
// require_once ROOT . '/library/userinfo.class.php';
$Statuses = array(
array('name' => 'Live', 'value' => '1'),
array('name' => 'Maintaince', 'value' => '0'),

View file

@ -14,9 +14,9 @@ $where = array(
'builder_id' => 'SITEPRO',
);
$resault = $DB->update('builder_api', $data, $where);
$result = $DB->update('builder_api', $data, $where);
if ($resault) {
if ($result) {
setMessage('SitePro API updated <b>successfully!</b>');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');

View file

@ -17,9 +17,9 @@ $where = array(
'smtp_key' => 'SMTP',
);
$resault = $DB->update('smtp', $data, $where);
$result = $DB->update('smtp', $data, $where);
if ($resault) {
if ($result) {
setMessage('SMTP updated <b>successfully!</b>');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');

View file

@ -7,13 +7,13 @@ if (!isset($_POST['submit'])) {
$email = post('email');
$resault = send_mail(array(
$result = send_mail(array(
'to' => $email,
'message' => $lang->I18N('This test email indicates that SMTP has been configured correctly.'),
'subject' => $lang->I18N('Send Test Email'),
));
if ($resault) {
if ($result) {
setMessage('The test email has been sent <b>successfully</b> !');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');

View file

@ -14,9 +14,9 @@ $where = array(
'api_key' => 'FREESSL',
);
$resault = $DB->update('ssl_api', $data, $where);
$result = $DB->update('ssl_api', $data, $where);
if ($resault) {
if ($result) {
setMessage('SSL API updated <b>successfully!</b>');
} else {
setMessage("Something went's <b>wrong!</b>", 'danger');

View file

@ -4,7 +4,7 @@ if (!defined('IN_CRONLITE')) {
exit('Access Denied');
}
$PageInfo['title'] = 'SSL Certificates';
$PageInfo['title'] = $lang->I18N('SSL Certificates');
$count = $DB->count('ssl');
if ($count > 0) {

View file

@ -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,16 +17,16 @@ 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 !');
redirect('admin/tickets');
}
$resault = $DB->update('tickets', array('ticket_status' => 3), array('ticket_id' => $ticket_id));
$result = $DB->update('tickets', array('ticket_status' => 3), array('ticket_id' => $ticket_id));
if ($resault) {
if ($result) {
$ticket_url = setURL('admin/tickets', '', array('action' => 'view', 'ticket_id' => $ticket_id));
$email_body = email_build_body('Ticket Closed',
$ClientInfo['client_fname'],

View file

@ -12,24 +12,24 @@ 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');
}
// update status
$resault = $DB->update('tickets', array('ticket_status' => '1'), array('ticket_id' => $ticket_id));
$result = $DB->update('tickets', array('ticket_status' => '1'), array('ticket_id' => $ticket_id));
if ($resault) {
if ($result) {
$FormData = array(
'reply_for' => $ticket_id,
'reply_from' => 999999,
'reply_content' => post('content'),
'reply_date' => date('Y-m-d H:i:s'),
);
$resault_insert = $DB->insert('ticket_replies', $FormData);
if ($resault_insert) {
$result_insert = $DB->insert('ticket_replies', $FormData);
if ($result_insert) {
$ticket_url = setURL('clientarea/tickets', array('action' => 'view', 'ticket_id' => $ticket_id));
$EmailContent = '<p>You have received a reply from Support Staff.</p>';
@ -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);

18
src/admin/domain.php Executable file
View file

@ -0,0 +1,18 @@
<?php
require_once __DIR__ . '/application.php';
$action = get('action', 'list');
if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
$action = 'list';
}
$PageInfo['title'] = 'Domain Provider ' . ucfirst($action);
require __DIR__ . '/controllers/domain/' . $action . '.php';
require __DIR__ . '/views/common/header.php';
require __DIR__ . '/views/common/navbar.php';
require __DIR__ . '/views/common/sidebar.php';
require __DIR__ . '/views/domain/' . $action . '.php';
require __DIR__ . '/views/common/footer.php';

18
src/admin/hosting.php Executable file
View file

@ -0,0 +1,18 @@
<?php
require_once __DIR__ . '/application.php';
$action = get('action', 'list');
if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
$action = 'list';
}
$PageInfo['title'] = 'Hosting Provider ' . ucfirst($action);
require __DIR__ . '/controllers/hosting/' . $action . '.php';
require __DIR__ . '/views/common/header.php';
require __DIR__ . '/views/common/navbar.php';
require __DIR__ . '/views/common/sidebar.php';
require __DIR__ . '/views/hosting/' . $action . '.php';
require __DIR__ . '/views/common/footer.php';

View file

@ -8,8 +8,6 @@ if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
$action = 'list';
}
$PageInfo['title'] = 'News ' . ucfirst($action);
require __DIR__ . '/controllers/news/' . $action . '.php';
require __DIR__ . '/views/common/header.php';
require __DIR__ . '/views/common/navbar.php';

View file

@ -1,7 +1,6 @@
<?php
require_once __DIR__ . '/application.php';
require_once ROOT . '/core/library/userinfo.class.php';
require_once ROOT . '/core/library/tickets.php';
$action = get('action', 'list');

View file

@ -1,13 +1,14 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">Hosting Account Settings</h5>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="m-0"><?php echo $lang->I18N('Hosting Account Settings'); ?></h5>
<a href="accounts.php?action=view&account_id=<?php echo $account_id; ?>" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<div class="mb-15">
<hr />
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
@ -23,7 +24,7 @@
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Phone Number</label>
<label class="form-label required"><?php echo $lang->I18N('Phone Number'); ?></label>
<input type="text" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control disabled" readonly>
</div>
</div>
@ -34,12 +35,12 @@
</div>
</div>
</div>
<div class="col-md-12"><hr></div>
<div class="col-md-12"><hr /></div>
<?php if ($AccountInfo['account_status'] == '1'): ?>
<form class="row" action="controllers/accounts/password.php" method="post">
<input type="hidden" name="account_id" value="<?php echo $account_id; ?>">
<div class="col-md-6">
<div class="mb-10 px-10">
<div class="pb-10 px-10">
<label class="form-label required">New Password</label>
<input type="password" name="new_password" placeholder="New password here..." class="form-control">
</div>
@ -92,3 +93,4 @@
</div>
</div>
</div>
</div>

View file

@ -1,27 +1,37 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<h3 class="m-0"><?php echo $PageInfo['title']; ?></h3>
<a href="index.php" class="btn text-white btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr />
<div class="table-responsive">
<table class="table table-stripped">
<div class="card-body table-responsive">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="5%">ID</th>
<th width="40%">Username</th>
<th width="30%">Domain</th>
<th width="5%">Deploy Date</th>
<th width="5%">Status</th>
<th width="5%">Action</th>
<th>ID</th>
<th><?php echo $lang->I18N('Clients'); ?></th>
<th><?php echo $lang->I18N('Provider'); ?></th>
<th><?php echo $lang->I18N('Username'); ?></th>
<th><?php echo $lang->I18N('Domain'); ?></th>
<th><?php echo $lang->I18N('Deploy Date'); ?></th>
<th><?php echo $lang->I18N('Status'); ?></th>
<th><?php echo $lang->I18N('Action'); ?></th>
</thead>
<tbody>
<?php if ($count > 0): ?>
<?php foreach ($rows as $row): ?>
<tr>
<td># <?php $row['account_id'];?></td>
<td><?php echo $row['account_id'];?></td>
<td><?php echo $row['account_client_id']; ?></td>
<td>
<a href="hosting.php?action=view&api_key=<?php echo $row['account_api_key']; ?>">
<?php echo $row['account_api_key']; ?>
</a>
</td>
<td><?php echo $row['account_username']; ?></td>
<td><?php echo $row['account_domain']; ?></td>
<td><?php echo $row['account_date']; ?></td>
@ -35,6 +45,9 @@ if ($row['account_status'] == '0') {
} elseif ($row['account_status'] == '2') {
$btn = ['danger', 'lock'];
echo '<span class="badge bg-danger text-white border-0">Suspended</span>';
} elseif ($row['account_status'] == '3') {
$btn = ['danger', 'lock'];
echo '<span class="badge bg-danger text-white border-0">Deleted</span>';
}
?></td>
<td>
@ -52,6 +65,9 @@ if ($row['account_status'] == '0') {
</tbody>
</table>
</div>
<p class="pb-10"><?php echo $count; ?> Records Founds</p>
<div class="card-footer">
<p class="py-10"><?php echo $count; ?> Records Founds</p>
</div>
</div>
</div>
</div>

View file

@ -1,25 +1,27 @@
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">cPanel Login</h5>
<a href="accounts.php?action=view&account_id=<?php echo $account_id; ?>" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<div class="mb-15">
<p>Now you are going to be redirected to the control panel. It can take upto 5 seconds based on your internet connecion speed.</p>
<form name="login" action="https://<?php echo $HostingApi['api_cpanel_url'] ?>/login.php" id="account_ogin" method="post">
<input type="hidden" name="uname" value="<?php echo $AccountInfo['account_username']; ?>">
<input type="hidden" name="passwd" value="<?php echo $AccountInfo['account_password']; ?>">
<input type="hidden" name="language" value="<?php echo $lang->get_language_value(); ?>">
<div class="text-center">
<input type="submit" name="Submit" value="Click here to Redirect" class="btn btn-primary btn-sm text-white">
</div>
</form>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $lang->I18N('Login to Control Panel'); ?></h3>
</div>
<hr />
<div class="card-body">
<p>Now you are going to be redirected to the control panel. It can take upto 5 seconds based on your internet connecion speed.</p>
<form name="login" action="https://<?php echo $AccountApi['api_cpanel_url'] ?>/login.php" id="account_ogin" method="post">
<input type="hidden" name="uname" value="<?php echo $AccountInfo['account_username']; ?>">
<input type="hidden" name="passwd" value="<?php echo $AccountInfo['account_password']; ?>">
<input type="hidden" name="language" value="<?php echo $lang->get_language_value(); ?>">
<div class="text-center">
<a class="btn btn-danger btn-sm" href="accounts.php?action=view&account_id=<?php echo $account_id; ?>">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('cancel'); ?>
</a>
<input type="submit" name="Submit" value="Click here to Redirect" class="btn btn-primary btn-sm text-white">
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
document.getElementById('account_ogin').submit(); // SUBMIT FORM
// document.getElementById('account_ogin').submit(); // SUBMIT FORM
</script>

View file

View file

@ -1,127 +1,171 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<div class="card pt-0">
<div class="card-header d-flex justify-content-between align-items-center pt-15 px-5">
<h5 class="m-0">Viewing Account (# <?php echo $account_id; ?>)</h5>
<a href="accounts.php" class="btn btn-sm btn-danger">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<?php if ($AccountInfo['account_status'] == '0'): ?>
<div class="alert alert-secondary col-md-12">This account is inactive.</div>
<?php elseif ($AccountInfo['account_status'] == '2'): ?>
<div class="alert alert-secondary col-md-12">This account has been suspended.</div>
<?php endif;?>
<div class="row pb-10">
<div class="col-md-12">
<div class="row">
<div class="col-md-4 px-5 text-center py-15">
<i class="fa fa-laptop fa-10x"></i>
</div>
<div class="col-md-4 offset-md-4 px-20 py-5 text-center text-md-right">
<?php if ($AccountInfo['account_status'] == '1'): ?>
<a href="accounts.php?action=login&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-success text-white btn-block my-5 btn-rounded">Control Panel</a>
<a href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-primary text-white btn-block my-5 btn-rounded">File Manager</a>
<?php else: ?>
<button class="btn btn-success text-white btn-block my-5 btn-rounded disabled">Control Panel</button>
<button class="btn btn-primary text-white btn-block my-5 btn-rounded disabled">File Manager</button>
<?php endif;?>
<a href="accounts.php?action=edit&account_id=<?php echo $account_id; ?>" class="btn btn-secondary btn-block my-5 btn-rounded">Edit Settings</a>
<hr />
<div class="card-body">
<?php if ($AccountInfo['account_status'] == '0'): ?>
<div class="alert alert-secondary col-md-12">This account is inactive.</div>
<?php elseif ($AccountInfo['account_status'] == '2'): ?>
<div class="alert alert-secondary col-md-12">This account has been suspended.</div>
<?php elseif ($AccountInfo['account_status'] == '3'): ?>
<div class="alert alert-secondary col-md-12">This account has been deleted.</div>
<?php endif;?>
<div class="row pb-10">
<div class="col-md-12 pb-10 mb-10">
<div class="row">
<div class="col-md-6 px-5 text-center py-15">
<i class="fa fa-laptop fa-10x"></i>
</div>
<div class="col-md-6 py-5 text-center text-md-right">
<?php if ($AccountInfo['account_status'] == '1'): ?>
<a href="accounts.php?action=login&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-success text-white btn-block my-5 btn-rounded"><?php echo $lang->I18N('Control Panel'); ?></a>
<a href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-primary text-white btn-block my-5 btn-rounded"><?php echo $lang->I18N('File Manager'); ?></a>
<?php else: ?>
<button class="btn btn-success text-white btn-block my-5 btn-rounded disabled"><?php echo $lang->I18N('Control Panel'); ?></button>
<button class="btn btn-primary text-white btn-block my-5 btn-rounded disabled"><?php echo $lang->I18N('File Manager'); ?></button>
<?php endif;?>
<a href="accounts.php?action=edit&account_id=<?php echo $account_id; ?>" class="btn btn-secondary btn-block my-5 btn-rounded"><?php echo $lang->I18N('Edit Settings'); ?></a>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Cpanel Username:</b>
<span><?php echo $AccountInfo['account_username']; ?></span>
<hr />
<div class="col-md-4 col-sm-6">
<div class="m-5">
<b>Control Panel Username:</b>
<span><?php echo $AccountInfo['account_username']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Cpanel Password:</b>
<span><kbd><?php echo $AccountInfo['account_password']; ?></kbd></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Control Panel Password:</b>
<span><kbd><?php echo $AccountInfo['account_password']; ?></kbd></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Main Domain:</b>
<span><?php echo $AccountInfo['account_domain']; ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Main Domain:</b>
<span><?php echo $AccountInfo['account_domain']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Cpanel Domain:</b>
<span><?php echo $HostingApi['api_cpanel_url']; ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Control Panel Domain:</b>
<span><?php echo $AccountApi['api_cpanel_url']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Status:</b>
<span>
<?php if ($AccountInfo['account_status'] == '0') {
<div class="col-md-4 col-sm-6 col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Status:</b>
<span>
<?php if ($AccountInfo['account_status'] == '0') {
echo '<span class="badge bg-secondary">Inactive</span>';
} elseif ($AccountInfo['account_status'] == '1') {
echo '<span class="badge bg-success">Active</span>';
} elseif ($AccountInfo['account_status'] == '2') {
echo '<span class="badge bg-danger">Suspend</span>';
}?>
</span>
} elseif ($AccountInfo['account_status'] == '3') {
echo '<span class="badge bg-danger">Deleted</span>';
} ?>
</span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Creation Date:</b>
<span><?php echo $AccountInfo['account_date']; ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Creation Date:</b>
<span><?php echo $AccountInfo['account_date']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Server IP:</b>
<span><?php echo $HostingApi['api_server_ip']; ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Server IP:</b>
<span><?php echo $AccountApi['api_server_ip']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Your IP:</b>
<span><?php echo UserInfo::get_ip() ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Your IP:</b>
<span><?php echo get_client_ip(); ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>FTP Hostname:</b>
<span><?php echo str_replace('cpanel', 'ftp', $HostingApi['api_cpanel_url']) ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>FTP Hostname:</b>
<span><?php echo $AccountApi['api_server_ftp_domain']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>FTP Port:</b>
<span>21</span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>FTP Port:</b>
<span>21</span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>MySQL Hostname:</b>
<span><?php echo str_replace('cpanel', 'sqlxxx', $HostingApi['api_cpanel_url']) ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>MySQL Hostname:</b>
<span><?php echo $AccountInfo['account_sql'] . '.' . $AccountApi['api_server_sql_domain']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Mysql Port:</b>
<span>3306</span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Mysql Port:</b>
<span>3306</span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Nameserver 1:</b>
<span><?php echo $HostingApi['api_ns_1']; ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Nameserver 1:</b>
<span><?php echo $AccountApi['api_ns_1']; ?></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Nameserver 2:</b>
<span><?php echo $HostingApi['api_ns_2']; ?></span>
<div class="col-md-4 col-sm-6">
<div class="d-flex justify-content-between align-items-center m-5">
<b>Nameserver 2:</b>
<span><?php echo $AccountApi['api_ns_2']; ?></span>
</div>
</div>
</div>
</div>
<hr />
<div class="card-footer">
<div class="col-md-6">
<?php if ($AccountInfo['account_status'] == '1'): ?>
<a href="accounts.php?action=login&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-success text-white m-5 btn-rounded">Control Panel</a>
<a href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-primary text-white m-5 btn-rounded">File Manager</a>
<?php else: ?>
<button class="btn btn-success text-white m-5 btn-rounded disabled">Control Panel</button>
<button class="btn btn-primary text-white m-5 btn-rounded disabled">File Manager</button>
<?php endif;?>
<a href="accounts.php?action=edit&account_id=<?php echo $account_id; ?>" class="btn btn-secondary m-5 btn-rounded">Edit Settings</a>
</div>
</div>
</div>
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">Account Domains</h5>
<a href="accounts.php?action=sync&type=domain&account_id=<?php echo $account_id; ?>" class="btn btn-sm btn-danger">
<i class="fa fa-sync"></i> <?php echo $lang->I18N('Sync'); ?>
</a>
</div>
<hr />
<div class="mb-10 px-10">
<?php if (count($AccountDomainList) > 0): ?>
<?php foreach ($AccountDomainList as $domain): ?>
<div class='d-flex justify-content-between align-items-center m-5'>
<span><a href="http://<?php echo $domain['domain_name']; ?>" target="_blank" ref="noreferrer noopener"><?php echo $domain['domain_name']; ?></a></span>
<span><a href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>&domain=<?php echo $domain['domain_name']; ?>" class='btn btn-sm btn-square btn-secondary' target='_blank'><i class='fa fa-file-import'></i></a></span>
</div>
<?php endforeach;?>
<?php else: ?>
<p class='text-center'>No Domain Found</p>
<?php endif;?>
</div>
</div>
</div>
</div>

View file

@ -1,38 +1,41 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">My Clients</h5>
<a href="index.php" class="btn text-white btn-danger btn-sm"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
<div class="card m-20 p-20">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $lang->I18N('Clients List'); ?></h3>
<a href="index.php" class="btn btn-danger btn-sm pull-right"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
</div>
<hr>
<div class="table-responsive">
<table class="table table-stripped">
<hr />
<div class="card-body table-responsive">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="5%">ID</th>
<th width="10%">Name</th>
<th width="40%">Email</th>
<th width="10%">Date</th>
<th width="10%">Status</th>
<th width="10%">Action</th>
<th>ID</th>
<th><?php echo $lang->I18N('Name'); ?></th>
<th><?php echo $lang->I18N('Email'); ?></th>
<th><?php echo $lang->I18N('Phone'); ?></th>
<th><?php echo $lang->I18N('Date'); ?></th>
<th><?php echo $lang->I18N('Status'); ?></th>
<th><?php echo $lang->I18N('Action'); ?></th>
</thead>
<tbody>
<?php if ($count > 0): ?>
<?php foreach ($rows as $value): ?>
<?php foreach ($rows as $value): ?>
<tr>
<td># <?php echo $value['client_id']; ?></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_phone']; ?></td>
<td><?php echo $value['client_date']; ?></td>
<td><?php
if ($value['client_status'] == '0') {
$btn = ['secondary', 'cog'];
echo '<span class="badge bg-secondary badge-pill">Inactive</span>';
$btn = ['secondary', 'cog'];
echo '<span class="badge bg-secondary badge-pill">Inactive</span>';
} elseif ($value['client_status'] == '1') {
$btn = ['success', 'globe'];
echo '<span class="badge bg-success badge-pill">Active</span>';
$btn = ['success', 'globe'];
echo '<span class="badge bg-success badge-pill">Active</span>';
} elseif ($value['client_status'] == '2') {
$btn = ['danger', 'lock'];
echo '<span class="badge bg-danger badge-pill">Suspended</span>';
$btn = ['danger', 'lock'];
echo '<span class="badge bg-danger badge-pill">Suspended</span>';
}
?></td>
<td>
@ -41,7 +44,7 @@ if ($value['client_status'] == '0') {
</a>
</td>
</tr>
<?php endforeach;?>
<?php endforeach;?>
<?php else: ?>
<tr>
<td colspan="6" class="text-center">Nothing found</td>
@ -50,6 +53,8 @@ if ($value['client_status'] == '0') {
</tbody>
</table>
</div>
<p class="pb-10"><?php echo $count; ?> Records Founds</p>
<hr />
<div class="card-footer"><?php echo $count; ?> Records Founds.</div>
</div>
</div>
</div>

View file

@ -1,58 +1,63 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-15">
<div class="d-flex justify-content-between align-items-center">
<h5 class="m-0">Client Information</h5>
<div class="card m-20 p-20">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0">Client Information</h3>
<a href="clients.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr />
<div class="row">
<div class="col-md-6">
<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['client_lname']; ?></h6>
</div>
<div class="col-md-6">
<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['client_phone']; ?></h6>
</div>
<div class="col-md-6">
<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['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['client_city']; ?></h6>
</div>
<div class="col-md-6">
<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>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>SSL Certificates:</b> <?php echo $count_ssl; ?></h6>
</div>
<div class="col-md-6">
<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['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['client_id']; ?>" class="btn m5t btn-sm btn-secondary">Mark as Suspended</a>
<?php endif; ?>
<div class="card-body">
<div class="row">
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $ClientInfo['client_fname']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $ClientInfo['client_lname']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $ClientInfo['client_email']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Phone Number'); ?>:</b> <?php echo $ClientInfo['client_phone']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Billing Address'); ?>:</b> <?php echo $ClientInfo['client_address']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Company'); ?>:</b> <?php echo $ClientInfo['client_company']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Country'); ?>:</b> <?php echo $CountryName; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('City'); ?>:</b> <?php echo $ClientInfo['client_city']; ?>
</div>
<div class="col-md-6 mb-10">
<b>Postal Code:</b> <?php echo $ClientInfo['client_pcode']; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('Hosting Accounts'); ?>:</b> <?php echo $count_account; ?>
</div>
<div class="col-md-6 mb-10">
<b><?php echo $lang->I18N('SSL Certificates'); ?>:</b> <?php echo $count_ssl; ?>
</div>
<div class="col-md-6 mb-10">
<b>Support Tickets:</b> <?php echo $count_tickets; ?>
</div>
<div class="col-md-12"><hr /></div>
<div class="col-md-12 py-5">
<a href="clients.php?action=login&client_id=<?php echo $ClientInfo['client_id'] ?>" target="_blank" class="btn 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 btn-success text-white">Mark as Active</a>
<?php else: ?>
<a href="controllers/clients/suspend.php?client_id=<?php echo $ClientInfo['client_id']; ?>" class="btn btn-secondary">Mark as Suspended</a>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,6 +1,8 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card text-center">
<h1 class="mb-0">404</h1>
<h5 class="mb-0">Not Found</h5>
</div>
</div>
</div>

View file

@ -1,7 +1,9 @@
<div class="container-fluid">
<div class="card text-center">
<h1 class="mb-0">503</h1>
<h5 class="mb-0">Unathorized Access</h5>
<p>You are trying to access a page which is not allowed to be displayed to an unauthorized user.</p>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card text-center">
<h1 class="mb-0">503</h1>
<h5 class="mb-0">Unathorized Access</h5>
<p>You are trying to access a page which is not allowed to be displayed to an unauthorized user.</p>
</div>
</div>
</div>
</div>

View file

@ -1,9 +1,10 @@
</div>
</div>
<div id="hidden-area"><?php getMessage(); ?></div>
<script src="<?php echo $site_url; ?>/assets/jquery/jquery.min.js"></script>
<!-- <script src="<?php echo $site_url; ?>/assets/bootstrap/js/bootstrap.min.js?_=<?php echo $static_release; ?>"></script> -->
<script src="<?php echo $site_url; ?>/assets/js/halfmoon.min.js"></script>
<!-- <script src="<?php echo $site_url; ?>/assets/ui/js/main.min.js"></script> -->
<script src="<?php echo $site_url; ?>/assets/js/common.js"></script>
<?php if (!empty($load_editor)): ?>

View file

@ -20,6 +20,10 @@
<?php echo $PageInfo['rel']; ?>
<!-- <link href="<?php echo $site_url; ?>/assets/bootstrap/css/bootstrap.min.css?_=<?php echo $static_release; ?>" rel="stylesheet" /> -->
<link href="<?php echo $site_url; ?>/assets/css/font-awesome.min.css" rel="stylesheet" />
<!-- <link href="<?php echo $site_url; ?>/assets/ui/css/style.min.css" rel="stylesheet" /> -->
<link href="<?php echo $site_url; ?>/assets/css/halfmoon.min.css" rel="stylesheet" />
<link href="<?php echo $site_url; ?>/assets/css/all.min.css" rel="stylesheet" />
<link href="<?php echo $site_url; ?>/assets/css/style.css" rel="stylesheet" />
@ -31,3 +35,4 @@
</head>
<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">
<div class="page-wrapper with-navbar with-sidebar" data-sidebar-type="overlayed-sm-and-down">

View file

@ -1,40 +1,37 @@
<div class="page-wrapper with-navbar with-sidebar" data-sidebar-type="overlayed-sm-and-down">
<nav class="navbar">
<div class="container-fluid">
<a href="index.php" class="navbar-brand"><?php echo $lang->I18N('Admin Area'); ?></a>
<ul class="navbar-nav ml-auto">
<li class="nav-item nav-height">
<button class="btn btn-sm my-auto" role="button" onclick="halfmoon.toggleDarkMode()">
<i class="fas fa-sun"></i>
</button>
</li>
<div class="nav-item nav-height dropdown with-arrow">
<button class="btn" data-toggle="dropdown" type="button" id="language-change-toggle" aria-haspopup="true" aria-expanded="false">
<?php echo $lang->get_language_name(); ?> <i class="fa fa-angle-up ml-5" aria-hidden="true"></i>
</button>
<div class="dropdown-menu language-change" aria-labelledby="language-change-toggle">
<?php echo $lang->get_languages_tags(); ?>
</div>
<nav class="navbar">
<div class="container-fluid">
<a href="index.php" class="navbar-brand"><?php echo $lang->I18N('Admin Area'); ?></a>
<ul class="navbar-nav ml-auto">
<li class="nav-item nav-height">
<button class="btn btn-sm my-auto" role="button" onclick="halfmoon.toggleDarkMode()">
<i class="fas fa-sun"></i>
</button>
</li>
<!-- 语言 -->
<div class="nav-item nav-height dropdown with-arrow">
<button class="btn" data-toggle="dropdown" type="button" id="language-change-toggle" aria-haspopup="true" aria-expanded="false">
<?php echo $lang->get_language_name(); ?> <i class="fa fa-angle-up ml-5" aria-hidden="true"></i>
</button>
<div class="dropdown-menu language-change" aria-labelledby="language-change-toggle">
<?php echo $lang->get_languages_tags(); ?>
</div>
<li class="nav-item nav-height dropdown with-arrow">
<a class="btn btn-sm m5x" data-toggle="dropdown" id="nav-link-dropdown-toggle">
<i class="fa fa-user"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="nav-link-dropdown-toggle">
<a href="<?php echo $site_url; ?>" class="dropdown-item" target="_blank"><?php echo $lang->I18N('Home'); ?></a>
<div class="dropdown-divider"></div>
<a href="profile.php" class="dropdown-item"><?php echo $lang->I18N('Profile'); ?></a>
<a href="settings.php" class="dropdown-item"><?php echo $lang->I18N('Settings'); ?></a>
<a href="logout.php" class="dropdown-item"><?php echo $lang->I18N('logout'); ?></a>
<div class="dropdown-divider"></div>
<div class="dropdown-content">
<button class="btn btn-block" role="button" onclick="halfmoon.toggleDarkMode()"><i class="fa fa-sun"></i> Theme</button>
</div>
</div>
</li>
<li class="nav-item nav-height hidden-on-up">
<button class="btn btn-sm my-auto" onclick="halfmoon.toggleSidebar()"><i class="fa fa-bars"></i></button>
</li>
</div>
</nav>
<li class="nav-item nav-height dropdown with-arrow">
<a class="btn btn-sm m5x" data-toggle="dropdown" id="nav-link-dropdown-toggle">
<i class="fa fa-user"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="nav-link-dropdown-toggle">
<a href="<?php echo $site_url; ?>" class="dropdown-item" target="_blank"><?php echo $lang->I18N('Home'); ?></a>
<div class="dropdown-divider"></div>
<a href="profile.php" class="dropdown-item"><?php echo $lang->I18N('Profile'); ?></a>
<a href="settings.php" class="dropdown-item"><?php echo $lang->I18N('Settings'); ?></a>
<div class="dropdown-divider"></div>
<a href="logout.php" class="dropdown-item"><?php echo $lang->I18N('logout'); ?></a>
</div>
</li>
<li class="nav-item nav-height hidden-on-up">
<button class="btn btn-sm my-auto" onclick="halfmoon.toggleSidebar()"><i class="fa fa-bars"></i></button>
</li>
</div>
</nav>

View file

@ -2,8 +2,8 @@
$avatar_path = $AdminInfo['admin_email'] ? md5($AdminInfo['admin_email']) : 'default';
?>
<!-- Sidebar Start -->
<div class="sidebar-overlay" onclick="halfmoon.toggleSidebar()"></div>
<div class="sidebar">
<div class="sidebar-menu">
<h5 class="sidebar-title"><?php echo $lang->I18N('Logged in as'); ?>:</h5>
@ -15,23 +15,23 @@ $avatar_path = $AdminInfo['admin_email'] ? md5($AdminInfo['admin_email']) : 'def
<?php echo $AdminInfo['admin_fname'] . " " . $AdminInfo['admin_lname']; ?>
</a>
<h5 class="sidebar-title">Main Menu</h5>
<h5 class="sidebar-title"><?php echo $lang->I18N('Main Menu'); ?></h5>
<div class="sidebar-divider"></div>
<a href="index.php" class="sidebar-link sidebar-link-with-icon">
<a href="./" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-home" aria-hidden="true"></i></span>
<?php echo $lang->I18N('home'); ?>
</a>
<a href="clients.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-users" aria-hidden="true"></i></span>
<?php echo $lang->I18N('Clients'); ?>
<?php echo $lang->I18N('Clients List'); ?>
</a>
<a href="tickets.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-bullhorn" aria-hidden="true"></i></span>
<?php echo $lang->I18N('Tickets'); ?>
<span class="sidebar-icon bg-transparent"><i class="fa fa-ticket-alt" aria-hidden="true"></i></span>
<?php echo $lang->I18N('Tickets List'); ?>
</a>
<a href="sslcert.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-shield-alt" aria-hidden="true"></i></span>
SSL Certificates
<?php echo $lang->I18N('SSL Certificates'); ?>
</a>
<a href="accounts.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-shopping-cart" aria-hidden="true"></i></span>
@ -43,7 +43,15 @@ $avatar_path = $AdminInfo['admin_email'] ? md5($AdminInfo['admin_email']) : 'def
</a>
<a href="news.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-newspaper" aria-hidden="true"></i></span>
<?php echo $lang->I18N('News'); ?>
<?php echo $lang->I18N('News List'); ?>
</a>
<a href="hosting.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-server" aria-hidden="true"></i></span>
<?php echo $lang->I18N('Hosting Provider'); ?>
</a>
<a href="domain.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-globe" aria-hidden="true"></i></span>
<?php echo $lang->I18N('Domain Provider'); ?>
</a>
<a href="settings.php" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon bg-transparent"><i class="fa fa-cog" aria-hidden="true"></i></span>
@ -54,6 +62,10 @@ $avatar_path = $AdminInfo['admin_email'] ? md5($AdminInfo['admin_email']) : 'def
<?php echo $lang->I18N('logout'); ?>
</a>
</div>
<div class="sidebar-footer">
<p class="copyright text-center">
&copy; <?php echo date("Y") ?> <a target="_blank" href="https://uiisc.org">UIISC</a> All rights reserved.
</p>
</div>
</div>
<div class="content-wrapper">
<!-- Sidebar End -->

View file

@ -1,4 +1,6 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-lg-3">
@ -38,7 +40,7 @@
<div class="card text-center bg-matrix-4 m-20 p-0 border-0">
<div class="mx-20 my-15 d-flex justify-content-between align-items-center">
<h3 class="my-0 pt-0 text-white"><?php echo $count_tickets; ?></h3>
<i class="fa fa-bullhorn fa-3x pt-10 text-white"></i>
<i class="fa fa-ticket-alt fa-3x pt-10 text-white"></i>
</div>
<div class="py-5" style="background: rgba(0,0,0,0.05); border-radius: 0px 0px 10px 10px;">
<a href="tickets.php" class="text-white">View Ticket <i class="fa fa-forward"></i></a>
@ -46,68 +48,79 @@
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="card m-20">
<h2 class="card-title">Welcome to Dear Admin!</h2>
<p>
Here you can manage your free hosting clients and free ssl with free support system remember that any action in this system cannot be undo.
</p>
<div class="text-right">
<a href="accounts.php" class="btn btn-sm">Getting Started</a>
</div>
</div>
<div class="card mx-20 my-10 p-15">
<div class="card-header d-flex justify-content-between align-items-center px-0 pt-0">
<h3 class="m-0">System information</h3>
<a href="settings.php" class="btn btn-danger">Settings</a>
</div>
<div class="col-lg-6">
<div class="card m-20">
<h2 class="card-title">Free SSL Available!</h2>
<p>
Now generation of free ssl has been allowed in order to provide fast website access and increase the security and protection of your website.
</p>
<div class="text-right">
<a href="ssl.php" class="btn btn-sm">Check Now</a>
</div>
<hr />
<div class="card-body">
<div class="row">
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Version:</b> <?php echo APP_VERSION; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Status:</b> <?php if ($SiteConfig['site_status'] == 1) {echo '<span class="badge badge-success">Live</span>';} elseif ($SiteConfig['site_status'] == 0) {echo '<span class="badge badge-secondary">Maintaince</span>';}?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Site Name:</b> <?php echo $SiteConfig['site_name']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Brand Name:</b> <?php echo $SiteConfig['site_brand']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Company Name:</b> <?php echo $SiteConfig['site_company']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>URI:</b> <?php echo $SiteConfig['site_path']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Contact Email:</b> <?php echo $SiteConfig['site_email']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>PHP Version:</b> <?php echo PHP_VERSION; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Server Protocol:</b> <?php echo HTTP_PROTOCOL; ?></p>
</div>
<!-- <div class="col-md-12"><hr></div> -->
<div class="col-md-12">
<p class="mb-0"><b>Document Root:</b> <?php echo $_SERVER['DOCUMENT_ROOT'] ?></p>
</div>
</div>
</div>
</div>
<div class="card m-20">
<div class="d-flex justify-content-between align-items-center">
<h5 class="m-0">System information</h5>
<a href="settings.php" class="btn btn-danger btn-sm">Settings</a>
<div class="row">
<div class="col-lg-6">
<div class="card mx-20 my-10 p-15">
<div class="card-header">
<h4 class="m-0">Welcome to Dear Admin!</h4>
</div>
<div class="card-body">
<p>
Here you can manage your free hosting clients and free ssl with free support system remember that any action in this system cannot be undo.
</p>
<div class="text-right">
<a href="accounts.php" class="btn btn-default">Getting Started</a>
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Version:</b> <?php echo APP_VERSION; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Status:</b> <?php if ($SiteConfig['site_status'] == 1) {echo '<span class="badge badge-success">Live</span>';} elseif ($SiteConfig['site_status'] == 0) {echo '<span class="badge badge-secondary">Maintaince</span>';}?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Site Name:</b> <?php echo $SiteConfig['site_name']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Brand Name:</b> <?php echo $SiteConfig['site_brand']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Company Name:</b> <?php echo $SiteConfig['site_company']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>URI:</b> <?php echo $SiteConfig['site_path']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Contact Email:</b> <?php echo $SiteConfig['site_email']; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>PHP Version:</b> <?php echo PHP_VERSION; ?></p>
</div>
<div class="col-md-6 col-lg-4">
<p class="mb-0"><b>Server Protocol:</b> <?php echo HTTP_PROTOCOL; ?></p>
</div>
<!-- <div class="col-md-12"><hr></div> -->
<div class="col-md-12">
<p class="mb-0"><b>Document Root:</b> <?php echo $_SERVER['DOCUMENT_ROOT'] ?></p>
<div class="col-lg-6">
<div class="card mx-20 my-10 p-15">
<div class="card-header">
<h4 class="m-0">Free SSL Available!</h4>
</div>
<div class="card-body">
<p>
Now generation of free ssl has been allowed in order to provide fast website access and increase the security and protection of your website.
</p>
<div class="text-right">
<a href="ssl.php" class="btn btn-default">Check Now</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,31 +1,29 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<a href="index.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return');?>
</a>
</div>
<hr>
<form action="controllers/domain/add.php" method="post">
<hr />
<form class="card-body" action="controllers/domain/add.php" method="post">
<div class="row">
<div class="col-md-12">
<div class="mb-5 px-10">
<label class="form-label required">Add Domain Extension</label>
<div class="input-group">
<input type="text" name="domain" id="cudomain" class="form-control" placeholder="eg .example.com">
<div class="input-group-append">
<button name="submit" class="btn btn-primary">Register</button>
</div>
</div>
</div>
<div class="col-md-6">
<label class="form-label required">Add Domain Extension</label>
<input type="text" name="domain" id="cudomain" class="form-control" placeholder="eg .example.com">
</div>
<div class="col-md-6">
<label class="form-label required">Add Domain Extension</label>
<button name="submit" class="btn btn-primary">Register</button>
</div>
</div>
</form>
<h6 class="mb-5 px-10">Registered Extensions</h6>
<div class="table-responsive">
<table class="table table-stripped">
<div class="card-body table-responsive">
<h4 class="mb-5">Registered Extensions</h4>
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="10%">ID</th>
<th width="75%">Domain</th>
@ -53,6 +51,10 @@
</tbody>
</table>
</div>
<p class="pb-10"><?php echo $count; ?> Records Founds</p>
<hr />
<div class="card-footer">
<p class="pb-10"><?php echo $count; ?> Records Found</p>
</div>
</div>
</div>
</div>

113
src/admin/views/hosting/add.php Executable file
View file

@ -0,0 +1,113 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<div>
<a href="hosting.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
</div>
<hr />
<form class="card-body" action="controllers/hosting/add.php" method="post">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Provider Type'); ?></label>
<select name="api_type" class="form-control" required>
<option value="myownfreehost" selected>MyOwnFreeHost</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Hosting Key</label>
<input type="text" name="api_key" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">MOFH API Username</label>
<input type="text" name="api_username" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">MOFH API Password</label>
<input type="text" name="api_password" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Server domain</label>
<input type="text" name="api_server_domain" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Server IP</label>
<input type="text" name="api_server_ip" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">FTP Server</label>
<input type="text" name="api_server_ftp_domain" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">SQL Server</label>
<input type="text" name="api_server_sql_domain" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Control Panel URL</label>
<input type="text" name="api_cpanel_url" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Hosting Package</label>
<input type="text" name="api_package" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Nameserver 1</label>
<input type="text" name="api_ns_1" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Nameserver 2</label>
<input type="text" name="api_ns_2" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">API Callback Token</label>
<input type="text" name="api_callback_token" class="form-control" maxlength="32" required>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label">API Callback URL</label>
<input type="text" class="form-control" value="<?php echo $site_url ?>/callback/[Hosting Key]/[API Callback Token]" readonly>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="my-10 px-10">
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>

106
src/admin/views/hosting/edit.php Executable file
View file

@ -0,0 +1,106 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<div>
<a href="hosting.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
</div>
<hr />
<form class="card-body" action="controllers/hosting/edit.php" method="post">
<input type="hidden" name="api_id" value="<?php echo $data['api_id']; ?>" style="display:none;">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Provider Type'); ?></label>
<input type="text" name="api_type" value="<?php echo $data['api_type']; ?>" class="form-control" required readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Hosting Key</label>
<input type="text" name="api_key" value="<?php echo $data['api_key']; ?>" class="form-control" required readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">MOFH API Username</label>
<input type="text" name="api_username" value="<?php echo $data['api_username']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">MOFH API Password</label>
<input type="text" name="api_password" value="<?php echo $data['api_password']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Server domain</label>
<input type="text" name="api_server_domain" value="<?php echo $data['api_server_domain']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Server IP</label>
<input type="text" name="api_server_ip" value="<?php echo $data['api_server_ip']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">FTP Server</label>
<input type="text" name="api_server_ftp_domain" value="<?php echo $data['api_server_ftp_domain']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">SQL Server</label>
<input type="text" name="api_server_sql_domain" value="<?php echo $data['api_server_sql_domain']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Control Panel URL</label>
<input type="text" name="api_cpanel_url" value="<?php echo $data['api_cpanel_url']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Hosting Package</label>
<input type="text" name="api_package" value="<?php echo $data['api_package']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Nameserver 1</label>
<input type="text" name="api_ns_1" value="<?php echo $data['api_ns_1']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Nameserver 2</label>
<input type="text" name="api_ns_2" value="<?php echo $data['api_ns_2']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">API Callback Token</label>
<input type="text" name="api_callback_token" value="<?php echo $data['api_callback_token']; ?>" class="form-control" maxlength="32" required>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="my-10 px-10">
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>

View file

@ -0,0 +1,45 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">Hosting Provider</h5>
<a href="hosting.php?action=add" class="btn btn-primary btn-sm">
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
</a>
</div>
<hr>
<div class="table-responsive">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th>Key</th>
<th>Type</th>
<th>Panel URL</th>
<th>Package</th>
<th>Action</th>
</thead>
<tbody>
<?php if ($count > 0): ?>
<?php foreach ($rows as $value): ?>
<tr>
<td><?php echo $value['api_key']; ?></td>
<td><?php echo $value['api_type']; ?></td>
<td><?php echo $value['api_cpanel_url']; ?></td>
<td><?php echo $value['api_package']; ?></td>
<td>
<a href="hosting.php?action=edit&id=<?php echo $value['api_id']; ?>" class="btn btn-sm btn-secondary mx-5 btn-rounded"><i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?></a>
<a href="hosting.php?action=view&id=<?php echo $value['api_id']; ?>" class="btn btn-sm btn-secondary mx-5 btn-rounded"><i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?></a>
</td>
</tr>
<?php endforeach;?>
<?php else: ?>
<tr>
<td colspan="5" class="text-center">Nothing found</td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
<p class="pb-10"><?php echo $count; ?> Records Found</p>
</div>
</div>
</div>

View file

@ -1,80 +1,117 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<a href="index.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
<div>
<a href="hosting.php" class="btn btn-sm btn-danger">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
<a href="<?php echo setURL('admin/hosting', '', array('action' => 'edit', 'id' => $data['api_id'])); ?>" class="btn btn-sm btn-success">
<i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?>
</a>
<a href="hosting.php?action=add" class="btn btn-sm btn-primary">
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
</a>
</div>
</div>
<hr />
<form action="controllers/hosting/edit.php" method="post">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">MOFH API Username</label>
<input type="text" name="api_username" value="<?php echo $HostingApi['api_username']; ?>" class="form-control" required>
<label class="form-label"><?php echo $lang->I18N('Provider Type'); ?></label>
<input type="text" name="api_type" value="<?php echo $data['api_type']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label">Hosting Key</label>
<input type="text" name="api_key" value="<?php echo $data['api_key']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required">MOFH API Password</label>
<input type="text" name="api_password" value="<?php echo $HostingApi['api_password']; ?>" class="form-control" required>
<label class="form-label">MOFH API Username</label>
<input type="text" name="api_username" value="<?php echo $data['api_username']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label">MOFH API Password</label>
<input type="text" name="api_password" value="<?php echo $data['api_password']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">cPanel URL</label>
<input type="text" name="api_cpanel_url" value="<?php echo $HostingApi['api_cpanel_url']; ?>" class="form-control" required>
<label class="form-label">Hosting Server</label>
<input type="text" name="api_server_domain" value="<?php echo $data['api_server_domain']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Hosting Package</label>
<input type="text" name="api_package" value="<?php echo $HostingApi['api_package']; ?>" class="form-control" required>
<label class="form-label">Server IP</label>
<input type="text" name="api_server_ip" value="<?php echo $data['api_server_ip']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Server IP</label>
<input type="text" name="api_server_ip" value="<?php echo $HostingApi['api_server_ip']; ?>" class="form-control" required>
<label class="form-label">FTP Server</label>
<input type="text" name="api_server_ftp_domain" value="<?php echo $data['api_server_ftp_domain']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Shared IP</label>
<input type="text" value="<?php echo gethostbyname($_SERVER['HTTP_HOST']); ?>" class="form-control" required>
<label class="form-label">SQL Server</label>
<input type="text" name="api_server_sql_domain" value="<?php echo $data['api_server_sql_domain']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Nameserver 1</label>
<input type="text" name="api_ns_1" value="<?php echo $HostingApi['api_ns_1']; ?>" class="form-control" required>
<label class="form-label">Control Panel URL</label>
<input type="text" name="api_cpanel_url" value="<?php echo $data['api_cpanel_url']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Nameserver 2</label>
<input type="text" name="api_ns_2" value="<?php echo $HostingApi['api_ns_2']; ?>" class="form-control" required>
<label class="form-label">Hosting Package</label>
<input type="text" name="api_package" value="<?php echo $data['api_package']; ?>" class="form-control" readonly>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Callback Token</label>
<input type="text" name="api_callback_token" value="<?php echo $HostingApi['api_callback_token']; ?>" class="form-control" maxlength="32" required>
<label class="form-label">Nameserver 1</label>
<input type="text" name="api_ns_1" value="<?php echo $data['api_ns_1']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label">Nameserver 2</label>
<input type="text" name="api_ns_2" value="<?php echo $data['api_ns_2']; ?>" class="form-control" readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label">API Callback Token</label>
<input type="text" name="api_callback_token" value="<?php echo $data['api_callback_token']; ?>" class="form-control" maxlength="32" readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label">API Callback URL</label>
<input type="text" class="form-control" value="<?php echo $api_callback_url; ?>" readonly>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-sm btn-primary"><?php echo $lang->I18N('Save'); ?></button>
<div class="mb-20 px-10">
<a href="<?php echo setURL('admin/hosting', '', array('action' => 'edit', 'id' => $data['api_id'])); ?>" class="btn btn-sm btn-secondary mx-5 btn-rounded"><i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?></a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

View file

@ -1,3 +1,4 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
@ -29,4 +30,5 @@
</div>
</form>
</div>
</div>
</div>

View file

@ -1,3 +1,4 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
@ -32,4 +33,5 @@
</div>
</form>
</div>
</div>
</div>

View file

@ -1,4 +1,4 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
@ -9,7 +9,7 @@
</div>
<hr>
<div class="table-responsive">
<table class="table table-stripped">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="5%">ID</th>
<th width="75%">Subject</th>
@ -39,4 +39,5 @@
</div>
<p class="pb-10"><?php echo $count; ?> Records Found</p>
</div>
</div>
</div>

View file

@ -4,6 +4,7 @@ if (!$Knowledgebase) {
exit();
}
?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
@ -36,3 +37,4 @@ if (!$Knowledgebase) {
</div>
</div>
</div>
</div>

View file

@ -1,7 +1,7 @@
<div class="container-fluid" id="login">
<div class="row">
<div class="col-md-6 offset-md-3 col-lg-4 offset-lg-4">
<div class="m-auto" style="width: 400px;">
<div class="card mx-30" style="opacity: 80%">
<form action="controllers/login/login.php" method="post">
<h5 class="m-0 text-center"><?php echo $lang->I18N('login'); ?></h5><hr>
@ -29,4 +29,4 @@
</div>
</div>
</div>
</div>
</div>

View file

@ -4,10 +4,11 @@ if (!defined('IN_CRONLITE')) {
}
?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">Add News</h5>
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<a href="news.php" class="btn btn-sm btn-danger"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
</div>
<hr>
@ -44,3 +45,4 @@ if (!defined('IN_CRONLITE')) {
</form>
</div>
</div>
</div>

View file

@ -4,10 +4,11 @@ if (!defined('IN_CRONLITE')) {
}
?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">Edit News</h5>
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<div>
<a href="news.php" class="btn btn-sm btn-danger">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
@ -52,3 +53,4 @@ if (!defined('IN_CRONLITE')) {
</form>
</div>
</div>
</div>

View file

@ -4,17 +4,18 @@ if (!defined('IN_CRONLITE')) {
}
?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0"><?php echo $lang->I18N('news'); ?></h5>
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<a href="news.php?action=add" class="btn text-white btn-success btn-sm">
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
</a>
</div>
<hr>
<div class="table-responsive">
<table class="table table-stripped">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="5%">ID</th>
<th><?php echo $lang->I18N('Title'); ?></th>
@ -47,3 +48,4 @@ if (!defined('IN_CRONLITE')) {
<p class="pb-10"><?php echo $count; ?> Records Found, Page 1 of 1</p>
</div>
</div>
</div>

View file

@ -6,11 +6,11 @@ if (!defined('IN_CRONLITE')) {
}
?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">News Details #<?php echo $id; ?></h5>
<h5 class="m-0"><?php echo $PageInfo['title']; ?> #<?php echo $id; ?></h5>
<div>
<a href="news.php" class="btn btn-sm btn-danger">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
@ -48,3 +48,4 @@ if (!defined('IN_CRONLITE')) {
</div>
</div>
</div>
</div>

View file

@ -1,41 +1,43 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<h5 class="m-0">Profile Edit</h5>
<a href="index.php" class="btn btn-danger btn-sm"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return');?></a>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $lang->I18N('Profile Edit'); ?></h3>
<a href="index.php" class="btn btn-danger btn-sm"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
</div>
<hr>
<form action="controllers/profile/edit.php" method="post">
<div class="row">
<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 $AdminInfo['admin_fname']; ?>" class="form-control" required>
<hr />
<div class="card-body">
<form action="controllers/profile/edit.php" method="post">
<div class="row">
<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 $AdminInfo['admin_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 $AdminInfo['admin_lname']; ?>" class="form-control" required>
</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 $AdminInfo['admin_email']; ?>" class="form-control disabled" required readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-primary">Update Profile</button>
<a href="https://www.gravatar.com/" target="_blank" class="btn btn-secondary">Update Image</a>
</div>
</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 $AdminInfo['admin_lname']; ?>" class="form-control" required>
</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 $AdminInfo['admin_email']; ?>" class="form-control disabled" required readonly>
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-sm btn-primary">Update Profile</button>
<a href="https://www.gravatar.com/" target="_blank" class="btn m5t btn-sm btn-secondary">Update Image</a>
</div>
</div>
<div class="col-md-12"><hr></div>
</div>
</form>
<form class="row" action="controllers/profile/password.php" method="post" onsubmit="
</form>
<div class="col-md-12"><hr></div>
<form action="controllers/profile/password.php" method="post" onsubmit="
var password = document.getElementById('password').value;
var cpassword = document.getElementById('cpassword').value;
if(password != cpassword){
@ -44,29 +46,34 @@
}
return true;
">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">New Password</label>
<input type="password" name="new_password" id="password" placeholder="New password here..." class="form-control">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">New Password</label>
<input type="password" name="new_password" id="password" placeholder="New password here..." class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Confirm Password</label>
<input type="password" name="confirm_password" id="cpassword" placeholder="Confirm password here..." class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Old Password</label>
<input type="password" name="old_password" placeholder="Old password here..." class="form-control">
</div>
</div>
<div class="col-md-12"><hr></div>
<div class="col-md-12">
<div class="mb-10 px-10">
<input type="submit" name="submit" value="Change Password" class="btn btn-sm btn-primary text-white">
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Confirm Password</label>
<input type="password" name="confirm_password" id="cpassword" placeholder="Confirm password here..." class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Old Password</label>
<input type="password" name="old_password" placeholder="Old password here..." class="form-control">
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<input type="submit" name="submit" value="Change Password" class="btn btn-sm btn-primary text-white">
</div>
</div>
</form>
</form>
</div>
</div>
</div>
</div>

View file

@ -1,7 +1,7 @@
<div class="container-fluid" id="login">
<div class="row">
<div class="col-md-6 offset-md-3 col-lg-4 offset-lg-4">
<div class="m-auto" style="width: 400px;">
<div class="card mx-30" style="opacity: 80%">
<form action="controllers/profile/forgetpassword.php" method="post">
<h5 class="m-0 text-center">Forget Password</h5><hr>
@ -19,4 +19,4 @@
</div>
</div>
</div>
</div>
</div>

View file

@ -1,7 +1,8 @@
<div class="content-wrapper">
<div class="container-fluid" id="login">
<div class="row">
<div class="col-md-6 offset-md-3 col-lg-4 offset-lg-4">
<div class="col-md-6 col-md-offset-2 col-lg-4 offset-lg-4">
<div class="card mx-30" style="opacity: 80%">
<form action="controllers/profile/resetpassword.php" method="post" onsubmit="
var password = document.getElementById('password').value;
@ -33,3 +34,4 @@
</div>
</div>
</div>
</div>

View file

@ -1,66 +1,75 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-15 pb-20">
<div class="d-flex justify-content-between align-items-center">
<h5 class="m-0"><?php echo $PageInfo['title'];?></h5>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $lang->I18N('My Profile'); ?></h3>
<a href="index.php" class="btn btn-danger btn-sm"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return');?></a>
</div>
<hr>
<div class="row">
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $AdminInfo['admin_fname']; ?></h6>
<hr />
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('First Name'); ?>:</b> <?php echo $AdminInfo['admin_fname']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $AdminInfo['admin_lname']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $AdminInfo['admin_email']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('IP Address'); ?>:</b> <?php echo get_client_ip(); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Shared IP:</b> <?php echo gethostbyname($_SERVER['HTTP_HOST']); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Device Type:</b> <?php echo get_client_device(); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Device OS:</b> <?php echo get_client_os(); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Web Browser:</b> <?php echo get_client_browser(); ?></h6>
</div>
<div class="col-md-12"><hr></div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Name:</b> <?php echo $SiteConfig['site_name']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Path:</b> <?php echo $SiteConfig['site_path']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Email:</b> <?php echo $SiteConfig['site_email']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Status:</b> <?php if ($SiteConfig['site_status'] == 1) {echo '<span class="badge badge-success">Live</span>';} elseif ($SiteConfig['site_status'] == 0) {echo '<span class="badge badge-secondary">Maintaince</span>';}?></h6>
</div>
<div class="col-md-12"><hr></div>
<div class="col-md-6">
<h6 class="mb-0"><b>Document Root:</b> <?php echo $_SERVER['DOCUMENT_ROOT'] ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Server Protocol:</b> <?php echo HTTP_PROTOCOL; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>PHP Version:</b> <?php echo PHP_VERSION; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>App Version:</b> <?php echo APP_VERSION; ?></h6>
</div>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('Last Name'); ?>:</b> <?php echo $AdminInfo['admin_lname']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b><?php echo $lang->I18N('Email Address'); ?>:</b> <?php echo $AdminInfo['admin_email']; ?></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>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Shared IP:</b> <?php echo gethostbyname($_SERVER['HTTP_HOST']); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Device Type:</b> <?php echo UserInfo::get_device(); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Device OS:</b> <?php echo UserInfo::get_os(); ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Web Browser:</b> <?php echo UserInfo::get_browser(); ?></h6>
</div>
<div class="col-md-12"><hr></div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Name:</b> <?php echo $SiteConfig['site_name']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Path:</b> <?php echo $SiteConfig['site_path']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Email:</b> <?php echo $SiteConfig['site_email']; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Site Status:</b> <?php if ($SiteConfig['site_status'] == 1) {echo '<span class="badge badge-success">Live</span>';} elseif ($SiteConfig['site_status'] == 0) {echo '<span class="badge badge-secondary">Maintaince</span>';}?></h6>
</div>
<div class="col-md-12"><hr></div>
<div class="col-md-6">
<h6 class="mb-0"><b>Document Root:</b> <?php echo $_SERVER['DOCUMENT_ROOT'] ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>Server Protocol:</b> <?php echo HTTP_PROTOCOL; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>PHP Version:</b> <?php echo PHP_VERSION; ?></h6>
</div>
<div class="col-md-6">
<h6 class="mb-0"><b>App Version:</b> <?php echo APP_VERSION; ?></h6>
</div>
<div class="col-md-12 my-5">
<a href="profile.php?action=edit" class="btn m5t btn-sm btn-primary">Update Profile</a>
<a href="https://www.gravatar.com/" target="_blank" class="btn m5t btn-sm btn-secondary">Update Image</a>
</div>
<hr />
<div class="card-footer">
<div class="row">
<div class="col-md-12">
<a href="profile.php?action=edit" class="btn btn-primary">Update Profile</a>
<a href="https://www.gravatar.com/" target="_blank" class="btn btn-secondary">Update Image</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,16 +1,10 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="px-10 m-20">
<a href="<?php echo setRouter('settings');?>" class="btn<?php if ($section == 'settings') echo ' btn-primary'; ?>">
<i class="fa fa-cog"></i> <?php echo $lang->I18N('System Settings'); ?>
</a>
<a href="<?php echo setRouter('settings', 'hosting');?>" class="btn<?php if ($section == 'hosting') echo ' btn-primary'; ?>">
<i class="fa fa-server"></i></span>
<?php echo $lang->I18N('Hosting Settings'); ?>
</a>
<a href="<?php echo setRouter('settings', 'domain');?>" class="btn<?php if ($section == 'domain') echo ' btn-primary'; ?>">
<i class="fa fa-plug"></i></span>
<?php echo $lang->I18N('Domain Settings'); ?>
</a>
<a href="<?php echo setRouter('settings', 'smtp');?>" class="btn<?php if ($section == 'smtp') echo ' btn-primary'; ?>">
<i class="fa fa-inbox"></i></span>
<?php echo $lang->I18N('SMTP Settings'); ?>

View file

@ -1,24 +1,25 @@
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<h5 class="m-0"><?php echo $lang->I18N('System Settings'); ?></h5>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $lang->I18N('System Settings'); ?></h3>
<a href="index.php" class="btn btn-danger btn-sm"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
</div>
<hr>
<hr />
<form action="controllers/settings/edit.php" method="post">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Site Name</label>
<input type="text" name="name" value="<?php echo $SiteConfig['site_name']; ?>" class="form-control" required>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Site Name'); ?></label>
<input type="text" name="name" value="<?php echo $SiteConfig['site_name']; ?>" class="form-control" required>
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Site Status</label>
<select name="status" class="form-control">
<?php
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Site Status'); ?></label>
<select name="status" class="form-control">
<?php
foreach ($Statuses as $Status) {
if ($Status['value'] == $SiteConfig['site_status']) {
@ -28,85 +29,84 @@ foreach ($Statuses as $Status) {
}
}
?>
</select>
</select>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Brand Name'); ?></label>
<input type="text" name="brand" value="<?php echo $SiteConfig['site_brand']; ?>" 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('Company Name'); ?></label>
<input type="text" name="company" value="<?php echo $SiteConfig['site_company']; ?>" 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('Contact Phone'); ?></label>
<input type="text" name="phone" value="<?php echo $SiteConfig['site_phone']; ?>" class="form-control" required maxlength="30">
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Clientarea URL</label>
<input type="text" name="url" value="<?php echo $SiteConfig['site_path']; ?>" 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('Contact Email'); ?></label>
<input type="text" name="email" value="<?php echo $SiteConfig['site_email']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label"><?php echo $lang->I18N('iFastNet Affiliate ID'); ?></label>
<input type="text" name="ifastnet_aff" value="<?php echo $SiteConfig['ifastnet_aff']; ?>" class="form-control">
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Brand Name'); ?></label>
<input type="text" name="brand" value="<?php echo $SiteConfig['site_brand']; ?>" class="form-control" required>
<div class="row">
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Title'); ?></label>
<input type="text" name="page_title" value="<?php echo $SiteConfig['page_title']; ?>" class="form-control" required maxlength="80">
</div>
</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 $SiteConfig['site_company']; ?>" class="form-control" required>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Description'); ?></label>
<input type="text" name="page_description" value="<?php echo $SiteConfig['page_description']; ?>" class="form-control" required maxlength="200">
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Contact Phone'); ?></label>
<input type="text" name="phone" value="<?php echo $SiteConfig['site_phone']; ?>" class="form-control" required maxlength="30">
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Keywords'); ?></label>
<input type="text" name="page_keywords" value="<?php echo $SiteConfig['page_keywords']; ?>" class="form-control" required maxlength="100">
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">Clientarea URL</label>
<input type="text" name="url" value="<?php echo $SiteConfig['site_path']; ?>" class="form-control" required>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Copyright'); ?></label>
<input type="text" name="page_copyright" value="<?php echo $SiteConfig['page_copyright']; ?>" class="form-control" required maxlength="100">
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Contact Email'); ?></label>
<input type="text" name="email" value="<?php echo $SiteConfig['site_email']; ?>" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label"><?php echo $lang->I18N('iFastNet Affiliate ID'); ?></label>
<input type="text" name="ifastnet_aff" value="<?php echo $SiteConfig['ifastnet_aff']; ?>" class="form-control">
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Author'); ?></label>
<input type="text" name="page_author" value="<?php echo $SiteConfig['page_author']; ?>" class="form-control" required maxlength="30">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Title'); ?></label>
<input type="text" name="page_title" value="<?php echo $SiteConfig['page_title']; ?>" class="form-control" required maxlength="80">
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Description'); ?></label>
<input type="text" name="page_description" value="<?php echo $SiteConfig['page_description']; ?>" class="form-control" required maxlength="200">
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Keywords'); ?></label>
<input type="text" name="page_keywords" value="<?php echo $SiteConfig['page_keywords']; ?>" class="form-control" required maxlength="100">
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Copyright'); ?></label>
<input type="text" name="page_copyright" value="<?php echo $SiteConfig['page_copyright']; ?>" class="form-control" required maxlength="100">
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<label class="form-label required"><?php echo $lang->I18N('Page Author'); ?></label>
<input type="text" name="page_author" value="<?php echo $SiteConfig['page_author']; ?>" class="form-control" required maxlength="30">
</div>
</div>
</div>
<hr>
<div class="col-md-12 pb-15">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-sm btn-primary"><?php echo $lang->I18N('Save'); ?></button>
<a href="index.php" class="btn btn-danger btn-sm"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
</div>
<hr />
<div class="card-footer">
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
</form>
</div>
</div>
</div>

View file

@ -1,14 +1,15 @@
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $PageInfo['title']; ?></h3>
<a href="index.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<form action="controllers/sitepro/edit.php" method="post">
<div class="row pb-15">
<hr />
<form class="card-body" action="controllers/sitepro/edit.php" method="post">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label required">SitePro API Username</label>
@ -22,9 +23,8 @@
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-sm btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
<hr />
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
</div>
</form>

View file

@ -1,13 +1,14 @@
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<a href="index.php" class="btn btn-danger btn-sm">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $PageInfo['title']; ?></h3>
<a href="index.php" class="btn btn-danger">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr />
<form action="controllers/smtp/edit.php" method="post">
<form class="card-body" action="controllers/smtp/edit.php" method="post">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
@ -41,13 +42,13 @@
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-sm btn-primary"><?php echo $lang->I18N('Save'); ?></button>
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
</div>
</div>
</form>
<hr />
<form action="controllers/smtp/test.php" method="post">
<form class="card-body" action="controllers/smtp/test.php" method="post">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
@ -58,7 +59,7 @@
<div class="col-md-6">
<div class="mb-10 px-10">
<label class="form-label">&nbsp;</label>
<button name="submit" class="btn btn-sm btn-primary form-control"><?php echo $lang->I18N('Send Email'); ?></button>
<button name="submit" class="btn btn-primary form-control"><?php echo $lang->I18N('Send Email'); ?></button>
</div>
</div>
</div>

View file

@ -1,13 +1,14 @@
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center px-5 pt-15">
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $PageInfo['title']; ?></h3>
<a href="index.php" class="btn btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<form action="controllers/sslapi/edit.php" method="post">
<hr />
<form class="card-body" action="controllers/sslapi/edit.php" method="post">
<div class="row">
<div class="col-md-6">
<div class="mb-10 px-10">
@ -22,11 +23,9 @@
</div>
</div>
<div class="col-md-12">
<div class="mb-10 px-10">
<button name="submit" class="btn btn-sm btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
<hr />
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
</div>
<div class="col-md-12"><hr></div>
</div>
</form>
</div>

View file

@ -1,3 +1,5 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
@ -8,7 +10,7 @@
</div>
<hr>
<div class="table-responsive">
<table class="table table-stripped">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="5%">ID</th>
<th width="5%">Order ID</th>
@ -59,4 +61,5 @@ if ($SSLInfo['status'] == 'processing') {
</div>
<p class="pb-10"><?php echo $count; ?> Records Founds</p>
</div>
</div>
</div>
</div>

View file

@ -1,3 +1,5 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
@ -91,4 +93,5 @@
<?php } ?>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,22 +1,24 @@
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<h5 class="m-0">My Tickets</h5>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h3 class="m-0"><?php echo $lang->I18N('Tickets List'); ?></h3>
<a href="index.php" class="btn text-white btn-danger btn-sm">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<div class="table-responsive">
<table class="table table-stripped">
<hr />
<div class="card-body table-responsive">
<table class="table table-stripped table-bordered table-hover">
<thead>
<th width="5%">ID</th>
<th width="50%">Subject</th>
<th width="5%">Department</th>
<th width="30%">Client Email</th>
<th width="5%">Date</th>
<th width="5%">Status</th>
<th width="5%">Action</th>
<th>ID</th>
<th>Subject</th>
<th>Department</th>
<th>Client Email</th>
<th>Date</th>
<th>Status</th>
<th>Action</th>
</thead>
<tbody>
<?php if ($count > 0): ?>
@ -29,13 +31,13 @@
<td><?php echo $value['ticket_date']; ?></td>
<td><?php echo get_ticket_status_span($value['ticket_status']);
if ($value['ticket_status'] == '0') {
$btn = ['secondary', 'clock'];
$btn = ['secondary', 'clock'];
} elseif ($value['ticket_status'] == '1') {
$btn = ['success', 'comment'];
$btn = ['success', 'comment'];
} elseif ($value['ticket_status'] == '2') {
$btn = ['primary', 'comment'];
$btn = ['primary', 'comment'];
} elseif ($value['ticket_status'] == '3') {
$btn = ['danger', 'lock'];
$btn = ['danger', 'lock'];
}
?></td>
<td>
@ -53,6 +55,10 @@ if ($value['ticket_status'] == '0') {
</tbody>
</table>
</div>
<p class="pb-10"><?php echo $count; ?> Records Founds</p>
<hr />
<div class="card-footer">
<p class="pb-10"><?php echo $count; ?> Records Founds</p>
</div>
</div>
</div>
</div>
</div>

View file

@ -4,93 +4,89 @@ if (!$TicketInfo) {
exit();
}
?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="card py-0">
<div class="d-flex justify-content-between align-items-center pt-15">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="m-0"><?php echo $lang->I18N('Tickets Details'); ?> (#<?php echo $ticket_id; ?>)</h5>
<a href="tickets.php" class="btn btn-sm btn-danger">
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
</a>
</div>
<hr>
<div class="mb-20">
<hr />
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center mx-10 my-5">
<b>Subject:</b>
<span><?php echo $TicketInfo['ticket_subject']; ?></span>
</div>
<b>Subject:</b>
<span><?php echo $TicketInfo['ticket_subject']; ?></span>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center mx-10 my-5">
<b>Status:</b>
<span><?php echo get_ticket_status_span($TicketInfo['ticket_status']); ?></span>
</div>
<b>Status:</b>
<span><?php echo get_ticket_status_span($TicketInfo['ticket_status']); ?></span>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center mx-10 my-5">
<b>Department:</b>
<span><?php echo get_ticket_department($TicketInfo['ticket_department']); ?></span>
</div>
<b>Department:</b>
<span><?php echo get_ticket_department($TicketInfo['ticket_department']); ?></span>
</div>
<div class="col-md-6">
<div class="d-flex justify-content-between align-items-center mx-10 my-5">
<b>Date:</b>
<span><?php echo $TicketInfo['ticket_date']; ?></span>
</div>
<b>Date:</b>
<span><?php echo $TicketInfo['ticket_date']; ?></span>
</div>
</div>
</div>
</div>
<div class="card py-10">
<div class="d-flex justify-content-between align-items-center px-5">
<b class="py-5">Client Reply</b>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<strong>Client Reply</strong>
<span><?php echo $TicketInfo['ticket_date']; ?></span>
</div><hr>
<div class="px-10 m-5">
</div>
<hr />
<div class="card-body">
<?php echo $TicketInfo['ticket_content']; ?>
</div>
</div>
<?php if ($ReplyCount > 0): ?>
<?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 echo $value['reply_from'] == 999999 ? 'Support Staff' : 'Client Reply'; ?></b>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<strong><?php echo $value['reply_from'] == 999999 ? 'Support Staff' : 'Client Reply'; ?></strong>
<span><?php echo $value['reply_date']; ?></span>
</div>
<hr>
<div class="px-10 m-5">
<hr />
<div class="card-body m-5">
<?php echo $value['reply_content']; ?>
</div>
</div>
<?php endforeach;?>
<?php else: ?>
<div class="card py-5">
<div class="text-center">
<p>No replies to this ticket yet</p>
</div>
<div class="card">
<div class="card-body text-center">No replies to this ticket yet.</div>
</div>
<?php endif;?>
<div class="card p-10" id="reply">
<?php if ($TicketInfo['ticket_status'] == '3'): ?>
<div class="text-center">
<p>You can't reply to this ticket anymore open new ticket for any further questions.</p>
</div>
<div class="card">
<div class="card-body text-center">You can't reply to this ticket anymore open new ticket for any further questions.</div>
</div>
<?php else: ?>
<form action="controllers/tickets/reply.php" method="post" class="p-10">
<div class="form-group mb-10">
<label class="form-label required" for="content">Reply content</label>
<textarea class="form-control" name="content" id="content" style="max-width: 100vw;" style="height: 200px"></textarea>
<input type="hidden" name="ticket_id" value="<?php echo $TicketInfo['ticket_id']; ?>">
<input type="hidden" name="ticket_email" value="<?php echo $TicketInfo['ticket_email']; ?>">
</div>
<div class="form-group my-0">
<button class="btn btn-sm btn-primary" name="submit">Add Reply</button>
<a href="controllers/tickets/close.php?ticket_id=<?php echo $ticket_id; ?>" class="btn btn-danger btn-sm">Close Ticket</a>
<div class="card" id="reply">
<form action="controllers/tickets/reply.php" method="post">
<label class="card-header form-label required" for="content">Reply content</label>
<div class="card-body">
<div class="form-group mb-10">
<textarea class="form-control" name="content" id="content"></textarea>
<input type="hidden" name="ticket_id" value="<?php echo $TicketInfo['ticket_id']; ?>">
<input type="hidden" name="ticket_email" value="<?php echo $TicketInfo['ticket_email']; ?>">
</div>
<div class="form-group">
<button class="btn btn-sm btn-primary" name="submit">Add Reply</button>
<a href="controllers/tickets/close.php?ticket_id=<?php echo $ticket_id; ?>" class="btn btn-danger btn-sm">Close Ticket</a>
<a href="tickets.php" class="btn btn-sm btn-danger pull-right"><i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?></a>
</div>
</div>
</form>
<?php endif;?>
</div>
</div>
</div>

4
src/assets/css/font-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -44,7 +44,7 @@ function jumpLink(action, params, target) {
* @param {string|number} expires 时长,单位天
* @param {string} path 路径
* @param {string} domain 域名
* @param {string} secure
* @param {string} secure
*/
function setCookie(name, value, expires, path, domain, secure) {
var today = new Date();

4359
src/assets/ui/css/style.min.css vendored Normal file

File diff suppressed because it is too large Load diff

145
src/assets/ui/js/main.min.js vendored Normal file
View file

@ -0,0 +1,145 @@
jQuery(function () {
$('body').on('click', '[data-stopPropagation]', function (e) {
e.stopPropagation()
})
// 滚动条
// const ps = new PerfectScrollbar('.lyear-layout-sidebar-scroll', {
// swipeEasing: false,
// suppressScrollX: true
// })
// 侧边栏
$('.lyear-aside-toggler').bind('click', function () {
$('.lyear-layout-sidebar').toggleClass('lyear-aside-open')
$('body').toggleClass('lyear-layout-sidebar-close')
if ($('.lyear-mask-modal').length == 0) {
$('<div class="lyear-mask-modal"></div>').prependTo('body')
} else {
$('.lyear-mask-modal').remove()
}
$('.lyear-mask-modal').on('click', function () {
$(this).remove()
$('.lyear-layout-sidebar').toggleClass('lyear-aside-open')
$('body').toggleClass('lyear-layout-sidebar-close')
})
})
// 侧边栏导航
$('.nav-item-has-subnav > a').on('click', function () {
$subnavToggle = jQuery(this)
$navHasSubnav = $subnavToggle.parent()
$topHasSubNav = $subnavToggle.parents('.nav-item-has-subnav').last()
$subnav = $navHasSubnav.find('.nav-subnav').first()
$viSubHeight = $navHasSubnav.siblings().find('.nav-subnav:visible').outerHeight()
$scrollBox = $('.lyear-layout-sidebar-scroll')
$navHasSubnav.siblings().find('.nav-subnav:visible').slideUp(500).parent().removeClass('open')
$subnav.slideToggle(300, function () {
$navHasSubnav.toggleClass('open')
// 新增滚动条处理
var scrollHeight = 0
;(pervTotal = $topHasSubNav.prevAll().length),
(boxHeight = $scrollBox.outerHeight()),
(innerHeight = $('.sidebar-main').outerHeight()),
(thisScroll = $scrollBox.scrollTop()),
(thisSubHeight = $(this).outerHeight()),
(footHeight = 121)
if (footHeight + innerHeight - boxHeight >= pervTotal * 48) {
scrollHeight = pervTotal * 48
}
if ($subnavToggle.parents('.nav-item-has-subnav').length == 1) {
$scrollBox.animate({ scrollTop: scrollHeight }, 300)
} else {
// 子菜单操作
if (typeof $viSubHeight != 'undefined' && $viSubHeight != null) {
scrollHeight = thisScroll + thisSubHeight - $viSubHeight
$scrollBox.animate({ scrollTop: scrollHeight }, 300)
} else {
if (thisScroll + boxHeight - $scrollBox[0].scrollHeight == 0) {
scrollHeight = thisScroll - thisSubHeight
$scrollBox.animate({ scrollTop: scrollHeight }, 300)
}
}
}
})
})
// 提示
if ($('[data-toggle="tooltip"]')[0]) {
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
})
}
// 弹出框
if ($('[data-toggle="popover"]')[0]) {
$('[data-toggle="popover"]').popover()
}
// 标签
if ($('.js-tags-input')[0]) {
$('.js-tags-input').tagsInput({
height: '36px',
width: '100%',
defaultText: $('.js-tags-input').attr('placeholder'),
removeWithBackspace: true,
delimiter: [',']
})
}
// 时间选择
jQuery('.js-datetimepicker').each(function () {
var $input = jQuery(this)
$input.datetimepicker({
format: $input.data('format') ? $input.data('format') : false,
useCurrent: $input.data('use-current') ? $input.data('use-current') : false,
locale: moment.locale('' + ($input.data('locale') ? $input.data('locale') : '') + ''),
showTodayButton: $input.data('show-today-button') ? $input.data('show-today-button') : false,
showClear: $input.data('show-clear') ? $input.data('show-clear') : false,
showClose: $input.data('show-close') ? $input.data('show-close') : false,
sideBySide: $input.data('side-by-side') ? $input.data('side-by-side') : false,
inline: $input.data('inline') ? $input.data('inline') : false
})
})
// 日期选择
jQuery('.js-datepicker').each(function () {
var $input = jQuery(this)
$input.datepicker({
weekStart: 1,
autoclose: true,
todayHighlight: true,
language: 'zh-CN'
})
})
// 颜色选取
jQuery('.js-colorpicker').each(function () {
var $colorpicker = jQuery(this)
var $colorpickerMode = $colorpicker.data('colorpicker-mode') ? $colorpicker.data('colorpicker-mode') : 'hex'
var $colorpickerinline = $colorpicker.data('colorpicker-inline') ? true : false
$colorpicker.colorpicker({
format: $colorpickerMode,
inline: $colorpickerinline
})
})
// 复选框全选
$('#check-all').change(function () {
$("input[type='checkbox']").prop('checked', $(this).prop('checked'))
})
// 设置主题配色
setTheme = function (input_name, data_name) {
$("input[name='" + input_name + "']").click(function () {
$('body').attr(data_name, $(this).val())
})
}
setTheme('site_theme', 'data-theme')
setTheme('logo_bg', 'data-logobg')
setTheme('header_bg', 'data-headerbg')
setTheme('sidebar_bg', 'data-sidebarbg')
})

8
src/callback/.htaccess Normal file
View file

@ -0,0 +1,8 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>

View file

@ -1,34 +1,36 @@
<?php
header("X-Powered-By: UIISC");
header("Server: UIISC");
header("Content-Type: text/html; charset=UTF-8");
if (!isset($_GET['token']) || empty($_GET['token'])) {
header("status: 401");
exit('401 Unauthorized');
}
if (!isset($_GET['key']) || empty($_GET['key'])) {
header("status: 401");
exit('401 Unauthorized');
}
require_once __DIR__ . '/../core/application.php';
$path_array = explode('/', trim($path_info, '/'));
$token = get('token');
$key = get('key');
$HostingApi = $DB->find('account_api', '*', array('api_key' => $key), null, 1);
if (!$HostingApi) {
header("status: 404");
exit('404 Not Found');
if (!$path_array || count($path_array) < 2) {
exit('401 Unauthorized');
}
if ($token != $HostingApi['api_callback_token']) {
header("status: 404");
exit('404 Not Found');
if (!isset($path_array[0]) || empty($path_array[0])) {
header("status: 401");
exit('401 Unauthorized');
}
require_once __DIR__ . '/' . $key . '/app.php';
if (!isset($path_array[1]) || empty($path_array[1])) {
header("status: 401");
exit('401 Unauthorized');
}
$api_key = $path_array[0];
$token = $path_array[1];
$AccountApi = $DB->find('account_api', '*', array('api_key' => $api_key), null, 1);
if (!$AccountApi) {
exit('Not Found');
}
if ($token != $AccountApi['api_callback_token']) {
exit('Unauthorized');
}
file_put_contents('./log.txt', json_encode($_POST), FILE_APPEND);
file_put_contents('./log.txt', "\n", FILE_APPEND);
require_once __DIR__ . '/' . $AccountApi['api_type'] . '/app.php';

View file

@ -12,49 +12,89 @@ if (!$username) {
exit('need: username');
}
$callback_log = array(
'callback_date' => date('Y-m-d H:i:s'),
'callback_username' => $username,
'callback_action' => $status,
'callback_comments' => post('comments'),
'callback_client_id' => 0,
'callback_raw' => json_encode(post())
);
// 账号信息
$AccountInfo = $DB->find('account', '*', array('account_username' => $username, 'account_api_key' => $HostingApi['api_key']));
$AccountInfo = $DB->find('account', '*', array('account_username' => $username));
if ($AccountInfo) {
// 账号存在 激活账号
$res = $DB->update('account', array('account_sql' => $status, 'account_status' => '1'), array('account_id' => $AccountInfo['account_id']));
// 更新账号信息
$res = $DB->update('account', array('account_status' => '1'), array('account_id' => $AccountInfo['account_id']));
// 查找客户信息
$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']));
if ($ClientInfo) {
$callback_log['callback_client_id'] = $AccountInfo['account_client_id'];
$EmailTo = $ClientInfo['client_email'];
$EmailSubject = 'New Hosting Account';
$EmailToPeople = $ClientInfo['client_fname'];
$EmailToNickname = $ClientInfo['client_fname'];
} else {
$EmailTo = $SiteConfig['site_email'];
$EmailToPeople = 'Administrator';
$EmailToNickname = 'Administrator';
}
$EmailContent = '<p>You have successfully created a new hosting account the details are given bellow.</p>';
} else {
// TODO: 账号不存在,入库
// 账号不存在,入库
$AccountInfo = array(
'account_username' => $username,
'account_password' => '********',
'account_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
'account_api_key' => $api_key,
'account_domain' => '***.' . $AccountApi['api_server_domain'],
'account_status' => '1',
'account_date' => $callback_log['callback_date'],
'account_client_id' => 0,
'account_sql' => 'sql***'
);
$DB->insert('account', $AccountInfo);
$EmailTo = $SiteConfig['site_email'];
$EmailToPeople = 'Administrator';
$EmailToNickname = 'Administrator';
$EmailContent = '<p>Congratulations !</p><p>You have successfully received a new hosting account, the details are given bellow.</p>';
}
// 记录日志
$DB->insert('account_callback', $callback_log);
$EmailDescription = '
<b>cPanel Username: </b><span>' . $AccountInfo['account_username'] . '</span><br />
<b>cPanel Password: </b><span>' . $AccountInfo['account_password'] . '</span><br />
<b>cPanel URL : </b><span>' . $HostingApi['api_cpanel_url'] . '</span><br /><br />
<b>Main Domain : </b><span>' . $AccountInfo['account_domain'] . '</span><br />
<b>Account Date : </b><span>' . $AccountInfo['account_date'] . '</span><br />
<b>Server IP : </b><span>' . $HostingApi['api_server_ip'] . '</span><br />
<b>Hosting Package: </b><span>' . $HostingApi['api_package'] . '</span><br /><br />
<b>FTP Username : </b><span>' . $AccountInfo['account_username'] . '</span><br />
<b>FTP Password : </b><span>' . $AccountInfo['account_password'] . '</span><br />
<b>FTP Hostname : </b><span>ftpupload.net</span><br />
<b>FTP Port : </b><span>21</span><br /><br />
<b>MySQL Username : </b><span>' . $AccountInfo['account_username'] . '</span><br />
<b>MySQL Password : </b><span>' . $AccountInfo['account_password'] . '</span><br />
<b>MySQL Hostname : </b><span>' . str_replace('cpanel', $AccountInfo['account_sql'], $HostingApi['api_cpanel_url']) . '</span><br />
<b>MySQL Port : </b><span>3306</span><br /><br />
<b>Nameserver 1 : </b><span>' . $HostingApi['api_ns_1'] . '</span><br />
<b>Nameserver 2 : </b><span>' . $HostingApi['api_ns_2'] . '</span>';
$email_body = email_build_body('New Hosting Account', $EmailToPeople, $EmailContent, $EmailDescription);
<p>Account domain : ' . $AccountInfo['account_domain'] . '<br />
Account date : ' . $AccountInfo['account_date'] . '<br />
Server IP : ' . $AccountApi['api_server_ip'] . '<br />
Hosting package: ' . $AccountApi['api_package'] . '<br /></p>
<p>Control Panel username : ' . $AccountInfo['account_username'] . '<br />
Control Panel password : ' . $AccountInfo['account_password'] . '<br />
Control Panel URL : ' . $AccountApi['api_cpanel_url'] . '<br /></p>
<p>SQL hostname : ***.' . $AccountApi['api_server_sql_domain'] . '<br />
SQL username : ' . $AccountInfo['account_username'] . '<br />
SQL password : ' . $AccountInfo['account_password'] . '<br />
SQL port : 3306</p>
<p>FTP username : ' . $AccountInfo['account_username'] . '<br />
FTP password : ' . $AccountInfo['account_password'] . '<br />
FTP hostname : ' . $AccountApi['api_server_ftp_domain'] . '<br />
FTP port : 21<br /></p>
<p>Nameserver 1 : ' . $AccountApi['api_ns_1'] . '<br />
Nameserver 2 : ' . $AccountApi['api_ns_2'] . '</p>';
$email_body = email_build_body('New Hosting Account', $EmailToNickname, $EmailContent, $EmailDescription);
// print($email_body);
$emails_log = array(
'email_client_id' => $AccountInfo['account_client_id'],
'email_date' => date('Y-m-d H:i:s'),
'email_to' => $EmailTo,
'email_subject' => 'New Hosting Account',
'email_body' => $email_body,
'email_read' => 0
);
// print_r($emails_log);
$DB->insert('emails', $emails_log);
send_mail(array(
'to' => $EmailTo,

View file

@ -12,10 +12,33 @@ if (!isset($_POST['comments'])) {
$status = post('status');
if (substr($status, 0, 3) == 'sql') {
if ($status == 'ACTIVATED') {
// 帐户激活,新注册
require_once __DIR__ . '/activate.php';
} elseif ($status == 'SUSPENDED') {
// 帐户暂停
require_once __DIR__ . '/suspend.php';
} else if ($status == 'REACTIVATE') {
// 帐户解禁
require_once __DIR__ . '/reactivate.php';
} else if ($status == 'CLIENTSUBADD') {
// 添加子域名
require_once __DIR__ . '/subdomainadd.php';
} else if ($status == 'CLIENTSUBDEL') {
// 删除子域名
require_once __DIR__ . '/subdomaindel.php';
} else if ($status == 'CLIENTPARKADD') {
// 添加停放域名
require_once __DIR__ . '/parkdomainadd.php';
} else if ($status == 'CLIENTPARKDEL') {
// 删除停放域名
require_once __DIR__ . '/parkdomaindel.php';
} else if ($status == 'DELETE') {
// 帐户已删除
require_once __DIR__ . '/delete.php';
} else if (substr($status, 0, 3) == 'sql') {
// 用户sql集群已开通
require_once __DIR__ . '/sqlcluster.php';
} else {
exit('Access Denied');
}

View file

@ -0,0 +1,86 @@
<?php
// require_once __DIR__ . '/../../core/application.php';
if (!defined('IN_CRONLITE')) {
exit('Access Denied');
}
$username = post('username');
if (!$username) {
exit('need: username');
}
$callback_log = array(
'callback_date' => date('Y-m-d H:i:s'),
'callback_username' => $username,
'callback_action' => $status,
'callback_comments' => post('comments'),
'callback_client_id' => 0,
'callback_raw' => json_encode(post())
);
// 账号信息
$AccountInfo = $DB->find('account', '*', array('account_username' => $username));
if ($AccountInfo) {
// 更新账号信息
// 0未激活1已激活2禁用3删除
$res = $DB->update('account', array('account_status' => '3'), array('account_id' => $AccountInfo['account_id']));
// 查找客户信息
$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']));
if ($ClientInfo) {
$callback_log['callback_client_id'] = $AccountInfo['account_client_id'];
$EmailTo = $ClientInfo['client_email'];
$EmailToNickname = $ClientInfo['client_fname'];
} else {
$EmailTo = $SiteConfig['site_email'];
$EmailToNickname = 'Administrator';
}
$EmailContent = '<p><strong>Notification</strong></p><p>You have a hosting account that has been deleted by the system, the details are below.</p>';
} else {
// 账号不存在,入库
$AccountInfo = array(
'account_username' => $username,
'account_password' => '********',
'account_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
'account_api_key' => $api_key,
'account_domain' => '***.' . $AccountApi['api_server_domain'],
'account_status' => '3',
'account_date' => $callback_log['callback_date'],
'account_client_id' => 0,
'account_sql' => 'sql***'
);
$DB->insert('account', $AccountInfo);
$EmailTo = $SiteConfig['site_email'];
$EmailToNickname = 'Administrator';
$EmailContent = '<p><strong>Notification</strong></p><p>The system has deleted a hosting account, the details are given bellow.</p>';
}
// 记录日志
$DB->insert('account_callback', $callback_log);
$EmailDescription = '<p>Hosting Account : <pre>' . $AccountInfo['account_username'] . '</pre></p>';
$email_body = email_build_body('Hosting Account Status Changed', $EmailToNickname, $EmailContent, $EmailDescription);
// print($email_body);
$emails_log = array(
'email_client_id' => $AccountInfo['account_client_id'],
'email_date' => date('Y-m-d H:i:s'),
'email_to' => $EmailTo,
'email_subject' => 'Hosting Account Status Changed',
'email_body' => $email_body,
'email_read' => 0
);
// print_r($emails_log);
$DB->insert('emails', $emails_log);
send_mail(array(
'to' => $EmailTo,
'message' => $email_body,
'subject' => 'Hosting Account Status Changed'
));

View file

@ -0,0 +1,90 @@
<?php
if (!defined('IN_CRONLITE')) {
exit('Access Denied');
}
$username = post('username');
if (!$username) {
exit('need: username');
}
$callback_log = array(
'callback_date' => date('Y-m-d H:i:s'),
'callback_username' => $username,
'callback_action' => $status,
'callback_comments' => post('comments'), // domain name
'callback_client_id' => 0,
'callback_raw' => json_encode(post())
);
// 账号信息
$AccountInfo = $DB->find('account', '*', array('account_username' => $username));
if ($AccountInfo) {
$account_id = $AccountInfo['account_id'];
// 查找客户信息
$ClientInfo = $DB->find('clients', 'client_email, client_fname', array('client_id' => $AccountInfo['account_client_id']));
if ($ClientInfo) {
$callback_log['callback_client_id'] = $AccountInfo['account_client_id'];
$EmailTo = $ClientInfo['client_email'];
$EmailToNickname = $ClientInfo['client_fname'];
$EmailContent = '<p>Your hosting account has successfully added a new parked domain. The details are given bellow.</p>';
} else {
$EmailTo = $SiteConfig['site_email'];
$EmailToNickname = 'Administrator';
$EmailContent = '<p>An unassigned hosting account has successfully added a new parked domain. The details are given bellow.</p>';
}
} else {
// 账号不存在,入库
$AccountInfo = array(
'account_username' => $username,
'account_password' => '********',
'account_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
'account_api_key' => $api_key,
'account_domain' => '***.' . $AccountApi['api_server_domain'],
'account_status' => '1',
'account_date' => $callback_log['callback_date'],
'account_client_id' => 0,
'account_sql' => 'sql***'
);
$account_id = $DB->insert('account', $AccountInfo);
$EmailTo = $SiteConfig['site_email'];
$EmailToNickname = 'Administrator';
$EmailContent = '<p>An unassigned hosting account has successfully added a new parked domain. The details are given bellow.</p>';
}
// 同步到本地
$DB->insert('account_domain', array(
'domain_account_id' => $account_id,
'domain_name' => $callback_log['callback_comments']
));
$EmailDescription = '<p><pre>' . $callback_log['callback_comments'] . '</pre></p>
<p>The new parked domain is now available for use.</p>';
// 记录日志
$DB->insert('account_callback', $callback_log);
$email_body = email_build_body('Hosting Account Parked Domain Added', $EmailToNickname, $EmailContent, $EmailDescription);
// print_r($email_body);
$emails_log = array(
'email_client_id' => $AccountInfo['account_client_id'],
'email_date' => date('Y-m-d H:i:s'),
'email_to' => $EmailTo,
'email_subject' => 'Hosting Account Parked Domain Added',
'email_body' => $email_body,
'email_read' => 0
);
// print_r($emails_log);
$DB->insert('emails', $emails_log);
send_mail(array(
'to' => $EmailTo,
'message' => $email_body,
'subject' => 'Hosting Account Parked Domain Added'
));

Some files were not shown because too many files have changed in this diff Show more