Просмотр файла game/lvl.php

Размер файла: 14.89Kb
<?php


include'inc/conf.php';

$sql = mysql_query("SELECT * FROM `users` WHERE `id` = '".$_SESSION['id']."' ");
$row = mysql_fetch_array($sql);

$pass = htmlspecialchars(stripslashes($_SESSION['pass']));
$id = htmlspecialchars(stripslashes($_SESSION['id']));


if ($id == $row['id'] and md5($pass)==$row['pass']){


if($row['lvl']==1 and $row['exp']>=105){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=2;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==2 and $row['exp']>=285){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=3;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==3 and $row['exp']>=1000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=4;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==4 and $row['exp']>=2875){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=5;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==5 and $row['exp']>=6000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=6;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==6 and $row['exp']>=10500){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=7;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==7 and $row['exp']>=17500){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=8;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==8 and $row['exp']>=28000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=9;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==9 and $row['exp']>=44000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=10;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==10 and $row['exp']>=69000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=11;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}

if($row['lvl']==11 and $row['exp']>=101000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=12;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==12 and $row['exp']>=135000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=13;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}

if($row['lvl']==13 and $row['exp']>=175000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=14;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==14 and $row['exp']>=225000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=15;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==15 and $row['exp']>=295000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=16;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==16 and $row['exp']>=350000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=17;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==17 and $row['exp']>=425000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=18;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==18 and $row['exp']>=530000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=19;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==19 and $row['exp']>=705000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=20;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==20 and $row['exp']>=920000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=21;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==21 and $row['exp']>=1230000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=22;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==22 and $row['exp']>=1625000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=23;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==23 and $row['exp']>=2000000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=24;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==24 and $row['exp']>=2600000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=25;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==25 and $row['exp']>=3200000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=26;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==26 and $row['exp']>=4000000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=27;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==27 and $row['exp']>=5150000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=28;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==28 and $row['exp']>=7000000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=29;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
if($row['lvl']==29 and $row['exp']>=10000000){

$def=$row['def']+5;
$power=$row['power']+5;
$speed=$row['speed']+5;
$manevr=$row['manevr']+5;
$lvl=30;
$sql = mysql_query("UPDATE `users` SET `def` = '".$def."', `power`='".$power."', `speed`='".$speed."', `manevr`='".$manevr."', `lvl`='".$lvl."' WHERE `id`='".$_SESSION['id']."'"); if($sql){ echo'<br/><font color="#3490a4"><img class="ico2"  src="img/pics/info.gif" alt=""><strong>Ваш уровень поднялся до '.$lvl.'</strong></font>'; }

}
}
?>