Файл: playtox.tk/podarok.php
Строк: 48
<?
define('PROTECTOR', 1);
$headmod = 'podarok';//фикс. места
$textl='Подарок';
@include('files/db.php');
@include('files/auth.php');
@include('files/func.php');
@include('files/core.php');
@include('files/head.php');
@include('files/zag.php');
echo"<div class='zag'> Заходи каждый день в игру и получай награду!</div></br>";
echo"Дней в игре</br>";
if($pod[day1]=="yes"){echo"<img src='/pic/podarok/day1_yes.png'>";} else {echo"<img src='/pic/podarok/day1_no.png'>";}
if($pod[day2]=="yes"){echo"<img src='/pic/podarok/day2_yes.png'>";} else {echo"<img src='/pic/podarok/day2_no.png'>";}
if($pod[day3]=="yes"){echo"<img src='/pic/podarok/day3_yes.png'>";} else {echo"<img src='/pic/podarok/day3_no.png'>";}
if($pod[day4]=="yes"){echo"<img src='/pic/podarok/day4_yes.png'>";} else {echo"<img src='/pic/podarok/day4_no.png'>";}
if($pod[day5]=="yes"){echo"<img src='/pic/podarok/day5_yes.png'>";} else {echo"<img src='/pic/podarok/day5_no.png'>";}
if($udata[podarok]=="no"){
echo"</br> <div class='menuList'><li> <a href='?act=day'>Забрать награду </a></li></div>";
}
if($_GET[act]=="day"){
if($udata[podarok]=="no"){
if($pod[day1]!="yes"){
$bon=1;
$day="day1";
}
if($pod[day1]=="yes" AND $pod[day2]!="yes"){
$day="day2";
$bon=1;
}
if($pod[day1]=="yes" AND $pod[day2]=="yes" AND $pod[day3]!="yes"){
$bon=2;
$day="day3";
}
if($pod[day1]=="yes" AND $pod[day2]=="yes" AND $pod[day3]=="yes" AND $pod[day4]!="yes" ){
$day="day4";
$bon=1;
}
if($pod[day1]=="yes" AND $pod[day2]=="yes" AND $pod[day3]=="yes" AND $pod[day4]=="yes" AND $pod[day5]!="yes" ){
$bon=3;
$day="day5";
}
$mon=rand(100,500)*$bon;
$ex=rand(10,50)*$bon;
$al=1*$bon;
$money=$udata[money]+$mon;
$skill=$udata[exp]+$ex;
$alm=$udata[almaz]+$al;
mysql_query("UPDATE `users` SET `money` = '$money', `exp`='$skill', `almaz`='$alm', `podarok`='yes' WHERE `usr` = '$log'");
mysql_query("UPDATE `podarok` SET `$day`='yes' WHERE `id_us`='$udata[id]'");
echo" Ваша награда $mon<img src='/pic/bazar.gif'> $ex<img src='/pic/exp.png'> $al<img src='/pic/almaz.png'>";
}else{
echo" Вы уже забрали награду";
}
}
@include('files/down.php');
?>