Файл: vsime.com/settings/inc/act_time_set.php
Строк: 69
<?
$title .=' - Время';
$navigation .= " / Время";
ex_head();
if (isset($_POST['submited'])) {
if (hsc(@$_POST['mdp']) == $mdp) {
if (isset($_POST['panel_time_zone']) && (is_numeric($_POST['panel_time_zone']) && $_POST['panel_time_zone']>=-12 && $_POST['panel_time_zone']<=12))$user['panel_time_zone'] = intval($_POST['panel_time_zone']); else $user['panel_time_zone'] = 0;
if (isset($_POST['panel_time_show']) && $_POST['panel_time_show'] == 1)$user['panel_time_show'] = 1; else $user['panel_time_show'] = 0;
if (!isset($error)) {
mysqli_query($dbi, "UPDATE `user` SET `panel_time_zone` = '$user[panel_time_zone]' WHERE `id` = '$user[id]'");
mysqli_query($dbi, "UPDATE `user` SET `panel_time_show` = '$user[panel_time_show]' WHERE `id` = '$user[id]'");
msg_sess("Настройки успешно сохранены");
header("Location: ?act=time_set");
exit();
}
}
}
echo "<form method='POST' action='' class='multi'>n";
echo "<div class='list'>n";
echo "<input type='checkbox' id='panel_time_show_1' name='panel_time_show' value='1'".($user['panel_time_show'] == 1?" CHECKED":NULL)."> <label for='panel_time_show_1'>Отображать время</label><br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "Время: n";
echo "<select name='panel_time_zone'>n";
for ($i=-12;$i<12;$i++) {
echo "<option value='$i'".($user['panel_time_zone']==$i?" selected='selected'":null).">".date("G:i", $time+$i*60*60)."</option>n";
}
echo "</select><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();
?>