Compare commits
26 commits
Author | SHA1 | Date | |
---|---|---|---|
|
d7d2669823 | ||
|
d167ea1b38 | ||
|
07afb48fcf | ||
|
bfd4e90878 | ||
|
950498e36b | ||
|
65f5501d67 | ||
|
f2b685d9b1 | ||
|
45c38c6da9 | ||
|
6210c99f9b | ||
|
9b13219a10 | ||
|
97d9fc7ab8 | ||
|
03b76efc30 | ||
|
14f4d5c957 | ||
|
3a2872da2c | ||
|
39aa23f045 | ||
|
8eee0ffd5b | ||
|
59dabbc30a | ||
|
c967c3e8ca | ||
|
47cf5a7bfd | ||
|
da431fa5ca | ||
|
3b956676b1 | ||
|
609f629c52 | ||
|
723bb93b9a | ||
|
a269eb6cf5 | ||
|
d186d8dc6e | ||
|
517ca3680f |
277 changed files with 5907 additions and 7292 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
test/
|
test/
|
||||||
|
install.lock
|
||||||
|
log.txt
|
62
README-zh.md
Normal file
62
README-zh.md
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
# UIISC
|
||||||
|
|
||||||
|
简体中文 | [English](README.md)
|
||||||
|
|
||||||
|
开源虚拟主机账号和支持管理系统(针对 MyOwnFreeHost)
|
||||||
|
|
||||||
|
- 演示地址 : [demo.uiisc.com](http://demo.uiisc.com)
|
||||||
|
- 官网 : [uiisc.org](http://uiisc.org "UIISC")
|
||||||
|
- 作者 : [Jackson Dou](https://github.com/jksdou "Jackson Dou")
|
||||||
|
|
||||||
|
## 功能
|
||||||
|
|
||||||
|
### 多语言
|
||||||
|
|
||||||
|
- [x] 加载默认语言配置 (/core/language/)
|
||||||
|
- [x] 语言切换
|
||||||
|
- [x] 加载自定义语言配置 (/data/language/)
|
||||||
|
|
||||||
|
### 客户管理
|
||||||
|
|
||||||
|
- [x] 账号注册
|
||||||
|
- [x] 账号验证
|
||||||
|
- [x] 账号注销
|
||||||
|
- [x] 邮箱验证
|
||||||
|
- [x] 资料修改
|
||||||
|
- [x] 登录/登出, 忘记/重置/修改密码
|
||||||
|
- [x] 申请和开通虚拟主机账号
|
||||||
|
- [x] 虚拟主机账号取消
|
||||||
|
- [x] 登录到虚拟主机控制面板
|
||||||
|
|
||||||
|
### 管理员模块
|
||||||
|
|
||||||
|
- [x] 验证域名是否可用
|
||||||
|
- [x] 创建虚拟主机账号
|
||||||
|
- [x] 修改虚拟主机账号密码
|
||||||
|
- [x] 取消或禁用虚拟主机账号
|
||||||
|
- [x] 激活或启用虚拟主机账号
|
||||||
|
- [x] 检查虚拟主机账号名下域名
|
||||||
|
- [x] 客户管理
|
||||||
|
- [x] 站点配置
|
||||||
|
- [x] 供应商接口配置
|
||||||
|
- [x] 支持多个供应商
|
||||||
|
- [x] 新闻通知管理
|
||||||
|
- [ ] 翻译文件管理
|
||||||
|
|
||||||
|
### 论坛模块
|
||||||
|
|
||||||
|
- [ ] 增删改查
|
||||||
|
|
||||||
|
## 使用截图
|
||||||
|
|
||||||
|
##### <u>套餐页面</u>
|
||||||
|
|
||||||
|
> ![套餐页面](screenshot/solution.png)
|
||||||
|
|
||||||
|
##### <u>登录页面</u>
|
||||||
|
|
||||||
|
> ![登录页面](screenshot/login.png)
|
||||||
|
|
||||||
|
##### <u>注册页面</u>
|
||||||
|
|
||||||
|
> ![注册页面](screenshot/register.png)
|
|
@ -1,5 +1,7 @@
|
||||||
# UIISC
|
# UIISC
|
||||||
|
|
||||||
|
English | [简体中文](README-zh.md)
|
||||||
|
|
||||||
An Open Source Web Hosting Account and Support Management System for MyOwnFreeHost
|
An Open Source Web Hosting Account and Support Management System for MyOwnFreeHost
|
||||||
|
|
||||||
- Demo : [demo.uiisc.com](http://demo.uiisc.com)
|
- Demo : [demo.uiisc.com](http://demo.uiisc.com)
|
||||||
|
|
|
@ -4,13 +4,13 @@ require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
$action = get('action', 'list');
|
$action = get('action', 'list');
|
||||||
|
|
||||||
if (!in_array($action, array('list', 'add', 'edit', 'view', 'goftp', 'login', 'sync'))) {
|
if (!in_array($action, array('list', 'add', 'edit', 'details', 'goftp', 'login', 'sync'))) {
|
||||||
$action = 'list';
|
$action = 'list';
|
||||||
}
|
}
|
||||||
|
|
||||||
require __DIR__ . '/controllers/accounts/' . $action . '.php';
|
require __DIR__ . '/controllers/accounts/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/accounts/' . $action . '.php';
|
require __DIR__ . '/views/accounts/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
41
src/admin/api/accounts.php
Executable file
41
src/admin/api/accounts.php
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'application.php';
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
if (!checkRefererHost()) exit('{"code":403}');
|
||||||
|
|
||||||
|
$act = get('act');
|
||||||
|
|
||||||
|
switch ($act) {
|
||||||
|
case 'add':
|
||||||
|
break;
|
||||||
|
case 'primary-domain':
|
||||||
|
$account_id = post('account_id', 0);
|
||||||
|
if (empty($account_id)) {
|
||||||
|
send_response(-1, $msg = 'need account_id');
|
||||||
|
}
|
||||||
|
$domain = post('domain', null);
|
||||||
|
if (empty($domain)) {
|
||||||
|
send_response(-1, $msg = 'need domain');
|
||||||
|
}
|
||||||
|
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
|
||||||
|
if (empty($AccountInfo)) {
|
||||||
|
send_response(-1, $msg = 'account not found');
|
||||||
|
}
|
||||||
|
$DomainInfo = $DB->find('account_domain', 'domain_id', array('domain_account_id' => $account_id, 'domain_name' => $domain), null, 1);
|
||||||
|
if (empty($DomainInfo)) {
|
||||||
|
send_response(-1, $msg = 'domain not found');
|
||||||
|
}
|
||||||
|
// set the primary domain
|
||||||
|
$result = $DB->update('account', array('account_domain' => $domain), array('account_id' => $account_id));
|
||||||
|
if ($result) {
|
||||||
|
send_response(200, array('account_domain' => $domain), 'success');
|
||||||
|
} else {
|
||||||
|
send_response(-1, $msg = 'error');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
send_response(-4, $msg = 'No Act');
|
||||||
|
break;
|
||||||
|
}
|
13
src/admin/api/application.php
Executable file
13
src/admin/api/application.php
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../../core/application.php';
|
||||||
|
|
||||||
|
if (isset($_SESSION['UIISC_ADMIN'])) {
|
||||||
|
$AdminInfo = $DB->find('admin', '*', array('admin_key' => base64_decode($_SESSION['UIISC_ADMIN'])), null, 1);
|
||||||
|
if (!$AdminInfo) {
|
||||||
|
unset($_SESSION['UIISC_ADMIN']);
|
||||||
|
send_response(403, null, 'need login');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
send_response(403, null, 'need login');
|
||||||
|
}
|
73
src/admin/api/clients.php
Executable file
73
src/admin/api/clients.php
Executable file
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'application.php';
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
if (!checkRefererHost()) exit('{"code":403}');
|
||||||
|
|
||||||
|
$act = get('act');
|
||||||
|
|
||||||
|
switch ($act) {
|
||||||
|
case 'add':
|
||||||
|
$form_data = array(
|
||||||
|
'client_fname' => post('client_fname'),
|
||||||
|
'client_lname' => post('client_lname'),
|
||||||
|
'client_email' => post('client_email'),
|
||||||
|
'client_phone' => post('client_phone'),
|
||||||
|
'client_company' => post('client_company'),
|
||||||
|
'client_address' => post('client_address'),
|
||||||
|
'client_country' => post('client_country'),
|
||||||
|
'client_city' => post('client_city'),
|
||||||
|
'client_pcode' => post('client_pcode'),
|
||||||
|
'client_state' => post('client_state'),
|
||||||
|
'client_password'=> hash('sha256', post('client_password', '123456')),
|
||||||
|
// 'client_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
|
||||||
|
'client_key' => randstr(8),
|
||||||
|
'client_status' => post('client_status', 0),
|
||||||
|
'client_signup_ip' => get_client_ip(),
|
||||||
|
'client_addtime' => date('Y-m-d H:i:s'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$client_id = $DB->insert('clients', $form_data);
|
||||||
|
|
||||||
|
if ($client_id) {
|
||||||
|
send_response(200, array('client_id' => $client_id), 'success');
|
||||||
|
} else {
|
||||||
|
send_response(-1, $msg = 'error');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'edit':
|
||||||
|
$client_id = post('client_id');
|
||||||
|
$client_password = post('client_password', '');
|
||||||
|
$form_data = array(
|
||||||
|
'client_fname' => post('client_fname'),
|
||||||
|
'client_lname' => post('client_lname'),
|
||||||
|
'client_email' => post('client_email'),
|
||||||
|
'client_phone' => post('client_phone'),
|
||||||
|
'client_company' => post('client_company'),
|
||||||
|
'client_address' => post('client_address'),
|
||||||
|
'client_country' => post('client_country'),
|
||||||
|
'client_city' => post('client_city'),
|
||||||
|
'client_pcode' => post('client_pcode'),
|
||||||
|
'client_state' => post('client_state'),
|
||||||
|
// 'client_key' => substr(str_shuffle('qwertyuioplkjhgfdsazxcvbnm012345789QWERTYUIOPLKJHGFDSAZXCVBNM'), 0, 8),
|
||||||
|
'client_status' => post('client_status', 0),
|
||||||
|
'client_updatetime' => date('Y-m-d H:i:s'),
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($client_password) {
|
||||||
|
$form_data['client_password'] = hash('sha256', $client_password);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $DB->update('clients', $form_data, array('client_id' => $client_id));
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
send_response(200, array('client_id' => $client_id), 'success');
|
||||||
|
} else {
|
||||||
|
send_response(-1, $msg = 'error');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
send_response(-4, $msg = 'No Act');
|
||||||
|
break;
|
||||||
|
}
|
36
src/admin/api/dashboard.php
Normal file
36
src/admin/api/dashboard.php
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'application.php';
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
if (!checkRefererHost()) exit('{"code":403}');
|
||||||
|
|
||||||
|
$act = get('act');
|
||||||
|
|
||||||
|
switch ($act) {
|
||||||
|
case 'stat':
|
||||||
|
$count_client = $DB->count('clients', array('client_status' => 1));
|
||||||
|
$count_clients = $DB->count('clients');
|
||||||
|
$count_account = $DB->count('account', array('account_status' => 1));
|
||||||
|
$count_accounts = $DB->count('account');
|
||||||
|
$count_ssl = $DB->count('ssl');
|
||||||
|
$count_ssls = $DB->count('ssl');
|
||||||
|
$count_ticket = $DB->count('tickets', "`ticket_status`=0 OR `ticket_status`=2");
|
||||||
|
$count_tickets = $DB->count('tickets');
|
||||||
|
|
||||||
|
$result = [
|
||||||
|
"count_client" => $count_client,
|
||||||
|
"count_clients" => $count_clients,
|
||||||
|
"count_account" => $count_account,
|
||||||
|
"count_accounts" => $count_accounts,
|
||||||
|
"count_ssl" => $count_ssl,
|
||||||
|
"count_ssls" => $count_ssls,
|
||||||
|
"count_ticket" => $count_ticket,
|
||||||
|
"count_tickets" => $count_tickets
|
||||||
|
];
|
||||||
|
send_response(0, $result);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
send_response(-4, null, 'No Act');
|
||||||
|
break;
|
||||||
|
}
|
63
src/admin/api/emails.php
Executable file
63
src/admin/api/emails.php
Executable file
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'application.php';
|
||||||
|
|
||||||
|
// if (!defined('IN_CRONLITE')) {
|
||||||
|
// exit('Access Denied');
|
||||||
|
// }
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
// if (!checkRefererHost()) exit('{"code":403}');
|
||||||
|
|
||||||
|
$act = get('act');
|
||||||
|
|
||||||
|
switch ($act) {
|
||||||
|
case 'info':
|
||||||
|
$email_id = intval(get('email_id'));
|
||||||
|
|
||||||
|
if ($email_id > 0) {
|
||||||
|
$row = $DB->find('emails', '*', array('email_id' => $email_id), null, 1);
|
||||||
|
} else {
|
||||||
|
$row = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$row) send_response(-1, null, '记录不存在');
|
||||||
|
send_response(0, $row);
|
||||||
|
break;
|
||||||
|
case 'list':
|
||||||
|
$where = " 1=1";
|
||||||
|
$email_id = intval(post('email_id'));
|
||||||
|
$email_client_id = post('email_client_id');
|
||||||
|
$email_subject = post('email_subject');
|
||||||
|
$email_to = post('email_to');
|
||||||
|
|
||||||
|
if (!empty($email_id)) {
|
||||||
|
$where .= " AND `email_id`='{$email_id}'";
|
||||||
|
}
|
||||||
|
if (!empty($email_client_id)) {
|
||||||
|
$where .= " AND `email_client_id`='{$email_client_id}'";
|
||||||
|
}
|
||||||
|
if (!empty($email_subject)) {
|
||||||
|
$where .= " AND `email_subject` like '%{$email_subject}%'";
|
||||||
|
}
|
||||||
|
if (!empty($email_to)) {
|
||||||
|
$where .= " AND `email_to` like '%{$email_to}%'";
|
||||||
|
}
|
||||||
|
|
||||||
|
$offset = intval(post('offset', 0));
|
||||||
|
$limit = intval(post('limit', 10));
|
||||||
|
$total = $DB->count('emails', $where);
|
||||||
|
|
||||||
|
if ($total > 0) {
|
||||||
|
$rows = $DB->findAll('emails', 'email_id,email_client_id,email_subject,email_date,email_to,email_read', $where, "`email_id` DESC", "$offset,$limit");
|
||||||
|
} else {
|
||||||
|
$rows = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// send_response(0, array('total' => $total, 'rows' => $rows));
|
||||||
|
exit(json_encode(array('code' => 0, 'rows' => $rows, 'total' => $total)));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
send_response(-4, null, 'No Act');
|
||||||
|
break;
|
||||||
|
}
|
88
src/admin/api/hosting-hostname.php
Executable file
88
src/admin/api/hosting-hostname.php
Executable file
|
@ -0,0 +1,88 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'application.php';
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
if (!checkRefererHost()) exit('{"code":403}');
|
||||||
|
|
||||||
|
$act = get('act');
|
||||||
|
|
||||||
|
switch ($act) {
|
||||||
|
case 'list':
|
||||||
|
$total = $DB->count('account_hostname');
|
||||||
|
$list = array();
|
||||||
|
$total = intval($total);
|
||||||
|
if ($total > 0) {
|
||||||
|
$list = $DB->findAll('account_hostname', '*', array(), '`host_id` ASC');
|
||||||
|
}
|
||||||
|
send_response(200, array('total' => $total, 'list' => $list));
|
||||||
|
break;
|
||||||
|
case 'options':
|
||||||
|
$api_id = get('api_id');
|
||||||
|
if (!$api_id) {
|
||||||
|
send_response(-1, array());
|
||||||
|
}
|
||||||
|
|
||||||
|
$where = array(
|
||||||
|
'api_id' => $api_id
|
||||||
|
);
|
||||||
|
$list = $DB->findAll('account_hostname', 'api_id,host_id,host_name', $where, '`host_id` ASC');
|
||||||
|
send_response(200, $list);
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
$hostname = post('hostname');
|
||||||
|
if (!$hostname) {
|
||||||
|
send_response(-1, null, '主机名不能为空 !');
|
||||||
|
}
|
||||||
|
$api_id = post('api_id');
|
||||||
|
if (!$api_id) {
|
||||||
|
send_response(-1, null, '托管服务提供商不能为空 !');
|
||||||
|
}
|
||||||
|
|
||||||
|
$domain = strtolower($hostname);
|
||||||
|
|
||||||
|
if (substr($domain, 0, 1) != '.') {
|
||||||
|
$domain = '.' . $domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'api_id' => $api_id,
|
||||||
|
'host_name' => $domain,
|
||||||
|
);
|
||||||
|
|
||||||
|
$has = $DB->count('account_hostname', $data);
|
||||||
|
if ($has && $has > 0) {
|
||||||
|
send_response(-1, null, 'Hostname aleady exsist !');
|
||||||
|
} else {
|
||||||
|
$result = $DB->insert('account_hostname', $data);
|
||||||
|
if ($result) {
|
||||||
|
send_response(0, null, 'Hostname added successfully !');
|
||||||
|
} else {
|
||||||
|
send_response(-1, null, 'Something went wrong !');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
$host_id = post('host_id');
|
||||||
|
if (!$host_id) {
|
||||||
|
send_response(-1, null, '主机ID不能为空 !');
|
||||||
|
}
|
||||||
|
$data = array(
|
||||||
|
'host_id' => $host_id
|
||||||
|
);
|
||||||
|
|
||||||
|
$has = $DB->count('account_hostname', $data);
|
||||||
|
if (!$has > 0) {
|
||||||
|
send_response(-1, null, 'Hostname not found !');
|
||||||
|
} else {
|
||||||
|
$result = $DB->delete('account_hostname', $data);
|
||||||
|
if ($result) {
|
||||||
|
send_response(0, null, 'Hostname deleted successfully !');
|
||||||
|
} else {
|
||||||
|
send_response(-1, null, 'Something went wrong !');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
send_response(-4, NULL, 'No Act');
|
||||||
|
break;
|
||||||
|
}
|
37
src/admin/api/login.php
Executable file
37
src/admin/api/login.php
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../../core/application.php';
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
|
||||||
|
if (!checkRefererHost()) exit(json_encode(['code' => 403, 'msg' => 'error' ]));
|
||||||
|
|
||||||
|
$admin_email = post('email');
|
||||||
|
|
||||||
|
if (empty($admin_email)) {
|
||||||
|
exit(json_encode(['code' => -1, 'msg' => 'Email address is required !' ]));
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin_password = post('password');
|
||||||
|
|
||||||
|
if (empty($admin_password)) {
|
||||||
|
exit(json_encode(['code' => -1, 'msg' => 'Password is required !' ]));
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin_password = hash('sha256', post('password'));
|
||||||
|
|
||||||
|
$data = $DB->find('admin', '*', array(
|
||||||
|
'admin_email' => $admin_email,
|
||||||
|
'admin_password' => $admin_password,
|
||||||
|
));
|
||||||
|
|
||||||
|
if (!empty($data) && is_array($data)) {
|
||||||
|
if (isset($_POST['remember'])) {
|
||||||
|
$_SESSION['UIISC_ADMIN'] = base64_encode($data['admin_key']);
|
||||||
|
} else {
|
||||||
|
$_SESSION['UIISC_ADMIN'] = base64_encode($data['admin_key']);
|
||||||
|
}
|
||||||
|
exit(json_encode(['code' => 0, 'msg' => 'Logged in successfully !' ]));
|
||||||
|
} else {
|
||||||
|
exit(json_encode(['code' => -1, 'msg' => 'Invalid email address or password !' ]));
|
||||||
|
}
|
18
src/admin/api/logout.php
Executable file
18
src/admin/api/logout.php
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../../core/application.php';
|
||||||
|
|
||||||
|
@header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
|
||||||
|
if (!checkRefererHost()) exit(json_encode(['code' => 403, 'msg' => 'error']));
|
||||||
|
|
||||||
|
// ob_start();
|
||||||
|
// session_start();
|
||||||
|
if (isset($_SESSION['UIISC_ADMIN'])) {
|
||||||
|
unset($_SESSION['UIISC_ADMIN']);
|
||||||
|
exit(json_encode(['code' => 0, 'msg' => 'Logout successfully !']));
|
||||||
|
} else {
|
||||||
|
exit(json_encode(['code' => 0, 'msg' => 'Login to continue !']));
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(json_encode(['code' => -1, 'msg' => 'error !']));
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once __DIR__ . '/../core/application.php';
|
require_once __DIR__ . '/../core/application.php';
|
||||||
|
|
||||||
|
define('ROOT_ADMIN', dirname(__FILE__));
|
||||||
|
|
||||||
require_once ROOT . '/core/adminarea.php';
|
require_once ROOT . '/core/adminarea.php';
|
||||||
|
|
|
@ -4,13 +4,13 @@ require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
$action = get('action', 'list');
|
$action = get('action', 'list');
|
||||||
|
|
||||||
if (!in_array($action, array('list', 'add', 'edit', 'view', 'login'))) {
|
if (!in_array($action, array('list', 'add', 'edit', 'details', 'login'))) {
|
||||||
$action = 'list';
|
$action = 'list';
|
||||||
}
|
}
|
||||||
|
|
||||||
require __DIR__ . '/controllers/clients/' . $action . '.php';
|
require __DIR__ . '/controllers/clients/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/clients/' . $action . '.php';
|
require __DIR__ . '/views/clients/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
0
src/admin/controllers/accounts/add.php
Normal file
0
src/admin/controllers/accounts/add.php
Normal file
|
@ -17,7 +17,7 @@ if (empty($AccountInfo)) {
|
||||||
redirect('admin/accounts');
|
redirect('admin/accounts');
|
||||||
}
|
}
|
||||||
|
|
||||||
$PageInfo['title'] = 'View Account (#' . $account_id . ')';
|
$PageInfo['title'] = 'Account Details';
|
||||||
$AccountApi = $DB->find('account_api', '*', array('api_key' => $AccountInfo['account_api_key']), null, 1);
|
$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));
|
$AccountDomainList = $DB->findAll('account_domain', '*', array('domain_account_id' => $account_id));
|
22
src/admin/controllers/accounts/domains.php
Executable file
22
src/admin/controllers/accounts/domains.php
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
$account_id = get('account_id');
|
||||||
|
|
||||||
|
if (empty($account_id)) {
|
||||||
|
redirect('admin/accounts');
|
||||||
|
}
|
||||||
|
|
||||||
|
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
|
||||||
|
|
||||||
|
if (empty($AccountInfo)) {
|
||||||
|
setMessage('not found', 'danger');
|
||||||
|
redirect('admin/accounts');
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'Account Domains';
|
||||||
|
|
||||||
|
$AccountDomainList = $DB->findAll('account_domain', '*', array('domain_account_id' => $account_id));
|
|
@ -6,4 +6,4 @@ $account_id = get('account_id');
|
||||||
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
|
$AccountInfo = $DB->find('account', '*', array('account_id' => $account_id), null, 1);
|
||||||
$ClientInfo = $DB->find('clients', '*', array('client_id' => $AccountInfo['account_client_id']), null, 1);
|
$ClientInfo = $DB->find('clients', '*', array('client_id' => $AccountInfo['account_client_id']), null, 1);
|
||||||
|
|
||||||
$PageInfo['title'] = 'Edit Account #' . $account_id;
|
$PageInfo['title'] = 'Account Edit';
|
||||||
|
|
|
@ -37,6 +37,7 @@ if ($AccountInfo['account_status'] == 1) {
|
||||||
$DomainList = array();
|
$DomainList = array();
|
||||||
}
|
}
|
||||||
if (count($DomainList) > 0) {
|
if (count($DomainList) > 0) {
|
||||||
|
// import all domains
|
||||||
foreach($DomainList as &$item) {
|
foreach($DomainList as &$item) {
|
||||||
// 格式 ("abc.com",1234)
|
// 格式 ("abc.com",1234)
|
||||||
$item = '("' . $item . '",' .$account_id . ')';
|
$item = '("' . $item . '",' .$account_id . ')';
|
||||||
|
@ -45,7 +46,7 @@ if (count($DomainList) > 0) {
|
||||||
$result = $DB->delete('account_domain', array('domain_account_id' => $account_id));
|
$result = $DB->delete('account_domain', array('domain_account_id' => $account_id));
|
||||||
// 同步到本地
|
// 同步到本地
|
||||||
// $result = $DB->insert('account_domain', $DomainList);
|
// $result = $DB->insert('account_domain', $DomainList);
|
||||||
$sql = "INSERT INTO `hosting_account_domain` (domain_name,domain_account_id) VALUES " . implode(',', $DomainList);
|
$sql = "INSERT INTO `pre_account_domain` (domain_name,domain_account_id) VALUES " . implode(',', $DomainList);
|
||||||
$result = $DB->query($sql);
|
$result = $DB->query($sql);
|
||||||
}
|
}
|
||||||
redirect('admin/accounts', '', array('action' => 'view', 'account_id' => $account_id));
|
redirect('admin/accounts', '', array('action' => 'details', 'account_id' => $account_id));
|
||||||
|
|
4
src/admin/controllers/clients/add.php
Normal file
4
src/admin/controllers/clients/add.php
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
require_once ROOT . '/core/library/countries.php';
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'Client Add';
|
25
src/admin/controllers/clients/details.php
Executable file
25
src/admin/controllers/clients/details.php
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once ROOT . '/core/library/countries.php';
|
||||||
|
|
||||||
|
$client_id = get('id');
|
||||||
|
|
||||||
|
if (empty($client_id)) {
|
||||||
|
redirect('admin/clients');
|
||||||
|
}
|
||||||
|
|
||||||
|
$ClientInfo = $DB->find('clients', '*', array('client_id' => $client_id), null, 1);
|
||||||
|
|
||||||
|
$CountryName = 'Not Defined';
|
||||||
|
|
||||||
|
foreach ($countries as $country) {
|
||||||
|
if ($ClientInfo['client_country'] == $country['code']) {
|
||||||
|
$CountryName = $country['name'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'Client Details';
|
||||||
|
$count_account = $DB->count('account', array('account_client_id' => $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']));
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require_once ROOT . '/core/library/countries.php';
|
require_once ROOT . '/core/library/countries.php';
|
||||||
|
|
||||||
$client_id = get('client_id');
|
$client_id = get('id');
|
||||||
|
|
||||||
if (empty($client_id)) {
|
if (empty($client_id)) {
|
||||||
redirect('admin/clients');
|
redirect('admin/clients');
|
||||||
|
@ -20,7 +20,7 @@ foreach ($countries as $country) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$PageInfo['title'] = 'View client (' . $client_id . ')';
|
$PageInfo['title'] = 'Client Edit';
|
||||||
$count_account = $DB->count('account', array('account_client_id' => $ClientInfo['client_id']));
|
$count_account = $DB->count('account', array('account_client_id' => $ClientInfo['client_id']));
|
||||||
$count_ssl = $DB->count('ssl', array('ssl_client_id' => $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']));
|
$count_tickets = $DB->count('tickets', array('ticket_client_id' => $ClientInfo['client_id']));
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require_once __DIR__ . '/../../application.php';
|
require_once __DIR__ . '/../../application.php';
|
||||||
|
|
||||||
$client_id = get('client_id');
|
$client_id = get('id');
|
||||||
|
|
||||||
if (empty($client_id)) {
|
if (empty($client_id)) {
|
||||||
redirect('admin/clients');
|
redirect('admin/clients');
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$PageInfo['title'] = 'Dashboard';
|
$PageInfo['title'] = 'Dashboard';
|
||||||
$count_clients = $DB->count('clients', null);
|
|
||||||
$count_account = $DB->count('account', array('account_status' => 1));
|
$date = date("Y-m-d H:i:s");
|
||||||
$count_ssl = $DB->count('ssl');
|
$mysqlversion = $DB->getColumn("select VERSION()");
|
||||||
$count_tickets = $DB->count('tickets', "`ticket_status`=0 OR `ticket_status`=2");
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../../application.php';
|
|
||||||
|
|
||||||
if (!isset($_POST['submit'])) {
|
|
||||||
exit('Method Not Allowed');
|
|
||||||
}
|
|
||||||
|
|
||||||
$domain = post('domain');
|
|
||||||
|
|
||||||
if (!$domain) {
|
|
||||||
redirect('admin/domain');
|
|
||||||
}
|
|
||||||
|
|
||||||
$domain = strtolower($domain);
|
|
||||||
|
|
||||||
if (substr($domain, 0, 1) != '.') {
|
|
||||||
$domain = '.' . $domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = array(
|
|
||||||
'extension_value' => $domain,
|
|
||||||
);
|
|
||||||
|
|
||||||
$has = $DB->count('domain_extensions', $data);
|
|
||||||
if ($has && $has > 0) {
|
|
||||||
setMessage('Extension aleady <b>exsist!</b>', 'danger');
|
|
||||||
} else {
|
|
||||||
$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/domain');
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../../application.php';
|
|
||||||
|
|
||||||
if (!isset($_POST['submit'])) {
|
|
||||||
exit('Method Not Allowed');
|
|
||||||
}
|
|
||||||
|
|
||||||
$extension = post('extension');
|
|
||||||
|
|
||||||
if (!$extension) {
|
|
||||||
redirect('admin/domain');
|
|
||||||
}
|
|
||||||
|
|
||||||
$extension = strtolower($extension);
|
|
||||||
|
|
||||||
if (substr($extension, 0, 1) != '.') {
|
|
||||||
$extension = '.' . $extension;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = array(
|
|
||||||
'extension_value' => $extension,
|
|
||||||
);
|
|
||||||
|
|
||||||
$count = $DB->count('domain_extensions', $data);
|
|
||||||
|
|
||||||
if (!$count > 0) {
|
|
||||||
setMessage('Extension won' . "'" . 't <b>exsist!</b>', 'danger');
|
|
||||||
} else {
|
|
||||||
$result = $DB->delete('domain_extensions', $data);
|
|
||||||
if ($result) {
|
|
||||||
setMessage('Extension deleted <b>successfully!</b>');
|
|
||||||
} else {
|
|
||||||
setMessage('Something went' . "'" . 's <b>wrong!</b>', 'danger');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
redirect('admin/domain');
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$PageInfo['title'] = 'Domain Extensions';
|
|
||||||
|
|
||||||
$count = $DB->count('domain_extensions');
|
|
||||||
|
|
||||||
if ($count > 0) {
|
|
||||||
$rows = $DB->findAll('domain_extensions', '*', array(), '`extension_id` ASC');
|
|
||||||
}
|
|
16
src/admin/controllers/emails/list.php
Executable file
16
src/admin/controllers/emails/list.php
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = $DB->count('emails');
|
||||||
|
if ($count > 0) {
|
||||||
|
$rows = $DB->findAll('emails', '*', array(), "`email_id` DESC");
|
||||||
|
}
|
||||||
|
|
||||||
|
$status_types = array(
|
||||||
|
"未查看",
|
||||||
|
"已查看",
|
||||||
|
);
|
||||||
|
|
||||||
|
$PageInfo['title'] = $lang->I18N('Emails List');
|
24
src/admin/controllers/emails/view.php
Executable file
24
src/admin/controllers/emails/view.php
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = get('id');
|
||||||
|
|
||||||
|
if (empty($id)) {
|
||||||
|
redirect('admin/emails');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$status_types = array(
|
||||||
|
'关闭',
|
||||||
|
'打开',
|
||||||
|
);
|
||||||
|
|
||||||
|
$data = null;
|
||||||
|
|
||||||
|
if ($id > 0) {
|
||||||
|
$data = $DB->find('emails', '*', array('email_id' => $id), null, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = $lang->I18N('Email Details');
|
17
src/admin/controllers/hosting-hostname/list.php
Executable file
17
src/admin/controllers/hosting-hostname/list.php
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$PageInfo['title'] = $lang->I18N('Hosting Hostname');
|
||||||
|
|
||||||
|
$api_id = get('id');
|
||||||
|
$where = array();
|
||||||
|
if ($api_id > 0) {
|
||||||
|
$has = $DB->find('account_api', 'api_id', array('api_id' => $api_id), null, 1);
|
||||||
|
if ($has) {
|
||||||
|
$where = array('api_id' => $api_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = $DB->count('account_hostname', $where);
|
||||||
|
if ($count > 0) {
|
||||||
|
$rows = $DB->findAll('account_hostname', '*', $where, '`host_id` ASC');
|
||||||
|
}
|
|
@ -5,67 +5,67 @@ if (isset($_POST['submit'])) {
|
||||||
|
|
||||||
if (!post('api_type')) {
|
if (!post('api_type')) {
|
||||||
setMessage('need field: api_type', 'danger');
|
setMessage('need field: api_type', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_key')) {
|
if (!post('api_key')) {
|
||||||
setMessage('need field: api_key', 'danger');
|
setMessage('need field: api_key', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_username')) {
|
if (!post('api_username')) {
|
||||||
setMessage('need field: api_username', 'danger');
|
setMessage('need field: api_username', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_password')) {
|
if (!post('api_password')) {
|
||||||
setMessage('need field: api_password', 'danger');
|
setMessage('need field: api_password', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_domain')) {
|
if (!post('api_server_domain')) {
|
||||||
setMessage('need field: api_server_domain', 'danger');
|
setMessage('need field: api_server_domain', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_cpanel_url')) {
|
if (!post('api_cpanel_url')) {
|
||||||
setMessage('need field: api_cpanel_url', 'danger');
|
setMessage('need field: api_cpanel_url', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_ip')) {
|
if (!post('api_server_ip')) {
|
||||||
setMessage('need field: api_server_ip', 'danger');
|
setMessage('need field: api_server_ip', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_ftp_domain')) {
|
if (!post('api_server_ftp_domain')) {
|
||||||
setMessage('need field: api_server_ftp_domain', 'danger');
|
setMessage('need field: api_server_ftp_domain', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_sql_domain')) {
|
if (!post('api_server_sql_domain')) {
|
||||||
setMessage('need field: api_server_sql_domain', 'danger');
|
setMessage('need field: api_server_sql_domain', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_ns_1')) {
|
if (!post('api_ns_1')) {
|
||||||
setMessage('need field: api_ns_1', 'danger');
|
setMessage('need field: api_ns_1', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_ns_2')) {
|
if (!post('api_ns_2')) {
|
||||||
setMessage('need field: api_ns_2', 'danger');
|
setMessage('need field: api_ns_2', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_package')) {
|
if (!post('api_package')) {
|
||||||
setMessage('need field: api_package', 'danger');
|
setMessage('need field: api_package', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_callback_token')) {
|
if (!post('api_callback_token')) {
|
||||||
setMessage('need field: api_callback_token', 'danger');
|
setMessage('need field: api_callback_token', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,5 +93,5 @@ if (isset($_POST['submit'])) {
|
||||||
setMessage("Something went's wrong !", 'danger');
|
setMessage("Something went's wrong !", 'danger');
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
18
src/admin/controllers/hosting-provider/details.php
Executable file
18
src/admin/controllers/hosting-provider/details.php
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
$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_type']}/{$data['api_key']}/{$data['api_callback_token']}";
|
||||||
|
} 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_type']}/{$data['api_key']}/{$data['api_callback_token']}";
|
||||||
|
} else {
|
||||||
|
$data = null;
|
||||||
|
}
|
|
@ -5,72 +5,72 @@ if (isset($_POST['submit'])) {
|
||||||
$api_id = post('api_id');
|
$api_id = post('api_id');
|
||||||
if (!$api_id) {
|
if (!$api_id) {
|
||||||
setMessage('need field: api_id', 'danger');
|
setMessage('need field: api_id', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_type')) {
|
if (!post('api_type')) {
|
||||||
setMessage('need field: api_type', 'danger');
|
setMessage('need field: api_type', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_key')) {
|
if (!post('api_key')) {
|
||||||
setMessage('need field: api_key', 'danger');
|
setMessage('need field: api_key', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_username')) {
|
if (!post('api_username')) {
|
||||||
setMessage('need field: api_username', 'danger');
|
setMessage('need field: api_username', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_password')) {
|
if (!post('api_password')) {
|
||||||
setMessage('need field: api_password', 'danger');
|
setMessage('need field: api_password', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_domain')) {
|
if (!post('api_server_domain')) {
|
||||||
setMessage('need field: api_server_domain', 'danger');
|
setMessage('need field: api_server_domain', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_cpanel_url')) {
|
if (!post('api_cpanel_url')) {
|
||||||
setMessage('need field: api_cpanel_url', 'danger');
|
setMessage('need field: api_cpanel_url', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_ip')) {
|
if (!post('api_server_ip')) {
|
||||||
setMessage('need field: api_server_ip', 'danger');
|
setMessage('need field: api_server_ip', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_ftp_domain')) {
|
if (!post('api_server_ftp_domain')) {
|
||||||
setMessage('need field: api_server_ftp_domain', 'danger');
|
setMessage('need field: api_server_ftp_domain', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_server_sql_domain')) {
|
if (!post('api_server_sql_domain')) {
|
||||||
setMessage('need field: api_server_sql_domain', 'danger');
|
setMessage('need field: api_server_sql_domain', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_ns_1')) {
|
if (!post('api_ns_1')) {
|
||||||
setMessage('need field: api_ns_1', 'danger');
|
setMessage('need field: api_ns_1', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_ns_2')) {
|
if (!post('api_ns_2')) {
|
||||||
setMessage('need field: api_ns_2', 'danger');
|
setMessage('need field: api_ns_2', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_package')) {
|
if (!post('api_package')) {
|
||||||
setMessage('need field: api_package', 'danger');
|
setMessage('need field: api_package', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!post('api_callback_token')) {
|
if (!post('api_callback_token')) {
|
||||||
setMessage('need field: api_callback_token', 'danger');
|
setMessage('need field: api_callback_token', 'danger');
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
@ -97,7 +97,7 @@ if (isset($_POST['submit'])) {
|
||||||
setMessage("Something went's wrong !", 'danger');
|
setMessage("Something went's wrong !", 'danger');
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect('admin/hosting', '', ['action' => 'edit', 'id' => $api_id]);
|
redirect('admin/hosting-provider', '', ['action' => 'edit', 'id' => $api_id]);
|
||||||
} else {
|
} else {
|
||||||
if (!defined('IN_CRONLITE')) {
|
if (!defined('IN_CRONLITE')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
|
@ -105,9 +105,8 @@ if (isset($_POST['submit'])) {
|
||||||
$id = get('id');
|
$id = get('id');
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$data = $DB->find('account_api', '*', array('api_id' => $id), null, 1);
|
$data = $DB->find('account_api', '*', array('api_id' => $id), null, 1);
|
||||||
$PageInfo = ['title' => 'Edit Hosting Provider #' . $id, 'rel' => ''];
|
|
||||||
} else {
|
} else {
|
||||||
setMessage('need field: id', 'danger');
|
setMessage('need field: id', 'danger');
|
||||||
redirect('admin/hosting');
|
redirect('admin/hosting-provider');
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,21 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
if (!defined('IN_CRONLITE')) {
|
|
||||||
exit('Access Denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
$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;
|
|
||||||
}
|
|
|
@ -17,6 +17,5 @@ if (isset($_POST['submit'])) {
|
||||||
}
|
}
|
||||||
redirect('admin/knowledgebase');
|
redirect('admin/knowledgebase');
|
||||||
} else {
|
} else {
|
||||||
$PageInfo = ['title' => 'New Knowledgebase', 'rel' => ''];
|
|
||||||
$load_editor = 1;
|
$load_editor = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,7 @@ if (!defined('IN_CRONLITE')) {
|
||||||
$knowledgebase_id = get('id');
|
$knowledgebase_id = get('id');
|
||||||
|
|
||||||
if ($knowledgebase_id > 0) {
|
if ($knowledgebase_id > 0) {
|
||||||
$PageInfo = ['title' => 'View Knowledgebase #' . $knowledgebase_id, 'rel' => ''];
|
|
||||||
$Knowledgebase = $DB->find('knowledgebase', '*', array('knowledgebase_id' => $knowledgebase_id), null, 1);
|
$Knowledgebase = $DB->find('knowledgebase', '*', array('knowledgebase_id' => $knowledgebase_id), null, 1);
|
||||||
} else {
|
} else {
|
||||||
$PageInfo = ['title' => 'Unathorized Access', 'rel' => ''];
|
|
||||||
$Knowledgebase = null;
|
$Knowledgebase = null;
|
||||||
}
|
}
|
|
@ -35,10 +35,8 @@ if (isset($_POST['submit'])) {
|
||||||
$id = get('id');
|
$id = get('id');
|
||||||
$load_editor = 1;
|
$load_editor = 1;
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$PageInfo = ['title' => 'Edit Knowledgebase #' . $id, 'rel' => ''];
|
|
||||||
$Knowledgebase = $DB->getRow("SELECT * FROM pre_knowledgebase WHERE knowledgebase_id='{$id}' limit 1");
|
$Knowledgebase = $DB->getRow("SELECT * FROM pre_knowledgebase WHERE knowledgebase_id='{$id}' limit 1");
|
||||||
} else {
|
} else {
|
||||||
$PageInfo = ['title' => 'Unathorized Access', 'rel' => ''];
|
|
||||||
$Knowledgebase = null;
|
$Knowledgebase = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require '../../application.php';
|
if (isset($_POST['submit'])) {
|
||||||
|
require_once __DIR__ . '/../../application.php';
|
||||||
|
$FormData = array(
|
||||||
|
'old_password' => post('old_password'),
|
||||||
|
'new_password' => post('new_password'),
|
||||||
|
'hashed_password' => hash('sha256', post('new_password')),
|
||||||
|
'user_key' => $AdminInfo['admin_key'],
|
||||||
|
'user_password' => $AdminInfo['admin_password'],
|
||||||
|
);
|
||||||
|
|
||||||
if (!isset($_POST['submit'])) {
|
if (hash('sha256', $FormData['old_password']) == $FormData['user_password']) {
|
||||||
exit('405 / Method Not Allowed');
|
$result = $DB->update('admin', array('admin_password' => $FormData['hashed_password']), array('admin_key' => $FormData['user_key']));
|
||||||
}
|
if ($result) {
|
||||||
|
setMessage('Password changed successfully !');
|
||||||
$FormData = array(
|
unset($_SESSION['UIISC_ADMIN']);
|
||||||
'old_password' => post('old_password'),
|
redirect('admin/login');
|
||||||
'new_password' => post('new_password'),
|
} else {
|
||||||
'hashed_password' => hash('sha256', post('new_password')),
|
setMessage("Something went's wrong !", 'danger');
|
||||||
'user_key' => $AdminInfo['admin_key'],
|
redirect('admin/settings');
|
||||||
'user_password' => $AdminInfo['admin_password'],
|
}
|
||||||
);
|
|
||||||
|
|
||||||
if (hash('sha256', $FormData['old_password']) == $FormData['user_password']) {
|
|
||||||
$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');
|
|
||||||
} else {
|
} else {
|
||||||
setMessage("Something went's wrong !", 'danger');
|
setMessage('Invalid user password !', 'danger');
|
||||||
redirect('admin/settings');
|
redirect('admin/settings');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
setMessage('Invalid user password !', 'danger');
|
|
||||||
redirect('admin/settings');
|
|
||||||
}
|
}
|
||||||
|
|
37
src/admin/controllers/ssl-provider/add.php
Executable file
37
src/admin/controllers/ssl-provider/add.php
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (isset($_POST['submit'])) {
|
||||||
|
require '../../application.php';
|
||||||
|
|
||||||
|
if (!post('api_type')) {
|
||||||
|
setMessage('need field: api_type', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!post('username')) {
|
||||||
|
setMessage('need field: username', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!post('password')) {
|
||||||
|
setMessage('need field: password', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'api_type' => post('api_type'),
|
||||||
|
'api_name' => post('api_name', ''),
|
||||||
|
'api_username' => post('username'),
|
||||||
|
'api_password' => post('password'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$result = $DB->insert('ssl_api', $data);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
setMessage('SSL Provider added <b>successfully!</b>');
|
||||||
|
} else {
|
||||||
|
setMessage("Something went's <b>wrong!</b>", 'danger');
|
||||||
|
}
|
||||||
|
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
5
src/admin/controllers/ssl-provider/details.php
Executable file
5
src/admin/controllers/ssl-provider/details.php
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$id = get('id');
|
||||||
|
|
||||||
|
$data = $DB->find('ssl_api', '*', array('id' => $id), null, 1);
|
49
src/admin/controllers/ssl-provider/edit.php
Executable file
49
src/admin/controllers/ssl-provider/edit.php
Executable file
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
if (isset($_POST['submit'])) {
|
||||||
|
require '../../application.php';
|
||||||
|
|
||||||
|
if (!post('id')) {
|
||||||
|
setMessage('need field: id', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!post('username')) {
|
||||||
|
setMessage('need field: username', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!post('password')) {
|
||||||
|
setMessage('need field: password', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'api_name' => post('api_name', ''),
|
||||||
|
'api_username' => post('username'),
|
||||||
|
'api_password' => post('password'),
|
||||||
|
);
|
||||||
|
$where = array(
|
||||||
|
'id' => post('id'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$result = $DB->update('ssl_api', $data, $where);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
setMessage('SSL API updated <b>successfully!</b>');
|
||||||
|
} else {
|
||||||
|
setMessage("Something went's <b>wrong!</b>", 'danger');
|
||||||
|
}
|
||||||
|
|
||||||
|
redirect('admin/ssl-provider', '', array('action' => 'details', 'id' => post('id')));
|
||||||
|
} else {
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
$id = get('id');
|
||||||
|
if ($id > 0) {
|
||||||
|
$data = $DB->find('ssl_api', '*', array('id' => $id), null, 1);
|
||||||
|
} else {
|
||||||
|
setMessage('need field: id', 'danger');
|
||||||
|
redirect('admin/ssl-provider');
|
||||||
|
}
|
||||||
|
}
|
10
src/admin/controllers/ssl-provider/list.php
Executable file
10
src/admin/controllers/ssl-provider/list.php
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = $DB->count('ssl_api');
|
||||||
|
if ($count > 0) {
|
||||||
|
$rows = $DB->findAll('ssl_api', '*', array(), "`id` DESC");
|
||||||
|
}
|
22
src/admin/controllers/ssl/details.php
Executable file
22
src/admin/controllers/ssl/details.php
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$ssl_id = get('id');
|
||||||
|
|
||||||
|
$SSLInfo = $DB->find('ssl', '*', array('ssl_id' => $ssl_id), null, 1);
|
||||||
|
if (!$SSLInfo) {
|
||||||
|
redirect('ssl');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($SSLInfo['ssl_status'] == 'processing') {
|
||||||
|
$Status = '<span class="label label-primary">Processing</span>';
|
||||||
|
} elseif ($SSLInfo['ssl_status'] == 'active') {
|
||||||
|
$Status = '<span class="label label-success">Active</span>';
|
||||||
|
} elseif ($SSLInfo['ssl_status'] == 'incomplete') {
|
||||||
|
$Status = '<span class="label label-info">Incomplete</span>';
|
||||||
|
} elseif ($SSLInfo['ssl_status'] == 'cancelled') {
|
||||||
|
$Status = '<span class="label label-warning">Cancelled</span>';
|
||||||
|
} elseif ($SSLInfo['ssl_status'] == 'expired') {
|
||||||
|
$Status = '<span class="label label-danger">Expired</span>';
|
||||||
|
} else {
|
||||||
|
$Status = '';
|
||||||
|
}
|
|
@ -9,10 +9,4 @@ $PageInfo['title'] = $lang->I18N('SSL Certificates');
|
||||||
$count = $DB->count('ssl');
|
$count = $DB->count('ssl');
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
$rows = $DB->findAll('ssl', '*', array(), "`ssl_id` DESC");
|
$rows = $DB->findAll('ssl', '*', array(), "`ssl_id` DESC");
|
||||||
|
|
||||||
require_once ROOT . '/core/handler/SSLHandler.php';
|
|
||||||
require_once ROOT . '/modules/GoGetSSL/GoGetSSLApi.php';
|
|
||||||
|
|
||||||
$apiClient = new GoGetSSLApi();
|
|
||||||
$apiClient->auth($SSLApi['api_username'], $SSLApi['api_password']);
|
|
||||||
}
|
}
|
47
src/admin/controllers/ssl/raw.php
Executable file
47
src/admin/controllers/ssl/raw.php
Executable file
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$ssl_id = get('ssl_id');
|
||||||
|
|
||||||
|
$SSLInfo = $DB->find('ssl', '*', array('ssl_id' => $ssl_id), null, 1);
|
||||||
|
if (!$SSLInfo) {
|
||||||
|
redirect('ssl');
|
||||||
|
}
|
||||||
|
|
||||||
|
$SSLApi = $DB->find('ssl_api', '*', array('id' => $SSLInfo['ssl_api_id']), null, 1);
|
||||||
|
|
||||||
|
// 现有 token 未过期,直接使用
|
||||||
|
if ($SSLApi['api_token'] && strtotime($SSLApi['api_token_expiretime']) - 180 >= time()) {
|
||||||
|
$apiClient = new third\GoGetSSLApi($SSLApi['api_token']);
|
||||||
|
} else {
|
||||||
|
// 无 token 或现有 token 已过期
|
||||||
|
$apiClient = new third\GoGetSSLApi();
|
||||||
|
// 获取新的 token
|
||||||
|
$api_token = $apiClient->auth($SSLApi['api_username'], $SSLApi['api_password']);
|
||||||
|
// 更新入库,设置有效期 365 天
|
||||||
|
$api_token_expiretime = time() + 365 * 86400;
|
||||||
|
$DB->update('ssl_api', array('api_token' => $api_token, 'api_token_expiretime' => time() + 365 * 86400), array('id' => $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
$SSLInfo = $apiClient->getOrderStatus($SSLApi['ssl_key']);
|
||||||
|
|
||||||
|
if ($SSLInfo['status'] == 'processing') {
|
||||||
|
$Status = '<span class="label label-primary">Processing</span>';
|
||||||
|
} elseif ($SSLInfo['status'] == 'active') {
|
||||||
|
$Status = '<span class="label label-success">Active</span>';
|
||||||
|
} elseif ($SSLInfo['status'] == 'incomplete') {
|
||||||
|
$Status = '<span class="label label-info">Incomplete</span>';
|
||||||
|
} elseif ($SSLInfo['status'] == 'cancelled') {
|
||||||
|
$Status = '<span class="label label-warning">Cancelled</span>';
|
||||||
|
} elseif ($SSLInfo['status'] == 'expired') {
|
||||||
|
$Status = '<span class="label label-danger">Expired</span>';
|
||||||
|
} else {
|
||||||
|
$Status = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($SSLInfo['begin_date'])) {
|
||||||
|
$Begin = '-- -- ----';
|
||||||
|
$End = $Begin;
|
||||||
|
} else {
|
||||||
|
$Begin = $SSLInfo['begin_date'];
|
||||||
|
$End = $SSLInfo['end_date'];
|
||||||
|
}
|
|
@ -1,25 +0,0 @@
|
||||||
<?php
|
|
||||||
require_once __DIR__ . '/../../application.php';
|
|
||||||
|
|
||||||
if (!isset($_POST['submit'])) {
|
|
||||||
exit('Method Not Allowed');
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = array(
|
|
||||||
'api_username' => post('username'),
|
|
||||||
'api_password' => post('password'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$where = array(
|
|
||||||
'api_key' => 'FREESSL',
|
|
||||||
);
|
|
||||||
|
|
||||||
$result = $DB->update('ssl_api', $data, $where);
|
|
||||||
|
|
||||||
if ($result) {
|
|
||||||
setMessage('SSL API updated <b>successfully!</b>');
|
|
||||||
} else {
|
|
||||||
setMessage("Something went's <b>wrong!</b>", 'danger');
|
|
||||||
}
|
|
||||||
|
|
||||||
redirect('admin/settings', 'sslapi');
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$PageInfo['title'] = 'SSL API Settings';
|
|
||||||
|
|
||||||
$where = array(
|
|
||||||
'api_key' => 'FREESSL'
|
|
||||||
);
|
|
||||||
|
|
||||||
$SSLApi = $DB->find('ssl_api', '*', $where, null, 1);
|
|
|
@ -1,33 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$ssl_id = get('ssl_id');
|
|
||||||
|
|
||||||
require_once ROOT . '/core/handler/SSLHandler.php';
|
|
||||||
require_once ROOT . '/modules/GoGetSSL/GoGetSSLApi.php';
|
|
||||||
|
|
||||||
$apiClient = new GoGetSSLApi();
|
|
||||||
$token = $apiClient->auth($SSLApi['api_username'], $SSLApi['api_password']);
|
|
||||||
|
|
||||||
$SSLInfo = $apiClient->getOrderStatus($ssl_id);
|
|
||||||
|
|
||||||
if ($SSLInfo['status'] == 'processing') {
|
|
||||||
$Status = '<span class="badge bg-primary">Processing</span>';
|
|
||||||
} elseif ($SSLInfo['status'] == 'active') {
|
|
||||||
$Status = '<span class="badge bg-success">Active</span>';
|
|
||||||
} elseif ($SSLInfo['status'] == 'incomplete') {
|
|
||||||
$Status = '<span class="badge bg-danger">Incomplete</span>';
|
|
||||||
} elseif ($SSLInfo['status'] == 'cancelled') {
|
|
||||||
$Status = '<span class="badge bg-">Cancelled</span>';
|
|
||||||
} elseif ($SSLInfo['status'] == 'expired') {
|
|
||||||
$Status = '<span class="badge bg-danger">Expired</span>';
|
|
||||||
} else {
|
|
||||||
$Status = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($SSLInfo['begin_date'])) {
|
|
||||||
$Begin = '-- -- ----';
|
|
||||||
$End = $Begin;
|
|
||||||
} else {
|
|
||||||
$Begin = $SSLInfo['begin_date'];
|
|
||||||
$End = $SSLInfo['end_date'];
|
|
||||||
}
|
|
|
@ -6,11 +6,9 @@ if (!defined('IN_CRONLITE')) {
|
||||||
$ticket_id = get('ticket_id', 0);
|
$ticket_id = get('ticket_id', 0);
|
||||||
|
|
||||||
if ($ticket_id > 0) {
|
if ($ticket_id > 0) {
|
||||||
$PageInfo['title'] = 'View Ticket #' . $ticket_id;
|
|
||||||
$TicketInfo = $DB->find('tickets', '*', array('ticket_id' => $ticket_id), null, 1);
|
$TicketInfo = $DB->find('tickets', '*', array('ticket_id' => $ticket_id), null, 1);
|
||||||
$ReplyCount = $DB->count('ticket_replies', array('reply_for' => $ticket_id));
|
$ReplyCount = $DB->count('ticket_replies', array('reply_for' => $ticket_id));
|
||||||
$ReplyInfo = $DB->findAll('ticket_replies', '*', array('reply_for' => $ticket_id), '`reply_id` DESC');
|
$ReplyInfo = $DB->findAll('ticket_replies', '*', array('reply_for' => $ticket_id), '`reply_id` DESC');
|
||||||
} else {
|
} else {
|
||||||
$PageInfo['title'] = 'Unathorized Access';
|
|
||||||
$TicketInfo = null;
|
$TicketInfo = null;
|
||||||
}
|
}
|
|
@ -12,7 +12,7 @@ if (!$ticket_id) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
$TicketInfo = $DB->find('tickets', 'ticket_email, ticket_client_id', array('ticket_id' => $ticket_id));
|
$TicketInfo = $DB->find('tickets', '*', array('ticket_id' => $ticket_id));
|
||||||
|
|
||||||
if (!$TicketInfo) {
|
if (!$TicketInfo) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
|
|
18
src/admin/domain-provider.php
Executable file
18
src/admin/domain-provider.php
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
|
$action = get('action', 'list');
|
||||||
|
|
||||||
|
if (!in_array($action, array('list', 'add', 'edit', 'details'))) {
|
||||||
|
$action = 'list';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'Domain Provider ' . ucfirst($action);
|
||||||
|
|
||||||
|
// require __DIR__ . '/controllers/domain-provider/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/header.php';
|
||||||
|
require __DIR__ . '/views/navbar.php';
|
||||||
|
require __DIR__ . '/views/sidebar.php';
|
||||||
|
require __DIR__ . '/views/domain-provider/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/footer.php';
|
|
@ -1,18 +0,0 @@
|
||||||
<?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';
|
|
12
src/admin/emails.php
Executable file
12
src/admin/emails.php
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
|
$action = get('action', 'list');
|
||||||
|
|
||||||
|
if (!in_array($action, array('list', 'view'))) {
|
||||||
|
$action = 'list';
|
||||||
|
}
|
||||||
|
|
||||||
|
require __DIR__ . '/controllers/emails/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/emails/' . $action . '.php';
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
require_once __DIR__ . '/../core/application.php';
|
require_once __DIR__ . '/../core/application.php';
|
||||||
require_once __DIR__ . '/controllers/profile/forgetpassword.php';
|
require_once __DIR__ . '/controllers/profile/forgetpassword.php';
|
||||||
require_once __DIR__ . '/views/common/header.php';
|
require_once __DIR__ . '/views/login/header.php';
|
||||||
require_once __DIR__ . '/views/profile/forgetpassword.php';
|
require_once __DIR__ . '/views/login/forgetpassword.php';
|
||||||
require_once __DIR__ . '/views/common/footer.php';
|
require_once __DIR__ . '/views/login/footer.php';
|
||||||
|
|
18
src/admin/hosting-hostname.php
Executable file
18
src/admin/hosting-hostname.php
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
|
$action = get('action', 'list');
|
||||||
|
|
||||||
|
if (!in_array($action, array('list'))) {
|
||||||
|
$action = 'list';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'Hosting Hostname ' . ucfirst($action);
|
||||||
|
|
||||||
|
require __DIR__ . '/controllers/hosting-hostname/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/header.php';
|
||||||
|
require __DIR__ . '/views/navbar.php';
|
||||||
|
require __DIR__ . '/views/sidebar.php';
|
||||||
|
require __DIR__ . '/views/hosting-hostname/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/footer.php';
|
18
src/admin/hosting-provider.php
Executable file
18
src/admin/hosting-provider.php
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
|
$action = get('action', 'list');
|
||||||
|
|
||||||
|
if (!in_array($action, array('list', 'add', 'edit', 'details'))) {
|
||||||
|
$action = 'list';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'Hosting Provider ' . ucfirst($action);
|
||||||
|
|
||||||
|
require __DIR__ . '/controllers/hosting-provider/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/header.php';
|
||||||
|
require __DIR__ . '/views/navbar.php';
|
||||||
|
require __DIR__ . '/views/sidebar.php';
|
||||||
|
require __DIR__ . '/views/hosting-provider/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/footer.php';
|
|
@ -1,18 +0,0 @@
|
||||||
<?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';
|
|
|
@ -2,8 +2,4 @@
|
||||||
|
|
||||||
require_once __DIR__ . '/application.php';
|
require_once __DIR__ . '/application.php';
|
||||||
require_once __DIR__ . '/controllers/dashboard/view.php';
|
require_once __DIR__ . '/controllers/dashboard/view.php';
|
||||||
require_once __DIR__ . '/views/common/header.php';
|
|
||||||
require_once __DIR__ . '/views/common/navbar.php';
|
|
||||||
require_once __DIR__ . '/views/common/sidebar.php';
|
|
||||||
require_once __DIR__ . '/views/dashboard/view.php';
|
require_once __DIR__ . '/views/dashboard/view.php';
|
||||||
require_once __DIR__ . '/views/common/footer.php';
|
|
||||||
|
|
|
@ -4,15 +4,15 @@ require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
$action = get('action', 'list');
|
$action = get('action', 'list');
|
||||||
|
|
||||||
if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
|
if (!in_array($action, array('list', 'add', 'edit', 'details'))) {
|
||||||
$action = 'list';
|
$action = 'list';
|
||||||
}
|
}
|
||||||
|
|
||||||
$PageInfo['title'] = 'Knowledgebase ' . ucfirst($action);
|
$PageInfo['title'] = 'Knowledgebase ' . ucfirst($action);
|
||||||
|
|
||||||
require __DIR__ . '/controllers/knowledgebase/' . $action . '.php';
|
require __DIR__ . '/controllers/knowledgebase/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/knowledgebase/' . $action . '.php';
|
require __DIR__ . '/views/knowledgebase/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
|
@ -9,6 +9,6 @@ if (isset($_SESSION['UIISC_ADMIN'])) {
|
||||||
$PageInfo['title'] = $lang->I18N('login');
|
$PageInfo['title'] = $lang->I18N('login');
|
||||||
$PageInfo['rel'] = '<link href="' . $site_url . '/assets/css/login.css" rel="stylesheet" />';
|
$PageInfo['rel'] = '<link href="' . $site_url . '/assets/css/login.css" rel="stylesheet" />';
|
||||||
|
|
||||||
require_once __DIR__ . '/views/common/header.php';
|
require_once __DIR__ . '/views/login/header.php';
|
||||||
require_once __DIR__ . '/views/login/login.php';
|
require_once __DIR__ . '/views/login/login.php';
|
||||||
require_once __DIR__ . '/views/common/footer.php';
|
require_once __DIR__ . '/views/login/footer.php';
|
||||||
|
|
|
@ -9,8 +9,8 @@ if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
|
||||||
}
|
}
|
||||||
|
|
||||||
require __DIR__ . '/controllers/news/' . $action . '.php';
|
require __DIR__ . '/controllers/news/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/news/' . $action . '.php';
|
require __DIR__ . '/views/news/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
|
@ -4,13 +4,13 @@ require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
$action = get('action', 'view');
|
$action = get('action', 'view');
|
||||||
|
|
||||||
if (!in_array($action, array('edit', 'view'))) {
|
if (!in_array($action, array('edit', 'view', 'password'))) {
|
||||||
$action = 'view';
|
$action = 'view';
|
||||||
}
|
}
|
||||||
|
|
||||||
require __DIR__ . '/controllers/profile/' . $action . '.php';
|
require __DIR__ . '/controllers/profile/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/profile/' . $action . '.php';
|
require __DIR__ . '/views/profile/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
require_once __DIR__ . '/../core/application.php';
|
require_once __DIR__ . '/../core/application.php';
|
||||||
require_once __DIR__ . '/controllers/profile/resetpassword.php';
|
require_once __DIR__ . '/controllers/profile/resetpassword.php';
|
||||||
require_once __DIR__ . '/views/common/header.php';
|
require_once __DIR__ . '/views/login/header.php';
|
||||||
require_once __DIR__ . '/views/profile/resetpassword.php';
|
require_once __DIR__ . '/views/login/resetpassword.php';
|
||||||
require_once __DIR__ . '/views/common/footer.php';
|
require_once __DIR__ . '/views/login/footer.php';
|
||||||
|
|
|
@ -14,9 +14,8 @@ if (!in_array($action, array('edit', 'view'))) {
|
||||||
}
|
}
|
||||||
|
|
||||||
require __DIR__ . '/controllers/' . $section . '/' . $action . '.php';
|
require __DIR__ . '/controllers/' . $section . '/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/settings/menu.php';
|
|
||||||
require __DIR__ . '/views/' . $section . '/' . $action . '.php';
|
require __DIR__ . '/views/' . $section . '/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
18
src/admin/ssl-provider.php
Normal file
18
src/admin/ssl-provider.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
|
$action = get('action', 'list');
|
||||||
|
|
||||||
|
if (!in_array($action, array('list', 'add', 'edit', 'details', 'raw'))) {
|
||||||
|
$action = 'list';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = $lang->I18N('SSL Provider') . $lang->I18N($action);
|
||||||
|
|
||||||
|
require __DIR__ . '/controllers/ssl-provider/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/header.php';
|
||||||
|
require __DIR__ . '/views/navbar.php';
|
||||||
|
require __DIR__ . '/views/sidebar.php';
|
||||||
|
require __DIR__ . '/views/ssl-provider/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/footer.php';
|
18
src/admin/ssl.php
Executable file
18
src/admin/ssl.php
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/application.php';
|
||||||
|
|
||||||
|
$action = get('action', 'list');
|
||||||
|
|
||||||
|
if (!in_array($action, array('list', 'add', 'edit', 'details'))) {
|
||||||
|
$action = 'list';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['title'] = 'SSL ' . $lang->I18N($action);
|
||||||
|
|
||||||
|
require __DIR__ . '/controllers/ssl/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/header.php';
|
||||||
|
require __DIR__ . '/views/navbar.php';
|
||||||
|
require __DIR__ . '/views/sidebar.php';
|
||||||
|
require __DIR__ . '/views/ssl/' . $action . '.php';
|
||||||
|
require __DIR__ . '/views/footer.php';
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/application.php';
|
|
||||||
|
|
||||||
$action = get('action', 'list');
|
|
||||||
|
|
||||||
if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
|
|
||||||
$action = 'list';
|
|
||||||
}
|
|
||||||
|
|
||||||
require __DIR__ . '/controllers/sslcert/' . $action . '.php';
|
|
||||||
require __DIR__ . '/views/common/header.php';
|
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
|
||||||
require __DIR__ . '/views/sslcert/' . $action . '.php';
|
|
||||||
require __DIR__ . '/views/common/footer.php';
|
|
|
@ -5,15 +5,15 @@ require_once ROOT . '/core/library/tickets.php';
|
||||||
|
|
||||||
$action = get('action', 'list');
|
$action = get('action', 'list');
|
||||||
|
|
||||||
if (!in_array($action, array('list', 'add', 'edit', 'view'))) {
|
if (!in_array($action, array('list', 'add', 'edit', 'details'))) {
|
||||||
$action = 'list';
|
$action = 'list';
|
||||||
}
|
}
|
||||||
|
|
||||||
$PageInfo['title'] = 'Tckets ' . ucfirst($action);
|
$PageInfo['title'] = 'Ticket ' . ucfirst($action);
|
||||||
|
|
||||||
require __DIR__ . '/controllers/tickets/' . $action . '.php';
|
require __DIR__ . '/controllers/tickets/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/header.php';
|
require __DIR__ . '/views/header.php';
|
||||||
require __DIR__ . '/views/common/navbar.php';
|
require __DIR__ . '/views/navbar.php';
|
||||||
require __DIR__ . '/views/common/sidebar.php';
|
require __DIR__ . '/views/sidebar.php';
|
||||||
require __DIR__ . '/views/tickets/' . $action . '.php';
|
require __DIR__ . '/views/tickets/' . $action . '.php';
|
||||||
require __DIR__ . '/views/common/footer.php';
|
require __DIR__ . '/views/footer.php';
|
||||||
|
|
102
src/admin/views/accounts/add.php
Executable file
102
src/admin/views/accounts/add.php
Executable file
|
@ -0,0 +1,102 @@
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="accounts.php"><?php echo $lang->I18N('Account List'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('add'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/accounts', '', array('action' => 'list')); ?>" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="panel-title">
|
||||||
|
<?php echo $PageInfo['title']; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label required">Name</label>
|
||||||
|
<input type="text" value="<?php echo $ClientInfo['client_fname'] . ' ' . $ClientInfo['client_lname']; ?>" class="form-control disabled" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label required">Email</label>
|
||||||
|
<input type="text" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control disabled" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Phone Number'); ?></label>
|
||||||
|
<input type="text" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control disabled" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label required">Billing Address</label>
|
||||||
|
<input type="text" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control disabled" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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="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>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label"> </label>
|
||||||
|
<button type="submit" name="submit" class="form-control btn btn-primary btn-sm text-white">Change Password</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-md-12">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<input type="submit" name="submit" value="Change Password" class="btn btn-primary btn-sm text-white">
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
</form>
|
||||||
|
<hr>
|
||||||
|
<form
|
||||||
|
action="controllers/accounts/deactivate.php"
|
||||||
|
method="post"
|
||||||
|
onsubmit="
|
||||||
|
var reason = document.getElementsByName('reason')[0].value;
|
||||||
|
if (reason.length < 8) {
|
||||||
|
alert('Reason must be 8 characters long...');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label required">Deacivation Reason</label>
|
||||||
|
<textarea name="reason" placeholder="Deactivation reason here..." class="form-control" id="reason"></textarea>
|
||||||
|
<div class="text-muted my-10 alert alert-secondary">Your account will be deleted after 30 days of your account deactivation and all of the account data will be removed completely(This action cannot be undo).</div>
|
||||||
|
<input type="hidden" name="account_id" value="<?php echo $AccountInfo['account_id']; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<input type="submit" name="submit" value="Deactivate Account" class="btn btn-danger btn-sm text-white">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php else: ?>
|
||||||
|
<form class="row" action="controllers/accounts/reactivate.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">
|
||||||
|
<label class="form-label">Activate Account</label>
|
||||||
|
<button type="submit" name="submit" class="btn btn-success text-white btn-block my-5">Activate Account</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php endif;?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,14 +1,18 @@
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<div class="card pt-0">
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
<div class="card-header d-flex justify-content-between align-items-center pt-15 px-5">
|
<li><a href="accounts.php"><?php echo $lang->I18N('Account List'); ?></a></li>
|
||||||
<h5 class="m-0">Viewing Account (# <?php echo $account_id; ?>)</h5>
|
<li class="active"><?php echo $lang->I18N('Account Details'); ?></li>
|
||||||
<a href="accounts.php" class="btn btn-sm btn-danger">
|
</ol>
|
||||||
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
|
<div class="panel panel-default">
|
||||||
</a>
|
<div class="panel-heading">
|
||||||
|
<div class="panel-title">
|
||||||
|
<?php echo $PageInfo['title']; ?>
|
||||||
|
<span class="label label-default"> ID <?php echo $account_id; ?></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="panel-body">
|
||||||
<div class="card-body">
|
|
||||||
<?php if ($AccountInfo['account_status'] == '0'): ?>
|
<?php if ($AccountInfo['account_status'] == '0'): ?>
|
||||||
<div class="alert alert-secondary col-md-12">This account is inactive.</div>
|
<div class="alert alert-secondary col-md-12">This account is inactive.</div>
|
||||||
<?php elseif ($AccountInfo['account_status'] == '2'): ?>
|
<?php elseif ($AccountInfo['account_status'] == '2'): ?>
|
||||||
|
@ -24,13 +28,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 py-5 text-center text-md-right">
|
<div class="col-md-6 py-5 text-center text-md-right">
|
||||||
<?php if ($AccountInfo['account_status'] == '1'): ?>
|
<?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=login&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-success btn-block"><?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>
|
<a href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-primary btn-block"><?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;?>
|
<?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>
|
<a href="accounts.php?action=edit&account_id=<?php echo $account_id; ?>" class="btn btn-secondary btn-block"><?php echo $lang->I18N('Edit Settings'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -42,130 +43,164 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Control Panel Password:</b>
|
<b>Control Panel Password:</b>
|
||||||
<span><kbd><?php echo $AccountInfo['account_password']; ?></kbd></span>
|
<span><kbd><?php echo $AccountInfo['account_password']; ?></kbd></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Main Domain:</b>
|
<b><?php echo $lang->I18N('Primary Domain'); ?>: </b>
|
||||||
<span><?php echo $AccountInfo['account_domain']; ?></span>
|
<span><?php echo $AccountInfo['account_domain']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Control Panel Domain:</b>
|
<b>Control Panel Domain:</b>
|
||||||
<span><?php echo $AccountApi['api_cpanel_url']; ?></span>
|
<span><?php echo $AccountApi['api_cpanel_url']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6 col-md-6">
|
<div class="col-md-4 col-sm-6 col-md-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Status:</b>
|
<b>Status:</b>
|
||||||
<span>
|
<span><?php if ($AccountInfo['account_status'] == '0'): ?>
|
||||||
<?php if ($AccountInfo['account_status'] == '0') {
|
<span class="label label-info"><?php echo $lang->I18N('Inactive'); ?></span>
|
||||||
echo '<span class="badge bg-secondary">Inactive</span>';
|
<?php elseif ($AccountInfo['account_status'] == '1'): ?>
|
||||||
} elseif ($AccountInfo['account_status'] == '1') {
|
<span class="label label-success"><?php echo $lang->I18N('Active'); ?></span>
|
||||||
echo '<span class="badge bg-success">Active</span>';
|
<?php elseif ($AccountInfo['account_status'] == '2'): ?>
|
||||||
} elseif ($AccountInfo['account_status'] == '2') {
|
<span class="label label-warning"><?php echo $lang->I18N('Suspended'); ?></span>
|
||||||
echo '<span class="badge bg-danger">Suspend</span>';
|
<?php elseif ($AccountInfo['account_status'] == '3'): ?>
|
||||||
} elseif ($AccountInfo['account_status'] == '3') {
|
<span class="label label-default"><?php echo $lang->I18N('Deleted'); ?></span>
|
||||||
echo '<span class="badge bg-danger">Deleted</span>';
|
<?php endif; ?></span>
|
||||||
} ?>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Creation Date:</b>
|
<b>Creation Date:</b>
|
||||||
<span><?php echo $AccountInfo['account_date']; ?></span>
|
<span><?php echo $AccountInfo['account_addtime']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Server IP:</b>
|
<b>Server IP:</b>
|
||||||
<span><?php echo $AccountApi['api_server_ip']; ?></span>
|
<span><?php echo $AccountApi['api_server_ip']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Your IP:</b>
|
<b>Your IP:</b>
|
||||||
<span><?php echo get_client_ip(); ?></span>
|
<span><?php echo get_client_ip(); ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>FTP Hostname:</b>
|
<b>FTP Hostname:</b>
|
||||||
<span><?php echo $AccountApi['api_server_ftp_domain']; ?></span>
|
<span><?php echo $AccountApi['api_server_ftp_domain']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>FTP Port:</b>
|
<b>FTP Port:</b>
|
||||||
<span>21</span>
|
<span>21</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>MySQL Hostname:</b>
|
<b>MySQL Hostname:</b>
|
||||||
<span><?php echo $AccountInfo['account_sql'] . '.' . $AccountApi['api_server_sql_domain']; ?></span>
|
<span><?php echo $AccountInfo['account_sql'] . '.' . $AccountApi['api_server_sql_domain']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Mysql Port:</b>
|
<b>Mysql Port:</b>
|
||||||
<span>3306</span>
|
<span>3306</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Nameserver 1:</b>
|
<b>Nameserver 1:</b>
|
||||||
<span><?php echo $AccountApi['api_ns_1']; ?></span>
|
<span><?php echo $AccountApi['api_ns_1']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-6">
|
<div class="col-md-4 col-sm-6">
|
||||||
<div class="d-flex justify-content-between align-items-center m-5">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<b>Nameserver 2:</b>
|
<b>Nameserver 2:</b>
|
||||||
<span><?php echo $AccountApi['api_ns_2']; ?></span>
|
<span><?php echo $AccountApi['api_ns_2']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="panel-footer">
|
||||||
<div class="card-footer">
|
<?php if ($AccountInfo['account_status'] == '1'): ?>
|
||||||
<div class="col-md-6">
|
<a href="accounts.php?action=login&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-success"><?php echo $lang->I18N('Control Panel'); ?></a>
|
||||||
<?php if ($AccountInfo['account_status'] == '1'): ?>
|
<a href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>" target="_blank" class="btn btn-primary"><?php echo $lang->I18N('File Manager'); ?></a>
|
||||||
<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>
|
<?php endif;?>
|
||||||
<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>
|
<a href="accounts.php?action=edit&account_id=<?php echo $account_id; ?>" class="btn btn-default"><?php echo $lang->I18N('Account Settings'); ?></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>
|
</div>
|
||||||
|
|
||||||
<div class="card py-0">
|
<div class="panel panel-default">
|
||||||
<div class="d-flex justify-content-between align-items-center pt-15">
|
<div class="panel-heading">
|
||||||
<h5 class="m-0">Account Domains</h5>
|
<div class="pull-right">
|
||||||
<a href="accounts.php?action=sync&type=domain&account_id=<?php echo $account_id; ?>" class="btn btn-sm btn-danger">
|
<a href="accounts.php?action=sync&type=domain&account_id=<?php echo $account_id; ?>" class="btn btn-xs btn-primary">
|
||||||
<i class="fa fa-sync"></i> <?php echo $lang->I18N('Sync'); ?>
|
<i class="fa fa-sync"></i> <?php echo $lang->I18N('Sync'); ?>
|
||||||
</a>
|
</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>
|
</div>
|
||||||
<?php endforeach;?>
|
<span class="panel-title">Account Domains</span>
|
||||||
<?php else: ?>
|
|
||||||
<p class='text-center'>No Domain Found</p>
|
|
||||||
<?php endif;?>
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php if (count($AccountDomainList) > 0): ?>
|
||||||
|
<ul class="list-group">
|
||||||
|
<?php foreach ($AccountDomainList as $domain): ?>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<span class="pull-right">
|
||||||
|
<button class="btn btn-info btn-xs" onclick="setPrimaryDomain(<?php echo $account_id; ?>, '<?php echo $domain['domain_name']; ?>');"><i class="fa fa-globe"></i> <?php echo $lang->I18N('Set As Primary Domain'); ?></button>
|
||||||
|
<a class="btn btn-primary btn-xs" href="accounts.php?action=goftp&account_id=<?php echo $account_id; ?>&domain=<?php echo $domain['domain_name']; ?>" target="_blank"><i class="fa fa-file-import"></i> <?php echo $lang->I18N('File Manager'); ?></a>
|
||||||
|
</span>
|
||||||
|
<a href="http://<?php echo $domain['domain_name']; ?>" target="_blank" ref="noreferrer noopener"><?php echo $domain['domain_name']; ?></a>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="panel-body">
|
||||||
|
<p class='text-center'>No Domain Found</p>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<script>
|
||||||
|
function setPrimaryDomain(account_id, domain) {
|
||||||
|
layer.confirm('将 ' + domain + ' 设置为主域名 ?', {
|
||||||
|
icon: 3,
|
||||||
|
btn: ['确定', '取消']
|
||||||
|
}, function() {
|
||||||
|
var ii = layer.load(2);
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'api/accounts.php?act=primary-domain',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
account_id: account_id,
|
||||||
|
domain: domain
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
if (data.code == 200) {
|
||||||
|
layer.msg('主域设置成功');
|
||||||
|
setTimeout(function() {
|
||||||
|
window.location.href = window.location.href;
|
||||||
|
}, 500);
|
||||||
|
} else {
|
||||||
|
layer.alert(data.msg, {
|
||||||
|
icon: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -1,14 +1,29 @@
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<div class="card">
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
<li><a href="accounts.php"><?php echo $lang->I18N('Account List'); ?></a></li>
|
||||||
<h5 class="m-0"><?php echo $lang->I18N('Hosting Account Settings'); ?></h5>
|
<li><a href="accounts.php?action=details&account_id=<?php echo $account_id; ?>"><?php echo $lang->I18N('Account Details'); ?></a></li>
|
||||||
<a href="accounts.php?action=view&account_id=<?php echo $account_id; ?>" class="btn btn-danger btn-sm">
|
<li class="active"><?php echo $lang->I18N('Account Settings'); ?></li>
|
||||||
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
|
</ol>
|
||||||
</a>
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/accounts', '', array('action' => 'details', 'account_id' => $account_id)); ?>" class="btn btn-success btn-xs">
|
||||||
|
<i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo setURL('admin/accounts', '', array('action' => 'add')); ?>" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo setURL('admin/accounts', '', array('action' => 'list')); ?>" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="panel-title">
|
||||||
|
<?php echo $PageInfo['title']; ?>
|
||||||
|
<span class="label label-default"> ID <?php echo $account_id; ?></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="panel-body">
|
||||||
<div class="card-body">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="mb-10 px-10">
|
<div class="mb-10 px-10">
|
||||||
|
@ -85,7 +100,7 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="mb-10 px-10">
|
<div class="mb-10 px-10">
|
||||||
<label class="form-label">Activate Account</label>
|
<label class="form-label">Activate Account</label>
|
||||||
<button type="submit" name="submit" class="btn btn-success text-white btn-block my-5 btn-rounded">Activate Account</button>
|
<button type="submit" name="submit" class="btn btn-success text-white btn-block my-5">Activate Account</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -93,4 +108,3 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<div class="card py-0">
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
<div class="d-flex justify-content-between align-items-center pt-15">
|
<li class="active"><?php echo $lang->I18N('Hosting Accounts'); ?></li>
|
||||||
<h3 class="m-0"><?php echo $PageInfo['title']; ?></h3>
|
</ol>
|
||||||
<a href="index.php" class="btn text-white btn-danger btn-sm">
|
<div class="panel panel-default">
|
||||||
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
|
<div class="panel-heading">
|
||||||
</a>
|
<div class="pull-right">
|
||||||
|
<a href="accounts.php?action=add" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="panel-title">
|
||||||
|
<?php echo $PageInfo['title']; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="table-responsive">
|
||||||
<div class="card-body table-responsive">
|
|
||||||
<table class="table table-stripped table-bordered table-hover">
|
<table class="table table-stripped table-bordered table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
@ -23,51 +29,55 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if ($count > 0): ?>
|
<?php if ($count > 0): ?>
|
||||||
<?php foreach ($rows as $row): ?>
|
<?php foreach ($rows as $row): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $row['account_id'];?></td>
|
<td>
|
||||||
<td><?php echo $row['account_client_id']; ?></td>
|
<a href="accounts.php?action=details&account_id=<?php echo $row['account_id']; ?>">
|
||||||
<td>
|
<?php echo $row['account_id']; ?>
|
||||||
<a href="hosting.php?action=view&api_key=<?php echo $row['account_api_key']; ?>">
|
</a>
|
||||||
<?php echo $row['account_api_key']; ?>
|
</td>
|
||||||
</a>
|
<td>
|
||||||
</td>
|
<a href="clients.php?action=details&id=<?php echo $row['account_client_id']; ?>">
|
||||||
<td><?php echo $row['account_username']; ?></td>
|
<?php echo $row['account_client_id']; ?>
|
||||||
<td><?php echo $row['account_domain']; ?></td>
|
</a>
|
||||||
<td><?php echo $row['account_date']; ?></td>
|
</td>
|
||||||
<td><?php
|
<td>
|
||||||
if ($row['account_status'] == '0') {
|
<a href="hosting-provider.php?action=details&api_key=<?php echo $row['account_api_key']; ?>">
|
||||||
$btn = ['danger', 'lock'];
|
<?php echo $row['account_api_key']; ?>
|
||||||
echo '<span class="badge bg-danger text-white border-0">Inactive</span>';
|
</a>
|
||||||
} elseif ($row['account_status'] == '1') {
|
</td>
|
||||||
$btn = ['success', 'globe'];
|
<td><?php echo $row['account_username']; ?></td>
|
||||||
echo '<span class="badge bg-success border-0 text-white">Active</span>';
|
<td><?php echo $row['account_domain']; ?></td>
|
||||||
} elseif ($row['account_status'] == '2') {
|
<td><?php echo $row['account_addtime']; ?></td>
|
||||||
$btn = ['danger', 'lock'];
|
<td><?php if ($row['account_status'] == '0'): ?>
|
||||||
echo '<span class="badge bg-danger text-white border-0">Suspended</span>';
|
<span class="label label-info"><?php echo $lang->I18N('Inactive'); ?></span>
|
||||||
} elseif ($row['account_status'] == '3') {
|
<?php elseif ($row['account_status'] == '1'): ?>
|
||||||
$btn = ['danger', 'lock'];
|
<span class="label label-success"><?php echo $lang->I18N('Active'); ?></span>
|
||||||
echo '<span class="badge bg-danger text-white border-0">Deleted</span>';
|
<?php elseif ($row['account_status'] == '2'): ?>
|
||||||
}
|
<span class="label label-warning"><?php echo $lang->I18N('Suspended'); ?></span>
|
||||||
?></td>
|
<?php elseif ($row['account_status'] == '3'): ?>
|
||||||
<td>
|
<span class="label label-default"><?php echo $lang->I18N('Deleted'); ?></span>
|
||||||
<a href="accounts.php?action=view&account_id=<?php echo $row['account_id']; ?>" class="btn btn-sm btn-<?php echo $btn[0]; ?> btn-rounded">
|
<?php endif; ?></td>
|
||||||
<i class="fa fa-<?php echo $btn[1]; ?>"></i> Manage
|
<td>
|
||||||
</a>
|
<a href="accounts.php?action=edit&account_id=<?php echo $row['account_id']; ?>" class="btn btn-success btn-xs">
|
||||||
</td>
|
<i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?>
|
||||||
</tr>
|
</a>
|
||||||
<?php endforeach;?>
|
<a href="accounts.php?action=details&account_id=<?php echo $row['account_id']; ?>" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach;?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6" class="text-center">Nothing found</td>
|
<td colspan="8" class="text-center">Nothing found</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="panel-footer">
|
||||||
<p class="py-10"><?php echo $count; ?> Records Founds</p>
|
<?php echo $count; ?> Records Founds
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,27 +1,25 @@
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<div class="card">
|
||||||
<div class="card">
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||||||
<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>
|
||||||
<h3 class="m-0"><?php echo $lang->I18N('Login to Control Panel'); ?></h3>
|
</div>
|
||||||
</div>
|
<hr />
|
||||||
<hr />
|
<div class="card-body">
|
||||||
<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>
|
||||||
<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">
|
||||||
<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="uname" value="<?php echo $AccountInfo['account_username']; ?>">
|
<input type="hidden" name="passwd" value="<?php echo $AccountInfo['account_password']; ?>">
|
||||||
<input type="hidden" name="passwd" value="<?php echo $AccountInfo['account_password']; ?>">
|
<input type="hidden" name="language" value="<?php echo $lang->get_language_value(); ?>">
|
||||||
<input type="hidden" name="language" value="<?php echo $lang->get_language_value(); ?>">
|
<div class="text-center">
|
||||||
<div class="text-center">
|
<a class="btn btn-danger btn-sm" href="accounts.php?action=view&account_id=<?php echo $account_id; ?>">
|
||||||
<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'); ?>
|
||||||
<i class="fa fa-backward"></i> <?php echo $lang->I18N('cancel'); ?>
|
</a>
|
||||||
</a>
|
<input type="submit" name="Submit" value="Click here to Redirect" class="btn btn-primary btn-sm text-white">
|
||||||
<input type="submit" name="Submit" value="Click here to Redirect" class="btn btn-primary btn-sm text-white">
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// document.getElementById('account_ogin').submit(); // SUBMIT FORM
|
document.getElementById('account_ogin').submit(); // SUBMIT FORM
|
||||||
</script>
|
</script>
|
||||||
|
|
113
src/admin/views/clients/add.php
Normal file
113
src/admin/views/clients/add.php
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="clients.php"><?php echo $lang->I18N('Client List'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('add'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'list')); ?>" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form id="form-client-add" class="row" onsubmit="return saveSubmit();" method="post">
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Status'); ?></label>
|
||||||
|
<select class="form-control" name="client_status">
|
||||||
|
<option value="0"><?php echo $lang->I18N('Inactive'); ?></option>
|
||||||
|
<option value="1"><?php echo $lang->I18N('Active'); ?></option>
|
||||||
|
<option value="2"><?php echo $lang->I18N('Suspended'); ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Password'); ?></label>
|
||||||
|
<input type="text" name="client_password" value="123456" class="form-control" placeholder="默认密码 123456">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('First Name'); ?></label>
|
||||||
|
<input type="text" name="client_fname" value="" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Last Name'); ?></label>
|
||||||
|
<input type="text" name="client_lname" value="" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Email Address'); ?></label>
|
||||||
|
<input type="text" name="client_email" value="" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Phone Number'); ?></label>
|
||||||
|
<input type="text" name="client_phone" value="" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Billing Address'); ?></label>
|
||||||
|
<input type="text" name="client_address" value="" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Company'); ?></label>
|
||||||
|
<input type="text" name="client_company" value="" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Country'); ?></label>
|
||||||
|
<input type="text" name="client_country" value="" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('State'); ?></label>
|
||||||
|
<input type="text" name="client_state" value="" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('City'); ?></label>
|
||||||
|
<input type="text" name="client_city" value="" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Postal Code'); ?></label>
|
||||||
|
<input type="text" name="client_pcode" value="" class="form-control">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<button class="btn btn-primary btn-sm" onclick="saveSubmit();"><?php echo $lang->I18N('Save') ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function saveSubmit() {
|
||||||
|
var ii = layer.load(2);
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'api/clients.php?act=add',
|
||||||
|
data: $("#form-client-add").serialize(),
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(res) {
|
||||||
|
layer.close(ii);
|
||||||
|
if (res.code == 200) {
|
||||||
|
layer.alert(res.msg, {
|
||||||
|
icon: 1,
|
||||||
|
closeBtn: false
|
||||||
|
}, function() {
|
||||||
|
if (res.data.client_id) {
|
||||||
|
window.location.href = 'clients.php?action=details&id=' + res.data.client_id;
|
||||||
|
} else {
|
||||||
|
window.location.href = 'clients.php';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.alert(res.msg, {
|
||||||
|
icon: 2
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(res) {
|
||||||
|
layer.close(ii);
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
81
src/admin/views/clients/details.php
Executable file
81
src/admin/views/clients/details.php
Executable file
|
@ -0,0 +1,81 @@
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="clients.php"><?php echo $lang->I18N('Client List'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('details'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'edit', 'id' => $ClientInfo['client_id'])); ?>" class="btn btn-success btn-xs">
|
||||||
|
<i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'add')); ?>" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'list')); ?>" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title">
|
||||||
|
<?php echo $PageInfo['title']; ?>
|
||||||
|
<span class="label label-default">ID <?php echo $ClientInfo['client_id']; ?></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<table class="table table-stripped table-bordered table-hover">
|
||||||
|
<tr>
|
||||||
|
<td width="200"><?php echo $lang->I18N('First Name'); ?></td>
|
||||||
|
<td><?php echo $ClientInfo['client_fname']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Last Name'); ?></td><td><?php echo $ClientInfo['client_lname']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Email Address'); ?></td><td><?php echo $ClientInfo['client_email']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Phone Number'); ?></td><td><?php echo $ClientInfo['client_phone']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Billing Address'); ?></td><td><?php echo $ClientInfo['client_address']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Company'); ?></td><td><?php echo $ClientInfo['client_company']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Country'); ?></td><td><?php echo $CountryName; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('City'); ?></td><td><?php echo $ClientInfo['client_city']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Postal Code</td><td><?php echo $ClientInfo['client_pcode']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('Hosting Accounts'); ?></td>
|
||||||
|
<td><a href="<?php echo setURL('admin/accounts', '', array('action' => 'list', 'client_id' => $ClientInfo['client_id'])); ?>"><?php echo $count_account; ?></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $lang->I18N('SSL Certificates'); ?></td>
|
||||||
|
<td><a href="<?php echo setURL('admin/ssl', '', array('action' => 'list', 'client_id' => $ClientInfo['client_id'])); ?>"><?php echo $count_ssl; ?></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Support Tickets</td>
|
||||||
|
<td><a href="<?php echo setURL('admin/tickets', '', array('action' => 'list', 'client_id' => $ClientInfo['client_id'])); ?>"><?php echo $count_tickets; ?></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<a href="clients.php?action=login&id=<?php echo $ClientInfo['client_id'] ?>" target="_blank" class="btn btn-primary btn-sm">
|
||||||
|
<i class="fa fa-sign-in-alt"></i> 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 btn-sm">Mark as Active</a>
|
||||||
|
<?php else: ?>
|
||||||
|
<a href="controllers/clients/suspend.php?client_id=<?php echo $ClientInfo['client_id']; ?>" class="btn btn-default btn-sm">Mark as Suspended</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
124
src/admin/views/clients/edit.php
Executable file
124
src/admin/views/clients/edit.php
Executable file
|
@ -0,0 +1,124 @@
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="clients.php"><?php echo $lang->I18N('Client List'); ?></a></li>
|
||||||
|
<li><a href="<?php echo setURL('admin/clients', '', array('action' => 'details', 'id' => $ClientInfo['client_id'])); ?>"><?php echo $lang->I18N('details'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('edit'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'details', 'id' => $ClientInfo['client_id'])); ?>" class="btn btn-success btn-xs">
|
||||||
|
<i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'add')); ?>" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'list')); ?>" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title">
|
||||||
|
<?php echo $PageInfo['title']; ?>
|
||||||
|
<span class="label label-default">ID <?php echo $ClientInfo['client_id']; ?></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form id="form-client-edit" class="row" onsubmit="return saveSubmit();" method="post">
|
||||||
|
<input type="hidden" name="client_id" value="<?php echo $ClientInfo['client_id']; ?>" />
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Status'); ?></label>
|
||||||
|
<select class="form-control" name="client_status" default="<?php echo $ClientInfo['client_status']; ?>">
|
||||||
|
<option value="0"><?php echo $lang->I18N('Inactive'); ?></option>
|
||||||
|
<option value="1"><?php echo $lang->I18N('Active'); ?></option>
|
||||||
|
<option value="2"><?php echo $lang->I18N('Suspended'); ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('Password'); ?></label>
|
||||||
|
<input type="text" name="client_password" value="" class="form-control" placeholder="留空白则不修改">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('First Name'); ?></label>
|
||||||
|
<input type="text" name="client_fname" value="<?php echo $ClientInfo['client_fname']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Last Name'); ?></label>
|
||||||
|
<input type="text" name="client_lname" value="<?php echo $ClientInfo['client_lname']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Email Address'); ?></label>
|
||||||
|
<input type="text" name="client_email" value="<?php echo $ClientInfo['client_email']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Phone Number'); ?></label>
|
||||||
|
<input type="text" name="client_phone" value="<?php echo $ClientInfo['client_phone']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Billing Address'); ?></label>
|
||||||
|
<input type="text" name="client_address" value="<?php echo $ClientInfo['client_address']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Company'); ?></label>
|
||||||
|
<input type="text" name="client_company" value="<?php echo $ClientInfo['client_company']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Country'); ?></label>
|
||||||
|
<input type="text" name="country_name" value="<?php echo $CountryName; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label"><?php echo $lang->I18N('State'); ?></label>
|
||||||
|
<input type="text" name="client_state" value="<?php echo $ClientInfo['client_state']; ?>" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('City'); ?></label>
|
||||||
|
<input type="text" name="client_city" value="<?php echo $ClientInfo['client_city']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 mb-10">
|
||||||
|
<label class="form-label required"><?php echo $lang->I18N('Postal Code'); ?></label>
|
||||||
|
<input type="text" name="client_pcode" value="<?php echo $ClientInfo['client_pcode']; ?>" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<button class="btn btn-primary btn-sm" onclick="saveSubmit();"><?php echo $lang->I18N('Save') ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function saveSubmit() {
|
||||||
|
var ii = layer.load(2);
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'api/clients.php?act=edit',
|
||||||
|
data: $("#form-client-edit").serialize(),
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(res) {
|
||||||
|
layer.close(ii);
|
||||||
|
if (res.code == 200) {
|
||||||
|
layer.alert(res.msg, {
|
||||||
|
icon: 1,
|
||||||
|
closeBtn: false
|
||||||
|
}, function() {
|
||||||
|
if (res.data.client_id) {
|
||||||
|
window.location.href = 'clients.php?action=edit&id=' + res.data.client_id;
|
||||||
|
} else {
|
||||||
|
window.location.href = 'clients.php';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.alert(res.msg, {
|
||||||
|
icon: 2
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(res) {
|
||||||
|
layer.close(ii);
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -1,12 +1,18 @@
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<div class="card m-20 p-20">
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
<li class="active"><?php echo $lang->I18N('Clients List'); ?></li>
|
||||||
<h3 class="m-0"><?php echo $lang->I18N('Clients List'); ?></h3>
|
</ol>
|
||||||
<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 class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'add')); ?>" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="table-responsive">
|
||||||
<div class="card-body table-responsive">
|
|
||||||
<table class="table table-stripped table-bordered table-hover">
|
<table class="table table-stripped table-bordered table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
@ -20,41 +26,43 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if ($count > 0): ?>
|
<?php if ($count > 0): ?>
|
||||||
<?php foreach ($rows as $value): ?>
|
<?php foreach ($rows as $value): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $value['client_id']; ?></td>
|
<td>
|
||||||
<td><?php echo $value['client_fname'] . " " . $value['client_lname']; ?></td>
|
<a href="clients.php?action=details&id=<?php echo $value['client_id']; ?>"><?php echo $value['client_id']; ?></a>
|
||||||
<td><?php echo $value['client_email']; ?></td>
|
</td>
|
||||||
<td><?php echo $value['client_phone']; ?></td>
|
<td><?php echo $value['client_fname'] . " " . $value['client_lname']; ?></td>
|
||||||
<td><?php echo $value['client_date']; ?></td>
|
<td><?php echo $value['client_email']; ?></td>
|
||||||
<td><?php
|
<td><?php echo $value['client_phone']; ?></td>
|
||||||
if ($value['client_status'] == '0') {
|
<td><?php echo $value['client_addtime']; ?></td>
|
||||||
$btn = ['secondary', 'cog'];
|
<td><?php if ($value['client_status'] == '0'): ?>
|
||||||
echo '<span class="badge bg-secondary badge-pill">Inactive</span>';
|
<span class="label label-warning"><?php echo $lang->I18N('Inactive'); ?></span>
|
||||||
} elseif ($value['client_status'] == '1') {
|
<?php elseif ($value['client_status'] == '1'): ?>
|
||||||
$btn = ['success', 'globe'];
|
<span class="label label-success"><?php echo $lang->I18N('Active'); ?></span>
|
||||||
echo '<span class="badge bg-success badge-pill">Active</span>';
|
<?php elseif ($value['client_status'] == '2'): ?>
|
||||||
} elseif ($value['client_status'] == '2') {
|
<span class="label label-default"><?php echo $lang->I18N('Suspended'); ?></span>
|
||||||
$btn = ['danger', 'lock'];
|
<?php endif; ?>
|
||||||
echo '<span class="badge bg-danger badge-pill">Suspended</span>';
|
</td>
|
||||||
}
|
<td>
|
||||||
?></td>
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'edit', 'id' => $value['client_id'])); ?>" class="btn btn-success btn-xs">
|
||||||
<td>
|
<i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?>
|
||||||
<a href="clients.php?action=view&client_id=<?php echo $value['client_id']; ?>" class="btn btn-sm btn-<?php echo $btn[0] ?> btn-rounded">
|
</a>
|
||||||
<i class="fa fa-<?php echo $btn[1]; ?>"></i> Manage
|
<a href="<?php echo setURL('admin/clients', '', array('action' => 'details', 'id' => $value['client_id'])); ?>" class="btn btn-primary btn-xs">
|
||||||
</a>
|
<i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?>
|
||||||
</td>
|
</a>
|
||||||
</tr>
|
<a href="clients.php?action=login&id=<?php echo $value['client_id'] ?>" target="_blank" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-sign-in-alt"></i> <?php echo $lang->I18N('login'); ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6" class="text-center">Nothing found</td>
|
<td colspan="7" class="text-center">Nothing found</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="panel-footer"><?php echo $count; ?> Records Founds.</div>
|
||||||
<div class="card-footer"><?php echo $count; ?> Records Founds.</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
|
|
||||||
<div class="content-wrapper">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<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="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>
|
|
|
@ -1,8 +0,0 @@
|
||||||
<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>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<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>
|
|
|
@ -1,23 +0,0 @@
|
||||||
</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)): ?>
|
|
||||||
|
|
||||||
<script src="<?php echo $site_url; ?>/assets/nicedit/nicedit.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
bkLib.onDomLoaded(function(){
|
|
||||||
new nicEditor({
|
|
||||||
iconsPath : '<?php echo $site_url; ?>/assets/nicedit/nicEditorIcons.gif'
|
|
||||||
}).panelInstance('content');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,37 +0,0 @@
|
||||||
<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>
|
|
||||||
</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>
|
|
||||||
<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>
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
<?php
|
|
||||||
$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>
|
|
||||||
<div class="sidebar-divider"></div>
|
|
||||||
<a href="profile.php" class="sidebar-link sidebar-link-with-icon">
|
|
||||||
<span class="sidebar-icon bg-transparent text-dark rounded-circle">
|
|
||||||
<img class="rounded-circle" src="https://dn-qiniu-avatar.qbox.me/avatar/<?php echo $avatar_path; ?>?s=30" height="30px" width="30px">
|
|
||||||
</span>
|
|
||||||
<?php echo $AdminInfo['admin_fname'] . " " . $AdminInfo['admin_lname']; ?>
|
|
||||||
|
|
||||||
</a>
|
|
||||||
<h5 class="sidebar-title"><?php echo $lang->I18N('Main Menu'); ?></h5>
|
|
||||||
<div class="sidebar-divider"></div>
|
|
||||||
<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 List'); ?>
|
|
||||||
</a>
|
|
||||||
<a href="tickets.php" class="sidebar-link sidebar-link-with-icon">
|
|
||||||
<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>
|
|
||||||
<?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>
|
|
||||||
<?php echo $lang->I18N('Hosting Accounts'); ?>
|
|
||||||
</a>
|
|
||||||
<a href="knowledgebase.php" class="sidebar-link sidebar-link-with-icon">
|
|
||||||
<span class="sidebar-icon bg-transparent"><i class="fa fa-book" aria-hidden="true"></i></span>
|
|
||||||
<?php echo $lang->I18N('Knowledgebase'); ?>
|
|
||||||
</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 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>
|
|
||||||
<?php echo $lang->I18N('Settings'); ?>
|
|
||||||
</a>
|
|
||||||
<a href="logout.php" class="sidebar-link sidebar-link-with-icon">
|
|
||||||
<span class="sidebar-icon bg-transparent"><i class="fa fa-arrow-circle-right" aria-hidden="true"></i></span>
|
|
||||||
<?php echo $lang->I18N('logout'); ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="sidebar-footer">
|
|
||||||
<p class="copyright text-center">
|
|
||||||
© <?php echo date("Y") ?> <a target="_blank" href="https://uiisc.org">UIISC</a> All rights reserved.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Sidebar End -->
|
|
|
@ -1,126 +1,193 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
require ROOT_ADMIN . '/views/header.php';
|
||||||
|
require ROOT_ADMIN . '/views/navbar.php';
|
||||||
|
require ROOT_ADMIN . '/views/sidebar.php';
|
||||||
|
|
||||||
|
?>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-lg-3">
|
<div class="col-lg-3 col-md-6">
|
||||||
<div class="card text-center bg-matrix-1 m-20 p-0 border-0">
|
<div class="panel panel-primary">
|
||||||
<div class="mx-20 my-15 d-flex justify-content-between align-items-center">
|
<div class="panel-heading">
|
||||||
<h3 class="my-0 pt-0 text-white"><?php echo $count_clients; ?></h3>
|
<div class="row">
|
||||||
<i class="fa fa-users fa-3x pt-10 text-white"></i>
|
<div class="col-xs-3">
|
||||||
</div>
|
<i class="fa fa-users fa-5x"></i>
|
||||||
<div class="py-5" style="background: rgba(0,0,0,0.05); border-radius: 0px 0px 10px 10px;">
|
</div>
|
||||||
<a href="clients.php" class="text-white">View Client <i class="fa fa-forward"></i></a>
|
<div class="col-xs-9 text-right">
|
||||||
|
<div class="huge">
|
||||||
|
<span id="count_client"></span>/<span class="count-all" id="count_clients"></span>
|
||||||
|
</div>
|
||||||
|
<div>客户数量</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="clients.php">
|
||||||
|
<div class="panel-footer">
|
||||||
|
<span class="pull-left"><?php echo $lang->I18N('View details'); ?></span>
|
||||||
|
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-3">
|
<div class="col-lg-3 col-md-6">
|
||||||
<div class="card text-center bg-matrix-2 m-20 p-0 border-0">
|
<div class="panel panel-yellow">
|
||||||
<div class="mx-20 my-15 d-flex justify-content-between align-items-center">
|
<div class="panel-heading">
|
||||||
<h3 class="my-0 pt-0 text-white"><?php echo $count_account; ?></h3>
|
<div class="row">
|
||||||
<i class="fa fa-shopping-cart fa-3x pt-10 text-white"></i>
|
<div class="col-xs-3">
|
||||||
</div>
|
<i class="fa fa-server fa-5x"></i>
|
||||||
<div class="py-5" style="background: rgba(0,0,0,0.05); border-radius: 0px 0px 10px 10px;">
|
</div>
|
||||||
<a href="accounts.php" class="text-white">View Account <i class="fa fa-forward"></i></a>
|
<div class="col-xs-9 text-right">
|
||||||
|
<div class="huge">
|
||||||
|
<span id="count_account"></span>/<span class="count-all" id="count_accounts"></span>
|
||||||
|
</div>
|
||||||
|
<div>账户数量</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="accounts.php">
|
||||||
|
<div class="panel-footer">
|
||||||
|
<span class="pull-left"><?php echo $lang->I18N('View details'); ?></span>
|
||||||
|
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-3">
|
<div class="col-lg-3 col-md-6">
|
||||||
<div class="card text-center bg-matrix-3 m-20 p-0 border-0">
|
<div class="panel panel-red">
|
||||||
<div class="mx-20 my-15 d-flex justify-content-between align-items-center">
|
<div class="panel-heading">
|
||||||
<h3 class="my-0 pt-0 text-white"><?php echo $count_ssl; ?></h3>
|
<div class="row">
|
||||||
<i class="fa fa-shield-alt fa-3x pt-10 text-white"></i>
|
<div class="col-xs-3">
|
||||||
</div>
|
<i class="fa fa-ticket-alt fa-5x"></i>
|
||||||
<div class="py-5" style="background: rgba(0,0,0,0.05); border-radius: 0px 0px 10px 10px;">
|
</div>
|
||||||
<a href="myssl.php" class="text-white">View SSL <i class="fa fa-forward"></i></a>
|
<div class="col-xs-9 text-right">
|
||||||
|
<div class="huge">
|
||||||
|
<span id="count_ticket"></span>/<span class="count-all" id="count_tickets"></span>
|
||||||
|
</div>
|
||||||
|
<div>工单数量</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="tickets.php">
|
||||||
|
<div class="panel-footer">
|
||||||
|
<span class="pull-left"><?php echo $lang->I18N('View details'); ?></span>
|
||||||
|
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-3">
|
<div class="col-lg-3 col-md-6">
|
||||||
<div class="card text-center bg-matrix-4 m-20 p-0 border-0">
|
<div class="panel panel-green">
|
||||||
<div class="mx-20 my-15 d-flex justify-content-between align-items-center">
|
<div class="panel-heading">
|
||||||
<h3 class="my-0 pt-0 text-white"><?php echo $count_tickets; ?></h3>
|
<div class="row">
|
||||||
<i class="fa fa-ticket-alt fa-3x pt-10 text-white"></i>
|
<div class="col-xs-3">
|
||||||
</div>
|
<i class="fa fa-shield-alt fa-5x"></i>
|
||||||
<div class="py-5" style="background: rgba(0,0,0,0.05); border-radius: 0px 0px 10px 10px;">
|
</div>
|
||||||
<a href="tickets.php" class="text-white">View Ticket <i class="fa fa-forward"></i></a>
|
<div class="col-xs-9 text-right">
|
||||||
|
<div class="huge">
|
||||||
|
<span id="count_ssl"></span>/<span class="count-all" id="count_ssls"></span>
|
||||||
|
</div>
|
||||||
|
<div>证书数量</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="ssl.php">
|
||||||
|
<div class="panel-footer">
|
||||||
|
<span class="pull-left"><?php echo $lang->I18N('View details'); ?></span>
|
||||||
|
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card mx-20 my-10 p-15">
|
<div class="panel panel-danger">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center px-0 pt-0">
|
<div class="list-group">
|
||||||
<h3 class="m-0">System information</h3>
|
<div class="list-group-item">
|
||||||
<a href="settings.php" class="btn btn-danger">Settings</a>
|
<span class="fa fa-paper-plane fa-fw"></span> <b><?php echo $lang->I18N('Shortcuts'); ?></b>
|
||||||
</div>
|
<a href="settings.php" class="btn btn-info btn-xs">Settings</a>
|
||||||
<hr />
|
<a href="<?php echo $site_url; ?>" class="btn btn-xs btn-info" target="_blank"><?php echo $lang->I18N('home'); ?></a>
|
||||||
<div class="card-body">
|
<a href="<?php echo setURL('contact'); ?>" class="btn btn-xs btn-info" target="_blank"><?php echo $lang->I18N('contact'); ?></a>
|
||||||
<div class="row">
|
<a href="<?php echo setURL('news'); ?>" class="btn btn-xs btn-info" target="_blank"><?php echo $lang->I18N('News'); ?></a>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6">
|
<div class="col-md-8 col-sm-12">
|
||||||
<div class="card mx-20 my-10 p-15">
|
<div class="panel panel-info">
|
||||||
<div class="card-header">
|
<div class="panel-heading">
|
||||||
<h4 class="m-0">Welcome to Dear Admin!</h4>
|
<h3 class="panel-title">服务器信息</h3>
|
||||||
</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>
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item"><b>服务器时间:</b><?php echo $date; ?></li>
|
||||||
|
<li class="list-group-item"><b>PHP 版本:</b><?php echo PHP_VERSION; ?>-<?php echo ini_get('safe_mode') ? '线程安全' : '非线程安全'; ?></li>
|
||||||
|
<li class="list-group-item"><b>MySQL 版本:</b><?php echo $mysqlversion ?></li>
|
||||||
|
<li class="list-group-item"><b>WEB软件:</b><?php echo $_SERVER['SERVER_SOFTWARE'] ?></li>
|
||||||
|
<li class="list-group-item"><b>操作系统:</b><?php echo php_uname(); ?></li>
|
||||||
|
<li class="list-group-item"><b>POST许可:</b><?php echo ini_get('post_max_size'); ?></li>
|
||||||
|
<li class="list-group-item"><b>文件上传许可:</b><?php echo ini_get('upload_max_filesize'); ?></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">
|
<div class="col-md-4 col-sm-12">
|
||||||
<div class="card mx-20 my-10 p-15">
|
<div class="panel panel-success">
|
||||||
<div class="card-header">
|
<div class="panel-heading">
|
||||||
<h4 class="m-0">Free SSL Available!</h4>
|
<h3 class="panel-title">应用信息</h3>
|
||||||
</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>
|
||||||
|
<ul class="list-group text-dark">
|
||||||
|
<li class="list-group-item">当前版本:V<?php echo APP_VERSION; ?> (Build <?php echo APP_BUILD; ?>, DB <?php echo DB_VERSION; ?>)</li>
|
||||||
|
<li class="list-group-item"><?php echo $lang->I18N('App Status'); ?> : <?php if ($SiteConfig['site_status'] == 1) {echo '<span class="label label-success">Live</span>';} elseif ($SiteConfig['site_status'] == 0) {echo '<span class="label label-danger">Maintaince</span>';}?></li>
|
||||||
|
<li class="list-group-item"><?php echo $lang->I18N('App URL'); ?> : <?php echo $site_url; ?></li>
|
||||||
|
<li class="list-group-item">官网网站:<a href="https://uiisc.org/" target="_blank">https://uiisc.org</a></li>
|
||||||
|
<li class="list-group-item">Github:<a href="https://github.com/uiisc/uiisc/" target="_blank">https://github.com/uiisc/uiisc</a></li>
|
||||||
|
<li class="list-group-item">© 2013-<?php echo date("Y") ?> <a href="https://uiisc.org/" target="_blank">UIISC</a>, Powered by <a href="https://crogram.org/" target="_blank">CROGRAM</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="list-group text-dark" id="checkupdate"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<?php
|
||||||
|
require ROOT_ADMIN . '/views/footer.php';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "api/dashboard.php?act=stat",
|
||||||
|
dataType: 'json',
|
||||||
|
async: true,
|
||||||
|
success: function(res) {
|
||||||
|
var data = res.data;
|
||||||
|
$('#count_client').html(data.count_client);
|
||||||
|
$('#count_clients').html(data.count_clients);
|
||||||
|
$('#count_account').html(data.count_account);
|
||||||
|
$('#count_accounts').html(data.count_accounts);
|
||||||
|
$('#count_ssl').html(data.count_ssl);
|
||||||
|
$('#count_ssls').html(data.count_ssls);
|
||||||
|
$('#count_ticket').html(data.count_ticket);
|
||||||
|
$('#count_tickets').html(data.count_tickets);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// check update
|
||||||
|
// $.ajax({
|
||||||
|
// url: '<?php // echo $checkupdate ?>',
|
||||||
|
// type: 'get',
|
||||||
|
// dataType: 'jsonp',
|
||||||
|
// jsonpCallback: 'callback'
|
||||||
|
// }).done(function(data){
|
||||||
|
// $("#checkupdate").html(data.msg);
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
25
src/admin/views/domain-provider/list.php
Executable file
25
src/admin/views/domain-provider/list.php
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('Domain Provider'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="domain-provider.php?action=add" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,60 +0,0 @@
|
||||||
<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>
|
|
||||||
<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 class="card-body" action="controllers/domain/add.php" method="post">
|
|
||||||
<div class="row">
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
<th width="15%">Action</th>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php if ($count > 0): ?>
|
|
||||||
<?php foreach ($rows as $value): ?>
|
|
||||||
<tr>
|
|
||||||
<td># <?php echo $value['extension_id']; ?></td>
|
|
||||||
<td><?php echo $value['extension_value']; ?></td>
|
|
||||||
<td>
|
|
||||||
<form action="controllers/domain/delete.php" method="post">
|
|
||||||
<input hidden type="text" name="extension" value="<?php echo $value['extension_value']; ?>" />
|
|
||||||
<button name="submit" class="btn btn-sm btn-secondary btn-rounded"><i class="fa fa-trash"></i></button>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach;?>
|
|
||||||
<?php else: ?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" class="text-center">No domain found</td>
|
|
||||||
</tr>
|
|
||||||
<?php endif;?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<div class="card-footer">
|
|
||||||
<p class="pb-10"><?php echo $count; ?> Records Found</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
115
src/admin/views/emails/list.php
Executable file
115
src/admin/views/emails/list.php
Executable file
|
@ -0,0 +1,115 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$PageInfo['rel'] = '<link href="' . $site_url . '/assets/css/bootstrap-table.css" rel="stylesheet" />';
|
||||||
|
|
||||||
|
require ROOT_ADMIN . '/views/header.php';
|
||||||
|
require ROOT_ADMIN . '/views/navbar.php';
|
||||||
|
require ROOT_ADMIN . '/views/sidebar.php';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('Emails List'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div id="searchToolbar">
|
||||||
|
<form onsubmit="return searchSubmit()" method="GET" class="form-inline">
|
||||||
|
<input type="hidden" name="did">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>搜索</label>
|
||||||
|
<input type="text" class="form-control" name="email_id" placeholder="邮件ID" style="width: 80px;" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="email_client_id" placeholder="客户ID" style="width: 80px;" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="email_to" placeholder="接收人" style="width: 120px;" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="email_subject" placeholder="主题">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> 搜索</button>
|
||||||
|
<a href="javascript:searchClear()" class="btn btn-default" title="刷新记录列表"><i class="fa fa-repeat"></i> 重置</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<table id="listTable"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require ROOT_ADMIN . '/views/footer.php';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script src="<?php echo $site_cdnpublic; ?>bootstrap-table/1.20.2/bootstrap-table.min.js"></script>
|
||||||
|
<script src="<?php echo $site_cdnpublic; ?>bootstrap-table/1.20.2/extensions/page-jump-to/bootstrap-table-page-jump-to.min.js"></script>
|
||||||
|
<script src="<?php echo $site_url; ?>/assets/js/custom.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
updateToolbar();
|
||||||
|
const defaultPageSize = 15;
|
||||||
|
const pageNumber = typeof window.$_GET['pageNumber'] != 'undefined' ? parseInt(window.$_GET['pageNumber']) : 1;
|
||||||
|
const pageSize = typeof window.$_GET['pageSize'] != 'undefined' ? parseInt(window.$_GET['pageSize']) : defaultPageSize;
|
||||||
|
|
||||||
|
$("#listTable").bootstrapTable({
|
||||||
|
url: 'api/emails.php?act=list',
|
||||||
|
pageNumber: pageNumber,
|
||||||
|
pageSize: pageSize,
|
||||||
|
classes: 'table table-striped table-hover table-bordered',
|
||||||
|
columns: [{
|
||||||
|
field: 'email_id',
|
||||||
|
title: '<?php echo $lang->I18N('Email ID'); ?>',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return '<a href="emails.php?action=view&id=' + value + '">' + value + '</a>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email_client_id',
|
||||||
|
title: '<?php echo $lang->I18N('Clients'); ?>',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
if (value > 0) {
|
||||||
|
return '<a href="clients.php?action=details&id=' + value + '">' + value + '</a>';
|
||||||
|
}
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email_subject',
|
||||||
|
title: '<?php echo $lang->I18N('Title'); ?>'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email_to',
|
||||||
|
title: '接收人',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return value || '-';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email_date',
|
||||||
|
title: '<?php echo $lang->I18N('Date'); ?>'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email_read',
|
||||||
|
title: '<?php echo $lang->I18N('Status'); ?>',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return value == 0 ? '<span class="label label-success">已查看</span>' : '<span class="label label-default">未查看</span>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: '',
|
||||||
|
title: '<?php echo $lang->I18N('Action'); ?>',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return '<a href="emails.php?action=view&id=' + row.email_id + '" class="btn btn-primary btn-xs"><i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?></a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
49
src/admin/views/emails/view.php
Executable file
49
src/admin/views/emails/view.php
Executable file
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
require ROOT_ADMIN . '/views/header.php';
|
||||||
|
require ROOT_ADMIN . '/views/navbar.php';
|
||||||
|
require ROOT_ADMIN . '/views/sidebar.php';
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="emails.php"><?php echo $lang->I18N('Emails List'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('details'); ?></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/emails', '', array('action' => 'list', 'email_client_id' => $data['email_client_id'])); ?>" class="btn btn-success btn-xs">
|
||||||
|
<i class="fa fa-edit"></i> <?php echo $lang->I18N('Client More'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="emails.php?action=list" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?> ID:<?php echo $id; ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<p>Subject: <?php echo $data['email_subject']; ?></p>
|
||||||
|
<p>Date: <?php echo $data['email_date']; ?></p>
|
||||||
|
<p>To: <?php echo $data['email_to']; ?></p>
|
||||||
|
<p>Client ID: <?php echo $data['email_client_id']; ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="news-content">
|
||||||
|
<?php echo htmlspecialchars_decode($data['email_body']); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require ROOT_ADMIN . '/views/footer.php';
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
24
src/admin/views/footer.php
Executable file
24
src/admin/views/footer.php
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
</div><!-- col-sm-9 col-md-9 col-lg-10 end -->
|
||||||
|
</div><!-- row page-wrapper end -->
|
||||||
|
</div><!-- container-fluid end -->
|
||||||
|
|
||||||
|
<div id="hidden-area"><?php getMessage(); ?></div>
|
||||||
|
|
||||||
|
<script src="<?php echo $site_cdnpublic; ?>jquery/1.12.4/jquery.min.js"></script>
|
||||||
|
<script src="<?php echo $site_cdnpublic; ?>twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||||
|
<script src="<?php echo $site_cdnpublic; ?>layer/3.1.1/layer.js"></script>
|
||||||
|
<script src="<?php echo $site_url; ?>/assets/js/common.js?_=<?php echo $static_release; ?>"></script>
|
||||||
|
<script src="<?php echo $site_url; ?>/assets/js/admin.js?_=<?php echo $static_release; ?>"></script>
|
||||||
|
|
||||||
|
<?php if (!empty($load_editor)): ?>
|
||||||
|
|
||||||
|
<script src="<?php echo $site_url; ?>/assets/nicedit/nicedit.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
bkLib.onDomLoaded(function(){
|
||||||
|
new nicEditor({
|
||||||
|
iconsPath : '<?php echo $site_url; ?>/assets/nicedit/nicEditorIcons.gif'
|
||||||
|
}).panelInstance('content');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
38
src/admin/views/header.php
Executable file
38
src/admin/views/header.php
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="<?php echo $lang->language_current; ?>">
|
||||||
|
<head>
|
||||||
|
<!-- Meta tags -->
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
||||||
|
<meta name="robots" content="noindex,nofollow">
|
||||||
|
<meta name="format-detection" content="telephone=no,email=no" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||||
|
<meta name="description" content="UIISC is a free of cost we hosting and SSL management software allow you to manage your clients and accounts from a single place!" />
|
||||||
|
<meta name="keywords" content="<?php echo $page_keywords; ?>" />
|
||||||
|
<meta name="author" content="UIISC" />
|
||||||
|
<meta name="copyright" content="® CROGRAM" />
|
||||||
|
<!-- Site info -->
|
||||||
|
<title><?php echo $PageInfo['title']; ?> - <?php echo $lang->I18N('AdminArea'); ?> - <?php echo $SiteConfig['site_name']; ?></title>
|
||||||
|
<link rel="icon" type="image/x-icon" href="<?php echo $site_url; ?>/assets/image/favicon.ico">
|
||||||
|
<link rel="shortcut" type="image/x-icon" href="<?php echo $site_url; ?>/assets/image/favicon.ico">
|
||||||
|
<!-- Style -->
|
||||||
|
<link href="<?php echo $site_cdnpublic; ?>twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="<?php echo $site_cdnpublic; ?>font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" />
|
||||||
|
<link href="<?php echo $site_url; ?>/assets/theme.switcher/css/auto.css" id="theme" type="text/css" rel="stylesheet" media="screen,projection" />
|
||||||
|
<link href="<?php echo $site_url; ?>/assets/css/common.css?_=<?php echo $static_release; ?>" rel="stylesheet" />
|
||||||
|
<link href="<?php echo $site_url; ?>/assets/css/admin.css?_=<?php echo $static_release; ?>" rel="stylesheet" />
|
||||||
|
<!-- Common JS -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var site_domain = "<?php echo $site_domain; ?>";
|
||||||
|
var cur_lang = "<?php echo $lang->language_current; ?>";
|
||||||
|
var ifastnet_aff = "<?php echo $ifastnet_aff; ?>";
|
||||||
|
</script>
|
||||||
|
<script src="<?php echo $site_url; ?>/assets/theme.switcher/theme.switcher.js" type="text/javascript"></script>
|
||||||
|
<!-- Custom JS -->
|
||||||
|
<?php echo $PageInfo['rel']; ?>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
141
src/admin/views/hosting-hostname/list.php
Executable file
141
src/admin/views/hosting-hostname/list.php
Executable file
|
@ -0,0 +1,141 @@
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<input type="hidden" value="<?php echo $api_id; ?>" name="api_id" />
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="hosting-provider.php"><?php echo $lang->I18N('Hosting Provider'); ?></a></li>
|
||||||
|
<li><a href="<?php echo setURL('admin/hosting-provider', '', array('action' => 'details', 'id' => $api_id)); ?>"><?php echo $lang->I18N('details'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('Hostname'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a class="btn btn-primary btn-xs" onclick="add_hostname();">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-stripped table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<th>ID</th>
|
||||||
|
<th><?php echo $lang->I18N('Hosting Provider'); ?></th>
|
||||||
|
<th><?php echo $lang->I18N('Hostname'); ?></th>
|
||||||
|
<th><?php echo $lang->I18N('Action'); ?></th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php if ($count > 0): ?>
|
||||||
|
<?php foreach ($rows as $value): ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $value['host_id']; ?></td>
|
||||||
|
<td><?php echo $value['api_id']; ?></td>
|
||||||
|
<td><?php echo $value['host_name']; ?></td>
|
||||||
|
<td>
|
||||||
|
<button class="btn btn-danger btn-xs" onclick="delete_hostname('<?php echo $value['host_id']; ?>');"><i class="fa fa-trash"></i></button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach;?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" class="text-center">No Data Found</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif;?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<div><?php echo $count; ?> Records Found</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function delete_hostname(host_id) {
|
||||||
|
layer.confirm('确定删除 ?', {
|
||||||
|
icon: 3,
|
||||||
|
btn: ['确定', '取消']
|
||||||
|
}, function() {
|
||||||
|
var ii = layer.load(2);
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'api/hosting-hostname.php?act=delete',
|
||||||
|
data: {
|
||||||
|
host_id: host_id
|
||||||
|
},
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
if (data.code == 0) {
|
||||||
|
layer.msg('删除成功');
|
||||||
|
setTimeout(function() {
|
||||||
|
window.location.href = window.location.href;
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
layer.alert(data.msg, {
|
||||||
|
icon: 2
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function add_hostname() {
|
||||||
|
layer.open({
|
||||||
|
type: 1,
|
||||||
|
area: ['350px'],
|
||||||
|
closeBtn: 2,
|
||||||
|
title: '<?php echo $lang->I18N('Add Hostname'); ?>',
|
||||||
|
content: '<div style="padding:15px 15px 0 15px"><p>请输入主机名。</p><div class="form-group"><input class="form-control" type="text" name="content" value="" autocomplete="off" placeholder="请输入主机名 eg .example.com"></div></div>',
|
||||||
|
btn: ['<?php echo $lang->I18N('Save'); ?>', '<?php echo $lang->I18N('Cancel'); ?>'],
|
||||||
|
yes: function() {
|
||||||
|
var content = $("input[name='content']").val();
|
||||||
|
if (content == '') {
|
||||||
|
$("input[name='content']").focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var ii = layer.load(2, {
|
||||||
|
shade: [0.1, '#fff']
|
||||||
|
});
|
||||||
|
var api_id = $("input[name='api_id']").val();
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'api/hosting-hostname.php?act=add',
|
||||||
|
data: {
|
||||||
|
api_id: api_id,
|
||||||
|
hostname: content
|
||||||
|
},
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
if (data.code == 0) {
|
||||||
|
layer.alert(data.msg, {
|
||||||
|
icon: 1
|
||||||
|
}, function() {
|
||||||
|
layer.closeAll();
|
||||||
|
window.location.href = window.location.href;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.alert(data.msg, {
|
||||||
|
icon: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
119
src/admin/views/hosting-provider/add.php
Executable file
119
src/admin/views/hosting-provider/add.php
Executable file
|
@ -0,0 +1,119 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="hosting-provider.php"><?php echo $lang->I18N('Hosting Provider'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('add'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="hosting-provider.php" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('Hosting Provider'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
|
</div>
|
||||||
|
<form action="controllers/hosting-provider/add.php" method="post">
|
||||||
|
<div class="panel-body">
|
||||||
|
<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">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">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/[Provider Type][Hosting Key]/[API Callback Token]" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<div class="my-10 px-10">
|
||||||
|
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,22 +1,33 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<div class="card py-0">
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
<div class="d-flex justify-content-between align-items-center pt-15">
|
<li><a href="hosting-provider.php"><?php echo $lang->I18N('Hosting Provider'); ?></a></li>
|
||||||
<h5 class="m-0"><?php echo $PageInfo['title']; ?></h5>
|
<li class="active"><?php echo $lang->I18N('details'); ?></li>
|
||||||
<div>
|
</ol>
|
||||||
<a href="hosting.php" class="btn btn-sm btn-danger">
|
<div class="panel panel-default">
|
||||||
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="hosting-hostname.php?id=<?php echo $data['api_id']; ?>" class="btn btn-info btn-xs">
|
||||||
|
<i class="fa fa-ethernet"></i> <?php echo $lang->I18N('Hostname'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo setURL('admin/hosting', '', array('action' => 'edit', 'id' => $data['api_id'])); ?>" class="btn btn-sm btn-success">
|
<a href="<?php echo setURL('admin/hosting-provider', '', array('action' => 'edit', 'id' => $data['api_id'])); ?>" class="btn btn-success btn-xs">
|
||||||
<i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?>
|
<i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="hosting.php?action=add" class="btn btn-sm btn-primary">
|
<a href="hosting-provider.php?action=add" class="btn btn-primary btn-xs">
|
||||||
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="hosting-provider.php" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?> ID: <?php echo $data['api_id']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<div class="panel-body">
|
||||||
<div class="card-body">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="mb-10 px-10">
|
<div class="mb-10 px-10">
|
||||||
|
@ -103,15 +114,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="mb-20 px-10">
|
<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>
|
<a href="<?php echo setURL('admin/hosting-provider', '', array('action' => 'edit', 'id' => $data['api_id'])); ?>" class="btn btn-success btn-xs"><i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
119
src/admin/views/hosting-provider/edit.php
Executable file
119
src/admin/views/hosting-provider/edit.php
Executable file
|
@ -0,0 +1,119 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li><a href="hosting-provider.php"><?php echo $lang->I18N('Hosting Provider'); ?></a></li>
|
||||||
|
<li><a href="<?php echo setURL('admin/hosting-provider', '', array('action' => 'details', 'id' => $data['api_id'])); ?>"><?php echo $lang->I18N('details'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('edit'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo setURL('admin/hosting-provider', '', array('action' => 'details', 'id' => $data['api_id'])); ?>" class="btn btn-success btn-xs">
|
||||||
|
<i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="hosting-provider.php?action=add" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
<a href="hosting-provider.php" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?> ID: <?php echo $data['api_id']; ?></span>
|
||||||
|
</div>
|
||||||
|
<form action="controllers/hosting-provider/edit.php" method="post">
|
||||||
|
<input type="hidden" name="api_id" value="<?php echo $data['api_id']; ?>" style="display:none;">
|
||||||
|
<div class="panel-body">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<div class="my-10 px-10">
|
||||||
|
<button name="submit" class="btn btn-primary"><?php echo $lang->I18N('Save'); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
56
src/admin/views/hosting-provider/list.php
Executable file
56
src/admin/views/hosting-provider/list.php
Executable file
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
|
<li class="active"><?php echo $lang->I18N('Hosting Provider'); ?></li>
|
||||||
|
</ol>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="hosting-provider.php?action=add" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-stripped table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Key</th>
|
||||||
|
<th><?php echo $lang->I18N('Type'); ?></th>
|
||||||
|
<th>Panel URL</th>
|
||||||
|
<th><?php echo $lang->I18N('Package'); ?></th>
|
||||||
|
<th><?php echo $lang->I18N('Action'); ?></th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php if ($count > 0): ?>
|
||||||
|
<?php foreach ($rows as $value): ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $value['api_id']; ?></td>
|
||||||
|
<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-provider.php?action=edit&id=<?php echo $value['api_id']; ?>" class="btn btn-success btn-xs"><i class="fa fa-edit"></i> <?php echo $lang->I18N('edit'); ?></a>
|
||||||
|
<a href="hosting-provider.php?action=details&id=<?php echo $value['api_id']; ?>" class="btn btn-primary btn-xs"><i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?></a>
|
||||||
|
<a href="hosting-hostname.php?id=<?php echo $value['api_id']; ?>" class="btn btn-info btn-xs"><i class="fa fa-ethernet"></i> <?php echo $lang->I18N('Hostname'); ?></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach;?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" class="text-center">Nothing found</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif;?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer"><?php echo $count; ?> Records Found</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,113 +0,0 @@
|
||||||
<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>
|
|
|
@ -1,106 +0,0 @@
|
||||||
<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>
|
|
|
@ -1,45 +0,0 @@
|
||||||
<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>
|
|
|
@ -1,34 +1,49 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('IN_CRONLITE')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<div class="card py-0">
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
||||||
<div class="d-flex justify-content-between align-items-center pt-15">
|
<li><a href="knowledgebase.php"><?php echo $lang->I18N('Knowledgebase'); ?></a></li>
|
||||||
<h5 class="m-0">New Knowledgebase</h5>
|
<li class="active"><?php echo $lang->I18N('add'); ?></li>
|
||||||
<a href="knowledgebase.php" class="btn btn-sm btn-danger">
|
</ol>
|
||||||
<i class="fa fa-backward"></i> <?php echo $lang->I18N('Return'); ?>
|
<div class="panel panel-default">
|
||||||
</a>
|
<div class="panel-heading">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="knowledgebase.php" class="btn btn-primary btn-xs">
|
||||||
|
<i class="fa fa-list"></i> <?php echo $lang->I18N('list'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<form action="controllers/knowledgebase/add.php" method="post">
|
<form action="controllers/knowledgebase/add.php" method="post">
|
||||||
<div class="row pb-20">
|
<div class="panel-body">
|
||||||
<div class="col-md-12">
|
<div class="row pb-20">
|
||||||
<div class="mb-10 px-10">
|
<div class="col-md-12">
|
||||||
<label class="form-label required" for="input_subject">Subject</label>
|
<div class="mb-10 px-10">
|
||||||
<input type="text" name="subject" id="input_subject" placeholder="knowledgebase subject..." class="form-control">
|
<label class="form-label required" for="input_subject">Subject</label>
|
||||||
|
<input type="text" name="subject" id="input_subject" placeholder="knowledgebase subject..." class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="mb-10 px-10">
|
||||||
|
<label class="form-label required">Content</label>
|
||||||
|
<textarea name="editor" id="content" placeholder="Enter ticket content..." class="form-control" style="height: 200px;"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
</div>
|
||||||
<div class="mb-10 px-10">
|
<div class="panel-footer">
|
||||||
<label class="form-label required">Content</label>
|
<div class="row pb-20">
|
||||||
<textarea name="editor" id="content" placeholder="Enter ticket content..." class="form-control" style="height: 200px;"></textarea>
|
<div class="col-md-12">
|
||||||
</div>
|
<div class="mb-10 px-10">
|
||||||
</div>
|
<button name="submit" class="btn btn-sm btn-primary">Create Knowledgebase</button>
|
||||||
<div class="col-md-12">
|
</div>
|
||||||
<div class="mb-10 px-10">
|
|
||||||
<button name="submit" class="btn btn-sm btn-primary">Create Knowledgebase</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue