Вход Регистрация
Файл: hunting/up.php
Строк: 36
<?php
require_once '../core/system.php';
echo 
only_reg();
echo 
ban();
$ruq mysql_query("SELECT * from `hunting` where `usr` = '$user[id]'");
$hnt mysql_fetch_array($ruq);

$header "Повышение уровня";
require_once 
H.'core/head.php';

$d=$hnt['level']+1;
if(
$hnt['level']==1){$st=50; }
if(
$hnt['level']==2){$st=100;}
if(
$hnt['level']==3){$st=300;}
if(
$hnt['level']==4){$st=700; }
if(
$hnt['level']==5){$st=1200; }
if(
$hnt['level']==6){$st=2800; }
if(
$hnt['level']==7){$st=4000;}
if(
$hnt['level']==8){$st=5500; }
if(
$hnt['level']==9){$st=8000; }
if(
$hnt['level']==10){$st=10000; }
if(
$hnt['level']==11){$st=14000; }
if(
$hnt['level']==12){}
$st=floor($st*0.70);
$goldd=$st*100;
if(
$hnt['level']<12){
if(
$user['gold']<$goldd){
header("Location: /hunting/");
$_SESSION['err'] = 'Недостаточно золота';exit;}
$gold=$user['gold']-$goldd;
mysql_query("INSERT INTO `logi` set `user_id` = '".$user['id']."', `text` = 'Охотник', `time` = '".$tm."', `kol`='".$goldd."', `kto`='-'");
mysql_query("UPDATE `user` SET `gold` = '$gold' WHERE `id` = '$user[id]'");
mysql_query("UPDATE `hunting` SET `level` = '$d' WHERE `usr` = '$user[id]'");
header("Location: /hunting/");
$_SESSION['message'] = "Уровень охотника повышен до $d уровня";
}else{
header("Location: /hunting/");
$_SESSION['err'] = "<font color=94ED18>Максимальный уровень !</font>";}
require_once 
H.'core/foot.php';
?>
Онлайн: 3
Реклама