View file ch/games/out.php

File size: 4.14Kb
<?php
ini_set('session.use_cookies','0');
ini_set('session.use_trans_sid','0');
ini_set('url_rewriter.tags','');
session_name("stw");
session_start();
header("Cache-Control: no-cache");
header("Content-type:text/vnd.wap.wml");  
session_destroy();
$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\"><small>Can not connect to MySQL</small></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\"><small>error select the database...</small></p>
</card></wml>");

function getmicrotime()
{ 
	list($usec, $sec) = explode(" ", microtime());
	return ((float)$usec + (float)$sec); 
}

$result = @mysql_query ("Select pass,user,posts,level,user_ip,user_soft,gposts,fsize from users where id='".$id."' LIMIT 1;");

if (mysql_affected_rows() == 0) {
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=\"error\" title=\"&#x041E;&#x0448;&#x0438;&#x0431;&#x043A;&#x0430;\" ontimer=\"index.php?ref=$ref\"><timer value=\"15\"/>";
echo "<p align=\"center\"><small>";
echo "&#x042E;&#x0437;&#x0435;&#x0440; &#x043D;&#x0435; &#x043D;&#x0430;&#x0439;&#x0434;&#x0435;&#x043D;!";
echo "</small></p></card></wml>";
mysql_close($link);
exit;
}

$row = mysql_fetch_array ($result);
if ($ps !== $row["pass"]){
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=\"error\" title=\"&#x041E;&#x0448;&#x0438;&#x0431;&#x043A;&#x0430;\" ontimer=\"index.php?ref=$ref\"><timer value=\"15\"/>";
echo "<p align=\"center\"><small>";
echo "&#x041D;&#x0435; &#x0432;&#x0435;&#x0440;&#x043D;&#x043E;&#x0435; &#x0441;&#x043E;&#x0447;&#x0435;&#x0442;&#x0430;&#x043D;&#x0438;&#x0435; &#x043D;&#x0438;&#x043A;&#x0430; &#x0438; &#x043F;&#x0430;&#x0440;&#x043E;&#x043B;&#x044F;!";
echo "</small></p></card></wml>";
mysql_close($link);
exit;
}
 
if($row['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
elseif($row['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
else { $fsize1 = ""; $fsize2 = ""; }
        
//Бан по ip-soft
mysql_query ("Select `klu4` from bannlist WHERE (ip = '".$addr."')and(soft = '".$agent."') LIMIT 1;");
if ((mysql_affected_rows()!=0)&&($rm!=9))
{
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 "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";
echo "<card id=\"ban\" title=\"Стоп!\" ontimer=\"index.php?ref=$ref\"><timer value=\"300\"/>";
echo "<p align=\"center\">";
echo $fsize1;
echo "Вы забанены по связке ip+soft!!!<br/>";
echo "И доступ вам разрешен только в  <a href=\"chat.php?id=$id&amp;ps=$ps&amp;rm=9&amp;rul=9&amp;ref=$ref\">Сортир</a>";
echo $fsize2;
echo "</p></card></wml>";
mysql_close($link);
exit;
}

$taker="$ses&amp;id=$id&amp;ps=$ps&amp;ref=$ref"; 
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 "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
echo "<card id=\"done\" title=\"Done!\" ontimer=\"../enter.php?$taker\"><timer value=\"5\"/>\n";
echo "<p align=\"center\">\n";
echo $fsize1;
echo "Сохранение данных<br/>\n";
echo "<a href=\"../enter.php?$taker\">Пожалуйста подождите...</a><br/>\n";
echo $fsize2;
echo "</p>\n";
echo "</card>\n";
echo "</wml>\n";
mysql_close($link);
?>