Файл: pages/render/exp_line.php
Строк: 39
<?php
// Physical module map v50.6: public URL stays clean while code lives in /pages.
if (!defined('GAME_ROOT')) define('GAME_ROOT', dirname(__DIR__, 2));
chdir(GAME_ROOT);
if (PHP_SAPI !== 'cli') { $_SERVER['PHP_SELF']='/exp_line.php'; $_SERVER['SCRIPT_NAME']='/exp_line.php'; }
/* Обновление игры под PHP 8.4 / PDO и усиление безопасности: by Метриум (Стэлп) */
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if(!$user) {
header('location: /');
exit;
}
if($user['save'] == 0) {
header('location: /save/');
exit;
}
$title = 'Настройки';
include './system/h.php';
if (isset($_SESSION['exp'])){
echo "".$_SESSION['exp']."";
$_SESSION['exp']=NULL;
}
if($_GET['race'] == true) {
db_query('UPDATE `users` SET `exp_line` = "'.($user['exp_line'] == 0 ? 1:0).'" WHERE `id` = "'.$user['id'].'"');
$_SESSION['exp'] = '<div class="ok center"> Полоса опыта была успешно изменена!</div>';
header('location: /exp_line/');
}
?>
<div class="block">
<center>
<form action="/exp_line?race=true" method="post">
<div>Текущая полоса: <span class="blue"><?=($user['exp_line'] == 0 ? 'Старая':'Новая')?></span>
<br>Желаете сменить полосу на <span class="blue"><?=($user['exp_line'] == 0 ? 'Новая':'Старая')?></span>?<br>
<span class="btn"><span class="end"><input type="submit" value="Сохранить" class="label">
<br>
<a href="/settings.">Нет, отмена</a>
</div>
</form>
</div></center>
</div>
<?php
include './system/f.php';
?>