Сборка REDL: панель на PHP 8, капча-тумблер, закрытые уязвимости, установщики в один клик

- панель работает на PHP 8.4 (оригинал под PHP 7.0): elFinder utf8_encode, apache_get_modules, warnings
- капча выключена и управляется из админки (флаг captcha_enable + блок настроек)
- закрыты две SQL-инъекции без авторизации (createAuthLog: пароль из POST и CF-Connecting-IP)
- убрано хранение паролей в открытом виде в authlog, XSS в поле ref
- установщики install-panel.sh и install-node.sh (оригинальный затирал sources.list репозиториями Debian 9)
- современный Dockerfile (оригинальный на debian:stretch больше не собирается)
- планировщик и автозапуск работают без systemd
- брендинг REDL.IO, год 2026, ссылки на redl.io
- документация на русском: ИЗМЕНЕНИЯ, БЕЗОПАСНОСТЬ, ИНСТРУКЦИЯ
This commit is contained in:
2026-07-30 02:00:01 +00:00
commit 6ee2744e3a
492 changed files with 354172 additions and 0 deletions
@@ -0,0 +1,153 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<?php
$mysqlExists = false;
if(function_exists("mysqli_connect"))
$mysqlExists = true;
$ssh2Exists = false;
if(function_exists("ssh2_connect"))
$ssh2Exists = true;
$gdExists = false;
if(function_exists("gd_info"))
$gdExists = true;
$modRewriteExists = false;
if(function_exists('apache_get_modules')) {
$modRewriteExists = in_array('mod_rewrite', apache_get_modules());
} else {
// nginx/php-fpm: mod_rewrite не применим, ЧПУ обеспечивает сам веб-сервер
$modRewriteExists = (bool)preg_match('~/(main|admin|account|servers)/~', @$_SERVER['REQUEST_URI']);
}
?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-body">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr class="text-left">
<th>Функция</th>
<th>Статус</th>
<th>Установка</th>
<th>Информация</th>
</tr>
</thead>
<tbody>
<tr>
<td>Система</td>
<td>REDL.IO — Хостинг с искусственным интеллектом</td>
<td><i class="fa fa-check-circle"></i></td>
<td><?php echo php_uname() ?></td>
</tr>
<tr>
<td>php_mysql</td>
<td><?php if($mysqlExists): ?>Установлен<?php else: ?>Не установлен<?php endif; ?></td>
<td><?php if($mysqlExists): ?><i class="fa fa-check-circle"></i><?php else: ?><code>apt-get install php-mysql</code><?php endif; ?></td>
<td>Работоспособность бд для сервера.</td>
</tr>
<tr>
<td>php_ssh2</td>
<td><?php if($ssh2Exists): ?>Установлен<?php else: ?>Не установлен<?php endif; ?></td>
<td><?php if($ssh2Exists): ?><i class="fa fa-check-circle"></i><?php else: ?><code>apt-get install libssh2-php</code><?php endif; ?></td>
<td>Подключение по ssh.</td>
</tr>
<tr>
<td>php_gd</td>
<td><?php if($gdExists): ?>Установлен<?php else: ?>Не установлен<?php endif; ?></td>
<td><?php if($gdExists): ?><i class="fa fa-check-circle"></i><?php else: ?><code>apt-get install php-gd</code><?php endif; ?></td>
<td>Просмотр каптчи.</td>
</tr>
<tr>
<td>mod_rewrite</td>
<td><?php if($modRewriteExists): ?>Установлен<?php else: ?>Не установлен<?php endif; ?></td>
<td><?php if($modRewriteExists): ?><i class="fa fa-check-circle"></i><?php else: ?><code>a2enmod rewrite</code><?php endif; ?></td>
<td>Кэширование памяти.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php if($user_access_level == 3):?>
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-body">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th>Время</th>
<th>Ссылка для браузера</th>
<th>Crontab</th>
</tr>
</thead>
<tbody>
<tr>
<td>1 раз в 00:00</td>
<td><?php echo $url ?>main/cron/index?token=<?php echo $token ?></td>
<td><code>0 0 * * * curl http://127.0.0.1/main/cron/index?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в минуту</td>
<td><?php echo $url ?>main/cron/gameServers?token=<?php echo $token ?></td>
<td><code>*/1 * * * * curl http://127.0.0.1/main/cron/gameServers?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в минуту</td>
<td><?php echo $url ?>main/cron/tasks?token=<?php echo $token ?></td>
<td><code>*/1 * * * * curl http://127.0.0.1/main/cron/tasks?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в 10 минут</td>
<td><?php echo $url ?>main/cron/serverReloader?token=<?php echo $token ?></td>
<td><code>0 */10 * * * curl http://127.0.0.1/main/cron/serverReloader?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в 30 минут</td>
<td><?php echo $url ?>main/cron/stopServers?token=<?php echo $token ?></td>
<td><code>*/30 * * * * curl http://127.0.0.1/main/cron/stopServers?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в 30 минут</td>
<td><?php echo $url ?>main/cron/stopServersQuery?token=<?php echo $token ?></td>
<td><code>*/30 * * * * curl http://127.0.0.1/main/cron/stopServersQuery?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в час</td>
<td><?php echo $url ?>main/cron/updateStats?token=<?php echo $token ?></td>
<td><code>* */1 * * * curl http://127.0.0.1/main/cron/updateStats?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в час</td>
<td><?php echo $url ?>main/cron/updateStatsLocations?token=<?php echo $token ?></td>
<td><code>* */1 * * * curl http://127.0.0.1/main/cron/updateStatsLocations?token=<?php echo $token ?></code></td>
</tr>
<tr>
<td>1 раз в неделю</td>
<td><?php echo $url ?>main/cron/clearLogs?token=<?php echo $token ?></td>
<td><code>0 * */7 * * curl http://127.0.0.1/main/cron/clearLogs?token=<?php echo $token ?></code></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?echo $footer?>
@@ -0,0 +1,55 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Рассылка E-mail
</h3>
</div>
</div>
<div class="card-body">
<form id="emailForm" method="POST">
<div class="form-group form-md-line-input">
<textarea class="form-control" id="text" name="text" rows="3" placeholder="Сообщение..."></textarea>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Отправить</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#emailForm').ajaxForm({
url: '/admin/emailinfo/index/ajax/',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
break;
}
},
beforeSubmit: function(arr, $form, options) {
toastr.info("Рассылка начата!");
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,97 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание игры
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название игры</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название игры">
</div>
<div class="form-group form-md-line-input">
<label>Введите код игры</label>
<input type="text" class="form-control" id="code" name="code" placeholder="Введите код игры">
</div>
<div class="form-group form-md-line-input">
<label>Выберите query-драйвер игры</label>
<select class="form-control" id="query" name="query" name="delivery" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<?php foreach($queryDrivers as $item): ?>
<option value="<?php echo $item ?>"><?php echo $item ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group form-md-line-input">
<label>Введите минимальное количество слотов для заказа</label>
<input type="text" class="form-control" id="minslots" name="minslots" placeholder="Введите минимальное количество слотов для заказа">
</div>
<div class="form-group form-md-line-input">
<label>Введите максимальное количество слотов для заказа</label>
<input type="text" class="form-control" id="maxslots" name="maxslots" placeholder="Введите максимальное количество слотов для заказа">
</div>
<div class="form-group form-md-line-input">
<label>Введите минимальный порт для заказа</label>
<input type="text" class="form-control" id="minport" name="minport" placeholder="Введите минимальный порт для заказа">
</div>
<div class="form-group form-md-line-input">
<label>Введите максимальное порт для заказа</label>
<input type="text" class="form-control" id="maxport" name="maxport" placeholder="Введите максимальное порт для заказа">
</div>
<div class="form-group form-md-line-input">
<label>Введите стоимость за один слот</label>
<input type="text" class="form-control" id="price" name="price" placeholder="Введите стоимость за один слот">
</div>
<div class="form-group form-md-line-input">
<label>Введите количество ядер на один сервер</label>
<input type="text" class="form-control" id="cores" name="cores" placeholder="Введите количество ядер на один сервер">
</div>
<div class="form-group form-md-line-input">
<label>Введите объем оперативной памяти на один сервер (в МБ)</label>
<input type="text" class="form-control" id="ram" name="ram" placeholder="Введите объем оперативной памяти на один сервер (в МБ)">
</div>
<div class="form-group form-md-line-input">
<label>Введите объем SSD на один сервер (в МБ)</label>
<input type="text" class="form-control" id="ssd" name="ssd" placeholder="Введите объем SSD на один сервер (в МБ)">
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/games/create/ajax',
dataType: 'json',
success: function(data) {
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/games')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,109 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование игры
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название игры</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название игры" value="<?php echo $game['game_name'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите код игры</label>
<input type="text" class="form-control" id="code" name="code" placeholder="Введите код игры" value="<?php echo $game['game_code'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Выберите query-драйвер игры</label>
<select class="form-control" id="query" name="query" name="delivery" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<?php foreach($queryDrivers as $item): ?>
<option value="<?php echo $item ?>"<?php if($item == $game['game_query']): ?> selected<?php endif; ?>><?php echo $item ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group form-md-line-input">
<label>Введите минимальное количество слотов для заказа</label>
<input type="text" class="form-control" id="minslots" name="minslots" placeholder="Введите минимальное количество слотов для заказа" value="<?php echo $game['game_min_slots'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите максимальное количество слотов для заказа</label>
<input type="text" class="form-control" id="maxslots" name="maxslots" placeholder="Введите максимальное количество слотов для заказа" value="<?php echo $game['game_max_slots'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите минимальный порт для заказа</label>
<input type="text" class="form-control" id="minport" name="minport" placeholder="Введите минимальный порт для заказа" value="<?php echo $game['game_min_port'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите максимальный порт для заказа</label>
<input type="text" class="form-control" id="maxport" name="maxport" placeholder="Введите максимальный порт для заказа" value="<?php echo $game['game_max_port'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите стоимость за один слот</label>
<input type="text" class="form-control" id="price" name="price" placeholder="Введите стоимость за один слот" value="<?php echo $game['game_price'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите количество ядер на один сервер</label>
<input type="text" class="form-control" id="cores" name="cores" placeholder="Введите количество ядер на один сервер" value="<?php echo $game['game_cores'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите объем оперативной памяти на один сервер (в МБ)</label>
<input type="text" class="form-control" id="ram" name="ram" placeholder="Введите объем оперативной памяти на один сервер (в МБ)" value="<?php echo $game['game_ram'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите объем SSD на один сервер (в МБ)</label>
<input type="text" class="form-control" id="ssd" name="ssd" placeholder="Введите объем SSD на один сервер (в МБ)" value="<?php echo $game['game_ssd'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Выберите статус игры</label>
<select class="form-control" id="status" name="status" name="delivery" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1"<?php if($game['game_status'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($game['game_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/games/edit/delete/<?php echo $game['game_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/games/edit/ajax/<?php echo $game['game_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/games')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,69 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список игр
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/games/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить игру">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Статус</th>
<th>Название</th>
<th>Код</th>
<th>Слоты</th>
<th>Порты</th>
<th>Цена за слот</th>
</tr>
</thead>
<tbody>
<?php foreach($games as $item): ?>
<tr onClick="redirect('/admin/games/edit/index/<?php echo $item['game_id'] ?>')">
<th scope="row"><?php echo $item['game_id'] ?></th>
<td>
<?php if($item['game_status'] == 0): ?>
<span class="badge badge-danger">Выключена</span>
<?php elseif($item['game_status'] == 1): ?>
<span class="badge badge-success">Включена</span>
<?php endif; ?>
</td>
<td><?php echo $item['game_name'] ?></td>
<td><?php echo $item['game_code'] ?></td>
<td><?php echo $item['game_min_slots'] ?> - <?php echo $item['game_max_slots'] ?></td>
<td><?php echo $item['game_min_port'] ?> - <?php echo $item['game_max_port'] ?></td>
<td><?php echo $item['game_price'] ?> руб.</td>
</tr>
<?php endforeach; ?>
<?php if(empty($games)): ?>
<tr>
<td colspan="7" class="text-center">На данный момент нет игр.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
+325
View File
@@ -0,0 +1,325 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-6">
<div class="card card-custom mb-2">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="symbol symbol-45 symbol-light mr-5">
<span class="symbol-label">
<span class="svg-icon svg-icon-lg svg-icon-primary">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<path d="M18,14 C16.3431458,14 15,12.6568542 15,11 C15,9.34314575 16.3431458,8 18,8 C19.6568542,8 21,9.34314575 21,11 C21,12.6568542 19.6568542,14 18,14 Z M9,11 C6.790861,11 5,9.209139 5,7 C5,4.790861 6.790861,3 9,3 C11.209139,3 13,4.790861 13,7 C13,9.209139 11.209139,11 9,11 Z" fill="#000000" fill-rule="nonzero" opacity="0.3"/>
<path d="M17.6011961,15.0006174 C21.0077043,15.0378534 23.7891749,16.7601418 23.9984937,20.4 C24.0069246,20.5466056 23.9984937,21 23.4559499,21 L19.6,21 C19.6,18.7490654 18.8562935,16.6718327 17.6011961,15.0006174 Z M0.00065168429,20.1992055 C0.388258525,15.4265159 4.26191235,13 8.98334134,13 C13.7712164,13 17.7048837,15.2931929 17.9979143,20.2 C18.0095879,20.3954741 17.9979143,21 17.2466999,21 C13.541124,21 8.03472472,21 0.727502227,21 C0.476712155,21 -0.0204617505,20.45918 0.00065168429,20.1992055 Z" fill="#000000" fill-rule="nonzero"/>
</g>
</svg>
</span>
</span>
</div>
<div class="d-flex flex-column flex-grow-1">
<a href="/admin/users" class="text-dark-75 text-hover-primary mb-1 font-size-lg font-weight-bolder">Пользователи</a>
<div class="d-flex">
<div class="d-flex align-items-center pr-5">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Заблокировано: <?$userov2 = 0;
foreach($users as $itemr): ?>
<? if (!($itemr['user_status'] == 0)) { // пропуск нечетных чисел
continue;
}?>
<? $userov2++; ?>
<?endforeach;echo $userov2; ?></span>
</div>
<div class="d-flex align-items-center">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Всего: <?$userov = 0;
foreach($users as $itemr): ?>
<? $userov++; ?>
<?endforeach;echo $userov; ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card card-custom mb-2">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="symbol symbol-45 symbol-light mr-5">
<span class="symbol-label">
<span class="svg-icon svg-icon-lg svg-icon-primary">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect x="0" y="0" width="24" height="24"/>
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M14.4862 18L12.7975 21.0566C12.5304 21.54 11.922 21.7153 11.4386 21.4483C11.2977 21.3704 11.1777 21.2597 11.0887 21.1255L9.01653 18H5C3.34315 18 2 16.6569 2 15V6C2 4.34315 3.34315 3 5 3H19C20.6569 3 22 4.34315 22 6V15C22 16.6569 20.6569 18 19 18H14.4862Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 7H15C15.5523 7 16 7.44772 16 8C16 8.55228 15.5523 9 15 9H6C5.44772 9 5 8.55228 5 8C5 7.44772 5.44772 7 6 7ZM6 11H11C11.5523 11 12 11.4477 12 12C12 12.5523 11.5523 13 11 13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11Z" fill="black"/>
</g>
</svg>
</span>
</span>
</div>
<div class="d-flex flex-column flex-grow-1">
<a href="/admin/tickets" class="text-dark-75 text-hover-primary mb-1 font-size-lg font-weight-bolder">Техническая поддержка</a>
<div class="d-flex">
<div class="d-flex align-items-center pr-5">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Новых запросов: <?$ticketov2 = 0;
foreach($tickets as $item): ?>
<? if (!($item['ticket_status'] == 1)) { // пропуск нечетных чисел
continue;
}?>
<? $ticketov2++; ?> <?endforeach;echo $ticketov2; ?></span>
</div>
<div class="d-flex align-items-center">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Запросов: <?$ticketov = 0;
foreach($tickets as $item): ?>
<? $ticketov++; ?>
<?endforeach;echo $ticketov; ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card card-custom mb-2">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="symbol symbol-45 symbol-light mr-5">
<span class="symbol-label">
<span class="svg-icon svg-icon-lg svg-icon-primary">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect x="0" y="0" width="24" height="24"/>
<path d="M5,2 L19,2 C20.1045695,2 21,2.8954305 21,4 L21,6 C21,7.1045695 20.1045695,8 19,8 L5,8 C3.8954305,8 3,7.1045695 3,6 L3,4 C3,2.8954305 3.8954305,2 5,2 Z M11,4 C10.4477153,4 10,4.44771525 10,5 C10,5.55228475 10.4477153,6 11,6 L16,6 C16.5522847,6 17,5.55228475 17,5 C17,4.44771525 16.5522847,4 16,4 L11,4 Z M7,6 C7.55228475,6 8,5.55228475 8,5 C8,4.44771525 7.55228475,4 7,4 C6.44771525,4 6,4.44771525 6,5 C6,5.55228475 6.44771525,6 7,6 Z" fill="#000000" opacity="0.3"/>
<path d="M5,9 L19,9 C20.1045695,9 21,9.8954305 21,11 L21,13 C21,14.1045695 20.1045695,15 19,15 L5,15 C3.8954305,15 3,14.1045695 3,13 L3,11 C3,9.8954305 3.8954305,9 5,9 Z M11,11 C10.4477153,11 10,11.4477153 10,12 C10,12.5522847 10.4477153,13 11,13 L16,13 C16.5522847,13 17,12.5522847 17,12 C17,11.4477153 16.5522847,11 16,11 L11,11 Z M7,13 C7.55228475,13 8,12.5522847 8,12 C8,11.4477153 7.55228475,11 7,11 C6.44771525,11 6,11.4477153 6,12 C6,12.5522847 6.44771525,13 7,13 Z" fill="#000000"/>
<path d="M5,16 L19,16 C20.1045695,16 21,16.8954305 21,18 L21,20 C21,21.1045695 20.1045695,22 19,22 L5,22 C3.8954305,22 3,21.1045695 3,20 L3,18 C3,16.8954305 3.8954305,16 5,16 Z M11,18 C10.4477153,18 10,18.4477153 10,19 C10,19.5522847 10.4477153,20 11,20 L16,20 C16.5522847,20 17,19.5522847 17,19 C17,18.4477153 16.5522847,18 16,18 L11,18 Z M7,20 C7.55228475,20 8,19.5522847 8,19 C8,18.4477153 7.55228475,18 7,18 C6.44771525,18 6,18.4477153 6,19 C6,19.5522847 6.44771525,20 7,20 Z" fill="#000000"/>
</g>
</svg>
</span>
</span>
</div>
<div class="d-flex flex-column flex-grow-1">
<a href="/admin/servers" class="text-dark-75 text-hover-primary mb-1 font-size-lg font-weight-bolder">Игровые сервера</a>
<div class="d-flex">
<div class="d-flex align-items-center pr-5">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Онлайн: <?$tserverov = 0;
foreach($tservers as $item): ?>
<? if (!($item['server_status'] == 2)) { // пропуск нечетных чисел
continue;
}?>
<? $tserverov++; ?>
<?endforeach;echo $tserverov; ?></span>
</div>
<div class="d-flex align-items-center">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Серверов: <?$tserverov1 = 0;
foreach($tservers as $item): ?>
<? $tserverov1++; ?>
<?endforeach;echo $tserverov1; ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card card-custom mb-2">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="symbol symbol-45 symbol-light mr-5">
<span class="symbol-label">
<span class="svg-icon svg-icon-lg svg-icon-primary">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect x="0" y="0" width="24" height="24"/>
<circle fill="#000000" opacity="0.3" cx="20.5" cy="12.5" r="1.5"/>
<rect fill="#000000" opacity="0.3" transform="translate(12.000000, 6.500000) rotate(-15.000000) translate(-12.000000, -6.500000) " x="3" y="3" width="18" height="7" rx="1"/>
<path d="M22,9.33681558 C21.5453723,9.12084552 21.0367986,9 20.5,9 C18.5670034,9 17,10.5670034 17,12.5 C17,14.4329966 18.5670034,16 20.5,16 C21.0367986,16 21.5453723,15.8791545 22,15.6631844 L22,18 C22,19.1045695 21.1045695,20 20,20 L4,20 C2.8954305,20 2,19.1045695 2,18 L2,6 C2,4.8954305 2.8954305,4 4,4 L20,4 C21.1045695,4 22,4.8954305 22,6 L22,9.33681558 Z" fill="#000000"/>
</g>
</svg>
</span>
</span>
</div>
<div class="d-flex flex-column flex-grow-1">
<a href="/admin/invoices" class="text-dark-75 text-hover-primary mb-1 font-size-lg font-weight-bolder">Платежи</a>
<div class="d-flex">
<div class="d-flex align-items-center pr-5">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold"><? foreach($invoices as $item): ?> <?endforeach; ?>
Последний счет: <?php echo isset($item['invoice_ammount']) ? $item['invoice_ammount'] : '0';?>руб.</span>
</div>
<div class="d-flex align-items-center">
<span class="svg-icon svg-icon-md svg-icon-primary pr-1">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon points="0 0 24 0 24 24 0 24"/>
<rect fill="#000000" opacity="0.3" transform="translate(8.500000, 12.000000) rotate(-90.000000) translate(-8.500000, -12.000000) " x="7.5" y="7.5" width="2" height="9" rx="1"/>
<path d="M9.70710318,15.7071045 C9.31657888,16.0976288 8.68341391,16.0976288 8.29288961,15.7071045 C7.90236532,15.3165802 7.90236532,14.6834152 8.29288961,14.2928909 L14.2928896,8.29289093 C14.6714686,7.914312 15.281055,7.90106637 15.675721,8.26284357 L21.675721,13.7628436 C22.08284,14.136036 22.1103429,14.7686034 21.7371505,15.1757223 C21.3639581,15.5828413 20.7313908,15.6103443 20.3242718,15.2371519 L15.0300721,10.3841355 L9.70710318,15.7071045 Z" fill="#000000" fill-rule="nonzero" transform="translate(14.999999, 11.999997) scale(1, -1) rotate(90.000000) translate(-14.999999, -11.999997) "/>
</g>
</svg>
</span>
<span class="text-muted font-weight-bold">Заработано: <?$invo = 0;
foreach($invoices as $item): ?>
<? if (!($item['invoice_status'] == 1)) { // пропуск нечетных чисел
continue;
}?>
<? $invo=$invo+$item['invoice_ammount']; ?>
<?endforeach; echo $invo; ?> RUB.</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-2">
<div class="card-body">
<div class="scroll scroll-pull" data-scroll="true" style="height: 360px; overflow: auto;" data-mobile-height="250">
<div class="timeline timeline-5">
<?php foreach($waste as $item): ?>
<div class="timeline-items">
<div class="timeline-item">
<div class="timeline-media bg-light-primary">
<?php if($item['waste_status'] == 1): ?>
<i class="fa fa-user-minus text-danger icon-md"></i>
<?php elseif($item['waste_status'] == 0): ?>
<i class="fa fa-user-check text-success icon-md"></i>
<?php endif; ?>
</div>
<div class="timeline-desc timeline-desc-light-primary">
<a href="/admin/users/edit/index/<?php echo $item['user_id'] ?>" class="font-weight-bolder text-primary"><?php echo $item['user_firstname'] ?> <?php echo $item['user_lastname'] ?> <?php if($item['waste_status'] == 1): ?>
<small class="text-danger">( - <?php echo $item['waste_ammount'] ?> RUB. )</small>
<?php elseif($item['waste_status'] == 0): ?>
<small class="text-success">( + <?php echo $item['waste_ammount'] ?> RUB. ) </small>
<?php endif; ?></small></a>
<a href="/admin/waste/index?userid=<?php echo $item['user_id'] ?>">
<p class="font-weight-normal text-dark-50 pt-1 pb-2">
<?php echo $item['waste_usluga'] ?>
</p>
</a>
</div>
</div>
</div>
<?php endforeach; ?>
<?php if(empty($waste)): ?>
<div class="alert alert-custom alert-light-primary fade show mb-4" role="alert">
<div class="alert-icon">
<i class="flaticon-exclamation"></i>
</div>
<div class="alert-text">На данный момент нет операций.</div>
<div class="alert-close">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">
<i class="ki ki-close"></i>
</span>
</button>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php foreach($users as $item): ?>
<?if($item['user_access_level'] == 1)
continue;?>
<div class="col-xl-6">
<div class="card card-custom mb-2">
<div class="card-body">
<div class="d-flex align-items-center mb-0">
<div class="symbol symbol-45 symbol-light mr-5">
<span class="symbol-label">
<img src="/<?if($item['user_img']) {echo $item['user_img'];}else{ echo 'application/public/img/user.png';}?>" class="h-75" alt="">
</span>
</div>
<div class="d-flex flex-column flex-grow-1 font-weight-bold">
<a href="/admin/users/edit/index/<?php echo $item['user_id'] ?>" class="text-dark text-hover-primary mb-0 font-size-lg"><?php echo $item['user_firstname'] ?> <?php echo $item['user_lastname'] ?></a>
<span class="text-muted"><?php if($item['user_access_level'] == 2): ?>
Тех. поддержка
<?php elseif($item['user_access_level'] == 3): ?>
Администратор
<?php endif; ?></span>
</div>
<div class="dropdown dropdown-inline ml-2">
<a href="https://vk.com/id<?php echo $item['user_vk_id'] ?>" target="blank" class="btn btn-hover-light-primary btn-sm btn-icon">
<i class="fab fa-vk"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,52 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Обратная связь
</h3>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th>Отправитель</th>
<th>Тема</th>
<th>E-mail</th>
<th>Дата обращения</th>
</tr>
</thead>
<tbody>
<?php foreach($mail as $item): ?>
<tr onClick="redirect('/admin/infobox/send/index/<?php echo $item['id']?>')">
<th scope="row"><?php echo $item['user_lastname'] ?> <?php echo $item['user_firstname'] ?></th>
<td><?php echo $item['category']?></td>
<td><?php echo $item['user_email'] ?></td>
<td><?php echo $item['inbox_date_add']?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($mail)): ?>
<tr>
<td colspan="4" style="text-align: center;">На данный момент нет запросов.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,75 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<form id="sendMForm" method="POST">
<div class="card card-custom mb-4">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="symbol symbol-50 mr-5">
<span class="symbol-label">
<img src="/application/public/img/user.png" class="h-75" alt="">
</span>
</div>
<div class="d-flex flex-column flex-grow-1">
<a href="javascript:;" class="text-dark-75 text-hover-primary mb-1 font-size-lg font-weight-bolder"><?php echo $mail['user_firstname'] ?> <?php echo $mail['user_lastname'] ?> <small><?php echo $mail['user_email'] ?></small></a>
<span class="text-muted font-weight-bold"><?php echo $mail['text'] ?></span>
</div>
<span class="text-muted font-weight-normal font-size-sm"><?php echo $mail['inbox_date_add']?></span>
</div>
</div>
</div>
<div class="card card-custom">
<div class="card-body">
<div class="form-group form-md-line-input">
<textarea class="form-control" id="msg" name="msg" rows="3" placeholder="Сообщение..."></textarea>
</div>
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
<div class="form-group" style="margin-bottom: 0rem;">
<div class="checkbox-list">
<label class="checkbox">
<input type="checkbox" id="dell" name="dell">
<span></span>
Удалить после отправки
</label>
</div>
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase">Отправить</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
$('#sendMForm').ajaxForm({
url: '/admin/infobox/send/sendMForm/<?php echo $mail['id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/infobox')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,55 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<?php foreach($invoices as $item): ?>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title"> <span class="card-icon">
<a href="javascript:;" class="badge badge-secondary" data-toggle="tooltip" data-placement="right" title="" data-original-title="ID"><?php echo $item['invoice_id'] ?>
</a>
</span><a href="/admin/users/edit/index/<?php echo $item['user_id'] ?>" class="text-dark"><?php echo $item['user_firstname'] ?> <?php echo $item['user_lastname'] ?></a><small class="text-muted font-size-sm ml-2"><?php echo $item['invoice_ammount'] ?> RUB.</small>
</h3>
<div class="card-toolbar">
<span class="badge badge-primary mr-2" data-toggle="tooltip" data-placement="right" title="" data-original-title="Платежная система"><?php echo $item['system'] ?></span>
<?php if($item['invoice_status'] == 0): ?>
<span class="badge badge-danger" data-toggle="tooltip" data-placement="right" title="" data-original-title="Дата операции: <?php echo date("d.m.Y в H:i", strtotime($item['invoice_date_add'])) ?>">Не оплачен</span>
<?php elseif($item['invoice_status'] == 1): ?>
<span class="badge badge-success" data-toggle="tooltip" data-placement="right" title="" data-original-title="Дата операции: <?php echo date("d.m.Y в H:i", strtotime($item['invoice_date_add'])) ?>">Оплачен</span>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<div class="col-xl-12">
<?php echo $pagination ?>
<?php if(empty($invoices)): ?>
<div class="alert alert-custom alert-light-primary fade show mb-4" role="alert">
<div class="alert-icon">
<i class="flaticon-exclamation"></i>
</div>
<div class="alert-text">На данный момент нет платежей.</div>
<div class="alert-close">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">
<i class="ki ki-close"></i>
</span>
</button>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,75 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание локации
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название локации</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название локации">
</div>
<div class="form-group form-md-line-input">
<label>Введите IP (Который видит пользователь)</label>
<input type="text" class="form-control" id="ip2" name="ip2" placeholder="Введите IP (Который видит пользователь)">
</div>
<div class="form-group form-md-line-input">
<label>Введите IP (По которому подключаются)</label>
<input type="text" class="form-control" id="ip" name="ip" placeholder="Введите IP (По которому подключаются)">
</div>
<div class="form-group form-md-line-input">
<label>Введите имя пользователя</label>
<input type="text" class="form-control" id="user" name="user" placeholder="Введите имя пользователя">
</div>
<div class="form-group form-md-line-input">
<label>Пароль</label>
<input type="text" class="form-control" id="password" name="password" placeholder="Пароль">
</div>
<div class="form-group form-md-line-input">
<label>Повторите пароль</label>
<input type="text" class="form-control" id="password2" name="password2" placeholder="Повторите пароль">
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/locations/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/locations')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,113 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование локации
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название локации</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название локации" value="<?php echo $location['location_name'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите IP (Который видит пользователь)</label>
<input type="text" class="form-control" id="ip2" name="ip2" placeholder="Введите IP (Который видит пользователь)" value="<?php echo $location['location_ip2'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите IP (По которому подключаются)</label>
<input type="text" class="form-control" id="ip" name="ip" placeholder="Введите IP (По которому подключаются)" value="<?php echo $location['location_ip'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите имя пользователя</label>
<input type="text" class="form-control" id="user" name="user" placeholder="Введите имя пользователя" value="<?php echo $location['location_user'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите ID игр для которых будет доступна локация (через пробел)</label>
<input type="text" class="form-control" id="location_games" name="location_games" placeholder="Введите ID игр для которых будет доступна локация (через пробел)" value="<?php echo $location['location_games'] ?>">
</div>
<hr>
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
<div class="form-group" style="margin-bottom: 0rem;">
<div class="checkbox-list">
<label class="checkbox">
<input type="checkbox" id="editpassword" name="editpassword" onChange="togglePassword()">
<span></span>
Изменить пароль
</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input">
<label>Пароль</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Пароль" disabled>
</div>
<div class="form-group form-md-line-input">
<label>Повторите пароль</label>
<input type="password" class="form-control" id="password2" name="password2" placeholder="Повторите пароль" disabled>
</div>
<hr>
<div class="form-group form-md-line-input">
<label>Выберите статус локации</label>
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1"<?php if($location['location_status'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($location['location_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/locations/edit/delete/<?php echo $location['location_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/locations/edit/ajax/<?php echo $location['location_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/locations')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
function togglePassword() {
var status = $('#editpassword').is(':checked');
if(status) {
$('#password').prop('disabled', false);
$('#password2').prop('disabled', false);
} else {
$('#password').prop('disabled', true);
$('#password2').prop('disabled', true);
}
}
</script>
<?php echo $footer ?>
@@ -0,0 +1,71 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список локаций
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/locations/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить локацию">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Статус</th>
<th>Название</th>
<th>IP</th>
<th>CPU</th>
<th>RAM</th>
<th>SSD</th>
<th>Обновлено в</th>
</tr>
</thead>
<tbody>
<?php foreach($locations as $item): ?>
<tr onClick="redirect('/admin/locations/edit/index/<?php echo $item['location_id'] ?>')">
<th scope="row"><?php echo $item['location_id'] ?></th>
<td>
<?php if($item['location_status'] == 0): ?>
<span class="badge badge-danger">Выключена</span>
<?php elseif($item['location_status'] == 1): ?>
<span class="badge badge-success">Включена</span>
<?php endif; ?>
</td>
<td><?php echo $item['location_name'] ?></td>
<td><?php echo $item['location_ip'] ?></td>
<td><?php echo $item['location_cpu'] ?>%</td>
<td><?php echo $item['location_ram'] ?>%</td>
<td><?php echo $item['location_hdd'] ?>%</td>
<td><?php echo date("H:i:s", strtotime($item['location_upd'])) ?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($locations)): ?>
<tr>
<td colspan="9" class="text-center">На данный момент нет локаций.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,106 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание мода
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название мода">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="textx" name="textx" rows="3" placeholder="Описание..."></textarea>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="img" name="img" placeholder="Введите ссылку на изображение">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="gameid" name="gameid" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<?php foreach($games as $item): ?>
<option value="<?php echo $item['game_id'] ?>"><?php echo $item['game_name'] ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group form-md-line-input">
<label for="upload" class="form-control"><input type="file" id="upload" name="userfile"></label>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="price" name="price" placeholder="Введите стоимость мода">
</div>
<hr>
<input type="submit" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/mods/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/mods')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
$(function(){
var progressBar = $('#progressbar');
$('#createForm').on('submit', function(e){
e.preventDefault();
var $that = $(this),
formData = new FormData($that.get(0));
$.ajax({
url: $that.attr('action'),
type: $that.attr('method'),
contentType: false,
processData: false,
data: formData,
dataType: 'json',
xhr: function(){
var xhr = $.ajaxSettings.xhr();
xhr.upload.addEventListener('progress', function(evt){
if(evt.lengthComputable) {
var percentComplete = Math.ceil(evt.loaded / evt.total * 100);
progressBar.val(percentComplete).text('Загружено ' + percentComplete + '%');
toastr.info('Загружено ' + percentComplete + '%');
}
}, false);
return xhr;
},
success: function(json){
if(json){
$that.after(json);
}
}
});
});
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,86 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование мода
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" value="<?php echo $mod['mod_name'] ?>" placeholder="Введите название мода">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="textx" name="textx" rows="3"placeholder="Описание..."><?php echo $mod['mod_textx'] ?></textarea>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="img" name="img" value="<?php echo $mod['mod_img'] ?>" placeholder="Введите ссылку на изображение">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="gameid" name="gameid" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<?php foreach($games as $item): ?>
<option value="<?php echo $item['game_id'] ?>" <?php if($item['game_id'] == $mod['game_id']): ?> selected="selected"<?php endif; ?>><?php echo $item['game_name'] ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="url" name="url" value="<?php echo $mod['mod_url'] ?>" placeholder="Введите ссылку на архив (tar)">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="arch" name="arch" value="<?php echo $mod['mod_arch'] ?>" placeholder="Введите название архива">
</div>
<hr>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="price" name="price" value="<?php echo $mod['mod_price'] ?>" placeholder="Введите стоимость мода">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="0"<?php if($mod['mod_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1"<?php if($mod['mod_status'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/mods/edit/delete/<?php echo $mod['mod_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/mods/edit/ajax/<?php echo $mod['mod_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/mods')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,65 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список модов
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/mods/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить мод">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Игра</th>
<th>Название</th>
<th>Статус</th>
<th>Стоимость</th>
</tr>
</thead>
<tbody>
<?php foreach($mods as $item): ?>
<tr onClick="redirect('/admin/mods/edit/index/<?php echo $item['mod_id'] ?>')">
<th scope="row"><?php echo $item['mod_id'] ?></th>
<td><?php echo $item['game_name'] ?></td>
<td><?php echo $item['mod_name'] ?></td>
<td>
<?php if($item['mod_status'] == 0): ?>
<span class="badge badge-danger">Выключен</span>
<?php elseif($item['mod_status'] == 1): ?>
<span class="badge badge-success">Включен</span>
<?php endif; ?>
</td>
<td><?php echo $item['mod_price'] ?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($mods)): ?>
<tr>
<td colspan="5" class="text-center">На данный момент нет модов.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,55 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание новости
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите заголовок">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="text" name="text" rows="3" placeholder="Введите текст новости"></textarea>
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/news/create/ajax',
dataType: 'json',
success: function(data) {
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/news/view/index/" + data.id + "')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,60 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование новости
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите заголовок" value="<?php echo $new['news_title'] ?>">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="text" name="text" rows="3" placeholder="Введите текст новости"><?echo $new['news_text']?></textarea>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/news/edit/delete/<?php echo $new['news_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/news/edit/ajax/<?php echo $new['news_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/news')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,55 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список новостей
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/news/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить новость">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Название</th>
<th>Добавил</th>
</tr>
</thead>
<tbody>
<?php foreach($news as $item): ?>
<tr onClick="redirect('/admin/news/edit/index/<?php echo $item['news_id'] ?>')">
<th><?php echo $item['news_id'] ?></th>
<td><?php echo $item['news_title'] ?></td>
<td><?php echo $item['user_lastname'] ?> <?php echo $item['user_firstname'] ?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($news)): ?>
<tr>
<td colspan="3" class="text-center">На данный момент нет новостей.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,81 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание промо кода
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="cod" name="cod" placeholder="Введите промо-код">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="skidka" name="skidka" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="5">5%</option>
<option value="10">10%</option>
<option value="15">15%</option>
<option value="20">20%</option>
<option value="25">25%</option>
<option value="30">30%</option>
<option value="35">35%</option>
<option value="40">40%</option>
<option value="45">45%</option>
<option value="50">50%</option>
<option value="55">55%</option>
<option value="60">60%</option>
<option value="65">65%</option>
<option value="70">70%</option>
<option value="75">75%</option>
<option value="80">80%</option>
<option value="85">85%</option>
<option value="90">90%</option>
<option value="95">95%</option>
<option value="100">100%</option>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="uses" name="uses" placeholder="Введите количество использований">
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/promo/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/promo')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,84 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование промо кода
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="cod" name="cod" placeholder="Введите промо-код" value="<?php echo $promo['cod'] ?>">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="skidka" name="skidka" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="5" <?php if($promo['skidka'] == 5): ?> selected="selected"<?php endif; ?>>5%</option>
<option value="10" <?php if($promo['skidka'] == 10): ?> selected="selected"<?php endif; ?>>10%</option>
<option value="15" <?php if($promo['skidka'] == 15): ?> selected="selected"<?php endif; ?>>15%</option>
<option value="20" <?php if($promo['skidka'] == 20): ?> selected="selected"<?php endif; ?>>20%</option>
<option value="25" <?php if($promo['skidka'] == 25): ?> selected="selected"<?php endif; ?>>25%</option>
<option value="30" <?php if($promo['skidka'] == 30): ?> selected="selected"<?php endif; ?>>30%</option>
<option value="35" <?php if($promo['skidka'] == 35): ?> selected="selected"<?php endif; ?>>35%</option>
<option value="40" <?php if($promo['skidka'] == 40): ?> selected="selected"<?php endif; ?>>40%</option>
<option value="45" <?php if($promo['skidka'] == 45): ?> selected="selected"<?php endif; ?>>45%</option>
<option value="50" <?php if($promo['skidka'] == 50): ?> selected="selected"<?php endif; ?>>50%</option>
<option value="55" <?php if($promo['skidka'] == 55): ?> selected="selected"<?php endif; ?>>55%</option>
<option value="60" <?php if($promo['skidka'] == 60): ?> selected="selected"<?php endif; ?>>60%</option>
<option value="65" <?php if($promo['skidka'] == 65): ?> selected="selected"<?php endif; ?>>65%</option>
<option value="70" <?php if($promo['skidka'] == 70): ?> selected="selected"<?php endif; ?>>70%</option>
<option value="75" <?php if($promo['skidka'] == 75): ?> selected="selected"<?php endif; ?>>75%</option>
<option value="80" <?php if($promo['skidka'] == 80): ?> selected="selected"<?php endif; ?>>80%</option>
<option value="85" <?php if($promo['skidka'] == 85): ?> selected="selected"<?php endif; ?>>85%</option>
<option value="90" <?php if($promo['skidka'] == 90): ?> selected="selected"<?php endif; ?>>90%</option>
<option value="95" <?php if($promo['skidka'] == 95): ?> selected="selected"<?php endif; ?>>95%</option>
<option value="100" <?php if($promo['skidka'] == 100): ?> selected="selected"<?php endif; ?>>100%</option>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="uses" name="uses" placeholder="Введите количество использований" value="<?php echo $promo['uses'] ?>">
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/promo/edit/delete/<?php echo $promo['id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/promo/edit/ajax/<?php echo $promo['id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/promo')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,57 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список промо кодов
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/promo/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить промо код">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<td>Код</td>
<td>Скидка</td>
<td>Использовано</td>
</tr>
</thead>
<tbody>
<?php foreach($promos as $item): ?>
<tr onClick="redirect('/admin/promo/edit/index/<?php echo $item['id'] ?>')">
<td><?php echo $item['id'] ?></td>
<td><?echo $item['cod']?></td>
<td><?php echo $item['skidka'] ?></td>
<td><?php echo $item['used'] ?>/<?php echo $item['uses'] ?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($promos)): ?>
<tr>
<td colspan="4" class="text-center">На данный момент нет промо кодов.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,73 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Добавление файла в репозиторий
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название файла">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="textx" name="textx" rows="3" placeholder="Описание..."></textarea>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="img" name="img" placeholder="Введите ссылку на изображение">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="gameid" name="gameid" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<?php foreach($games as $item): ?>
<option value="<?php echo $item['game_id'] ?>"><?php echo $item['game_name'] ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="url" name="url" placeholder="Введите адрес файла">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="price" name="price" placeholder="Введите стоимость файла">
</div>
<hr>
<input type="submit" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/repo/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/repo')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,83 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование файла в репозитории
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" value="<?php echo $repo['repo_name'] ?>" placeholder="Введите название файла">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="textx" name="textx" rows="3"placeholder="Описание..."><?php echo $repo['repo_textx'] ?></textarea>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="img" name="img" value="<?php echo $repo['repo_img'] ?>" placeholder="Введите ссылку на изображение">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="gameid" name="gameid" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<?php foreach($games as $item): ?>
<option value="<?php echo $item['game_id'] ?>" <?php if($item['game_id'] == $repo['game_id']): ?> selected="selected"<?php endif; ?>><?php echo $item['game_name'] ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="url" name="url" value="<?php echo $repo['repo_url'] ?>" placeholder="Введите ссылку на файд">
</div>
<hr>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="price" name="price" value="<?php echo $repo['repo_price'] ?>" placeholder="Введите стоимость файла">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="0"<?php if($repo['repo_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1"<?php if($repo['repo_status'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/repo/edit/delete/<?php echo $repo['repo_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/repo/edit/ajax/<?php echo $repo['repo_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/repo')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,65 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список файлов в репозитории
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/repo/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить файл">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Игра</th>
<th>Название</th>
<th>Статус</th>
<th>Стоимость</th>
</tr>
</thead>
<tbody>
<?php foreach($repo as $item): ?>
<tr onClick="redirect('/admin/repo/edit/index/<?php echo $item['repo_id'] ?>')">
<th scope="row"><?php echo $item['repo_id'] ?></th>
<td><?php echo $item['game_name'] ?></td>
<td><?php echo $item['repo_name'] ?></td>
<td>
<?php if($item['repo_status'] == 0): ?>
<span class="badge badge-danger">Выключен</span>
<?php elseif($item['repo_status'] == 1): ?>
<span class="badge badge-success">Включен</span>
<?php endif; ?>
</td>
<td><?php echo $item['repo_price'] ?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($repo)): ?>
<tr>
<td colspan="5" class="text-center">На данный момент нет файлов.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,546 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-3">
<div class="card card-custom mb-3 pt-5">
<div class="card-body">
<div class="text-center">
<div class="symbol symbol-60 symbol-circle symbol-xl-90">
<div class="symbol-label">
<?php if($server['server_status'] == 1): ?>
<i class="fa fa-power-off icon-6x text-danger"></i>
<?php elseif($server['server_status'] == 2): ?>
<i class="fa fa-power-off icon-6x text-success"></i>
<?php elseif($server['server_status'] == 3): ?>
<i class="fas fa-clock icon-6x text-primary"></i>
<?php elseif($server['server_status'] == 4 || $server['server_status'] == 5 || $server['server_status'] == 6 || $server['server_status'] == 7): ?>
<i class="fas fa-clock icon-6x text-info"></i>
<?php elseif($server['server_status'] == 0): ?>
<i class="fas fa-exclamation-circle icon-6x text-warning"></i>
<?php endif; ?>
</div>
<i class="symbol-badge symbol-badge-bottom bg-<?php if($server['server_status'] == 0): ?>warning
<?php elseif($server['server_status'] == 1): ?>danger
<?php elseif($server['server_status'] == 2): ?>success
<?php elseif($server['server_status'] == 3): ?>primary
<?php elseif($server['server_status'] == 4 || $server['server_status'] == 5 || $server['server_status'] == 6 || $server['server_status'] == 7): ?>info
<?php endif; ?>"></i>
</div>
<h4 class="font-weight-bolder my-2"><?php echo $server['game_name'] ?></h4>
<div class="text-muted font-weight-bold mb-2"><?php if($server['server_status'] == 1): ?>
Остановлен
<?php elseif($server['server_status'] == 2): ?>
Запущен
<?php elseif($server['server_status'] == 3): ?>
Устанавливается
<?php elseif($server['server_status'] == 4): ?>
Переустанавливается
<?php elseif($server['server_status'] == 5): ?>
Создается BackUP
<?php elseif($server['server_status'] == 6): ?>
Устанавливается BackUP
<?php elseif($server['server_status'] == 0): ?>
Заблокирован
<?php elseif($server['server_status'] == 7): ?>
Обновляется
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="card card-custom mb-3">
<div class="card-body px-1" style="padding: 0.3rem 2.25rem;">
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<?php if($server['server_status'] == 1): ?>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'start')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-power-off"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Запустить</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'reinstall')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fas fa-spinner"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Переустановить</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'backup')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-cloud-download-alt"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Сделать BackUP</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'unbackup')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-cloud-upload-alt"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Развернуть BackUP</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'delete_backup')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fas fa-quidditch"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Удалить BackUP</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'block')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-lock"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Блокировать</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'delete')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-trash-alt"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Удалить сервер</span>
</a>
</div>
<?php elseif($server['server_status'] == 2): ?>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'stop')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-power-off"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Остановить</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'restart')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-sync-alt"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Перезапустить</span>
</a>
</div>
<?php elseif($server['server_status'] == 0): ?>
<div class="navi-item my-2">
<a href="javascript:;" onClick="actionserver(<?php echo $server['server_id'] ?>,'unblock')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fas fa-unlock"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Разблокировать</span>
</a>
</div>
<?php endif; ?>
<?php if($server['game_code'] == "cs" || $server['game_code'] == "csgo" || $server['game_code'] == "css" || $server['game_query'] == "samp" AND $server['server_status'] == 1): ?>
<div class="navi-item my-2">
<a href="javascript:;" data-toggle="modal" data-target="#csfast" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="far fa-sun"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Параметры запуска</span>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="col-xl-9">
<div class="row">
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Клиент<small class="text-muted font-size-sm ml-2"><a class="text-muted" href="/admin/users/edit/index/<?php echo $server['user_id'] ?>"> <?php echo $server['user_firstname'] ?> <?php echo $server['user_lastname'] ?></a></small></h3>
</div>
</div>
</div>
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">
Статистика
<small class="text-muted font-size-sm ml-2" id="stats">
<div class="spinner spinner-primary"></div>
</small>
</h3>
</div>
</div>
</div>
<div class="col-xl-12 mb-3">
<div class="separator separator-dashed separator-border-2"></div>
</div>
<?php if($server['server_status'] == 2): ?>
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Название<small class="text-muted font-size-sm ml-2"><?php echo $query['hostname'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Режим<small class="text-muted font-size-sm ml-2"><?php echo $query['gamemode'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Карта<small class="text-muted font-size-sm ml-2"><?php echo $query['mapname'] ?></small></h3>
</div>
</div>
</div>
<?php endif; ?>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Адрес<small class="text-muted font-size-sm ml-2"><?php echo $server['location_ip'] ?>:<?php echo $server['server_port'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Слоты<small class="text-muted font-size-sm ml-2"><?php echo $server['server_slots'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Оплачен до<small class="text-muted font-size-sm ml-2"><?php echo date("d.m.Y", strtotime($server['server_date_end'])) ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Локация<small class="text-muted font-size-sm ml-2"><?php echo $server['location_name'] ?></small></h3>
</div>
</div>
</div>
<?php if($server['game_code'] == "cs" || $server['game_code'] == "csgo" || $server['game_code'] == "css" || $server['game_query'] == "samp" AND $server['server_status'] == 2): ?>
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">RCON Пароль<small class="text-muted font-size-sm ml-2"><?php echo $server['rcon_password'] ?></small></h3>
</div>
</div>
</div>
<?php endif; ?>
<?php if($server['game_code'] == "cs" || $server['game_code'] == "csgo" || $server['game_code'] == "css" AND $server['fastdl_status'] == 1 AND $server['server_status'] == 2): ?>
<div class="col-xl-12">
<div class="alert alert-primary mb-5 p-5" role="alert">
<div class="input-group">
<input type="text" class="form-control" placeholder="FastDL URL: http://<?php echo $server['location_ip'] ?>:8080/fastdl_gs<?php echo $server['server_id'] ?>" value="FastDL URL: http://<?php echo $server['location_ip'] ?>:8080/fastdl_gs<?php echo $server['server_id'] ?>">
</div>
</div>
</div>
<?php endif; ?>
<?if($server['server_status'] == 1 || $server['server_status'] == 2):?>
<div class="col-xl-12 mb-3">
<div class="separator separator-dashed separator-border-2"></div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Адрес FTP-сервера<small class="text-muted font-size-sm ml-2"><?php echo $server['location_ip'] ?></small></h3>
<div class="card-toolbar">
<a href="http://filezilla.ru/get/" target="_blank" class="btn btn-clean btn-icon">
<i class="fa fa-external-link-alt" data-toggle="tooltip" data-placement="right" title="" data-original-title="Скачать FTP Клиент"></i>
</a>
</div>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Порт FTP-сервера<small class="text-muted font-size-sm ml-2">21</small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Имя пользователя<small class="text-muted font-size-sm ml-2">gs<?php echo $server['server_id'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Пароль доступа<small class="text-muted font-size-sm ml-2"><?php echo $server['server_password'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-12 mb-3">
<div class="separator separator-dashed separator-border-2"></div>
</div>
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">MySQL Хост<small class="text-muted font-size-sm ml-2">127.0.0.1/<?php echo $server['location_ip'] ?></small></h3>
<div class="card-toolbar">
<?if($server['server_mysql'] == 1):?>
<a href="javascript:;" onClick="sendAction(<?php echo $server['server_id'] ?>,'mysqloff')" class="btn btn-clean btn-icon" style="margin-right: .25rem"><i class="fa fa-power-off" data-toggle="tooltip" data-placement="right" title="" data-original-title="Выключить"></i></a>
<?elseif($server['server_mysql'] == 0):?>
<a href="javascript:;" onClick="sendAction(<?php echo $server['server_id'] ?>,'mysqlcr')" class="btn btn-clean btn-icon" style="margin-right: .25rem"><i class="fa fa-user-plus" data-toggle="tooltip" data-placement="right" title="" data-original-title="Создать базу"></i></a>
<?elseif($server['server_mysql'] == 2):?>
<a href="javascript:;" onClick="sendAction(<?php echo $server['server_id'] ?>,'mysqlon')" class="btn btn-clean btn-icon" style="margin-right: .25rem"><i class="fa fa-power-off" data-toggle="tooltip" data-placement="right" title="" data-original-title="Включить"></i></a>
<?endif;?>
</div>
</div>
</div>
</div>
<?if($server['server_mysql'] == 1):?>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Имя пользователя<small class="text-muted font-size-sm ml-2">gs<?php echo $server['server_id'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Пароль доступа<small class="text-muted font-size-sm ml-2"><?php echo $server['db_pass'] ?></small></h3>
</div>
</div>
</div>
<?endif;?>
<?endif;?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if($server['game_code'] == "cs" || $server['game_code'] == "csgo" || $server['game_code'] == "css" || $server['game_query'] == "samp" AND $server['server_status'] == 1): ?>
<!--begin::Modal-->
<div class="modal fade" id="csfast" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Параметры запуска</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i aria-hidden="true" class="ki ki-close"></i>
</button>
</div>
<form id="settingStart" method="POST" style="padding:0px; margin:0px;">
<div class="modal-body">
<?php if($server['game_code'] == "cs" || $server['game_code'] == "csgo" || $server['game_code'] == "css"): ?>
<div class="form-group form-md-line-input">
<label>Античит VAC</label>
<select class="form-control" id="vac" name="vac">
<option value="0" <?php if($server['server_vac'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1" <?php if($server['server_vac'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
</div>
<div class="form-group form-md-line-input">
<label>FastDL</label>
<select class="form-control" id="fastdl" name="fastdl">
<option value="0" <?php if($server['fastdl_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1" <?php if($server['fastdl_status'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
</div>
<?php endif; ?>
<?php if($server['game_code'] == "cs"): ?>
<div class="form-group form-md-line-input">
<label>FPS</label>
<select class="form-control" id="fps" name="fps">
<?php foreach($fps as $item): ?>
<option value="<?php echo $item ?>" <?php if($server['server_fps'] == $item): ?> selected="selected"<?php endif; ?>><?php echo $item ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if($server['game_code'] == "csgo" || $server["game_code"] == "css"): ?>
<div class="form-group form-md-line-input">
<label>Tickrate</label>
<select class="form-control" id="tickrate" name="tickrate">
<?php foreach($tickrate as $item): ?>
<option value="<?php echo $item ?>" <?php if($server['server_tickrate'] == $item): ?> selected="selected"<?php endif; ?>><?php echo $item ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if($server["game_code"] == "cs" || $server['game_code'] == "csgo" || $server["game_code"] == "css" || $server['game_query'] == "samp"): ?>
<div class="form-group">
<label>RCON Пароль</label>
<input type="text" class="form-control" id="rcon_password" name="rcon_password" placeholder="Введите RCON Пароль" value="<?echo $server['rcon_password']?>">
</div>
<?php endif; ?>
</div>
<div class="modal-footer" style="padding: 0.5rem;">
<button type="button" class="btn btn-light-primary font-weight-bold" data-dismiss="modal">Отмена</button>
<button type="submit" class="btn btn-primary font-weight-bold">Сохранить</button>
</div>
</form>
</div>
</div>
</div>
<!--end::Modal-->
<?php endif; ?>
<?php if($server['game_code'] == "cs" || $server['game_code'] == "csgo" || $server['game_code'] == "css" || $server['game_query'] == "samp" AND $server['server_status'] == 1): ?>
<script>
$('#settingStart').ajaxForm({
url: '/admin/servers/control/settingStart/<?php echo $server['server_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
$('button[type=submit]').prop('disabled', false);
setTimeout("reload()", 2500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php endif; ?>
<script>
function updateData() {
$.ajax({
url: '/admin/servers/control/getData/<?=$server['server_id']?>',
dataType: 'text',
success: function (data) {
data = $.parseJSON(data);
$("#stats").text("CPU: "+data.cpu+"% | RAM: "+data.ram+"% | SSD: "+data.ssd+"% | Players: "+data.players);
}
})
}
$(document).ready(function() {
updateData();
});
function actionserver(serverid, actionserver) {
switch(actionserver) {
case "reinstall":
{
if(!confirm("Вы уверенны в том, что хотите переустановить сервер? Все данные будут удалены.")) return;
break;
}
case "backup":
{
if(!confirm("Вы уверены в том, что хотите сделать бэкап сервера? Прежний бэкап будет удален.")) return;
break;
}
case "unbackup":
{
if(!confirm("Вы уверены в том, что хотите восстановить сервер?")) return;
break;
}
case "delete_backup":
{
if(!confirm("Вы уверены в том, что хотите удалить BackUP сервера?")) return;
break;
}
case "delete":
{
if(!confirm("Вы уверенны в том, что хотите удалить сервер gs<?echo $server['server_id']?>?")) return;
break;
}
case "block":
{
if(!confirm("Вы уверенны в том, что хотите заблокировать сервер gs<?echo $server['server_id']?>?")) return;
break;
}
case "unblock":
{
if(!confirm("Вы уверенны в том, что хотите разблокировать сервер gs<?echo $server['server_id']?>?")) return;
break;
}
}
$.ajax({
url: '/admin/servers/control/actionserver/'+serverid+'/'+actionserver,
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1500);
break;
}
},
beforeSend: function(arr, options) {
toastr.warning("Ваш запрос обрабатывается, пожалуйста, подождите...");
}
});
}
</script>
<script>
function sendAction(serverid, mysqlhostin) {
$.ajax({
url: '/admin/servers/control/mysqlhostin/'+serverid+'/'+mysqlhostin,
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1500);
break;
}
},
beforeSend: function(arr, options) {
toastr.warning("Ваш запрос обрабатывается, пожалуйста, подождите...");
}
});
}
</script>
<?php echo $footer ?>
@@ -0,0 +1,103 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<?php foreach($servers as $item): ?>
<div class="col-lg-6 mb-10">
<div class="card card-custom wave mb-2 bg-light-<?php if($item['server_status'] == 0): ?>warning
<?php elseif($item['server_status'] == 1): ?>danger
<?php elseif($item['server_status'] == 2): ?>success
<?php elseif($item['server_status'] == 3): ?>primary
<?php elseif($item['server_status'] == 4 || $item['server_status'] == 5 || $item['server_status'] == 6 || $item['server_status'] == 7): ?>info
<?php endif; ?>">
<div class="card-body">
<div class="d-flex align-items-center justify-content-between p-4 flex-lg-wrap flex-xl-nowrap">
<div class="d-flex flex-column mr-5">
<a href="/admin/servers/control/index/<?php echo $item['server_id'] ?>" class="h4 text-dark text-hover-primary mb-5"><?php echo $item['location_ip2'] ?>:<?php echo $item['server_port'] ?><small class="text-muted font-size-sm ml-2">ID <?php echo $item['server_id'] ?></small></a>
<p class="text-dark-50"><?php echo $item['game_name'] ?></p>
</div>
<div class="ml-6 ml-lg-0 ml-xxl-6 flex-shrink-0">
<?php if($item['server_status'] == 1): ?>
<a href="javascript:;" onClick="actionserver(<?php echo $item['server_id'] ?>,'start')" class="btn btn-icon btn-success" data-toggle="tooltip" title="Запустить">
<i class="fa fa-power-off"></i>
</a>
<a href="javascript:;" class="btn btn-icon btn-light" data-toggle="tooltip" title="Сервер должен быть включен!">
<i class="fa fa-redo"></i>
</a>
<?php elseif($item['server_status'] == 2): ?>
<a href="javascript:;" onClick="actionserver(<?php echo $item['server_id'] ?>,'stop')" class="btn btn-icon btn-danger" data-toggle="tooltip" title="Остановить">
<i class="fa fa-power-off"></i>
</a>
<a href="javascript:;" onClick="actionserver(<?php echo $item['server_id'] ?>,'restart')" class="btn btn-icon btn-info" data-toggle="tooltip" title="Перезапустить">
<i class="fa fa-redo"></i>
</a>
<?php elseif($item['server_status'] == 0 || $item['server_status'] == 3 || $item['server_status'] == 4 || $item['server_status'] == 5 || $item['server_status'] == 6 || $item['server_status'] == 7): ?>
<a href="javascript:;" class="btn btn-icon btn-light" data-toggle="tooltip" title="Вы не можете использовать это действие!">
<i class="fa fa-power-off"></i>
</a>
<a href="javascript:;" class="btn btn-icon btn-light" data-toggle="tooltip" title="Вы не можете использовать это действие!">
<i class="fa fa-redo"></i>
</a>
<?php endif; ?>
<a href="/admin/servers/control/index/<?php echo $item['server_id'] ?>" class="btn btn-icon btn-primary" data-toggle="tooltip" title="Перейти">
<i class="fa fa-sign-in-alt"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?php if(empty($servers)): ?>
<div class="col-xl-12 col-xxl-12">
<div class="alert alert-custom alert-light-primary fade show mb-4" role="alert">
<div class="alert-icon">
<i class="flaticon-exclamation"></i>
</div>
<div class="alert-text">На данный момент нет игровых серверов.</div>
<div class="alert-close">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">
<i class="ki ki-close"></i>
</span>
</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php echo $pagination ?>
</div>
</div>
</div>
<script>
function actionserver(serverid, actionserver) {
$.ajax({
url: '/admin/servers/control/actionserver/'+serverid+'/'+actionserver,
dataType: 'text',
success: function(data) {
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1500);
break;
}
},
beforeSend: function(arr, options) {
toastr.warning("Ваш запрос обрабатывается, пожалуйста, подождите...");
}
});
}
</script>
<?php echo $footer ?>
+450
View File
@@ -0,0 +1,450 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header card-header-tabs-line nav-tabs-line-3x">
<div class="card-toolbar">
<ul class="nav nav-tabs nav-bold nav-tabs-line nav-tabs-line-3x">
<li class="nav-item mr-3">
<a class="nav-link active" data-toggle="tab" href="#setting">
<span class="nav-icon">
<i class="fas fa-cog"></i>
</span>
<span class="nav-text font-size-lg">Общие настройки</span>
</a>
</li>
<li class="nav-item mr-3">
<a class="nav-link" data-toggle="tab" href="#pay">
<span class="nav-icon">
<i class="fas fa-store"></i>
</span>
<span class="nav-text font-size-lg">Платежные системы</span>
</a>
</li>
<li class="nav-item mr-3">
<a class="nav-link" data-toggle="tab" href="#hostinpl">
<span class="nav-icon">
<i class="fas fa-cogs"></i>
</span>
<span class="nav-text font-size-lg">Прочие настройки</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#info">
<span class="nav-icon">
<i class="fas fa-info-circle"></i>
</span>
<span class="nav-text font-size-lg">Информация и бонусы</span>
</a>
</li>
</ul>
</div>
</div>
<div class="card-body">
<form class="form-group form-md-line-input" id="settings" method="post" action="" novalidate="novalidate">
<div class="tab-content mt-5">
<div class="tab-pane fade show active" id="setting" role="tabpanel">
<div class="form-group">
<label>URL сайта <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="url" name="url" placeholder="Введите URL сайта" value="<?php echo $settings['url'] ?>">
</div>
<div class="form-group">
<label>Название сайта <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="title" name="title" placeholder="Введите название сайта" value="<?php echo $settings['title'] ?>">
</div>
<div class="form-group">
<label>Описание сайта <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="description" name="description" placeholder="Введите описание сайта" value="<?php echo $settings['description'] ?>">
</div>
<div class="form-group">
<label>Ключевые слова <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="keywords" name="keywords" placeholder="Введите ключевые слова" value="<?php echo $settings['keywords'] ?>">
</div>
<div class="form-group">
<label>Имя отправителя <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="mail_sender" name="mail_sender" placeholder="Введите имя отправителя" value="<?php echo $settings['mail_sender'] ?>">
</div>
<div class="form-group">
<label>E-mail Службы поддержки <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="mail_from" name="mail_from" placeholder="Введите E-mail Службы поддержки" value="<?php echo $settings['mail_from'] ?>">
</div>
<div class="form-group">
<label>ID Вашей группы ВКонтакте</label>
<input type="text" class="form-control" id="public" name="public" placeholder="Введите ID Вашей группы ВКонтакте" value="<?php echo $settings['public'] ?>">
</div>
<div class="form-group">
<label>Cсылка на ваш логотип</label>
<input type="text" class="form-control" id="logo" name="logo" placeholder="Введите ссылку на ваш логотип" value="<?php echo $settings['logo'] ?>">
</div>
<div class="form-group">
<label>Статистика хостинга</label>
<select class="form-control" id="status_hostinpl" name="status_hostinpl">
<option value="0"<?php if($settings['status_hostinpl'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
<option value="1"<?php if($settings['status_hostinpl'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
</select>
</div>
<div class="form-group">
<label>Веб.хостинг</label>
<select class="form-control" id="webhost" name="webhost">
<option value="0"<?php if($settings['webhost'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1"<?php if($settings['webhost'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
</div>
</div>
<div class="tab-pane fade" id="pay" role="tabpanel">
<div class="form-group">
<label>Модуль быстрой оплаты</label>
<select class="form-control" id="oplata_status" name="oplata_status">
<option value="1"<?php if($settings['oplata_status'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
<option value="0"<?php if($settings['oplata_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
</select>
</div>
<div class="form-group">
<label>Платежная система быстрой оплаты</label>
<select class="form-control" id="oplatahostinpl" name="oplatahostinpl">
<option value="freepay"<?php if($settings['oplatahostinpl'] == "freepay"): ?> selected="selected"<?php endif; ?>>Free-kassa</option>
<option value="robopay"<?php if($settings['oplatahostinpl'] == "robopay"): ?> selected="selected"<?php endif; ?>>Robokassa</option>
<option value="litepay"<?php if($settings['oplatahostinpl'] == "litepay"): ?> selected="selected"<?php endif; ?>>Litekassa</option>
<option value="enotpay"<?php if($settings['oplatahostinpl'] == "enotpay"): ?> selected="selected"<?php endif; ?>>Enot</option>
<option value="anypay"<?php if($settings['oplatahostinpl'] == "anypay"): ?> selected="selected"<?php endif; ?>>Anypay</option>
<option value="interpay"<?php if($settings['oplatahostinpl'] == "interpay"): ?> selected="selected"<?php endif; ?>>Interpay</option>
<option value="unitpay"<?php if($settings['oplatahostinpl'] == "unitpay"): ?> selected="selected"<?php endif; ?>>Unitpay</option>
<option value="yandexkassa"<?php if($settings['oplatahostinpl'] == "yandexkassa"): ?> selected="selected"<?php endif; ?>>Яндекс деньги</option>
<option value="qiwi"<?php if($settings['oplatahostinpl'] == "qiwi"): ?> selected="selected"<?php endif; ?>>Qiwi</option>
</select>
</div>
<hr>
<div class="form-group">
<label>Платежная система: Freekassa</label>
<select class="form-control" id="freekassa" name="freekassa">
<option value="1"<?php if($settings['freekassa'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($settings['freekassa'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Robokassa</label>
<select class="form-control" id="robokassa" name="robokassa">
<option value="1"<?php if($settings['robokassa'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($settings['robokassa'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Litekassa</label>
<select class="form-control" id="litekassa" name="litekassa">
<option value="1"<?php if($settings['litekassa'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($settings['litekassa'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Enot</label>
<select class="form-control" id="enotpay" name="enotpay">
<option value="1"<?php if($settings['enotpay'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($settings['enotpay'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Anypay</label>
<select class="form-control" id="anypay" name="anypay">
<option value="1"<?php if($settings['anypay'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($settings['anypay'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Unitpay</label>
<select class="form-control" id="unitpay" name="unitpay">
<option value="0"<?php if($settings['unitpay'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
<option value="1"<?php if($settings['unitpay'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Interkassa</label>
<select class="form-control" id="interkassa" name="interkassa">
<option value="0"<?php if($settings['interkassa'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
<option value="1"<?php if($settings['interkassa'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Yandex</label>
<select class="form-control" id="yandexkassa" name="yandexkassa">
<option value="0"<?php if($settings['yandexkassa'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
<option value="1"<?php if($settings['yandexkassa'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
</select>
</div>
<div class="form-group">
<label>Платежная система: Qiwi</label>
<select class="form-control" id="qiwi" name="qiwi">
<option value="1"<?php if($settings['qiwi'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($settings['qiwi'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<hr>
<label>Платежная система: Free-Kassa</label>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="fk_login" name="fk_login" placeholder="Введите ID" value="<?php echo $settings['fk_login'] ?>">
<span class="form-text text-muted">Freekassa ID</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="fk_password1" name="fk_password1" placeholder="Введите секретный ключ №1" value="<?php echo $settings['fk_password1'] ?>">
<span class="form-text text-muted">Freekassa Key 1</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="fk_password2" name="fk_password2" placeholder="Введите секретный ключ №2" value="<?php echo $settings['fk_password2'] ?>">
<span class="form-text text-muted">Freekassa Key 2</span>
</div>
<hr>
<label>Платежная система: Robokassa</label>
<div class="form-group">
<input type="text" class="form-control" id="rk_login" name="rk_login" placeholder="Введите ID" value="<?php echo $settings['rk_login'] ?>">
<span class="form-text text-muted">Robokassa ID</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="rk_password1" name="rk_password1" placeholder="Введите секретный ключ №1" value="<?php echo $settings['rk_password1'] ?>">
<span class="form-text text-muted">Robokassa Key 1</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="rk_password2" name="rk_password2" placeholder="Введите секретный ключ №2" value="<?php echo $settings['rk_password2'] ?>">
<span class="form-text text-muted">Robokassa Key 2</span>
</div>
<hr>
<label>Платежная система: Litekassa</label>
<div class="form-group">
<input type="text" class="form-control" id="lk_login" name="lk_login" placeholder="Введите ID" value="<?php echo $settings['lk_login'] ?>">
<span class="form-text text-muted">Litekassa ID</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="lk_password" name="lk_password" placeholder="Введите секретный ключ" value="<?php echo $settings['lk_password'] ?>">
<span class="form-text text-muted">Litekassa Key</span>
</div>
<hr>
<label>Платежная система: Enot</label>
<div class="form-group">
<input type="text" class="form-control" id="enot_login" name="enot_login" placeholder="Введите ID" value="<?php echo $settings['enot_login'] ?>">
<span class="form-text text-muted">Enot ID</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="enot_password1" name="enot_password1" placeholder="Введите секретный ключ №1" value="<?php echo $settings['enot_password1'] ?>">
<span class="form-text text-muted">Секретный пароль</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="enot_password2" name="enot_password2" placeholder="Введите секретный ключ №2" value="<?php echo $settings['enot_password2'] ?>">
<span class="form-text text-muted">Дополнительный ключ</span>
</div>
<hr>
<label>Платежная система: Anypay</label>
<div class="form-group">
<input type="text" class="form-control" id="anypay_login" name="anypay_login" placeholder="Введите ID" value="<?php echo $settings['anypay_login'] ?>">
<span class="form-text text-muted">ID проекта</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="anypay_password" name="anypay_password" placeholder="Введите секретный ключ" value="<?php echo $settings['anypay_password'] ?>">
<span class="form-text text-muted">Секретный ключ</span>
</div>
<hr>
<label>Платежная система: Unitpay</label>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="unitpay_url" name="unitpay_url" placeholder="Введите URL" value="<?php echo $settings['unitpay_url'] ?>">
<span class="form-text text-muted">Unitpay URL</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="unitpay_secret" name="unitpay_secret" placeholder="Введите секретный ключ" value="<?php echo $settings['unitpay_secret'] ?>">
<span class="form-text text-muted">Unitpay секретный ключ</span>
</div>
<hr>
<label>Платежная система: Interkassa</label>
<div class="form-group">
<input type="text" class="form-control" id="ik_shopid" name="ik_shopid" placeholder="Введите ID" value="<?php echo $settings['ik_shopid'] ?>">
<span class="form-text text-muted">Interkassa ID (ik_shopid)</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="ik_secretkey" name="ik_secretkey" placeholder="Введите секретный ключ" value="<?php echo $settings['ik_secretkey'] ?>">
<span class="form-text text-muted">Interkassa Key (ik_secretkey)</span>
</div>
<hr>
<label>Платежная система: Yandex</label>
<div class="form-group">
<input type="text" class="form-control" id="yk_login" name="yk_login" placeholder="Введите login" value="<?php echo $settings['yk_login'] ?>">
<span class="form-text text-muted">Номер счета</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="yk_password1" name="yk_password1" placeholder="Введите pass" value="<?php echo $settings['yk_password1'] ?>">
<span class="form-text text-muted">Токен</span>
</div>
<hr>
<label>Платежная система: Qiwi</label>
<div class="form-group">
<input type="text" class="form-control" id="qiwipublickey" name="qiwipublickey" placeholder="Введите публичный ключ" value="<?php echo $settings['qiwipublickey'] ?>">
<span class="form-text text-muted">Публичный ключ</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="qiwisecretkey" name="qiwisecretkey" placeholder="Введите секретный ключ" value="<?php echo $settings['qiwisecretkey'] ?>">
<span class="form-text text-muted">Секретный ключ</span>
</div>
<div class="form-group">
<label>Настройки формы Qiwi</label>
<select class="form-control" id="qiwi_theme" name="qiwi_theme">
<option value="1"<?php if($settings['qiwi_theme'] == 1): ?> selected="selected"<?php endif; ?>>Включены</option>
<option value="0"<?php if($settings['qiwi_theme'] == 0): ?> selected="selected"<?php endif; ?>>Выключены</option>
</select>
</div>
<div class="form-group">
<input type="text" class="form-control" id="qiwi_themecode" name="qiwi_themecode" placeholder="Введите код темы (themeCode)" value="<?php echo $settings['qiwi_themecode'] ?>">
<span class="form-text text-muted">Код темы (themeCode)</span>
</div>
</div>
<div class="tab-pane fade" id="hostinpl" role="tabpanel">
<div class="form-group">
<label>Тестовый период</label>
<select class="form-control" id="serv_test" name="serv_test">
<option value="0"<?php if($settings['serv_test'] == 0): ?> selected="selected"<?php endif; ?>>Заказ запрещен</option>
<option value="1"<?php if($settings['serv_test'] == 1): ?> selected="selected"<?php endif; ?>>Заказ разрешен (по одобрению)</option>
</select>
</div>
<div class="form-group">
<label>Подтверждение E-mail</label>
<select class="form-control" id="register" name="register">
<option value="0"<?php if($settings['register'] == 0): ?> selected="selected"<?php endif; ?>>Включен</option>
<option value="1"<?php if($settings['register'] == 1): ?> selected="selected"<?php endif; ?>>Выключен</option>
</select>
</div>
<hr>
<label>Защита от ботов (reCAPTCHA v2)</label>
<div class="form-group">
<select class="form-control" id="captcha_enable" name="captcha_enable">
<option value="0"<?php if($settings['captcha_enable'] == 0): ?> selected="selected"<?php endif; ?>>Выключена (капчи нет на сайте)</option>
<option value="1"<?php if($settings['captcha_enable'] == 1): ?> selected="selected"<?php endif; ?>>Включена (нужны ключи ниже)</option>
</select>
<span class="form-text text-muted">Капча при входе, регистрации, восстановлении пароля и в тикетах. Включайте только после того, как вписали оба ключа.</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="recaptcha" name="recaptcha" placeholder="Site key" value="<?php echo $settings['recaptcha'] ?>">
<span class="form-text text-muted">Site key (публичный ключ) — из панели google.com/recaptcha, тип reCAPTCHA v2 «Я не робот»</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="secret_recaptcha" name="secret_recaptcha" placeholder="Secret key" value="<?php echo $settings['secret_recaptcha'] ?>">
<span class="form-text text-muted">Secret key (секретный ключ) того же сайта</span>
</div>
<hr>
<label>Тех.работы</label>
<div class="form-group">
<select class="form-control" id="offline" name="offline">
<option value="0"<?php if($settings['offline'] == 0): ?> selected="selected"<?php endif; ?>>Хостинг доступен</option>
<option value="1"<?php if($settings['offline'] == 1): ?> selected="selected"<?php endif; ?>>Хостинг закрыт на тех.работы</option>
</select>
<span class="form-text text-muted">Статус тех.работ</span>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="offline_res" name="offline_res" placeholder="Введите сообщение тех.работ" value="<?php echo $settings['offline_res'] ?>">
<span class="form-text text-muted">Сообщение тех.работ</span>
</div>
<hr>
<label>Авторизация VK</label>
<div class="form-group">
<input type="text" class="form-control" id="vk_id" name="vk_id" placeholder="Введите ID приложения" value="<?php echo $settings['vk_id'] ?>">
<span class="form-text text-muted">ID приложения</span>
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="vk_stat" name="vk_stat">
<option value="0"<?php if($settings['vk_stat'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1"<?php if($settings['vk_stat'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
<span class="form-text text-muted">Статус авторизаци</span>
</div>
<hr>
<label>VK BOT</label>
<div class="form-group">
<select class="form-control" id="VK_bot" name="VK_bot">
<option value="0"<?php if($settings['VK_bot'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
<option value="1"<?php if($settings['VK_bot'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
</select>
<span class="form-text text-muted">Статус бота</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="VK_confirmationToken" name="VK_confirmationToken" placeholder="ConfirmationToken" value="<?php echo $settings['VK_confirmationToken'] ?>">
<span class="form-text text-muted">ConfirmationToken</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="VK_token" name="VK_token" placeholder="Введите Token" value="<?php echo $settings['VK_token'] ?>">
<span class="form-text text-muted">Token</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="VK_secretKey" name="VK_secretKey" placeholder="Введите секретный ключ" value="<?php echo $settings['VK_secretKey'] ?>">
<span class="form-text text-muted">Секретный ключ</span>
</div>
<hr>
<div class="form-group form-md-line-input">
<label>Стоимость смены порта</label>
<input type="text" class="form-control" id="portPrice" name="portPrice" placeholder="Введите стоимость смены порта" value="<?php echo $settings['portPrice'] ?>">
</div>
</div>
<div class="tab-pane fade" id="info" role="tabpanel">
<div class="form-group">
<label>Конвертация бонусов</label>
<input type="text" class="form-control" id="bonus1" name="bonus1" placeholder="Введите сумму" value="<?php echo $settings['bonus1'] ?>">
<span class="form-text text-muted">Bonus 1</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="bonus2" name="bonus2" placeholder="Введите сумму" value="<?php echo $settings['bonus2'] ?>">
<span class="form-text text-muted">Bonus 2</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="bonus3" name="bonus3" placeholder="Введите сумму" value="<?php echo $settings['bonus3'] ?>">
<span class="form-text text-muted">Bonus 3</span>
</div>
<div class="form-group">
<input type="text" class="form-control" id="bonus4" name="bonus4" placeholder="Введите сумму" value="<?php echo $settings['bonus4'] ?>">
<span class="form-text text-muted">Bonus 4</span>
</div>
<hr>
<div class="form-group">
<label class="form-control-label">Процент реферальной системы (за заказ услуг)</label>
<input type="text" class="form-control" id="ref_percent" name="ref_percent" placeholder="Введите процент" value="<?php echo $settings['ref_percent'] ?>">
</div>
<div class="form-group">
<label class="form-control-label">Процент бонусов за пополнение</label>
<input type="text" class="form-control" id="bonus_percent" name="bonus_percent" placeholder="Введите процент" value="<?php echo $settings['bonus_percent'] ?>">
</div>
<hr>
<div class="form-group form-md-line-input">
<label class="form-control-label">Контактый номер</label>
<input type="text" class="form-control" id="phone" name="phone" placeholder="Введите номер" value="<?php echo $settings['phone'] ?>">
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary btn-lg btn-block">Применить настройки</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#settings').ajaxForm({
url: '/admin/settings/ajax',
dataType: 'text',
success: function(data) {
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/settings/index')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,305 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko (https://vk.com/id00v)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-lg-6">
<div class="card card-custom gutter-b">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Пополнение счета</h3>
</div>
</div>
<div class="card-body">
<div id="invoices"></div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card card-custom gutter-b">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Регистраций</h3>
</div>
</div>
<div class="card-body">
<div id="registers"></div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card card-custom gutter-b">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Общее количевство игроков</h3>
</div>
</div>
<div class="card-body">
<div id="players"></div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card card-custom gutter-b">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Общая нагрузка на железо</h3>
</div>
</div>
<div class="card-body">
<div id="loads"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
<script>
<?php echo $charts; ?>
const primary = '#6993FF';
const success = '#1BC5BD';
const info = '#8950FC';
const warning = '#FFA800';
const danger = '#F64E60';
var ApexChartsStats = function () {
var players_chart = function () {
const apexChart = "#players";
var options = {
chart: {
height: 350,
type: 'area',
defaultLocale: 'en',
locales: [{
name: 'en',
options: {
months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
shortMonths: ['Янв.', 'Фев.', 'Март.', 'Апр.', 'Май.', 'Июнь.', 'Июль.', 'Авг.', 'Сент.', 'Окт.', 'Ноя.', 'Дек.'],
days: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
shortDays: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
toolbar: {
exportToPNG: 'Скачать PNG',
exportToCSV: 'Скачать CSV',
exportToSVG: 'Скачать SVG',
selection: 'Выбор',
selectionZoom: 'Выбор Zoom',
zoomIn: 'Увеличить',
zoomOut: 'Уменьшить',
pan: 'Панорамирование',
reset: 'Сброс Масштаба',
}
}
}]
},
dataLabels: {
enabled: false
},
series: [{
name: 'Количевство игроков',
data: players
}],
xaxis: {
type: 'datetime'
},
tooltip: {
x: {
format: 'dd.MM.yy в HH:mm'
},
},
colors: [primary]
};
var chart = new ApexCharts(document.querySelector(apexChart), options);
chart.render();
}
var registers_chart = function () {
const apexChart = "#registers";
var options = {
series: [{
name: 'Количевство регистраций',
data: registers
}],
chart: {
height: 350,
type: 'area',
defaultLocale: 'en',
locales: [{
name: 'en',
options: {
months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
shortMonths: ['Янв.', 'Фев.', 'Март.', 'Апр.', 'Май.', 'Июнь.', 'Июль.', 'Авг.', 'Сент.', 'Окт.', 'Ноя.', 'Дек.'],
days: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
shortDays: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
toolbar: {
exportToPNG: 'Скачать PNG',
exportToCSV: 'Скачать CSV',
exportToSVG: 'Скачать SVG',
selection: 'Выбор',
selectionZoom: 'Выбор Zoom',
zoomIn: 'Увеличить',
zoomOut: 'Уменьшить',
pan: 'Панорамирование',
reset: 'Сброс Масштаба',
}
}
}]
},
dataLabels: {
enabled: false
},
stroke: {
curve: 'smooth'
},
xaxis: {
type: 'datetime'
},
tooltip: {
x: {
format: 'dd.MM.yy в HH:mm'
},
},
colors: [primary]
};
var chart = new ApexCharts(document.querySelector(apexChart), options);
chart.render();
}
var invoices_chart = function () {
const apexChart = "#invoices";
var options = {
series: [{
name: 'Прибыль (руб)',
data: invoices
}],
chart: {
height: 350,
type: 'area',
defaultLocale: 'en',
locales: [{
name: 'en',
options: {
months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
shortMonths: ['Янв.', 'Фев.', 'Март.', 'Апр.', 'Май.', 'Июнь.', 'Июль.', 'Авг.', 'Сент.', 'Окт.', 'Ноя.', 'Дек.'],
days: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
shortDays: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
toolbar: {
exportToPNG: 'Скачать PNG',
exportToCSV: 'Скачать CSV',
exportToSVG: 'Скачать SVG',
selection: 'Выбор',
selectionZoom: 'Выбор Zoom',
zoomIn: 'Увеличить',
zoomOut: 'Уменьшить',
pan: 'Панорамирование',
reset: 'Сброс Масштаба',
}
}
}]
},
dataLabels: {
enabled: false
},
stroke: {
curve: 'smooth'
},
xaxis: {
type: 'datetime'
},
tooltip: {
x: {
format: 'dd.MM.yy в HH:mm'
},
},
colors: [primary]
};
var chart = new ApexCharts(document.querySelector(apexChart), options);
chart.render();
}
var loads_chart = function () {
const apexChart = "#loads";
var options = {
series: [{
name: 'CPU (%)',
data: loads1
}, {
name: 'RAM (%)',
data: loads3
}, {
name: 'SSD (%)',
data: loads2
}],
chart: {
height: 350,
type: 'area',
defaultLocale: 'en',
locales: [{
name: 'en',
options: {
months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
shortMonths: ['Янв.', 'Фев.', 'Март.', 'Апр.', 'Май.', 'Июнь.', 'Июль.', 'Авг.', 'Сент.', 'Окт.', 'Ноя.', 'Дек.'],
days: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
shortDays: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
toolbar: {
exportToPNG: 'Скачать PNG',
exportToCSV: 'Скачать CSV',
exportToSVG: 'Скачать SVG',
selection: 'Выбор',
selectionZoom: 'Выбор Zoom',
zoomIn: 'Увеличить',
zoomOut: 'Уменьшить',
pan: 'Панорамирование',
reset: 'Сброс Масштаба',
}
}
}]
},
dataLabels: {
enabled: false
},
stroke: {
curve: 'smooth'
},
xaxis: {
type: 'datetime'
},
tooltip: {
x: {
format: 'dd.MM.yy в HH:mm'
},
},
colors: [primary, success, danger]
};
var chart = new ApexCharts(document.querySelector(apexChart), options);
chart.render();
}
return {
init: function () {
players_chart();
loads_chart();
registers_chart();
invoices_chart();
}
};
}();
jQuery(document).ready(function () {
ApexChartsStats.init();
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,102 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4 col-xxl-4 mb-4">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<div class="px-4 mt-4 mb-10">
<a href="/admin/tickets/create" class="btn btn-block btn-primary font-weight-bold text-uppercase py-4 px-6 text-center">Написать клиенту</a>
</div>
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<div class="navi-item my-2">
<a href="/admin/tickets/index?status=1" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-user-clock icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Новые запросы</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/tickets" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-headset icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все запросы</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="/admin/ticketcategory" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-list-alt icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все категории</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/ticketcategory/create" class="navi-link active">
<span class="navi-icon mr-4">
<i class="fa fa-plus icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Создать категорию</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-xxl-8">
<div class="card card-custom">
<div class="card-body">
<form class="form-group form-md-line-input" action="#" id="createForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название" value="<?php echo $category['category_name'] ?>">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="0">Выключена</option>
<option value="1">Включена</option>
</select>
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/ticketcategory/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/ticketcategory')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,105 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4 col-xxl-4 mb-4">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<div class="px-4 mt-4 mb-10">
<a href="/admin/tickets/create" class="btn btn-block btn-primary font-weight-bold text-uppercase py-4 px-6 text-center">Написать клиенту</a>
</div>
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<div class="navi-item my-2">
<a href="/admin/tickets/index?status=1" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-user-clock icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Новые запросы</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/tickets" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-headset icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все запросы</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="/admin/ticketcategory" class="navi-link active">
<span class="navi-icon mr-4">
<i class="fa fa-list-alt icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все категории</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/ticketcategory/create" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-plus icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Создать категорию</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-xxl-8">
<div class="card card-custom">
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название" value="<?php echo $category['category_name'] ?>">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="0"<?php if($category['category_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
<option value="1"<?php if($category['category_status'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/ticketcategory/edit/delete/<?php echo $category['category_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/ticketcategory/edit/ajax/<?php echo $category['category_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/ticketcategory')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,98 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4 col-xxl-4 mb-4">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<div class="px-4 mt-4 mb-10">
<a href="/admin/tickets/create" class="btn btn-block btn-primary font-weight-bold text-uppercase py-4 px-6 text-center">Написать клиенту</a>
</div>
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<div class="navi-item my-2">
<a href="/admin/tickets/index?status=1" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-user-clock icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Новые запросы</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/tickets" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-headset icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все запросы</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="/admin/ticketcategory" class="navi-link active">
<span class="navi-icon mr-4">
<i class="fa fa-list-alt icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все категории</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/ticketcategory/create" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-plus icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Создать категорию</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-xxl-8">
<div class="card card-custom">
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Название</th>
<th>Статус</th>
</tr>
</thead>
<tbody>
<?php foreach($category as $item): ?>
<tr onClick="redirect('/admin/ticketcategory/edit/index/<?php echo $item['category_id'] ?>')">
<th><?php echo $item['category_id'] ?></th>
<td><?php echo $item['category_name'] ?></td>
<td>
<?php if($item['category_status'] == 0): ?>
<span class="badge badge-danger">Выключена</span>
<?php elseif($item['category_status'] == 1): ?>
<span class="badge badge-success">Включена</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
<?php if(empty($category)): ?>
<tr>
<td colspan="4" class="text-center">На данный момент нет категорий.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,99 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4 col-xxl-4 mb-4">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<div class="navi-item my-2">
<a href="/admin/tickets/index?status=1" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-user-clock icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Новые запросы</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/tickets" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-headset icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все запросы</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="/admin/ticketcategory" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-list-alt icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все категории</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/ticketcategory/create" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-plus icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Создать категорию</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-xxl-8">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<form method="POST" id="createForm" style="padding:0px; margin:0px;">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="name" name="name" placeholder="Введите тему обращения">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="pid" name="pid" placeholder="Введите ID клиента">
</div>
<div class="form-group form-md-line-input">
<textarea class="form-control" id="text" name="text" rows="3" placeholder="Сообщение..."></textarea>
</div>
<hr>
<button type="submit" class="btn btn-primary btn-lg btn-block">Отправить</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/tickets/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/tickets/view/index/" + data.id + "')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,99 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4 col-xxl-4 mb-4">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<div class="px-4 mt-4 mb-10">
<a href="/admin/tickets/create" class="btn btn-block btn-primary font-weight-bold text-uppercase py-4 px-6 text-center">Написать клиенту</a>
</div>
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<div class="navi-item my-2">
<a href="/admin/tickets/index?status=1" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-user-clock icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Новые запросы</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/tickets" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-headset icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все запросы</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="/admin/ticketcategory" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-list-alt icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все категории</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/ticketcategory/create" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-plus icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Создать категорию</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-xxl-8">
<?php foreach($tickets as $item): ?>
<div class="card card-custom mb-4">
<div class="card-header border-0" style="min-height: 0;padding-top: 0.5rem;padding-bottom: 0.5rem;">
<h3 class="card-title"><span class="card-icon">
<?php if($item['ticket_status'] == 0): ?>
<i class="fa fa-user-lock text-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Вопрос закрыт"></i>
<?php elseif($item['ticket_status'] == 1): ?>
<i class="fa fa-user-clock text-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Ожидает ответа"></i>
<?php elseif($item['ticket_status'] == 2): ?>
<i class="fa fa-user text-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Ответ от администрации"></i>
<?php endif; ?>
</span><?php echo $item['ticket_name'] ?><small class="text-muted font-size-sm ml-2"><?php echo date("d.m.Y в H:i", strtotime($item['ticket_date_add'])) ?></small>
</h3>
<div class="card-toolbar">
<a href="/admin/tickets/view/index/<?php echo $item['ticket_id'] ?>" class="btn btn-icon btn-primary mr-2" style="height: 24px;" data-toggle="tooltip" data-placement="right" title="" data-original-title="Перейти" >
<i class="fa fa-sign-in-alt"></i>
</a>
</div>
</div>
</div>
<?php endforeach; ?>
<?php if(empty($tickets)): ?>
<div class="alert alert-custom alert-light-primary fade show mb-4" role="alert">
<div class="alert-icon">
<i class="flaticon-exclamation"></i>
</div>
<div class="alert-text">На данный момент в тех.поддержку нет запросов.</div>
<div class="alert-close">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">
<i class="ki ki-close"></i>
</span>
</button>
</div>
</div>
<?php endif; ?>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,267 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4 col-xxl-4 mb-4 ">
<div class="card card-custom card-sticky">
<div class="card-body px-5">
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<div class="navi-item my-2">
<a href="/admin/tickets/index?status=1" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-user-clock icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Новые запросы</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/tickets" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-headset icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все запросы</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="/admin/ticketcategory" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-list-alt icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Все категории</span>
</a>
</div>
<div class="navi-item my-2">
<a href="/admin/ticketcategory/create" class="navi-link">
<span class="navi-icon mr-4">
<i class="fa fa-plus icon-lg"></i>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Создать категорию</span>
</a>
</div>
<hr>
<div class="navi-item my-2">
<a href="javascript:;" class="navi-link" data-toggle="tooltip" data-placement="right" title="" data-original-title="Тема запроса">
<span class="navi-icon mr-4">
<i class="flaticon-multimedia-2 icon-lg"></i>
</span>
<span class="navi-text"><?php echo $ticket['ticket_name'] ?></span>
</a>
<a href="javascript:;" class="navi-link" data-toggle="tooltip" data-placement="right" title="" data-original-title="Дата запроса">
<span class="navi-icon mr-4">
<i class="flaticon-calendar icon-lg"></i>
</span>
<span class="navi-text"><?php echo date("d.m.Y в H:i", strtotime($ticket['ticket_date_add'])) ?></span>
</a>
<a href="javascript:;" class="navi-link" data-toggle="tooltip" data-placement="right" title="" data-original-title="Статус запроса">
<span class="navi-icon mr-4">
<i class="flaticon-exclamation icon-lg"></i>
</span>
<span class="navi-text"><?php if($ticket['ticket_status'] == 0): ?>
Запрос закрыт
<?php elseif($ticket['ticket_status'] == 1): ?>
Запрос открыт
<?php elseif($ticket['ticket_status'] == 2): ?>
Получен ответ
<?php endif; ?></span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-xxl-8">
<form id="sendForm" action="" method="POST">
<div class="card card-custom card-sticky">
<div class="card-header align-items-center px-4 py-3">
<div class="text-left flex-grow-1">
<div class="dropdown dropdown-inline">
<button type="button" class="btn btn-clean btn-sm btn-icon btn-icon-md" data-toggle="tooltip" data-placement="right" title="" data-original-title="Запрос №<?php echo $ticket['ticket_id'] ?>"><i class="fas fa-info-circle"></i>
</button>
</div>
</div>
<div class="text-center flex-grow-1">
<div class="text-dark-75 font-weight-bold font-size-h5">Тех.поддержка</div>
</div>
<div class="text-right flex-grow-1">
<?php if($ticket['ticket_status'] != 0): ?>
<button type="button" onClick="sendAction(<?php echo $ticket['ticket_id'] ?>,'closed')" class="btn btn-clean btn-sm btn-icon btn-icon-md" data-toggle="tooltip" data-placement="right" title="" data-original-title="Закрыть запрос">
<i class="fa fa-lock"></i>
</button>
<?elseif($ticket['ticket_status'] == 0):?>
<button type="button" class="btn btn-clean btn-sm btn-icon btn-icon-md disabled" data-toggle="tooltip" data-placement="right" title="" data-original-title="Запрос закрыт">
<i class="fa fa-lock"></i>
</button>
<?endif;?>
</div>
</div>
<div class="card-body">
<div class="scroll scroll-pull" id="scroll" data-scroll="true" style="height: 350px; overflow: auto;" data-mobile-height="300">
<div class="messages" id="messagess">
<div class="alert alert-primary" role="alert">Получаю сообщения...</div>
</div>
</div>
</div>
<div class="card-footer align-items-center">
<?php if($ticket['ticket_status'] != 0): ?>
<input type="text" class="form-control" type="text" id="text" name="text" placeholder="Напишите сообщение...">
<?elseif($ticket['ticket_status'] == 0):?>
<input type="text" class="form-control" type="text" id="text" name="text" placeholder="Запрос закрыт..." disabled>
<?endif;?>
<div class="d-flex align-items-center justify-content-between mt-5">
<div class="mr-3">
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
<div class="form-group" style="margin-bottom: 0rem;">
<div class="checkbox-list">
<label class="checkbox">
<input type="checkbox" checked id="autoscroll">
<span></span>Автообновление</label></span>
</div>
</div>
</div>
</div>
<div>
<button type="button" class="btn btn-primary btn-icon" data-toggle="modal" data-target="#image"><i class="flaticon2-photo-camera"></i></button>
<button class="btn btn-primary btn-icon" type="submit"><i class="flaticon2-paper-plane"></i></button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="image" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Импорт изображения</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i aria-hidden="true" class="ki ki-close"></i>
</button>
</div>
<div class="modal-body">
<form id="imgForm" method="POST" action="" style="padding:0px; margin:0px;">
<div class="alert alert-primary mb-5 p-5" role="alert">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-camera text-primary"></i>
</span>
</div>
<input class="form-control" id="file" name="userfile" type="file">
<div class="input-group-append">
<button type="submit" class="btn btn-light-primary btn-icon"><i class="fa fa-download"></i></button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
setInterval(function() {
$.ajax({
url: "/admin/tickets/view/getMessagess",
type: "POST",
data: {tid: <?=$ticket['ticket_id']?>},
success: function (data) {
if (autoscroll.checked == true) {
$("#messagess").html(data);
var scroll = document.getElementById("scroll");
scroll.scrollTop = scroll.scrollHeight;
}
}
})
}, 2000);
$('#imgForm').ajaxForm({
url: '/admin/tickets/view/uploadFile/<?php echo $ticket['ticket_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
$("#file").val("");
break;
case 'success':
toastr.success(data.success);
$('button[type=submit]').prop('disabled', false);
$('#image').modal('hide');
$("#file").val("");
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
$('#sendForm').ajaxForm({
url: '/admin/tickets/view/ajax/<?php echo $ticket['ticket_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
$('button[type=submit]').prop('disabled', false);
$('#text').val('');
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
function sendAction(ticketid, action) {
switch(action) {
case "closed":
{
if(!confirm("Вы уверенны в том, что хотите закрыть запрос?")) return;
break;
}
}
$.ajax({
url: '/admin/tickets/view/action/'+ticketid+'/'+action,
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('#controlBtns button').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1500);
break;
}
},
beforeSend: function(arr, options) {
if(action == "closed") toastr.warning("Закрываем запрос...");
$('#controlBtns button').prop('disabled', true);
}
});
}
</script>
<?php echo $footer ?>
@@ -0,0 +1,271 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-4">
<div class="card card-custom mb-3">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="flex-shrink-0 mr-4 symbol symbol-65 symbol-circle">
<img src="<?php echo $url ?><?if($user['user_img']) {echo $user['user_img'];}else{ echo '/application/public/img/user.png';}?>" alt="image">
</div>
<div class="d-flex flex-column mr-auto">
<a href="javascript:;" class="card-title text-hover-primary font-weight-bolder font-size-h5 text-dark mb-1"><?php echo $user['user_firstname'] ?> <?php echo $user['user_lastname'] ?></a>
<span class="text-muted font-weight-bold"><?php if($user['user_access_level'] == 3): ?> Администратор <?php elseif($user['user_access_level'] == 2): ?> Тех.Поддержка <?php elseif($user['user_access_level'] == 1): ?> Клиент <?php elseif($user['user_access_level'] == 0): ?> Демонстрация <?php endif; ?></span>
</div>
</div>
</div>
</div>
<div class="card card-custom">
<div class="card-body pt-4">
<div class="navi navi-bold navi-hover navi-active navi-link-rounded">
<div class="navi-item mb-2">
<a href="/admin/servers/index?userid=<?php echo $user['user_id'] ?>" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-server"></i>
</span>
<span class="navi-text font-size-lg">Сервера пользователя</span>
</a>
</div>
<div class="navi-item mb-2">
<a href="/admin/webhost/index?userid=<?php echo $user['user_id'] ?>" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-globe"></i>
</span>
<span class="navi-text font-size-lg">Web сайты пользователя</span>
</a>
</div>
<div class="navi-item mb-2">
<a href="/admin/tickets/index?userid=<?php echo $user['user_id'] ?>" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-headset"></i>
</span>
<span class="navi-text font-size-lg">Запросы пользователя</span>
</a>
</div>
<div class="navi-item mb-2">
<a href="/admin/invoices/index?userid=<?php echo $user['user_id'] ?>" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-donate"></i>
</span>
<span class="navi-text font-size-lg">Платежи пользователя</span>
</a>
</div>
<div class="navi-item mb-2">
<a href="/admin/waste/index?userid=<?php echo $user['user_id'] ?>" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-tasks"></i>
</span>
<span class="navi-text font-size-lg">Операции пользователя</span>
</a>
</div>
<div class="navi-item mb-2">
<a href="javascript:;" data-toggle="modal" data-target="#authloghostinpl" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-map-marker-alt"></i>
</span>
<span class="navi-text font-size-lg">Логи авторизации</span>
</a>
</div>
<?php if($user_access_level == 3):?>
<div class="navi-item mb-2">
<a href="javascript:;" onClick="action_user('user_del')" class="navi-link py-4">
<span class="navi-icon mr-2">
<i class="fa fa-trash-alt"></i>
</span>
<span class="navi-text font-size-lg">Удалить пользователя</span>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="col-xl-8">
<div class="card card-custom">
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="lastname" name="lastname" placeholder="<?php echo $user['user_lastname'] ?>" value="<?php echo $user['user_lastname'] ?>">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="firstname" name="firstname" placeholder="<?php echo $user['user_firstname'] ?>" value="<?php echo $user['user_firstname'] ?>">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="email" name="email" placeholder="<?php echo $user['user_email'] ?>" value="<?php echo $user['user_email'] ?>">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1" <?php if($user['user_status'] == 1): ?> selected="selected"<?php endif; ?>>Разблокирован</option>
<option value="0" <?php if($user['user_status'] == 0): ?> selected="selected"<?php endif; ?>>Заблокирован</option>
</select>
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="accesslevel" name="accesslevel" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="0" <?php if($user['user_access_level'] == 0): ?> selected="selected"<?php endif; ?>>Демонстрация</option>
<option value="1" <?php if($user['user_access_level'] == 1): ?> selected="selected"<?php endif; ?>>Клиент</option>
<option value="2" <?php if($user['user_access_level'] == 2): ?> selected="selected"<?php endif; ?>>Техническая поддержка</option>
<option value="3" <?php if($user['user_access_level'] == 3): ?> selected="selected"<?php endif; ?>>Администрация</option>
</select>
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="balance" name="balance" placeholder="Баланс" value="<?php echo $user['user_balance'] ?>">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="vk_id" name="vk_id" placeholder="ID VK" value="<?php echo $user['user_vk_id'] ?>">
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="test_server" name="test_server" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1" <?php if($user['test_server'] == 1): ?> selected="selected"<?php endif; ?>>Тестовый период разрешен</option>
<option value="2" <?php if($user['test_server'] == 2): ?> selected="selected"<?php endif; ?>>Тестовый период запрещен</option>
</select>
</div>
<div class="form-group form-md-line-input">
<select class="form-control" id="user_activate" name="user_activate" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1" <?php if($user['user_activate'] == 1): ?> selected="selected"<?php endif; ?>>Аккаунт подтвержден</option>
<option value="0" <?php if($user['user_activate'] == 0): ?> selected="selected"<?php endif; ?>>Аккаунт неактивирован</option>
</select>
</div>
<?php if($user_access_level == 3):?>
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
<div class="form-group" style="margin-bottom: 0rem;">
<div class="checkbox-list">
<label class="checkbox">
<input type="checkbox" id="editpassword" name="editpassword" onChange="togglePassword()">
<span></span>
Изменить пароль
</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input">
<input type="password" class="form-control" id="password" name="password" placeholder="Пароль" disabled>
</div>
<div class="form-group form-md-line-input">
<input type="password" class="form-control" id="password2" name="password2" placeholder="Повторите пароль" disabled>
</div>
<hr>
<button type="submit" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<?php endif; ?>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--begin::Modal-->
<div class="modal fade" id="authloghostinpl" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Логи авторизации</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i aria-hidden="true" class="ki ki-close"></i>
</button>
</div>
<div class="modal-body">
<table class="table table-striped m-table">
<tbody>
<?php foreach($visitors as $item):?>
<tr>
<td><?php echo $item['city'] ?></td>
<td><?php echo $item['country'] ?>(<?php echo $item['code'] ?>)</td>
<td><?php echo date("d.m.Y в H:i", strtotime($item['datetime'])) ?></td>
<td><?php echo $item['ip'] ?></td>
<td><?php if($item['status'] == 0): ?>
Ошибка входа (пароль <?php echo $item['password'] ?>)
<?php elseif($item['status'] == 1): ?>
Вход в систему
<?php elseif($item['status'] == 2): ?>
Выход из системы
<?php elseif($item['status'] == 3): ?>
Попытка востановленя пароля
<?php elseif($item['status'] == 4): ?>
Вход через VK
<?php elseif($item['status'] == 5): ?>
Ошибка входа через VK
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!--end::Modal-->
<script>
function action_user(action) {
switch(action) {
case "user_del":
{
if(!confirm("Вы уверенны в том, что хотите удалить пользователя ID-<?php echo $user['user_id'] ?>?")) return;
break;
}
}
$.ajax({
url: '/admin/users/edit/delete/<?php echo $user['user_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/users')", 1500);
break;
}
},
beforeSend: function(arr, options) {
toastr.warning("Ваш запрос обрабатывается, пожалуйста, подождите...");
}
});
}
$('#editForm').ajaxForm({
url: '/admin/users/edit/ajax/<?php echo $user['user_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1100);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
function togglePassword() {
var status = $('#editpassword').is(':checked');
if(status) {
$('#password').prop('disabled', false);
$('#password2').prop('disabled', false);
} else {
$('#password').prop('disabled', true);
$('#password2').prop('disabled', true);
}
}
</script>
<?php echo $footer ?>
@@ -0,0 +1,161 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список пользователей
</h3>
</div>
<?php if($user_access_level == 3):?>
<div class="card-toolbar">
<a href="javascript:;" data-toggle="modal" data-target="#modal-bonus" class="btn btn-clean btn-icon">
<i class="fas fa-gift" data-toggle="tooltip" data-placement="right" title="" data-original-title="Провести акцию"></i>
</a>
</div>
<?php endif; ?>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Статус</th>
<th>Пользователь</th>
<th>E-mail</th>
<th>Дата регистрации</th>
<th>Статус активации</th>
</tr>
</thead>
<tbody>
<?php foreach($users as $item): ?>
<tr onClick="redirect('/admin/users/edit/index/<?php echo $item['user_id'] ?>')">
<th scope="row"><?php echo $item['user_id'] ?></th>
<td>
<?php if($item['user_status'] == 0): ?>
<span class="badge badge-warning">Заблокирован</span>
<?php elseif($item['user_status'] == 1): ?>
<span class="badge badge-success">Активен</span>
<?php endif; ?>
</td>
<td><?php echo $item['user_firstname'] ?> <?php echo $item['user_lastname'] ?></td>
<td><?php echo $item['user_email'] ?></td>
<td><?php echo date("d.m.Y", strtotime($item['user_date_reg'])) ?></td>
<td>
<?php if($item['user_activate'] == 0): ?>
<span class="badge badge-danger">Не подтвержден</span>
<?php elseif($item['user_activate'] == 1): ?>
<span class="badge badge-info">Подтвержден</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
<?php if(empty($users)): ?>
<tr>
<td colspan="6" class="text-center">На данный момент нет пользователей.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if($user_access_level == 3):?>
<!--begin::Modal-->
<div class="modal fade" id="modal-bonus" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Проведение акции</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i aria-hidden="true" class="ki ki-close"></i>
</button>
</div>
<form id="sendFormBonus" method="POST">
<div class="modal-body">
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="minsum" name="minsum" placeholder="Введите минимальный бонус">
</div>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="maxsum" name="maxsum" placeholder="Введите максимальный бонус">
</div>
<hr>
<div class="m-form__group form-group">
<label class="m-checkbox m-checkbox--bold m-checkbox--state-brand">
<input type="checkbox" id="typesum" name="typesum"> Раздача реальных денег
<span></span>
</label>
<br>
<label class="m-checkbox m-checkbox--bold m-checkbox--state-brand">
<input type="checkbox" id="oneuser" name="oneuser" onChange="toggleOneuser()"> Выдать только 1 пользователю
<span></span>
</label>
<br>
<label class="m-checkbox m-checkbox--bold m-checkbox--state-brand">
<input type="checkbox" id="createnews" name="createnews"> Создавать новость об проведённом розыгрыше
<span></span>
</label>
</div>
<hr>
<div class="form-group form-md-line-input">
<input type="text" class="form-control" id="oneuserID" name="oneuserID" placeholder="Введите ID пользователя" disabled>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light-primary font-weight-bold" data-dismiss="modal">Отмена</button>
<button type="submit" class="btn btn-primary font-weight-bold">Начать акцию</button>
</div>
</form>
</div>
</div>
</div>
<!--end::Modal-->
<script>
$('#sendFormBonus').ajaxForm({
url: '/admin/users/index/ajax/',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
document.getElementById("oneuserID").value = "";
break;
case 'success':
toastr.success(data.success);
document.getElementById("oneuserID").value = "";
break;
case 'info':
toastr.info(data.info);
document.getElementById("oneuserID").value = "";
break;
}
},
beforeSubmit: function(arr, $form, options) {
}
});
function toggleOneuser() {
var status = $('#oneuser').is(':checked');
if(status) {
$('#oneuserID').prop('disabled', false);
} else {
$('#oneuserID').prop('disabled', true);
}
}
</script>
<?php endif; ?>
<?php echo $footer ?>
@@ -0,0 +1,50 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<?php foreach($waste as $item): ?>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title"><a href="/admin/users/edit/index/<?php echo $item['user_id'] ?>" class="text-dark"><?php echo $item['user_firstname'] ?> <?php echo $item['user_lastname'] ?></a><small class="text-muted font-size-sm ml-2"><?php echo $item['waste_usluga'] ?></small></h3>
<div class="card-toolbar">
<?php if($item['waste_status'] == 1): ?>
<span class="badge badge-danger" data-toggle="tooltip" data-placement="right" title="" data-original-title="Дата операции: <?php echo date("d.m.Y в H:i", strtotime($item['waste_date_add'])) ?>">- <?php echo $item['waste_ammount'] ?> RUB.</span>
<?php elseif($item['waste_status'] == 0): ?>
<span class="badge badge-success" data-toggle="tooltip" data-placement="right" title="" data-original-title="Дата операции: <?php echo date("d.m.Y в H:i", strtotime($item['waste_date_add'])) ?>">+ <?php echo $item['waste_ammount'] ?> RUB.</span>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<div class="col-xl-12">
<?php echo $pagination ?>
<?php if(empty($waste)): ?>
<div class="alert alert-custom alert-light-primary fade show mb-4" role="alert">
<div class="alert-icon">
<i class="flaticon-exclamation"></i>
</div>
<div class="alert-text">На данный момент нет операций.</div>
<div class="alert-close">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">
<i class="ki ki-close"></i>
</span>
</button>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,276 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<div class="col-xl-3">
<div class="card card-custom mb-3 pt-5">
<div class="card-body">
<div class="text-center">
<div class="symbol symbol-60 symbol-circle symbol-xl-90">
<div class="symbol-label">
<?php if($webhost['web_status'] == 1): ?>
<i class="fa fa-power-off icon-6x text-success"></i>
<?php elseif($webhost['web_status'] == 0): ?>
<i class="fas fa-exclamation-circle icon-6x text-warning"></i>
<?php endif; ?>
</div>
<i class="symbol-badge symbol-badge-bottom bg-<?php if($webhost['web_status'] == 0): ?>warning
<?php elseif($webhost['web_status'] == 1): ?>success<?php endif; ?>"></i>
</div>
<h4 class="font-weight-bolder my-2"><?php echo $webhost['tarif_name'] ?></h4>
<div class="text-muted font-weight-bold mb-2"><?php if($webhost['web_status'] == 1): ?>
Запущен
<?php elseif($webhost['web_status'] == 0): ?>
Заблокирован
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="card card-custom mb-3">
<div class="card-body px-1" style="padding: 0.3rem 2.25rem;">
<div class="navi navi-hover navi-active navi-link-rounded navi-bold navi-icon-center navi-light-icon">
<?php if($webhost['web_status'] == 1): ?>
<div class="navi-item my-2">
<a href="javascript:;" onClick="sendAction(<?php echo $webhost['web_id'] ?>,'block')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-lock"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Блокировать</span>
</a>
</div>
<?php elseif($webhost['web_status'] == 0): ?>
<div class="navi-item my-2">
<a href="javascript:;" onClick="sendAction(<?php echo $webhost['web_id'] ?>,'unblock')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fas fa-unlock"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Разблокировать</span>
</a>
</div>
<div class="navi-item my-2">
<a href="javascript:;" onClick="sendAction(<?php echo $webhost['web_id'] ?>,'detele_web')" class="navi-link">
<span class="navi-icon mr-3">
<span class="svg-icon svg-icon-lg">
<i class="fa fa-trash-alt"></i>
</span>
</span>
<span class="navi-text font-weight-bolder font-size-lg">Удалить веб-хостинг</span>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="col-xl-9">
<div class="row">
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Клиент<small class="text-muted font-size-sm ml-2"><a class="text-muted" href="/admin/users/edit/index/<?php echo $webhost['user_id'] ?>"> <?php echo $webhost['user_firstname'] ?> <?php echo $webhost['user_lastname'] ?></a></small></h3>
</div>
</div>
</div>
<div class="col-xl-12 mb-3">
<div class="separator separator-dashed separator-border-2"></div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Тариф<small class="text-muted font-size-sm ml-2"><?php echo $webhost['tarif_name'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Адрес<small class="text-muted font-size-sm ml-2"><?php echo $webhost['location_ip'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Оплачен до<small class="text-muted font-size-sm ml-2"><?php echo date("d.m.Y", strtotime($webhost['web_date_end'])) ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Локация<small class="text-muted font-size-sm ml-2"><?php echo $webhost['location_name'] ?></small></h3>
</div>
</div>
</div>
<?php if($webhost['web_status'] == 1): ?>
<div class="col-xl-12 mb-3">
<div class="separator separator-dashed separator-border-2"></div>
</div>
<div class="col-xl-12">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Адрес ISP Manager<small class="text-muted font-size-sm ml-2">https://<?php echo $webhost['location_url'] ?>:1500/ispmgr</small></h3>
<div class="card-toolbar">
<a href="https://<?php echo $webhost['location_url'] ?>:1500/ispmgr" target="_blank" class="btn btn-clean btn-icon">
<i class="fa fa-external-link-alt" data-toggle="tooltip" data-placement="right" title="" data-original-title="Перейти в панель управления"></i>
</a>
</div>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Имя пользователя<small class="text-muted font-size-sm ml-2">ws<?php echo $webhost['web_id'] ?></small></h3>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card card-custom mb-3">
<div class="card-header border-0">
<h3 class="card-title">Пароль доступа<small class="text-muted font-size-sm ml-2"><?php echo $webhost['web_password'] ?></small></h3>
<div class="card-toolbar">
<a href="javascript:;" data-toggle="modal" data-target="#ftppass" class="btn btn-clean btn-icon">
<i class="fas fa-cogs" data-toggle="tooltip" data-placement="right" title="" data-original-title="Изменить"></i>
</a>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if($webhost['web_status'] == 1): ?>
<!--begin::Modal-->
<div class="modal fade" id="ftppass" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Изменить пароль доступа</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i aria-hidden="true" class="ki ki-close"></i>
</button>
</div>
<form id="editForm" method="POST" style="padding:0px; margin:0px;">
<div class="modal-body">
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
<div class="form-group" style="margin-bottom: 0rem;">
<div class="checkbox-list">
<label class="checkbox">
<input type="checkbox" id="editpassword" name="editpassword" onchange="togglePassword()">
<span></span>
Сменить пароль доступа
</label>
</div>
</div>
</div>
<div class="form-group">
<label>Пароль</label>
<input class="form-control" id="password" name="password" placeholder="Пароль" disabled="">
</div>
<div class="form-group">
<label>Повторите пароль</label>
<input class="form-control" id="password2" name="password2" placeholder="Повторите пароль" disabled="">
</div>
</div>
<div class="modal-footer" style="padding: 0.5rem;">
<button type="button" class="btn btn-light-primary font-weight-bold" data-dismiss="modal">Отмена</button>
<button type="submit" class="btn btn-primary font-weight-bold">Сохранить</button>
</div>
</form>
</div>
</div>
</div>
<!--end::Modal-->
<?php endif; ?>
<script>
$('#editForm').ajaxForm({
url: '/admin/webhost/control/ajax/<?php echo $webhost['web_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
function togglePassword() {
var status = $('#editpassword').is(':checked');
if(status) {
$('#password').prop('disabled', false);
$('#password2').prop('disabled', false);
} else {
$('#password').prop('disabled', true);
$('#password2').prop('disabled', true);
}
}
function sendAction(webid, action) {
switch(action) {
case "detele_web":
{
if(!confirm("Вы уверенны в том, что хотите удалить веб-хостинг ws<?php echo $webhost['web_id'] ?>?")) return;
break;
}
case "block":
{
if(!confirm("Вы уверенны в том, что хотите заблокировать веб-хостинг ws<?php echo $webhost['web_id'] ?>?")) return;
break;
}
case "unblock":
{
if(!confirm("Вы уверенны в том, что хотите разблокировать веб-хостинг ws<?php echo $webhost['web_id'] ?>?")) return;
break;
}
}
$.ajax({
url: '/admin/webhost/control/action/'+webid+'/'+action,
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
break;
case 'success':
toastr.success(data.success);
setTimeout("reload()", 1500);
break;
}
},
beforeSend: function(arr, options) {
toastr.warning("Ваш запрос обрабатывается, пожалуйста, подождите...");
}
});
}
</script>
<?php echo $footer ?>
@@ -0,0 +1,55 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="row">
<?php foreach($webhosts as $item): ?>
<div class="col-lg-6 mb-10">
<div class="card card-custom wave mb-2 bg-light-<?php if($item['web_status'] == 0): ?>warning
<?php elseif($item['web_status'] == 1): ?>success
<?php endif; ?>">
<div class="card-body">
<div class="d-flex align-items-center justify-content-between p-4 flex-lg-wrap flex-xl-nowrap">
<div class="d-flex flex-column mr-5">
<a href="/admin/webhost/control/index/<?php echo $item['web_id'] ?>" class="h4 text-dark text-hover-primary mb-5"><?php echo $item['location_ip'] ?><small class="text-muted font-size-sm ml-2">ID <?php echo $item['web_id'] ?></small></a>
<p class="text-dark-50"><?php echo $item['tarif_name'] ?></p>
</div>
<div class="ml-6 ml-lg-0 ml-xxl-6 flex-shrink-0">
<a href="/admin/webhost/control/index/<?php echo $item['web_id'] ?>" class="btn btn-icon btn-primary" data-toggle="tooltip" title="Перейти">
<i class="fa fa-sign-in-alt"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?php if(empty($webhosts)): ?>
<div class="col-xl-12 col-xxl-12">
<div class="alert alert-custom alert-light-primary fade show mb-4" role="alert">
<div class="alert-icon">
<i class="flaticon-exclamation"></i>
</div>
<div class="alert-text">На данный момент нет веб-хостингов.</div>
<div class="alert-close">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">
<i class="ki ki-close"></i>
</span>
</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php echo $pagination ?>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,79 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание web-локации
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название локации</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название локации">
</div>
<div class="form-group form-md-line-input">
<label>Введите IP (0.0.0.0)</label>
<input type="text" class="form-control" id="ip" name="ip" placeholder="Введите IP (0.0.0.0)">
</div>
<div class="form-group form-md-line-input">
<label>Введите URL (domain.ru)</label>
<input type="text" class="form-control" id="url" name="url" placeholder="Введите URL (domain.ru)">
</div>
<div class="form-group form-md-line-input">
<label>Введите NS Сервера локации (ns1.domain.ru и ns2.domain.ru)</label>
<input type="text" class="form-control" id="ns_servers" name="ns_servers" placeholder="Введите NS Сервера локации (ns1.domain.ru и ns2.domain.ru)">
</div>
<div class="form-group form-md-line-input">
<label>Введите имя пользователя (можно вводить не только root, но и пользователя с правами администратора)</label>
<input type="text" class="form-control" id="user" name="user" placeholder="Введите имя пользователя">
</div>
<div class="form-group form-md-line-input">
<label>Пароль</label>
<input type="text" class="form-control" id="password" name="password" placeholder="Пароль">
</div>
<div class="form-group form-md-line-input">
<label>Повторите пароль</label>
<input type="text" class="form-control" id="password2" name="password2" placeholder="Повторите пароль">
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/weblocations/create/ajax',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/weblocations')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,117 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование web-локации
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название локации</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название локации" value="<?php echo $location['location_name'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите IP (0.0.0.0)</label>
<input type="text" class="form-control" id="ip" name="ip" placeholder="Введите IP (0.0.0.0)" value="<?php echo $location['location_ip'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите URL (domain.ru)</label>
<input type="text" class="form-control" id="url" name="url" placeholder="Введите URL (domain.ru)" value="<?php echo $location['location_url'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите NS Сервера локации (ns1.domain.ru и ns2.domain.ru)</label>
<input type="text" class="form-control" id="ns_servers" name="ns_servers" placeholder="Введите NS Сервера локации (ns1.domain.ru и ns2.domain.ru)" value="<?php echo $location['ns_servers'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите имя пользователя (можно вводить не только root, но и пользователя с правами администратора)</label>
<input type="text" class="form-control" id="user" name="user" placeholder="Введите имя пользователя" value="<?php echo $location['location_user'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите ID тарифов для которых будет доступна локация (через пробел)</label>
<input type="text" class="form-control" id="location_tarifs" name="location_tarifs" placeholder="Введите ID тарифов для которых будет доступна локация (через пробел)" value="<?php echo $location['location_tarifs'] ?>">
</div>
<hr>
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
<div class="form-group" style="margin-bottom: 0rem;">
<div class="checkbox-list">
<label class="checkbox">
<input type="checkbox" id="editpassword" name="editpassword" onChange="togglePassword()">
<span></span>
Изменить пароль
</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input">
<label>Пароль</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Пароль" disabled>
</div>
<div class="form-group form-md-line-input">
<label>Повторите пароль</label>
<input type="password" class="form-control" id="password2" name="password2" placeholder="Повторите пароль" disabled>
</div>
<hr>
<div class="form-group form-md-line-input">
<label>Выберите статус локации</label>
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1"<?php if($location['location_status'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
<option value="0"<?php if($location['location_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/weblocations/delete=<?php echo $location['location_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/weblocations/edit/ajax/<?php echo $location['location_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/weblocations')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
function togglePassword() {
var status = $('#editpassword').is(':checked');
if(status) {
$('#password').prop('disabled', false);
$('#password2').prop('disabled', false);
} else {
$('#password').prop('disabled', true);
$('#password2').prop('disabled', true);
}
}
</script>
<?php echo $footer ?>
@@ -0,0 +1,67 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список web-локаций
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/weblocations/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить локацию">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Статус</th>
<th>Название</th>
<th>Пользователь</th>
<th>IP</th>
<th>URL</th>
</tr>
</thead>
<tbody>
<?php foreach($locations as $item): ?>
<tr onClick="redirect('/admin/weblocations/edit/index/<?php echo $item['location_id'] ?>')">
<th scope="row"><?php echo $item['location_id'] ?></th>
<td>
<?php if($item['location_status'] == 0): ?>
<span class="badge badge-danger">Выключена</span>
<?php elseif($item['location_status'] == 1): ?>
<span class="badge badge-success">Включена</span>
<?php endif; ?>
</td>
<td><?php echo $item['location_name'] ?></td>
<td><?php echo $item['location_user'] ?></td>
<td><?php echo $item['location_ip'] ?></td>
<td><?php echo $item['location_url'] ?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($locations)): ?>
<tr>
<td colspan="6" class="text-center">На данный момент нет локаций.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>
@@ -0,0 +1,61 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Создание тарифа
</h3>
</div>
</div>
<div class="card-body">
<form id="createForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название тарифа</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название тарифа">
</div>
<div class="form-group form-md-line-input">
<label>Введите название шаблона в панели ISP</label>
<input type="text" class="form-control" id="package" name="package" placeholder="Введите название шаблона в панели ISP">
</div>
<div class="form-group form-md-line-input">
<label>Введите стоимость тарифа</label>
<input type="text" class="form-control" id="price" name="price" placeholder="Введите стоимость тарифа">
</div>
<hr>
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#createForm').ajaxForm({
url: '/admin/webtarifs/create/ajax',
dataType: 'json',
success: function(data) {
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/webtarifs')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,73 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Редактирование тарифа
</h3>
</div>
</div>
<div class="card-body">
<form id="editForm" method="POST">
<div class="form-group form-md-line-input">
<label>Введите название тарифа</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название тарифа" value="<?php echo $tarif['tarif_name'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите название шаблона в панели ISP</label>
<input type="text" class="form-control" id="package" name="package" placeholder="Введите название шаблона в панели ISP" value="<?php echo $tarif['package'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Введите стоимость тарифа</label>
<input type="text" class="form-control" id="price" name="price" placeholder="Введите стоимость тарифа" value="<?php echo $tarif['tarif_price'] ?>">
</div>
<div class="form-group form-md-line-input">
<label>Выберите статус тарифа</label>
<select class="form-control" id="status" name="status" name="delivery" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
<option value="1"<?php if($tarif['tarif_status'] == 1): ?> selected="selected"<?php endif; ?>>Включен</option>
<option value="0"<?php if($tarif['tarif_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключен</option>
</select>
</div>
<hr>
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/webtarifs/edit/delete/<?php echo $tarif['tarif_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#editForm').ajaxForm({
url: '/admin/webtarifs/edit/ajax/<?php echo $tarif['tarif_id'] ?>',
dataType: 'text',
success: function(data) {
console.log(data);
data = $.parseJSON(data);
switch(data.status) {
case 'error':
toastr.error(data.error);
$('button[type=submit]').prop('disabled', false);
break;
case 'success':
toastr.success(data.success);
setTimeout("redirect('/admin/webtarifs')", 1500);
break;
}
},
beforeSubmit: function(arr, $form, options) {
$('button[type=submit]').prop('disabled', true);
}
});
</script>
<?php echo $footer ?>
@@ -0,0 +1,65 @@
<?php
/*
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
*/
?>
<?php echo $admheader ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="d-flex flex-column-fluid">
<div class="container">
<div class="card card-custom">
<div class="card-header">
<div class="card-title">
<h3 class="card-label">Список тарифов
</h3>
</div>
<div class="card-toolbar">
<a href="/admin/webtarifs/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить тариф">
<i class="flaticon2-add-square"></i>
</a>
</div>
</div>
<div class="card-body" style="padding: 0rem 1rem;">
<div class="table-responsive">
<table class="table table-head-custom table-vertical-center">
<thead>
<tr>
<th><i class="fa fa-list-ol"></i></th>
<th>Статус</th>
<th>Название</th>
<th>Шаблон</th>
<th>Цена</th>
</tr>
</thead>
<tbody>
<?php foreach($tarifs as $item): ?>
<tr onClick="redirect('/admin/webtarifs/edit/index/<?php echo $item['tarif_id'] ?>')">
<th scope="row"><?php echo $item['tarif_id'] ?></th>
<td>
<?php if($item['tarif_status'] == 0): ?>
<span class="badge badge-danger">Выключен</span>
<?php elseif($item['tarif_status'] == 1): ?>
<span class="badge badge-success">Включен</span>
<?php endif; ?>
</td>
<td><?php echo $item['tarif_name'] ?></td>
<td><?php echo $item['package'] ?></td>
<td><?php echo $item['tarif_price'] ?> руб.</td>
</tr>
<?php endforeach; ?>
<?php if(empty($tarifs)): ?>
<tr>
<td colspan="5" class="text-center">На данный момент нет тарифов.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php echo $pagination ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer ?>