Файл: user/settings/online.panel.php
Строк: 159
<?php
require_once '../../sys/inc/start.php';
require_once '../../sys/inc/compress.php';
require_once '../../sys/inc/sess.php';
require_once '../../sys/inc/settings.php';
require_once '../../sys/inc/db_connect.php';
require_once '../../sys/inc/ipua.php';
require_once '../../sys/inc/fnc.php';
require_once '../../sys/inc/user.php';
only_reg();
$set['title'] = 'Настройка онлайн панели';
require_once '../../sys/inc/thead.php';
title();
if (isset($_POST['save'])) {
if (isset($_POST['set_online']) && ($_POST['set_online'] == 3 || $_POST['set_online'] == 2 || $_POST['set_online'] == 1 || $_POST['set_online'] == 0)) {
$user['set_online'] = intval($_POST['set_online']);
mysql_query("UPDATE `user` SET `set_online` = '$user[set_online]' WHERE `id` = '$user[id]' LIMIT 1");
} else {
$err[] = 'Ошибка вывода панели онлайн';
}
if (isset($_POST['set_online_view']) && ($_POST['set_online_view'] == 4 || $_POST['set_online_view'] == 3 || $_POST['set_online_view'] == 2 || $_POST['set_online_view'] == 1)) {
$user['set_online_view'] = intval($_POST['set_online_view']);
mysql_query("UPDATE `user` SET `set_online_view` = '$user[set_online_view]' WHERE `id` = '$user[id]' LIMIT 1");
} else {
$err[] = 'Ошибка вида панели онлайн';
}
if (!isset($err)) {
msg('Изменения успешно приняты');
header("Refresh: 1; url=/user/settings/online.panel.php");
echo "<a href = '/user/settings/online.panel.php'><div class = 'razd'><img src = '/style/img/left.png' /> Назад</div></a>";
require_once '../../sys/inc/tfoot.php';
}
}
err();
aut();
echo "<form name = 'settings' class = 'razd' action = '?$passgen' method = 'POST'>";
echo "Вывод онлайн панели<br />";
echo "<input type = 'radio' name = 'set_online' value = '3' " . ($user['set_online'] == 3 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Только данные</label><br /><img src = '/style/settings/online.png' /><br />";
echo "<input type = 'radio' name = 'set_online' value = '2' " . ($user['set_online'] == 2 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Только аватары</label><br /><img src = '/style/settings/online1.png' /><br />";
echo "<input type = 'radio' name='set_online' value='1' " . ($user['set_online'] == 1 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Данные + аватары</label><br /><img src = '/style/settings/online2.png' /><br />";
echo "<input type = 'radio' name='set_online' value='0' " . ($user['set_online'] == 0 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Не показывать вообще</label><br />";
echo "<div class = 'hr'></div>";
echo "Вид онлайн панели<br />";
echo "<input type = 'radio' name = 'set_online_view' value = '1' " . ($user['set_online_view'] == 1 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Вариант 1</label><br /><font color = 'blue'>Онлайн 235 | Гостей 452</font><br />";
echo "<input type = 'radio' name = 'set_online_view' value = '2' " . ($user['set_online_view'] == 2 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Вариант 2</label><br /><font color = 'blue'>Онлайн 235 (Гостей 452)</font><br />";
echo "<input type = 'radio' name = 'set_online_view' value = '3' " . ($user['set_online_view'] == 3 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Вариант 3</label><br /><font color = 'blue'>Онлайн 235 (+452)</font><br />";
echo "<input type = 'radio' name = 'set_online_view' value = '4' " . ($user['set_online_view'] == 4 ? " checked = 'checked'" : NULL) . "/>";
echo "<label>Вариант 4 (общее количество)</label><br /><font color = 'blue'>Онлайн 687</font><br />";
echo "<div class = 'hr'></div>";
echo "<button name = 'save' class = 'action'>";
echo "<span class = 'label'><span class = 'icon icon67' /> Сохранить</span>";
echo "</button></form>";
echo "<div class = 'razd'>";
if (isset($_SESSION['refer']) && $_SESSION['refer'] != NULL && otkuda($_SESSION['refer'])) {
echo "<img src = '/style/img/left.png' /> <a href = '$_SESSION[refer]'>" . otkuda($_SESSION['refer']) . "</a><br />";
}
echo "<img src = '/style/img/left.png' /> <a href = '/umenu.php'>Кабинет</a><br />";
echo "</div>";
require_once '../../sys/inc/tfoot.php';