Просмотр файла znaki_LIM/znaki_LIM/user.php

Размер файла: 5.03Kb
<?php
Error_Reporting(E_ALL & ~E_NOTICE);

$r=rand(0,100000);
//послаем заголовки
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
//вывод файла wml
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>';
include "./ini.php";
if(!empty($login))
$q = @mysql_query("select `id` from `".$px.$utable."` where `login`='".$login."';");
if(empty($id)) {
$data = @mysql_fetch_array($q);
$id = $data['id']; 
}

$login = autorize();
if($login['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
        elseif($login['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
        else { $fsize1 = ""; $fsize2 = ""; }
if($search) {
$query_users = @mysql_query("select * from `".$px.$utable."` where login='".$dblogin."';");
$data = @mysql_fetch_array($query_users);
} else {
$query_users = @mysql_query("select * from `".$px.$utable."` where id='$dbid';");
$data = @mysql_fetch_array($query_users);
}
print '<card title="'.$data['login'].'">'.
'<p>';
switch($mod) {
       case 'see':
       $to=urlencode($data['email']);
       $photo=$data['photo'];
       $status=$data['status'];
       if ($data['website']=="http://") $web="";
       if ($data['icq']=="0")           $icq="";
       if($data['sex']=="m") { $sex = "<img src=\"./m.gif\" alt=\"m\"/>"; } 
else { $sex = "<img src=\"./zh.gif\" alt=\"zh\"/>"; }
/////////////////////// vybor strany
//ссылка на фото
print $fsize1;
print $lang['nick'].": ".$data['login']." <br/>"; 
print $lang['name'].":".$data['name']."<br/>";
print $lang['datereg'].": ".date("d-m-Y", $data['rtime'])." <br/>";

print $divide;
print '<a href="user.php?id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;dbid='.$data['id'].'&amp;r='.$r.'">'.$lang['back'].'</a><br/>'.
               '<a href="room.php?id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;r='.$r.'">'.$lang['to_chat'].'</a><br/>';

       break;
default:
if($login) {
//данные о пользователе
$moder=$login['moder'];
$admin=$login['admin'];
$from=urlencode($login['email']);
//еще данные
$user_moder=$data['moder'];


//если это не поиск
if(!$search && $data['id']!=$id) print
$fsize1.'<b><a href="user.php?id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;dbid='.$data['id'].'&amp;mod=see&amp;r='.$r.'">'.$data['login'].'</a></b><br/>'.$fsize2;
//? ?
print $fsize1;
if(!empty($moder)&&empty($data['admin'])) print "<b>-----</b><br/><a href=\"add.php?id=$id&amp;pass=$pass&amp;whoid=$dbid&amp;room=$room&amp;mod=kick\">".$lang['kick']."</a><br/>";
if($moder>=2&&empty($data['admin'])) print "<a href=\"add.php?id=$id&amp;pass=$pass&amp;whoid=$dbid&amp;room=$room&amp;mod=kill\">".$lang['kill']."</a><br/>";
if($moder>=3&&empty($data['admin'])) print "<a href=\"add.php?id=$id&amp;pass=$pass&amp;whoid=$dbid&amp;room=$room&amp;mod=agent\">Браузер</a><br/>";
if(!empty($admin)) {
if($user_moder>=1) { print "<b>-----</b><br/><a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=delmoder\">".$lang['delmoder']."</a><br/>"; }
else {
print "<b>-----</b><br/><a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=makemoder\">".$lang['makemoder']."</a><br/>"; }
if($user_moder>=2) { print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=delkiller\">".$lang['delkiller']."</a><br/>"; }
else {
print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=makekiller\">".$lang['makekiller']."</a><br/>"; }
if($user_moder>=3) { print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=delshpion\">".$lang['delshpion']."</a><br/>"; }
else {
print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=makeshpion\">".$lang['makeshpion']."</a><br/>"; }
if($user_moder>=4) { print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=deltopmoder\">".$lang['deltopmoder']."</a><br/>"; }
else {
print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=maketopmoder\">".$lang['maketopmoder']."</a><br/>"; }
print "<a href=\"admin.php?id=$id&amp;pass=$pass&amp;whoid=".$data['id']."&amp;room=$room&amp;mod=del\">".$lang['delete']."</a><br/>";
}
print "<b>-----</b><br/><a href=\"ignor.php?id=$id&amp;pass=$pass&amp;room=$room&amp;r=$r&amp;mod=set&amp;whoid=".$data['id']."\">".$lang['in_ignor']."</a><br/>";

//в чат
if($room) print "<a href=\"room.php?id=$id&amp;pass=$pass&amp;room=$room&amp;r=$r\">".$lang['to_chat']."</a><br/>";
} else { print $lang['access_denied']; }
break;
}
//конечные теги
print $fsize2;
print '</p>'.
'</card>'.
'</wml>';
//разрываем соединение с базой
@mysql_close();
ob_end_flush();
?>