276ec7f3eb
This change replaces the use of $_SERVER['SERVER_NAME'] with $_SERVER['HTTP_HOST'] throughout the codebase. The modification ensures consistency and compliance with best practices, since $_SERVER['HTTP_HOST'] is often used to extract the host header from an HTTP request. This update may improve compatibility and security, especially in scenarios where the Host header plays a key role in proper server configuration and routing. Please review and test the changes carefully to ensure smooth functionality in different environments.
33 lines
1.3 KiB
PHP
33 lines
1.3 KiB
PHP
<?php
|
||
if (!DEFINED('EGP'))
|
||
exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
|
||
|
||
$list = '';
|
||
|
||
$aGroup = array('user' => 'Пользователь', 'support' => 'Тех. поддержка', 'admin' => 'Администратор');
|
||
|
||
$sql->query('SELECT `id` FROM `users` WHERE `time`<"' . ($start_point - 181) . '"');
|
||
|
||
$aPage = sys::page($page, $sql->num(), 20);
|
||
|
||
sys::page_gen($aPage['ceil'], $page, $aPage['page'], 'acp/users/section');
|
||
|
||
$sql->query('SELECT `id`, `login`, `mail`, `group`, `time` FROM `users` WHERE `time`<"' . ($start_point - 181) . '" ORDER BY `id` ASC LIMIT ' . $aPage['num'] . ', 20');
|
||
while ($us = $sql->get()) {
|
||
$list .= '<tr>';
|
||
$list .= '<td>' . $us['id'] . '</td>';
|
||
$list .= '<td><a href="' . $cfg['http'] . 'acp/users/id/' . $us['id'] . '">' . $us['login'] . '</a></td>';
|
||
$list .= '<td>' . $us['mail'] . '</td>';
|
||
$list .= '<td>' . $aGroup[$us['group']] . '</td>';
|
||
$list .= '<td>' . sys::today($us['time']) . '</td>';
|
||
$list .= '<td><a href="#" onclick="return users_delete(\'' . $us['id'] . '\')" class="text-red">Удалить</a></td>';
|
||
$list .= '</tr>';
|
||
}
|
||
|
||
$html->get('offline', 'sections/users');
|
||
|
||
$html->set('list', $list);
|
||
$html->set('pages', isset($html->arr['pages']) ? $html->arr['pages'] : '');
|
||
|
||
$html->pack('main');
|
||
?>
|