- панель работает на 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 - документация на русском: ИЗМЕНЕНИЯ, БЕЗОПАСНОСТЬ, ИНСТРУКЦИЯ
47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
<?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)
|
|
*/
|
|
class indexController extends Controller {
|
|
private $limit = 20;
|
|
public function index($page = 1) {
|
|
$this->document->setActiveSection('admin/webtarifs');
|
|
$this->document->setActiveItem('index');
|
|
|
|
if(!$this->user->isLogged()) {
|
|
$this->session->data['error'] = "Вы не авторизированы!";
|
|
$this->response->redirect($this->config->url . 'account/login');
|
|
}
|
|
if($this->user->getAccessLevel() < 3) {
|
|
$this->session->data['error'] = "У вас нет доступа к данному разделу!";
|
|
$this->response->redirect($this->config->url);
|
|
}
|
|
|
|
$this->load->library('pagination');
|
|
$this->load->model('webhostTarifs');
|
|
|
|
$options = array(
|
|
'start' => ($page - 1) * $this->limit,
|
|
'limit' => $this->limit
|
|
);
|
|
|
|
$total = $this->webhostTarifsModel->getTotalTarifs();
|
|
$tarifs = $this->webhostTarifsModel->getTarifs(array(), array(), $options);
|
|
|
|
$paginationUrl = '/admin/webtarifs/index/index/{page}';
|
|
$paginationLib = new paginationLibrary();
|
|
$paginationLib->total = $total;
|
|
$paginationLib->page = $page;
|
|
$paginationLib->limit = $this->limit;
|
|
$paginationLib->url = $paginationUrl;
|
|
$pagination = $paginationLib->render();
|
|
|
|
$this->data['tarifs'] = $tarifs;
|
|
$this->data['pagination'] = $pagination;
|
|
|
|
$this->getChild(array('common/admheader', 'common/footer'));
|
|
return $this->load->view('admin/webtarifs/index', $this->data);
|
|
}
|
|
}
|
|
?>
|