View file chatservice/enter.php

File size: 5.26Kb
<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">
<wml><head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";

print "<card title=\"&#1055;&#1088;&#1080;&#1093;&#1086;&#1078;&#1072;&#1103;\">
<p align=\"center\">";
include "./ini.php";
mysql_query ("select * from bannedib WHERE ci='$ci' AND (ip = '".getenv(REMOTE_ADDR)."')and(browser = '".getenv(HTTP_USER_AGENT)."')");
                        if(mysql_affected_rows()!=0){include "b.php";}
if(!empty($login))
$q = @mysql_query("select `id` from `".$px.$utable."` where `login`='".$login."' and ci= '".$ci."';");
if(empty($id)) {

$data = @mysql_fetch_array($q);

$id = $data['id'];
}

$login = autorize();
if($login) {
        if(!$login['ip']) { @mysql_query("update `".$px.$utable."` set `ip`='".getenv(REMOTE_ADDR)."' where `id`='".$id."' and ci= '".$ci."';"); }
        if(!$login['soft']) { @mysql_query("update `".$px.$utable."` set `soft`='".getenv(HTTP_USER_AGENT)."' where `id`='".$id."' and ci= '".$ci."';"); }

        if($login['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
        elseif($login['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
        else { $fsize1 = ""; $fsize2 = ""; }
        print $fsize1;
        ustatus();
        @mysql_query("update `".$px.$utable."` set `ltime`='".time()."', `room`='$room' where `id`='".$id."' and ci= '".$ci."';");
        $q_letters_in = @mysql_query("select count(*) from `".$px.$ltable."` where `to_user`='".$login['login']."' and `new`=1 and ci= '".$ci."';");
        $num_in=@mysql_fetch_array($q_letters_in);
        $q_letters_in_all = @mysql_query("select count(*) from `".$px.$ltable."` where `to_user`='".$login['login']."' and ci= '".$ci."'");
        $num_in_all=@mysql_fetch_array($q_letters_in_all);




        if($login['admin']) print "<a href=\"./admin.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1040;&#1076;&#1084;&#1080;&#1085;&#1082;&#1072;</a><br/>*****<br/>";

        if($login['moder']) print "<a href=\"./moder.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1052;&#1086;&#1076;&#1077;&#1088;&#1082;&#1072;</a><br/>*****<br/>";
        ///////////////////////////////////////////////////////
        $q_num_meets = @mysql_query("select count(*) from `".$px.$meettable."` where 1 and ci= '".$ci."'");
        $num_meets=@mysql_fetch_array($q_num_meets);

        print "<a href=\"./letters/index.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1055;&#1080;&#1089;&#1100;&#1084;&#1072;(".$num_in['count(*)']."/".$num_in_all['count(*)'].")</a><br/>
        <a href=\"./meets.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1042;&#1089;&#1090;&#1088;&#1077;&#1095;&#1080;(".$num_meets['count(*)'].")</a><br/>
        <a href=\"./search.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1055;&#1086;&#1080;&#1089;&#1082;</a><br/>
        <a href=\"./online.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1050;&#1090;&#1086;?&#1043;&#1076;&#1077;?</a><br/>
        *****<br/>";

        $q = @mysql_query("select `var`,`val1` from `".$px.$stable."` where `mod`='room' and ci='".$ci."' order by val3;");

        while($droom = @mysql_fetch_array($q)) {
                $q_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE `ltime`>'".intval(time()-$offline)."' AND `room`='".$droom['var']."' and ci= '".$ci."';");
                $dcount = @mysql_fetch_array($q_count);
                print "<a href=\"room.php?ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=".$droom['var']."\">".$droom['val1']."(".$dcount['count(*)'].")</a><br/>";
        }
        print "*****<br/>
        <a href=\"./statistic.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1057;&#1090;&#1072;&#1090;&#1080;&#1089;&#1090;&#1080;&#1082;&#1072;</a><br/>
        <a href=\"./help.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1055;&#1086;&#1084;&#1086;&#1097;&#1100;</a><br/>
        <a href=\"./ignor.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1048;&#1075;&#1085;&#1086;&#1088;-&#1083;&#1080;&#1089;&#1090;</a><br/>
        <a href=\"./setup.php?ci=$ci&amp;id=$id&amp;id=$id&amp;pass=$pass\">&#1053;&#1072;&#1089;&#1090;&#1088;&#1086;&#1081;&#1082;&#1080;</a><br/>
        <a href=\"./profile.php?ci=$ci&amp;id=$id&amp;pass=$pass\">&#1055;&#1088;&#1086;&#1092;&#1080;&#1083;&#1100;</a><br/>";
        print "*****<br/>";
$sc=mysql_query("select * from cusers where ci='".$ci."';");
$ch = @mysql_fetch_array($sc);
$topic=$ch['topic'];
$name=$ch['name'];
$link=$ch['link'];
        print "<a href=\"".$ch['link']."\">".$ch['name']."</a><br/>";
         print "<a href=\"http://ruwap.com.ru\">ruwap.com.ru</a>";
        $pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='$room' and ci='".$ci."';");

        $pdc = @mysql_fetch_array($pr_count);

        print "<br/>".$lang['people_in_holl'].": ".$pdc['count(*)']."<br/>";
        print $fsize2;
} else { print "&#1054;&#1096;&#1080;&#1073;&#1082;&#1072; &#1072;&#1074;&#1090;&#1086;&#1088;&#1080;&#1079;&#1072;&#1094;&#1080;&#1080;!"; }
print "<img src=\"http://top.ruwap.com.ru/count.php?id=1\" alt=\"RUwap.com.RU\"/><br/>";
print "</p>
</card>
</wml>";
@mysql_close();
?>