Просмотр файла chat_user.php

Размер файла: 5.22Kb
<?php
if (!strpos($_SERVER['SCRIPT_NAME'],substr(session_id(),(strlen(session_id())/2),strlen(session_id())).session_id().substr(session_id(),0,(strlen(session_id())/2)).'/index.php'))
    {
     header('location: http://'.$_SERVER['SERVER_NAME'].'/'); exit();
    }
if (!mysql_fetch_object(mysql_query('SELECT * FROM `'.$px.$utable.'` WHERE `id` = "'.trim(stripslashes(htmlspecialchars($isus))).'"')))
    {
     $cls->a_header('Пользователь не найден.');
     $cls->write($lang['user_not_exist']);
     if (!empty($room)) {$cls->write('<a href="?'.$_SESSION['re'].'/'.$_SESSION['re2'].'/'.$room.'&amp;'.SID.'">'.$lang['to_chat'].'</a><br/>');}
     else {$cls->write('<a href="?'.SID.'">'.$lang['holl'].'</a><br/>');}
     $cls->a_footer();
     exit();
    }

$data = mysql_fetch_object(mysql_query('SELECT * FROM `'.$px.$utable.'` WHERE `id` = "'.trim(stripslashes(htmlspecialchars($isus))).'"'));

$admin = $idu->level;
$from = $idu->email;

if (substr($target['5'],0,(strlen($_SESSION['user1'])+1)) == $_SESSION['user1'].'(' && substr($target['5'],-1) == ')')
    {
     $ex = explode($_SESSION['user1'].'(',$target['5']);
     $ml = explode(')',$ex['1']);
     require_once(rootpath.'chat_email.php');
     exit();
    }
$onla = mysql_fetch_object(mysql_query('SELECT `login` FROM `chat_session` WHERE `login` = "'.$data->login.'"'));
if (!empty($onla->login)) {$yes = 'Online';} else {$yes = 'Offline';}
$user_moder = $data->level;
$to = $data->email;
$photo = $data->photo;
$status = $data->status;

$cls->a_header('Анкета '.$data->login);
$cls->write('<div class="d1"><h3 align="center">'.$data->login.'</h3></div>');

    $cls->write('<div class="d0"><form method="post" action="?'.$_SESSION['re'].'/'.$_SESSION['re2'].'/'.$room.'/'.$data->id.'&amp;'.SID.'">'.
    '<input name="msg" value="'.$data->login.'," class="itext"/><br/>'.
    '<b>Цвет текста:</b><br/>'.
    '<select name="col" title="send">'.
    '<option value="0">Системный</option>'.
    '<option value="1">Синий</option>'.
    '<option value="2">Зеленый</option>'.
    '<option value="3">Голубой</option>'.
    '<option value="4">коричневый</option>'.
    '<option value="5">Белый</option>'.
    '<option value="6">Черный</option>'.
    '</select><br/><br/>'.
    '<select name="private" title="send">'.
    '<option value="0">Всем</option>'.
    '<option value="'.$id.'.'.$data->id.'">Приватно</option>'.
    '</select><br/>'.
    '<input name="translit" type="checkbox" value="1"/>Транслит<br/>'.
    '<input value="Сказать"  type="submit" class="ibutton"/>'.
    '</form>');
echo '</div><div class="d1">Пользователь '.$yes.'<br/>';
if (!empty($photo)) {$cls->write($lang['nick'].': <a href="'.$photo.'">'.$data->login.'</a><br/>');}
    else {$cls->write($lang['nick'].': '.$data->login.' <br/>');}
$cls->write($lang['name'].': '.$data->name.' <br/>'.
$lang['sex'].': '.$data->sex.' <br/>'.
$lang['birthday'].': '.$data->bday.'-'.$data->bmonth.'-19'.$data->byear.'<br/>'.
$lang['live'].': '.$data->live.' <br/>'.
'E-Mail: <a href="?'.$_SESSION['re'].'/'.$_SESSION['re2'].'/'.$room.'/'.$_SESSION['rooms3'].'/'.$target['4'].'/'.ref1.'('.$to.')&amp;'.SID.'">'.$to.' </a><br/>');
if ($target['5'] == $_SESSION['user2']  && $target['5'] != '')
    {
     $cls->write($lang['status'].': '.$status.' <br/>'.
     $lang['posts'].': '.$data->posts.' <br/>'.
     $lang['datereg'].': '.date("d-m-Y", $data->rtime).' <br/>'.
     'Существует '.all_time(time()-$data->rtime).'<br/>'.
     'Из них в чате '.all_time($data->adtime).'</div>');
    }else {$cls->write('<a href="?'.$_SESSION['re'].'/'.$_SESSION['re2'].'/'.$room.'/'.$_SESSION['rooms3'].'/'.$target['4'].'/'.ref2.'&amp;'.SID.'">Доп. информация</a></div>');}
if (!empty($admin))
    {
	 $cls->write('<div class="d3"><b>Адрес ip:</b><br/>'.$data->ip.'<br/>'.
	 '<b>User-Agent:</b><br/>'.$data->soft.'<br/>'.
	 '<a href="?'.$_SESSION['re'].'/'.$_SESSION['re15'].'/'.ref10.'/'.$target['4'].'&amp;'.SID.'">'.$lang['kick'].'</a><br/>');
	 if ($admin >= 4) {$cls->write('<a href="?'.$_SESSION['re'].'/'.$_SESSION['re15'].'/'.ref6.'/'.$target['4'].'&amp;'.SID.'">'.$lang['kill'].'</a><br/>');}
     $cls->write('<a href="?'.$_SESSION['re'].'/'.$_SESSION['re14'].'/'.ref4.'/'.$data->id.'&amp;'.SID.'">'.$lang['delete'].'</a></div>');
    }
$_SESSION['user1'] = ref1; session_register('user1');
$_SESSION['user2'] = ref2; session_register('user2');
$_SESSION['user3'] = ref3; session_register('user3');
$_SESSION['user4'] = ref4; session_register('user4');
$_SESSION['mdr6'] = ref6; session_register('mdr6');
$_SESSION['mdr10'] = ref10; session_register('mdr10');
$pagesize = round((ob_get_length()+500)/1024,1);
require_once(rootpath.'trafic.php');
$end = gettime();
$cls->write('<div class="foot"><a href="?'.$_SESSION['re'].'/'.$_SESSION['re11'].'/'.ref3.'/'.$data->id.'&amp;'.SID.'">'.$lang['in_ignor'].'</a><br/>'.
'<a href="?'.$_SESSION['re'].'/'.$_SESSION['re2'].'/'.$room.'&amp;'.SID.'">'.$lang['to_chat'].'</a><br/>'.
'<a href="?'.SID.'">В прихожую</a>['.round(($end - $mystart), 5).']</div>');
$cls->a_footer();
ob_end_flush();
@mysql_close();
?>