Размер файла: 1.67Kb
<?
if ($_SESSION['wap']=="xml")
{
echo $div['header'];
echo "<a href=\"http://skymobi.org\">На главную</a><br/>";
$string=str_replace("&","&",$QUERY_STRING);
echo "[xhtml | <a href=\"$PHP_SELF?$string&wap=wml\">wml</a>]";
echo $div['end'];
echo $div['div'];
echo "(c)SkyMobi.Org<br/>";
echo $div['end'];
echo "</body>
</html>";
}else{
echo "<a href=\"http://skymobi.org\">На главную</a><br/>";
$string=str_replace("&","&",$QUERY_STRING);
echo "[wml | <a href=\"$PHP_SELF?$string&wap=xml\">xhtml</a>]<br/>";
echo "(c)SkyMobi.Org<br/>";
echo "</small></p></card></wml>";
}
function OnlUser() {
global $autorize,$forums,$podforums,$theme,$agent,$addr;
$id=$autorize['id'];
$timenow=date("YmdHi");
$userCountRez=@mysql_query("UPDATE users SET `time`='$timenow',`online`='1',`onlf`='$forums',`onlp`='$podforums',`onlt`='$theme',`ip`='$addr',`brow`='$agent' WHERE id='$id';");
}
function OnlUserAnonim() {
global $autorize,$agent,$addr,$forums,$podforums,$theme;
$timenow=@time();
if (!$autorize)
{
$q = @mysql_query("select * from anonims where ((`ip`='$addr') and (`brow`='$agent'));");
if (mysql_affected_rows()==0)
{
@mysql_query("insert into anonims values(0,'$addr','$agent','$timenow','$forums','$podforums','$theme');")or die ("FUCK");
}
else
{
@mysql_query("UPDATE anonims SET `time`='$timenow',`onlf`='$forums',`onlp`='$podforums',`onlt`='$theme' WHERE ((ip='$addr') and (brow='$agent'));");
}
}
}
OnlUser();
OnlUserAnonim();
?>