Файл: vk.com_vhllam/games_xhata/intuition2/game.php
Строк: 425
<?
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/adm_check.php';
include_once '../../sys/inc/user.php';
$sm='баллов'; // Название валюты
$bilet = mysql_fetch_assoc(mysql_query("SELECT * FROM `lottery2` WHERE `id` = '".intval($_GET['id'])."' limit 1"));
$ank=get_user($bilet['id_user']);
$SIMoney='balls'; // валюта сайта
$sim='5'; // стоимость билета
if (isset($user) && $ank['id']!=$user['id'] && !$bilet['id'])
{
header("Location: index.php?naher");
}
else if (!isset($user))
{
header("Location: index.php?naher");
}
if ($bilet['level']==1)$money='10';
if ($bilet['level']==2)$money='20';
if ($bilet['level']==3)$money='40';
if ($bilet['level']==4)$money='80';
if ($bilet['level']==5)$money='150';
if ($bilet['level']==6)$money='300';
if ($bilet['level']==7)$money='600';
if ($bilet['level']==8)$money='1250';
if ($bilet['level']==9)$money='2500';
if ($bilet['level']==10)$money='5000';
if (isset($_GET['money']) && $ank['id']==$user['id'] && $bilet['read']==1)
{
$msg=""; // сообщение если понадобиться
mysql_query("INSERT INTO `lottery2_winners` (id_user, time, msg, type, winners) values('$user[id]', '$time', '".my_esc($msg)."', 'intuition', '$money')");
mysql_query("UPDATE `user` SET `" .$SIMoney . "` = '".($user['' . $SIMoney . '']+$money)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `lottery2` SET `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
mysql_query("DELETE FROM `lottery2` WHERE `id_user` = '$user[id]' AND `level` = '666'",$db);
header("Location: index.php?chek=$money");
}
if (isset($user) && $ank['id']==$user['id'])
{
//--------------Билет №1--------------------//
if (isset($_GET['s1']) && $_GET['s1']==1 && $bilet['level']==0 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num=intval($_GET['s1']);
if ($num==$bilet['a1'])
mysql_query("UPDATE `lottery2` SET `s1` = '0', `s2` = '2', `level` = '1', `over` = '1' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s1` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s1']) && $_GET['s1']==2 && $bilet['level']==0 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num=intval($_GET['s1']);
if ($num==$bilet['a1'])
mysql_query("UPDATE `lottery2` SET `s1` = '0', `s2` = '2', `level` = '1', `over` = '1' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s1` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №2--------------------//
if (isset($_GET['s2']) && $_GET['s2']==1 && $bilet['level']==1 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s2']);
if ($num2==$bilet['a2'])
mysql_query("UPDATE `lottery2` SET `s2` = '0', `s4` = '2', `level` = '2', `over` = '2' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s2` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s2']) && $_GET['s2']==2 && $bilet['level']==1 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s2']);
if ($num2==$bilet['a2'])
mysql_query("UPDATE `lottery2` SET `s2` = '0', `s4` = '2', `level` = '2', `over` = '2' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s2` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №3--------------------//
if (isset($_GET['s3']) && $_GET['s3']==1 && $bilet['level']==2 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s3']);
if ($num2==$bilet['a4'])
mysql_query("UPDATE `lottery2` SET `s4` = '0', `s8` = '2', `level` = '3', `over` = '3' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s4` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s3']) && $_GET['s3']==2 && $bilet['level']==2 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s3']);
if ($num2==$bilet['a4'])
mysql_query("UPDATE `lottery2` SET `s4` = '0', `s8` = '2', `level` = '3', `over` = '3' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s4` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №4--------------------//
if (isset($_GET['s4']) && $_GET['s4']==1 && $bilet['level']==3 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s4']);
if ($num2==$bilet['a8'])
mysql_query("UPDATE `lottery2` SET `s8` = '0', `s15` = '2', `level` = '4', `over` = '4' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s8` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s4']) && $_GET['s4']==2 && $bilet['level']==3 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s4']);
if ($num2==$bilet['a8'])
mysql_query("UPDATE `lottery2` SET `s8` = '0', `s15` = '2', `level` = '4', `over` = '4' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s8` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №5--------------------//
if (isset($_GET['s5']) && $_GET['s5']==1 && $bilet['level']==4 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s5']);
if ($num2==$bilet['a15'])
mysql_query("UPDATE `lottery2` SET `s15` = '0', `s30` = '2', `level` = '5', `over` = '5' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s15` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s5']) && $_GET['s5']==2 && $bilet['level']==4 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s5']);
if ($num2==$bilet['a15'])
mysql_query("UPDATE `lottery2` SET `s15` = '0', `s30` = '2', `level` = '5', `over` = '5' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s15` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №6--------------------//
if (isset($_GET['s6']) && $_GET['s6']==1 && $bilet['level']==5 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s6']);
if ($num2==$bilet['a30'])
mysql_query("UPDATE `lottery2` SET `s30` = '0', `s60` = '2', `level` = '6', `over` = '6' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s30` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s6']) && $_GET['s6']==2 && $bilet['level']==5 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s6']);
if ($num2==$bilet['a30'])
mysql_query("UPDATE `lottery2` SET `s30` = '0', `s60` = '2', `level` = '6', `over` = '6' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s30` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №7--------------------//
if (isset($_GET['s7']) && $_GET['s7']==1 && $bilet['level']==6 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s7']);
if ($num2==$bilet['a60'])
mysql_query("UPDATE `lottery2` SET `s60` = '0', `s125` = '2', `level` = '7', `over` = '7' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s60` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s7']) && $_GET['s7']==2 && $bilet['level']==6 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s7']);
if ($num2==$bilet['a60'])
mysql_query("UPDATE `lottery2` SET `s60` = '0', `s125` = '2', `level` = '7', `over` = '7' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s60` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №8--------------------//
if (isset($_GET['s8']) && $_GET['s8']==1 && $bilet['level']==7 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s8']);
if ($num2==$bilet['a125'])
mysql_query("UPDATE `lottery2` SET `s125` = '0', `s250` = '2', `level` = '8', `over` = '8' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s125` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s8']) && $_GET['s8']==2 && $bilet['level']==7 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s8']);
if ($num2==$bilet['a125'])
mysql_query("UPDATE `lottery2` SET `s125` = '0', `s250` = '2', `level` = '8', `over` = '8' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s125` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №9--------------------//
if (isset($_GET['s9']) && $_GET['s9']==1 && $bilet['level']==8 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s9']);
if ($num2==$bilet['a250'])
mysql_query("UPDATE `lottery2` SET `s250` = '0', `s500` = '2', `level` = '9', `over` = '9' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s250` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s9']) && $_GET['s9']==2 && $bilet['level']==8 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s9']);
if ($num2==$bilet['a250'])
mysql_query("UPDATE `lottery2` SET `s250` = '0', `s500` = '2', `level` = '9', `over` = '9' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s250` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
//--------------Билет №10--------------------//
if (isset($_GET['s10']) && $_GET['s10']==1 && $bilet['level']==9 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s10']);
if ($num2==$bilet['a500'])
mysql_query("UPDATE `lottery2` SET `s500` = '0', `level` = '10', `over` = '10' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s250` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
if (isset($_GET['s10']) && $_GET['s10']==2 && $bilet['level']==9 && $ank['id']==$user['id'] && $bilet['read']==1)
{
$num2=intval($_GET['s9']);
if ($num2==$bilet['a250'])
mysql_query("UPDATE `lottery2` SET `s250` = '0', `level` = '10', `over` = '10' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
else
mysql_query("UPDATE `lottery2` SET `s250` = '0', `read` = '0', `level` = '666' WHERE `id_user` = '$user[id]' AND `id` = '$bilet[id]' LIMIT 1");
header("Location: game.php?id=$bilet[id]");
}
//-----------------------------------------//
}
$set['title']='Интуиция';
include_once '../../sys/inc/thead.php';
title();
err();
aut();
echo "<div class='cont'>n";
echo "<a href='/games_xhata/apps.php'>Приложения</a> | <b>Интуиция</b>n";
echo "</div>n";
echo "Лоторея <font color='green'><b>"Интуиция"</b></font><br />";
echo "<b>Билет</b> <font color='red'>№$bilet[id]</font><br />";
if ($bilet['level']==666)
{
echo "<div class='err'>";
echo "К сожалению, вы проиграли.<br />";
if ($user[''.$SIMoney.'']>=''.$sim.'')
{
echo "<form method="post" action="index.php?pokupka">";
echo "<input type="submit" value="Играть еще ($sim $sm) " /> ";
echo "</form>n";
}
elseif (isset($user) && $user[''.$SIMoney.'']<''.$sim.'')
{
echo "Не достаточно средств для покупки билета<br /><form method="post" action="/user/money/">";
echo "<input type="submit" value="Пополнить счет" />";
echo "</form>n";
}
echo "</div>";
echo "← <a href='index.php'>Вернуться</a><br />n";
echo "<font color='#e38b35'>Выигрышная комбинация этого билета:</font><br />";
}
//-------------билет 500 SIMmoney-------------//
if ($bilet['s500']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s10=1'><img src='img/500.png'></a><a href='game.php?id=$bilet[id]&s10=2'><img src='img/500.png'></a>";
if ($bilet['s500']==1 && $bilet['level']!=666)
echo "<img src='img/500.png'><img src='img/500.png'>";
if ($bilet['s500']==0 && $bilet['level']!=666){
echo ($bilet['a500']==1?"<img src='img/ok_500.png'>":"<img src='img/500.png'>")."".($bilet['a500']==1?"<img src='img/500.png'>":"<img src='img/ok_500.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s500']==0 && $bilet['over']==9){
echo ($bilet['a500']==1?"<img src='img/ok_500.png'>":"<img src='img/0.png'>")."".($bilet['a500']==1?"<img src='img/0.png'>":"<img src='img/ok_500.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s500']==1 && $bilet['over']==9){
echo ($bilet['a500']==1?"<img src='img/ok_500.png'>":"<img src='img/500.png'>")."".($bilet['a500']==1?"<img src='img/500.png'>":"<img src='img/ok_500.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=9){
echo ($bilet['a500']==1?"<img src='img/ok_500.png'>":"<img src='img/500.png'>")."".($bilet['a500']==1?"<img src='img/500.png'>":"<img src='img/ok_500.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 250 SIMmoney-------------//
if ($bilet['s250']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s9=1'><img src='img/250.png'></a><a href='game.php?id=$bilet[id]&s9=2'><img src='img/250.png'></a>";
if ($bilet['s250']==1 && $bilet['level']!=666)
echo "<img src='img/250.png'><img src='img/250.png'>";
if ($bilet['s250']==0 && $bilet['level']!=666){
echo ($bilet['a250']==1?"<img src='img/ok_250.png'>":"<img src='img/250.png'>")."".($bilet['a250']==1?"<img src='img/250.png'>":"<img src='img/ok_250.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s250']==0 && $bilet['over']==8){
echo ($bilet['a250']==1?"<img src='img/ok_250.png'>":"<img src='img/0.png'>")."".($bilet['a250']==1?"<img src='img/0.png'>":"<img src='img/ok_250.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s250']==1 && $bilet['over']==8){
echo ($bilet['a250']==1?"<img src='img/ok_250.png'>":"<img src='img/250.png'>")."".($bilet['a250']==1?"<img src='img/250.png'>":"<img src='img/ok_250.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=8){
echo ($bilet['a250']==1?"<img src='img/ok_250.png'>":"<img src='img/250.png'>")."".($bilet['a250']==1?"<img src='img/250.png'>":"<img src='img/ok_250.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 125 SIMmoney-------------//
if ($bilet['s125']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s8=1'><img src='img/125.png'></a><a href='game.php?id=$bilet[id]&s8=2'><img src='img/125.png'></a>";
if ($bilet['s125']==1 && $bilet['level']!=666)
echo "<img src='img/125.png'><img src='img/125.png'>";
if ($bilet['s125']==0 && $bilet['level']!=666){
echo ($bilet['a125']==1?"<img src='img/ok_125.png'>":"<img src='img/125.png'>")."".($bilet['a125']==1?"<img src='img/125.png'>":"<img src='img/ok_125.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s125']==0 && $bilet['over']==7){
echo ($bilet['a125']==1?"<img src='img/ok_125.png'>":"<img src='img/0.png'>")."".($bilet['a125']==1?"<img src='img/0.png'>":"<img src='img/ok_125.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s125']==1 && $bilet['over']==7){
echo ($bilet['a125']==1?"<img src='img/ok_125.png'>":"<img src='img/125.png'>")."".($bilet['a125']==1?"<img src='img/125.png'>":"<img src='img/ok_125.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=7){
echo ($bilet['a125']==1?"<img src='img/ok_125.png'>":"<img src='img/125.png'>")."".($bilet['a125']==1?"<img src='img/125.png'>":"<img src='img/ok_125.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 60 SIMmoney-------------//
if ($bilet['s60']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s7=1'><img src='img/60.png'></a><a href='game.php?id=$bilet[id]&s7=2'><img src='img/60.png'></a>";
if ($bilet['s60']==1 && $bilet['level']!=666)
echo "<img src='img/60.png'><img src='img/60.png'>";
if ($bilet['s60']==0 && $bilet['level']!=666){
echo ($bilet['a60']==1?"<img src='img/ok_60.png'>":"<img src='img/60.png'>")."".($bilet['a60']==1?"<img src='img/60.png'>":"<img src='img/ok_60.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s60']==0 && $bilet['over']==6){
echo ($bilet['a60']==1?"<img src='img/ok_60.png'>":"<img src='img/0.png'>")."".($bilet['a60']==1?"<img src='img/0.png'>":"<img src='img/ok_60.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s60']==1 && $bilet['over']==6){
echo ($bilet['a60']==1?"<img src='img/ok_60.png'>":"<img src='img/60.png'>")."".($bilet['a60']==1?"<img src='img/60.png'>":"<img src='img/ok_60.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=6){
echo ($bilet['a60']==1?"<img src='img/ok_60.png'>":"<img src='img/60.png'>")."".($bilet['a60']==1?"<img src='img/60.png'>":"<img src='img/ok_60.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 30 SIMmoney-------------//
if ($bilet['s30']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s6=1'><img src='img/30.png'></a><a href='game.php?id=$bilet[id]&s6=2'><img src='img/30.png'></a>";
if ($bilet['s30']==1 && $bilet['level']!=666)
echo "<img src='img/30.png'><img src='img/30.png'>";
if ($bilet['s30']==0 && $bilet['level']!=666){
echo ($bilet['a30']==1?"<img src='img/ok_30.png'>":"<img src='img/30.png'>")."".($bilet['a30']==1?"<img src='img/30.png'>":"<img src='img/ok_30.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s30']==0 && $bilet['over']==5){
echo ($bilet['a30']==1?"<img src='img/ok_30.png'>":"<img src='img/0.png'>")."".($bilet['a30']==1?"<img src='img/0.png'>":"<img src='img/ok_30.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s30']==1 && $bilet['over']==5){
echo ($bilet['a30']==1?"<img src='img/ok_30.png'>":"<img src='img/30.png'>")."".($bilet['a30']==1?"<img src='img/30.png'>":"<img src='img/ok_30.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=5){
echo ($bilet['a30']==1?"<img src='img/ok_30.png'>":"<img src='img/30.png'>")."".($bilet['a30']==1?"<img src='img/30.png'>":"<img src='img/ok_30.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 15 SIMmoney-------------//
if ($bilet['s15']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s5=1'><img src='img/15.png'></a><a href='game.php?id=$bilet[id]&s5=2'><img src='img/15.png'></a>";
if ($bilet['s15']==1 && $bilet['level']!=666)
echo "<img src='img/15.png'><img src='img/15.png'>";
if ($bilet['s15']==0 && $bilet['level']!=666){
echo ($bilet['a15']==1?"<img src='img/ok_15.png'>":"<img src='img/15.png'>")."".($bilet['a15']==1?"<img src='img/15.png'>":"<img src='img/ok_15.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s15']==0 && $bilet['over']==4){
echo ($bilet['a15']==1?"<img src='img/ok_15.png'>":"<img src='img/0.png'>")."".($bilet['a15']==1?"<img src='img/0.png'>":"<img src='img/ok_15.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s15']==1 && $bilet['over']==4){
echo ($bilet['a15']==1?"<img src='img/ok_15.png'>":"<img src='img/15.png'>")."".($bilet['a15']==1?"<img src='img/15.png'>":"<img src='img/ok_15.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=4){
echo ($bilet['a15']==1?"<img src='img/ok_15.png'>":"<img src='img/15.png'>")."".($bilet['a15']==1?"<img src='img/15.png'>":"<img src='img/ok_15.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 8 SIMmoney-------------//
if ($bilet['s8']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s4=1'><img src='img/8.png'></a><a href='game.php?id=$bilet[id]&s4=2'><img src='img/8.png'></a>";
if ($bilet['s8']==1 && $bilet['level']!=666)
echo "<img src='img/8.png'><img src='img/8.png'>";
if ($bilet['s8']==0 && $bilet['level']!=666){
echo ($bilet['a8']==1?"<img src='img/ok_8.png'>":"<img src='img/8.png'>")."".($bilet['a8']==1?"<img src='img/8.png'>":"<img src='img/ok_8.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s8']==0 && $bilet['over']==3){
echo ($bilet['a8']==1?"<img src='img/ok_8.png'>":"<img src='img/0.png'>")."".($bilet['a8']==1?"<img src='img/0.png'>":"<img src='img/ok_8.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s8']==1 && $bilet['over']==3){
echo ($bilet['a8']==1?"<img src='img/ok_8.png'>":"<img src='img/8.png'>")."".($bilet['a8']==1?"<img src='img/8.png'>":"<img src='img/ok_8.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=3){
echo ($bilet['a8']==1?"<img src='img/ok_8.png'>":"<img src='img/8.png'>")."".($bilet['a8']==1?"<img src='img/8.png'>":"<img src='img/ok_8.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 4 SIMmoney-------------//
if ($bilet['s4']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s3=1'><img src='img/4.png'></a><a href='game.php?id=$bilet[id]&s3=2'><img src='img/4.png'></a>";
if ($bilet['s4']==1 && $bilet['level']!=666)
echo "<img src='img/4.png'><img src='img/4.png'>";
if ($bilet['s4']==0 && $bilet['level']!=666){
echo ($bilet['a4']==1?"<img src='img/ok_4.png'>":"<img src='img/4.png'>")."".($bilet['a4']==1?"<img src='img/4.png'>":"<img src='img/ok_4.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s4']==0 && $bilet['over']==2){
echo ($bilet['a4']==1?"<img src='img/ok_4.png'>":"<img src='img/0.png'>")."".($bilet['a4']==1?"<img src='img/0.png'>":"<img src='img/ok_4.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s4']==1 && $bilet['over']==2){
echo ($bilet['a4']==1?"<img src='img/ok_4.png'>":"<img src='img/4.png'>")."".($bilet['a4']==1?"<img src='img/4.png'>":"<img src='img/ok_4.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=2){
echo ($bilet['a4']==1?"<img src='img/ok_4.png'>":"<img src='img/4.png'>")."".($bilet['a4']==1?"<img src='img/4.png'>":"<img src='img/ok_4.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 2 SIMmoney-------------//
if ($bilet['s2']==2 && $bilet['level']!=666)
echo "<a href='game.php?id=$bilet[id]&s2=1'><img src='img/2.png'></a><a href='game.php?id=$bilet[id]&s2=2'><img src='img/2.png'></a>";
if ($bilet['s2']==1 && $bilet['level']!=666)
echo "<img src='img/2.png'><img src='img/2.png'>";
if ($bilet['s2']==0 && $bilet['level']!=666){
echo ($bilet['a2']==1?"<img src='img/ok_2.png'>":"<img src='img/2.png'>")."".($bilet['a2']==1?"<img src='img/2.png'>":"<img src='img/ok_2.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s2']==0 && $bilet['over']==1){
echo ($bilet['a2']==1?"<img src='img/ok_2.png'>":"<img src='img/0.png'>")."".($bilet['a2']==1?"<img src='img/0.png'>":"<img src='img/ok_2.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s2']==1 && $bilet['over']==1){
echo ($bilet['a2']==1?"<img src='img/ok_2.png'>":"<img src='img/2.png'>")."".($bilet['a2']==1?"<img src='img/2.png'>":"<img src='img/ok_2.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=1){
echo ($bilet['a2']==1?"<img src='img/ok_2.png'>":"<img src='img/2.png'>")."".($bilet['a2']==1?"<img src='img/2.png'>":"<img src='img/ok_2.png'>");
}
echo "<br />";
//-------------------------------------------//
//-------------билет 1 SIMmoney-------------//
if ($bilet['s1']==2)
echo "<a href='game.php?id=$bilet[id]&s1=1'><img src='img/1.png'></a><a href='game.php?id=$bilet[id]&s1=2'><img src='img/1.png'></a><br />";
if ($bilet['s1']==1)
echo "<img src='img/1.png'><img src='img/1.png'><br />";
if ($bilet['s1']==0 && $bilet['level']!=666){
echo ($bilet['a1']==1?"<img src='img/ok_1.png'>":"<img src='img/1.png'>")."".($bilet['a1']==1?"<img src='img/1.png'>":"<img src='img/ok_1.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s1']==0 && $bilet['over']==0){
echo ($bilet['a1']==1?"<img src='img/ok_1.png'>":"<img src='img/0.png'>")."".($bilet['a1']==1?"<img src='img/0.png'>":"<img src='img/ok_1.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['s1']==1 && $bilet['over']==0){
echo ($bilet['a1']==1?"<img src='img/ok_1.png'>":"<img src='img/1.png'>")."".($bilet['a1']==1?"<img src='img/1.png'>":"<img src='img/ok_1.png'>");
}
if ($bilet['read']==0 && $bilet['level']==666 && $bilet['over']!=0){
echo ($bilet['a1']==1?"<img src='img/ok_1.png'>":"<img src='img/1.png'>")."".($bilet['a1']==1?"<img src='img/1.png'>":"<img src='img/ok_1.png'>");
}
//-------------------------------------------//
if ($bilet['level']>0 && $bilet['read']==1)
{
echo "<table class='post'>";
echo "<tr>";
echo "<td class='p_m'>";
echo "→ Ваш выигрыш составляет <font color='red'><b>$money</b></font> $sm";
echo "<form method="post" action="game.php?id=$bilet[id]&money">";
echo "<input type="submit" value="Забрать выигрыш" /> ";
echo "</form>n";
echo "</td>";
echo "</tr>";
echo "</table>";
}
if ($bilet['level']==666)
{
mysql_query("DELETE FROM `lottery2` WHERE `id_user` = '$user[id]' AND `level` = '666'",$db);
}
echo "<div class='post_1'>n";
echo "<a href='index.php'>Назад</a>n";
echo "</div>n";
echo "<div class='cont'>n";
echo "<a href='/games_xhata/apps.php'>Приложения</a> | <b>Интуиция</b>n";
echo "</div>n";
include_once '../../sys/inc/tfoot.php';
?>