Файл: user/settings.php
Строк: 65
<?php
/* DCMS S (Special)
* Версия файла 0.0.1
* Дата последнего редактирования 24.10.2015
* Модифицировал densnet
*/
require_once '../sys/inc/start.php';
require_once H . 'sys/inc/compress.php';
require_once H . 'sys/inc/sess.php';
require_once H . 'sys/inc/settings.php';
require_once H . 'sys/inc/db_connect.php';
require_once H . 'sys/inc/ipua.php';
require_once H . 'sys/inc/fnc.php';
require_once H . 'sys/inc/user.php';
user::only_reg();
$set['title'] = 'Общие';
require_once H . 'sys/inc/thead.php';
if (isset($_POST['save'])) {
$user['set_files'] = (isset($_POST['set_files']) && $_POST['set_files']) ? '1' : '0';
mysql_query("UPDATE `user` SET `set_files` = '" . mysql_real_escape_string($user['set_files']) . "' WHERE `id` = '$user[id]' LIMIT 1");
$user['show_url'] = (isset($_POST['show_url']) && $_POST['show_url']) ? '1' : '0';
mysql_query("UPDATE `user` SET `show_url` = '" . mysql_real_escape_string($user['show_url']) . "' WHERE `id` = '$user[id]' LIMIT 1");
if (!isset($err)) {
msg('Изменения успешно приняты');
header("Location: settings.php?" . SID);
exit;
}
}
title();
aut();
err();
echo '<div class="busi_switcher"><table><tr><td style = "width: 20%;">';
echo "<a class = 'active brd'>Общие</a>";
echo '</td><td style = "width: 20%;">';
echo "<a href = '/user/settings/them.php' class = 'brd'>Вид</a>";
echo '</td><td style = "width: 20%;">';
echo "<a href = '/user/settings/time.php' class = 'brd'>Время</a>";
echo '</td><td style = "width: 20%;">';
echo "<a href = '/user/settings/private.php' class = 'brd'>Приватность</a>";
echo '</td><td style = "width: 20%;">';
echo "<a href = '/user/settings/password.php' class = 'brd'>Пароль</a>";
echo '</td></tr></table></div>';
echo "<form name = 'settings' class = 'comm' action = '?$passgen' method = 'POST'>";
echo "<span style = 'float:right;'><img src = '/style/icons/Settings2.png' /></span>";
echo "<label><input type = 'checkbox'" . ($user['set_files'] ? " checked = 'checked'" : null) . " name = 'set_files' value = '1' />Выгрузка файлов</label><br/>";
echo "<label><input type = 'checkbox'" . ($user['show_url'] ? " checked = 'checked'" : null) . " name = 'show_url' value = '1' />Местоположение</label><br/>";
if ($user['ank_mail']) {
echo "<label><input type = 'checkbox' name = 'set_news_to_mail' " . ($user['set_news_to_mail'] ? " checked = 'checked'" : null) . " value = '1' />Получать новости на E-mail</label><br/>";
}
echo "<button name = 'save' class = 'button-green'>Сохранить</button>";
echo "</form>";
echo "<div class = 'comm'><a href = '/umenu.php' style = 'color: #88C057;'><img src = '/style/icons/left.png'/> Кабинет</a></div>";
require_once H . 'sys/inc/tfoot.php';