View file klub/name.php

File size: 1.34Kb
<?

 include_once '../sys/inc/start.php';
 include_once '../sys/inc/compress.php';
 include_once '../sys/inc/sess.php';
 include_once '../sys/inc/home.php';
 include_once '../sys/inc/settings.php';
 include_once '../sys/inc/db_connect.php';
 include_once '../sys/inc/ipua.php';
 include_once '../sys/inc/fnc.php';
 include_once '../sys/inc/shif.php';
 include_once '../sys/inc/user.php';
 $set['title']='Клуб Бар - Рега имени';
 include_once 'sr/head.php';
 if(isset($_GET['ok']))  {
$barnam = $_POST['barnam'];
if (strlen2($barnam) < 2) {
$err="Короткое или не указанно имя";
}
if(!isset($err)) {
			mysql_query("UPDATE `user` SET `barnam` = '".$barnam."' WHERE `id` = '".$user['id']."'");
$_SESSION['message'] = 'Имя в клубе зарегано ! ';

header("Location: index.php");
}}
err();
echo"<div class='link'>";
echo" <img src='icon_klud.png' width='270' height='70' alt='*'> <br>";
if($user['barnam']==NULL){
echo "<form method='post' action='?ok'>\n";
echo "<b>Ваше имя в игре</b> <br/><input type='text' name='barnam' value=''><br />\n";
echo "<input type='submit' value='Сохранить'/><br /></form></div>\n";
}else{
echo"Увас уже есть имя<div class='foot'>&laquo;<a href='index.php'>Назад</a><br /></div>";
}
include_once 'sr/foot.php';

 ?>