Файл: impwar.tk/arena_nadpisi.php
Строк: 51
<?php
require_once('conf/dbc.php');
require_once('conf/session_start.php');
require_once('conf/ban.php');
$page_title = 'Надпись на арене';
require_once('conf/head.php');
$user_id = abs(intval($_SESSION['id']));
if ((isset($_SESSION['id'])) and (isset($_SESSION['nick']))) {
/////////////////////////////////
////////////////////////////////////Записали локацию
$query = "Select *from users where id = '$user_id' limit 1";
$result = mysqli_query($dbc, $query) or die ('Ошибка передачи запроса к БД6');
$row = mysqli_fetch_array($result);
$location = $row['location'];
if ($location == 'setting') {
}
else {
$query_loc = "update users set location = 'setting' where id = '$user_id' limit 1";
$result_loc = mysqli_query($dbc, $query_loc) or die ('Ошибка передачи запроса к БД');
}
require_once('conf/top.php');
}
?>
<div id="main">
<div class="stats">
<center><br/> <p class="profile" style="border-top:1px solid #000000; background-color:#000000;"> <span class="net">Смена надписи на арене</span>
</p></center>
<div style="background-color: #1E1E1E;">
<p style="border-top:1px solid #444e4f;"></p>
<center><b>Слова нападающему:</b></center>
<p style="border-top:1px solid #444e4f;"></p>
</div>
<?php
if ($row['gruppa'] <> 'mytants' and $row['gruppa'] <> 'bandits' and $row['gruppa'] <> 'monolits' and $row['gruppa'] <> 'zombie') {
if($user_id==$_SESSION['id']){
if(isset($_POST['st'])){
$str=filter($_POST['st']);
$dbc->query("UPDATE`users`SET`status_a` ='$str'WHERE`id`='$user_id'")or die('SQL ERROR');
header ('Location: settings.php?error=7');
exit();
}
}
{
$user_id = abs(intval($_SESSION['id']));
$st=$dbc->query("Select * from `users`WHERE`id`='$user_id'")->fetch_assoc();
$st=$st['status_a'];
echo '<form action="?id='.$_SESSION['id'].'" method="post"><br/>
<textarea style="width:98%; height:30px;" cols="35px" value="'.$st.'" name="st" placeholder="Введите новый статус..." autofocus required></textarea><br/>
<center><input type="submit" style="width:83px; height:24px;" value="Изменить" accesskey="ы"/></form></center>';
}
echo '<a href="?status&id='.$user_id.'"><a>';
}
$stat=$dbc->query("SELECT `status_a` FROM`users` WHERE`id`='$user_id'")->fetch_assoc();
require_once('conf/navig.php');
require_once('conf/foot.php');
mysqli_close($dbc);
?>
</body>
</html>