Файл: vsime.com/settings/inc/act_view.php
Строк: 61
<?
$title .=' - Параметры отображения';
$navigation .= " / Параметры отображения";
ex_head();
if (isset($_POST['submited'])) {
if (hsc(@$_POST['mdp']) == $mdp) {
if (isset($_POST['input_bbs']) && $_POST['input_bbs'] == 1)$input_bbs = 1; else $input_bbs = 0;
if (isset($_POST['title_link']) && $_POST['title_link'] == 1)$title_link = 1; else $title_link = 0;
if (isset($_POST['smiles_show']) && $_POST['smiles_show'] == 1)$smiles_show = 1; else $smiles_show = 0;
$rop = intval($_POST['rop']);
if ($rop >= 3 && $rop <=30)$rop = $rop; else $rop = 3;
if (!isset($error)) {
mysqli_query($dbi, "UPDATE `user` SET `input_bbs` = '$input_bbs' WHERE `id` = '$user[id]'");
mysqli_query($dbi, "UPDATE `user` SET `title_link` = '$title_link' WHERE `id` = '$user[id]'");
mysqli_query($dbi, "UPDATE `user` SET `smiles_show` = '$smiles_show' WHERE `id` = '$user[id]'");
mysqli_query($dbi, "UPDATE `user` SET `rop` = '$rop' WHERE `id` = '$user[id]'");
msg_sess("Настройки успешно сохранены");
header("Location: ?act=view");
exit();
}
}
}
echo "<form method='POST' action='' class='multi'>n";
echo "<div class='list'>n";
echo "К-тво элементов на страницу: <input name='rop' value='$user[rop]' size='2' /> (от 3 до 30)<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<input type='checkbox' id='input_bbs_1' name='input_bbs' value='1'".($user['input_bbs'] == 1?" CHECKED":NULL)."> <label for='input_bbs_1'>Панель быстрой вставки бб-кодов</label><br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<input type='checkbox' id='title_link_1' name='title_link' value='1'".($user['title_link'] == 1?" CHECKED":NULL)."> <label for='title_link_1'>Подсказки к ссылкам</label><br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<input type='checkbox' id='smiles_show_1' name='smiles_show' value='1'".($user['smiles_show'] == 1?" CHECKED":NULL)."> <label for='smiles_show_1'>Использовать смайлы</label><br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<input type='hidden' name='mdp' value='$mdp'>n";
echo "<input type='submit' name='submited' value='Сохранить'>n";
echo "</div>n";
echo "</form>n";
echo "<div class='foot'>n";
echo image_back()." <a href='?act=index'>Назад</a>n";
echo "</div>n";
ex_foot();
?>