Файл: impwar.tk/ramka.php
Строк: 27
<?php
require_once('conf/dbc.php');
require_once('conf/session_start.php');
require_once('conf/ban.php');
if ((!isset($_SESSION['id'])) or (!isset($_SESSION['nick']))) {
?>
<script type="text/javascript">
document.location.href = "login.php";
</script>
<?php
exit();
}
$page_title = 'Смена дизайна';
require_once('conf/head.php');
require_once('conf/top.php');
$user_id=abs(intval($_SESSION['id']));
$user=$dbc->query("SELECT * FROM `users` WHERE`id`='$user_id' LIMIT 1")->fetch_assoc();
?>
<?php if ($user[ramka] == '0') {?>
<?php
$pdo->exec("UPDATE users SET ramka = '1' WHERE id = '".$user['id']."'");
header('location: /settings.php?error=12');
?>
<?php } else {?>
<?php
$pdo->exec("UPDATE users SET ramka = '0' WHERE id = '".$user['id']."'");
header('location: /settings.php?error=12');
}
require_once('conf/navig.php');
require_once('conf/foot.php');
mysqli_close($dbc);
?>
</body>
</html>