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

Размер файла: 1.92Kb
<?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();
    }
$cls->a_header('Встречи чата');
$cls->write('<div class="d1"><h5 align="center">'.$lang['meets'].'</h5></div><div class="d0">');

             if ($target['2'] == $_SESSION['meets1'] && $target['2'] != ''){
             $arr = mysql_fetch_object(mysql_query('SELECT * FROM `'.$px.$meettable.'` WHERE `id` = "'.$target['3'].'" ORDER BY `id` DESC'));
             $cls->write('<u>'.$lang['topic'].':</u> '.$arr->title.'<br/>'.
             '<u>'.$lang['content'].':</u> '.$arr->content.'<br/>'.
             '<u>'.$lang['who_add'].':</u> '.$arr->login);
	         }
             else{
             $q = mysql_query('SELECT * FROM `'.$px.$meettable.'` ORDER BY `id` DESC LIMIT 10');
             if (mysql_num_rows($q) == 0) {$cls->write('Встречи не намечены.');}
                 else
                     {
	                  while ($arr = mysql_fetch_object($q))
	                         {
	                          $cls->write('<a href="?'.$_SESSION['re'].'/'.$_SESSION['re3'].'/'.ref5.'/'.$arr->id.'&amp;'.SID.'">'.$arr->title.'</a><br/>');
	                         }
	                 }
              $_SESSION['meets1'] = ref5; session_register('meets1');
             }
    $cls->write('</div>');
	if ($target['2'] == $_SESSION['meets1']) {$cls->write('<br/><a href="?'.$_SESSION['re'].'/'.$_SESSION['re3'].'&amp;'.SID.'">'.$lang['meets'].'</a><br/>');}
$pagesize = round((ob_get_length()+500)/1024,1);
require_once(rootpath.'trafic.php');
$end = gettime();
$cls->write('<div class="foot"><a href="?'.SID.'">В прихожую</a>['.round(($end - $mystart), 5).']</div>');
$cls->a_footer();
ob_end_flush();
@mysql_close();
?>