View file 4at2/ch/games.php

File size: 3.33Kb
<?
header("Cache-Control: no-cache");
header("Content-type:text/vnd.wap.wml");  
$ref=rand(10000,1000000);
require("inc.php");

$link = @mysql_pconnect ($MySQL_Hostname, $MySQL_Username, $MySQL_Password)
                or die ("<wml>
<card id=\"error\" title=\"error\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">Can not connect to MySQL</p>
</card>
</wml>");
     
     @mysql_select_db($MySQLDatabasename) or die ("<wml>
<card id=\"error\" title=\"error\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">error select the database...</p>
</card>
</wml>");   
		
		$result = @mysql_query ("Select pass,user,posts,avr,max,level,ignor,kik,whokik,whykik,user_ip,user_soft,inv,translit,smiles,safe,credits,fsize from users where id='".$id."' LIMIT 1;");
		
		
         if (mysql_affected_rows() == 0) {
          echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">\n";
echo "<wml>\n";
echo "<card id=\"error\" title=\"&#x041E;&#x0448;&#x0438;&#x0431;&#x043A;&#x0430;\" ontimer=\"index.php?ref=$ref\"><timer value=\"15\"/>\n";
echo "<p align=\"center\">\n";
echo "User was not found\n";
echo "</p>\n";
echo "</card>\n";
echo "</wml>\n";
mysql_close($link);
exit;
}
                
$row = mysql_fetch_array ($result);
if ($ps !== $row["pass"]){
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">\n";
echo "<wml>\n";
echo "<card id=\"error\" title=\"&#x041E;&#x0448;&#x0438;&#x0431;&#x043A;&#x0430;\" ontimer=\"index.php?ref=$ref\"><timer value=\"15\"/>\n";
echo "<p align=\"center\">\n";
echo "Your login failed\n";
echo "</p>\n";
echo "</card>\n";
echo "</wml>\n";
mysql_close($link);   
exit;
}           

if($row['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
elseif($row['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
else { $fsize1 = ""; $fsize2 = ""; }
/*
$rmaf = "maf1";
$tm = time()-300;
mysql_query("select * from $rmaf WHERE id > '".$tm."' group by usid order by id desc");
$mafnum = mysql_affected_rows();
$sm[1] = $mafnum-1;
@$kolm = $kolm + $mafnum-1;
*/
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
echo "<wml>";
echo "<card id=\"enter\" title=\"&#x0418;&#x0433;&#x0440;&#x044B;\">";
echo "<p align=\"center\">";
echo $fsize1; 
//echo "<a href=\"maf.php?id=$id&amp;ps=$ps&amp;rm=1&amp;ref=$ref\">Чатовская Мафия($kolm)</a><br/>";
echo "<a href=\"./games/21.php?id=$id&amp;ps=$ps&amp;ref=$ref\">Очко</a><br/>";
echo "<a href=\"./games/kosti.php?id=$id&amp;ps=$ps&amp;ref=$ref\">Кости</a><br/>";
echo "<a href=\"./games/777.php?id=$id&amp;ps=$ps&amp;ref=$ref\">Бандит</a><br/>";
print "<a href=\"./games/naperstki.php?id=$id&amp;ps=$ps&amp;ref=$ref\">Напёрстки</a><br/>";
print "<a href=\"./games/ugadaika.php?id=$id&amp;ps=$ps&amp;ref=$ref\">Угадай число</a><br/>";
echo "---<br/>";
echo "<a href=\"enter.php?id=$id&amp;ps=$ps&amp;ref=$ref\">&#x041F;&#x0440;&#x0438;&#x0445;&#x043E;&#x0436;&#x0430;&#x044F;</a><br/>";
echo $fsize2;
echo "</p></card></wml>";
mysql_close ($link);
?>