<?
define('IN_WAPP_CHAT', true);
include "ini.php";
include "includes/func_validate.php";
list($msec,$sec)=explode(chr(32),microtime());
$HeadTime=$sec+$msec;
$ro=mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200');"));
list($max_users)=mysql_fetch_array(mysql_query("select max_users from stats;"));
list($record_time)=mysql_fetch_array(mysql_query("select max_users_time from stats;"));
if($ro>$max_users || empty($max_users))
{
//added max users
mysql_query("update stats set max_users='".$ro."',max_users_time='".time()."'");
}
/*if(!empty($QUERY_STRING))
{
$data = explode(":",$QUERY_STRING);
list($idtolog)=mysql_fetch_array(mysql_query("select id from users where login='".$data[0]."' and p='".$data[1]."';"));
$id=$idtolog;
$p=$data[1];
}*/
if(empty($id) || empty($p))
{
//мутим рефов, чтоб заценить эффективность рекламы
$ref=$_GET['ref'];
if(!empty($ref) && $ref=='sota')
{
$ref_array = file("ref.dat");
$all = $ref_array[0]+1;
$fp = @fopen("ref.dat","a+");
flock ($fp, LOCK_EX);
@fputs($fp,$all);
flock ($fp, LOCK_UN);
@fclose($fp);
}
$check = trim(strtolower($_SERVER['HTTP_USER_AGENT']));
if((strpos($check,'mozilla')!==false || strpos($check,'opera')!==false || strpos($check,'msie')!==false) && !isset($wml)) $html=1;
if(isset($html)) $version='html'; else $version='wml';
if(isset($html))
{
ini_set('url_rewriter.tags','');
session_start();
include'includes/gzip.php';
include "includes/header.php";
echo'<head><title>'.$site.'</title></head><link rel="stylesheet" type="text/css" href="css.css"/></head><body>';
echo'<table align="center" border="0" cellspacing="1" cellpadding="5" width="280">';
echo'<div class="a">';
echo'<b>'.$site.'</b></div>';
list($welcome)=mysql_fetch_array(mysql_query("select welcome from stats;"));
$welcome=eregi_replace("((https?|ftp)://[[:alnum:]_=/-]+(\\.[[:alnum:]_=/-]+)*(/[[:alnum:]+&._=/~%#]*(\\?[[:alnum:]?+&_=/%#]*)?)?)", "<a href='\\1'>\\1</a>", $welcome);
$welcome = preg_replace('#\[b\](.*?)\[/b\]#si', '<b>\1</b>', $welcome);
$welcome = preg_replace('#\[i\](.*?)\[/i\]#si', '<i>\1</i>', $welcome);
$welcome = preg_replace('#\[u\](.*?)\[/u\]#si', '<u>\1</u>', $welcome);
echo "<div class=\"b\"><img src=\"chat.gif\" alt=\"chatko\"/><br/>$welcome";
echo'</div><div class="a">';
echo'<form action="c.php" method="post">
'.$lang['your_name'].':<br>
<input name="login" value="" maxlength="100"/><br/>
'.$lang['password'].':<br>
<input name="p" value="" maxlength="100" type="password"/><br/>';
print $lang['room'].':<br/>';
print '<input type="radio" name="room" value="0"/>'.$lang['vict'].'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room=0;")).'<br/>';
$rq=mysql_query("select id,name,visiblefor from rooms order by position;");
while(list($rid,$rname,$visiblefor)=mysql_fetch_array($rq))
{
if($visiblefor==1)
print '<input type="radio" name="room" value="'.$rid.'"/>'.$rname.'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room='".$rid."';")).'<br/>';
}
echo'Пол:<br/>
<input type="radio" name="sex" value="0"/>М<br/>
<input type="radio" name="sex" value="1"/>Ж<br/>';
print 'Язык:<br/>
<input type="radio" name="lg" value="ru"/>Pyccкий<br/>
<input type="radio" name="lg" value="en"/>English<br/>';
echo'<input type="hidden" name="doctype" value="html"/>
<input type="submit" value="В чат!"></form>';
echo'[<a href="index.php?wml">WML</a>|<b>xHTML</b>]';
echo'</div>';
}
else
{
include "includes/header.php";
print '<card title="'.$site.'" id="k1">';
print '<p><small><b>'.$site.'</b><br/>';
list($welcome)=mysql_fetch_array(mysql_query("select welcome from stats;"));
$welcome=eregi_replace("((https?|ftp)://[[:alnum:]_=/-]+(\\.[[:alnum:]_=/-]+)*(/[[:alnum:]+&._=/~%#]*(\\?[[:alnum:]?+&_=/%#]*)?)?)", "<a href='\\1'>\\1</a>", $welcome);
$welcome = preg_replace('#\[b\](.*?)\[/b\]#si', '<b>\1</b>', $welcome);
$welcome = preg_replace('#\[i\](.*?)\[/i\]#si', '<i>\1</i>', $welcome);
$welcome = preg_replace('#\[u\](.*?)\[/u\]#si', '<u>\1</u>', $welcome);
echo "<img src=\"chat.gif\" alt=\"chatko\"/><br/>$welcome<br/>---<br/>";
print 'Language/Язык:<br/>';
print '<a href="index.php?lg=ru&wml#k2">Pyccкий</a><br/>';
print '<a href="index.php?lg=en&wml#k2">English</a><br/>';
//print '<a href="index.php?lg=de#k2">Deutch</a><br/>';
print '---<br/>';
echo'[<b>WML</b>|<a href="index.php?html">xHTML</a>]<br/>';
print '<a href="http://'.$url.'">'.$site.'</a>';
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
print '</small></p></card>';
print '<card title="'.$lang['on_chat'].'-'.$ro.'" id="k2">';
print "<p><small>";
print $lang['your_name'].':<br/></small>';
print '<input name="login" value="" maxlength="100"/><br/>';
print '<small>'.$lang['password'].':</small><br/>';
print '<input name="p" value="" maxlength="100" type="password"/><br/>';
print '<small>'.$lang['room'].':</small><br/>';
print '<select name="room">';
print '<option value="0">'.$lang['vict'].'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room=0;")).'</option>';
$rq=mysql_query("select id,name,visiblefor from rooms order by position;");
while(list($rid,$rname,$visiblefor)=mysql_fetch_array($rq))
{
if($visiblefor==1)
print '<option value="'.$rid.'">'.$rname.'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room='".$rid."';")).'</option>';
}
print '</select><br/>';
print '<small>'.$lang['sex'].':</small><br/>';
print '<select name="sex">
<option value="0">'.$lang['m'].'</option>
<option value="1">'.$lang['w'].'</option>
</select><br/>';
print '<small><anchor>'.$lang['in_chat'].'!
<go href="c.php" method="post">
<postfield name="login" value="$(login)"/>
<postfield name="p" value="$(p)"/>
<postfield name="room" value="$(room)"/>
<postfield name="sex" value="$(sex)"/>
<postfield name="lg" value="'.$lg.'"/>
</go>
</anchor>';
print '<br/>---<br/>'.$lang['regs'].': '.mysql_result(mysql_query("select count(id) from users;"),0).'<br/><a href="http://'.$url.'">'.$site.'</a>';
}
}
else
{
$id=intval($id);
list($level,$posts,$pass,$version)=mysql_fetch_array(mysql_query("select level,posts,pass,version from users where id='".$id."';"));
if($pass!=$p)die('<card title="Error!"><p><small>'.$lang['incorrect_pass_id'].'<br/><anchor>'.$lang['back'].'<prev/></anchor></small></p></card></wml>');
if(isset($contactlist))
{
include "includes/func_pages2.php";
list($clist)=mysql_fetch_array(mysql_query("select contacts from users where id='".$id."';"));
if($version=='html')
{
ini_set('url_rewriter.tags','');
session_start();
include'includes/gzip.php';
}
include "includes/header.php";
if($version=='html')
{
echo'<head><title>Контакт-лист</title></head><link rel="stylesheet" type="text/css" href="css.css"/></head><body>';
echo'<table align="center" border="0" cellspacing="1" cellpadding="5" width="280">';
echo'<div class="a">';
}
else
{
print '<card title="Контакт-лист">';
print "<p><small>";
}
if(!empty($dbid))
{
$dbid=intval($dbid);
if($dbid==$id) print 'Самолюбие зашкаливает)))<br/>';
else
{
list($cllogin)=mysql_fetch_array(mysql_query("select login from users where id='".$dbid."';"));
if(!in_array(":$dbid:", explode('|',$clist)))
{
if(!empty($clist)) mysql_query("update users set contacts='".$clist."|:".$dbid.":' where id='".$id."';");
else mysql_query("update users set contacts=':".$dbid.":' where id='".$id."';");
}
print "<b>$cllogin</b> успешно добавлен(а) в контакт-лист!<br/>";
}
}
if(!empty($cldel))
{
$cldel=intval($cldel);
$cldel=':'.$cldel.':';
$ig_arr=explode('|',$clist);
if(count(explode('|',$clist))<=1)
{
$clist=str_replace($cldel,'',$clist);
mysql_query("update users set contacts='".$clist."' where id='".$id."';");
}
elseif(count(explode('|',$clist))>1 && $ig_arr[0]!=$cldel)
{
$clist=str_replace('|'.$cldel,'',$clist);
mysql_query("update users set contacts='".$clist."' where id='".$id."';");
}
elseif(count(explode('|',$clist))>1 && $ig_arr[0]==$cldel)
{
$clist=str_replace($cldel.'|','',$clist);
mysql_query("update users set contacts='".$clist."' where id='".$id."';");
}
else
{
print 'Unknown error!<br/>';
}
print '<b><u>Пользователь был успешно удален из вашего контакт-листа.</u></b><br/>';
}
if(!empty($clist))
{
echo'Нажмите на <b>[x]</b> для того чтобы удалить пользователя из контакт-листа.<br/>';
if(!ereg('\|',$clist))
{
$clist=str_replace (':', '', $clist);
list($clogin,$last,$pol)=mysql_fetch_array(mysql_query("select login,last,pol from users where id='".$clist."';"));
echo'<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&contactlist&cldel='.$clist.'">[x]</a> ';
print ' <a href="u.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&dbid='.$clist.'">'.$clogin.'</a>';
if($last>(time()-300)) $onl='*';
elseif($last>(time()-600)) $onl='+';
elseif($last>(time()-1200)) $onl='-';
else $onl='-';
if($pol==0) $pol=$lang['m'];
elseif($pol==1) $pol=$lang['w'];
if($last<(time()-1200) && $pol==$lang['m']) $pol.='(был '.date('d.m.Y H:i:s',$last).')';
elseif($last<(time()-1200) && $pol==$lang['w']) $pol.='(была '.date('d.m.Y H:i:s',$last).')';
print "<b>$onl</b>$pol<br/>";
}
else
{
$clist=str_replace (':', '', $clist);
$clist=explode('|',$clist);
$total = count($clist);
if (empty($_GET['start'])) $start = 0;
else $start = intval($_GET['start']);
if ($total < $start + 10){ $end = $total; }
else {$end = $start + 10; }
for ($i = $start; $i < $end; $i++)
{
list($clogin,$last,$pol)=mysql_fetch_array(mysql_query("select login,last,pol from users where id='".$clist[$i]."';"));
echo'<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&contactlist&cldel='.$clist[$i].'">[x]</a> ';
print ' <a href="u.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&dbid='.$clist[$i].'">'.$clogin.'</a>';
if($last>(time()-300)) $onl='*';
elseif($last>(time()-600)) $onl='+';
elseif($last>(time()-1200)) $onl='-';
else $onl='-';
if($pol==0) $pol=$lang['m'];
elseif($pol==1) $pol=$lang['w'];
if($last<(time()-1200) && $pol==$lang['m']) $pol.='(был '.date('d.m.Y H:i:s',$last).')';
elseif($last<(time()-1200) && $pol==$lang['w']) $pol.='(была '.date('d.m.Y H:i:s',$last).')';
print "<b>$onl</b>$pol<br/>";
}
print pages('index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&contactlist&start=', $total, 10, $start);
}
} else echo'Контакт-лист пуст<br/>Чтобы добавить пользователя в контакт-лист, нажмите на ссылку <b>"Добавить в контакт-лист"</b> в его(её) анкете.<br/>';
if($version=='html')
{
echo'<hr><a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a></div><div class="b">';
include'includes/gzip_foot.php';
include'includes/traffic.php';
echo"$cmp(всего $_SESSION[traffic] kb, сэкономлено ".($_SESSION[traffic2]-$_SESSION[traffic])." kb)<br/>";
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
echo'</body></html>';
}
else
{
echo'---<br/><a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a><br/>';
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
print "</small></p></card></wml>";
}
exit;
}
if(isset($clearpr))
{
if($version=='html')
{
ini_set('url_rewriter.tags','');
session_start();
include'includes/gzip.php';
}
include "includes/header.php";
if($version=='html')
{
echo'<head><title>Очистка привата</title></head><link rel="stylesheet" type="text/css" href="css.css"/></head><body>';
echo'<table align="center" border="0" cellspacing="1" cellpadding="5" width="280">';
echo'<div class="a">';
}
else
{
print '<card title="Очистка привата">';
print "<p><small>";
}
list($log)=mysql_fetch_array(mysql_query("select login from users where id='".$id."';"));
mysql_query("delete from privat where kto='".$id."|".$log."' or komu='".$id."|".$log."';");
echo"Все ваши приватные сообщения были успешно удалены!<br/>";
if($version=='html')
{
echo'<a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a></div><div class="b">';
include'includes/gzip_foot.php';
include'includes/traffic.php';
echo"$cmp(всего $_SESSION[traffic] kb, сэкономлено ".($_SESSION[traffic2]-$_SESSION[traffic])." kb)<br/>";
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
echo'</body></html>';
}
else
{
echo'<a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a><br/>';
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
print "</small></p></card></wml>";
}
exit;
}
if(isset($news))
{
include'includes/func_pages2.php';
include'includes/func_remains.php';
if($version=='html')
{
ini_set('url_rewriter.tags','');
session_start();
include'includes/gzip.php';
}
include "includes/header.php";
if($version=='html')
{
echo'<head><title>Газета</title></head><link rel="stylesheet" type="text/css" href="css.css"/></head><body>';
echo'<table align="center" border="0" cellspacing="1" cellpadding="5" width="280">';
echo'<div class="a"><img src="newschatko.gif" alt="news"/><br/>';
}
else
{
print '<card title="Газета">';
print "<p><small><img src=\"newschatko.gif\" alt=\"news\"/><br/>";
}
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
$base_url="index.php?id=$id&lg=$lg&p=$p&room=$room&news&start=";
$num_items=mysql_num_rows(mysql_query("select id from news;"));
if($num_items==0) echo'Новостей нет!';
$rq=mysql_query("select id,poster,header,text,event,time from news order by time desc limit $start,3;");
while(list($nid,$poster,$header,$text,$event,$time)=mysql_fetch_array($rq))
{
$text=eregi_replace("((https?|ftp)://[[:alnum:]_=/-]+(\\.[[:alnum:]_=/-]+)*(/[[:alnum:]+&._=/~%#]*(\\?[[:alnum:]?+&_=/%#]*)?)?)", "<a href='\\1'>\\1</a>", $text);
$text = preg_replace('#\[b\](.*?)\[/b\]#si', '<b>\1</b>', $text);
$text = preg_replace('#\[i\](.*?)\[/i\]#si', '<i>\1</i>', $text);
$text = preg_replace('#\[u\](.*?)\[/u\]#si', '<u>\1</u>', $text);
$text = str_replace("[br]", "<br/>", $text);
list($kto)=mysql_fetch_array(mysql_query("select login from users where id='".$poster."';"));
if($version=='html') echo'</div><div class="b">'.$header.'</u></b> ('.date('d.m.Y H:i',$time).')</div><div class="a">'; else echo'<b><u>'.$header.'</u></b> ('.date('d.m.Y H:i',$time).')<br/>';
print $text.'<br/>';
if(!empty($event)) echo '<b>Осталось:</b> '.remains($event).'<br/>';
echo'Разместил(а): <a href="u.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&dbid='.$poster.'">'.$kto.'</a><br/>';
}
print pages($base_url, $num_items, 3, $start);
if($version=='html')
{
echo'<hr><a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a></div><div class="b">';
include'includes/gzip_foot.php';
include'includes/traffic.php';
echo"$cmp(всего $_SESSION[traffic] kb, сэкономлено ".($_SESSION[traffic2]-$_SESSION[traffic])." kb)<br/>";
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
echo'</body></html>';
}
else
{
echo'---<br/><a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a><br/>';
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo '<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
print "</small></p></card></wml>";
}
exit;
}
if($version=='html')
{
ini_set('url_rewriter.tags','');
session_start();
include'includes/gzip.php';
}
include "includes/header.php";
if($version=='html')
{
echo'<head><title>'.$lang['on_chat'].'-'.$ro.'</title></head><link rel="stylesheet" type="text/css" href="css.css"/></head><body>';
echo'<table align="center" border="0" cellspacing="1" cellpadding="5" width="280">';
}
else
{
print '<card title="'.$lang['on_chat'].'-'.$ro.'">';
print "<p><small>";
}
list($newstime)=mysql_fetch_array(mysql_query("select time from news order by time desc limit 0,1;"));
$newstime=date('d.m.Y H:i:s',$newstime);
include 'includes/status.php';
if($version=='html')
{
echo'<div class="b">';
print '<a class="soft" href="f.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">Помощь/Правила</a><br/>';
print '<a class="soft" href="t.php?id='.$id.'&mode=um&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['top_um'].'</a><br/>';
print '<a class="soft" href="t.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['top_chatters'].'</a><br/>';
print '<a class="soft" href="t.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&mode=mp">'.$lang['most_popular'].'</a><br/>';
echo'</div>';
}
else
{
print '<a href="f.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">Помощь/Правила</a><br/>';
print '<a href="t.php?id='.$id.'&mode=um&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['top_um'].'</a><br/>';
print '<a href="t.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['top_chatters'].'</a><br/>';
print '<a href="t.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&mode=mp">'.$lang['most_popular'].'</a><br/>';
}
$room=intval($room);
if($version=='html')
{
echo'<div class="c">
<form action="c.php" method="post">';
print $lang['room'].':<br/>';
//print '<select name="room">';
print '<input type="radio" name="room" value="0" '.($room==0 ? 'checked="checked"' : '').'/>'.$lang['vict'].'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room=0;")).'<br/>';
$rq=mysql_query("select id,name,visiblefor from rooms order by position;");
while(list($rid,$rname,$visiblefor)=mysql_fetch_array($rq))
{
if($visiblefor==1)
print '<input type="radio" name="room" value="'.$rid.'" '.($room==$rid ? 'checked="checked"' : '').'/>'.$rname.'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room='".$rid."';")).'<br/>';
elseif($visiblefor==0 && $level>2)
print '<input type="radio" name="room" value="'.$rid.'" '.($room==$rid ? 'checked="checked"' : '').'/>'.$rname.'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room='".$rid."';")).'<br/>';
}
//print '</select><br/>';
echo'
<input type="hidden" name="id" value="'.$id.'"/>
<input type="hidden" name="p" value="'.$p.'"/>
<input type="hidden" name="lg" value="'.$lg.'"/>';
print '<input type="submit" value="'.$lang['in_chat'].'!"></form>';
echo'</div>';
}
else
{
print $lang['room'].':</small><br/>';
print '<select name="room">';
print '<option value="0">'.$lang['vict'].'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room=0;")).'</option>';
$rq=mysql_query("select id,name,visiblefor from rooms order by position;");
while(list($rid,$rname,$visiblefor)=mysql_fetch_array($rq))
{
if($visiblefor==1)
print '<option value="'.$rid.'">'.$rname.'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room='".$rid."';")).'</option>';
elseif($visiblefor==0 && $level>2)
print '<option value="'.$rid.'">'.$rname.'-'.mysql_num_rows(mysql_query("select id from users where last>('".time()."'-'1200') and room='".$rid."';")).'</option>';
}
print '</select><br/>';
print '<small><anchor>'.$lang['in_chat'].'!
<go href="c.php" method="post">
<postfield name="id" value="'.$id.'"/>
<postfield name="p" value="'.$p.'"/>
<postfield name="room" value="$(room)"/>
<postfield name="lg" value="'.$lg.'"/>
</go>
</anchor><br/>';
}
list($iglist)=mysql_fetch_array(mysql_query("select ignor from users where id='".$id."';"));
if(empty($iglist)) $igcount=0; else $igcount=count(explode('|',$iglist));
list($clist)=mysql_fetch_array(mysql_query("select contacts from users where id='".$id."';"));
if(empty($clist))
{
$ccount=0;
$conline=0;
}
else
{
$conline=0;
$clist=str_replace (':', '', $clist);
$clist=explode('|',$clist);
$ccount = count($clist);
for ($i = 0; $i < $ccount; $i++)
{
list($last)=mysql_fetch_array(mysql_query("select last from users where id='".$clist[$i]."';"));
if($last>(time()-900)) $conline++;
}
}
if($version=='html')
{
echo'<div class="a">';
print '<b>Мое меню</b><br/>';
print '<a href="http://oxi-axi.ru/forum">Форум</a><br/>';
print '<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&news">Газета</a> ('.$newstime.')<br/>';
print '<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&contactlist">Контакт-лист</a>('.$conline.'/'.$ccount.')<br/>';
print '<a href="http://oxi-axi.ru/chat/smile.php">Загрузить личный смайл</a><br/>';
print '<a href="http://oxi-axi.ru/chat/gallery/?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">Галерея чата</a><br/>';
print '<a href="d.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['my_blog'].'</a><br/>';
print '<a href="p.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['setup'].'</a><br/>';
print '<a href="u.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&search">Поиск</a><br/>';
print '<a href="i.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['ignore_list'].'</a>('.$igcount.')<br/>';
print '<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&clearpr">Очистить приват</a><br/>';
print '<hr>';
print '<a href="st.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['stats_of_chat'].'</a><br/>';
print '<a href="l.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['moders'].'</a><br/>';
print '<hr><a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a>';
echo'</div>';
}
else
{
print '---<br/><b>Мое меню</b><br/>';
print '<a href="http://oxi-axi.ru/forum">Форум</a><br/>';
print '<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&news">Газета</a> ('.$newstime.')<br/>';
print '<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&contactlist">Контакт-лист</a>('.$conline.'/'.$ccount.')<br/>';
print '<a href="http://oxi-axi.ru/chat/smile.php">Загрузить личный смайл</a><br/>';
print '<a href="http://oxi-axi.ru/chat/gallery/?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">Галерея чата</a><br/>';
print '<a href="d.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['my_blog'].'</a><br/>';
print '<a href="p.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['setup'].'</a><br/>';
print '<a href="u.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&search">Поиск</a><br/>';
print '<a href="i.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['ignore_list'].'</a>('.$igcount.')<br/>';
print '<a href="index.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'&clearpr">Очистить приват</a><br/>';
print '---<br/>';
print '<a href="st.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['stats_of_chat'].'</a><br/>';
print '<a href="l.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['moders'].'</a><br/>';
print '---<br/><a href="c.php?id='.$id.'&lg='.$lg.'&p='.$p.'&room='.$room.'">'.$lang['back_into_chat'].'</a>';
echo'<br/>';
}
//echo'<a href="http://topic.wap55.ru/?1634:10854"><img src="http://topic.wap55.ru/img.php?1634:10854" alt="Ka(sim)...top"/></a><br/>';
}
if($version=='html')
{
echo'<div class="b">';
if(empty($id) || empty($p)) print '<a class="soft" href="http://'.$url.'">'.$site.'</a><br>';
include'includes/gzip_foot.php';
include'includes/traffic.php';
if(!empty($id) && !empty($p)) echo"$cmp(всего $_SESSION[traffic] kb, сэкономлено ".($_SESSION[traffic2]-$_SESSION[traffic])." kb)<br/>";
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
echo'<a href="http://gigatop.net/in.php?7054"><img src="http://gigatop.net/c.php?7054" alt="GigaTop.Net" /></a>';
echo'</body></html>';
}
else
{
list($msec,$sec)=explode(chr(32),microtime());
print round(($sec+$msec)-$HeadTime,4)." sec.";
print "<a href=\"http://gigatop.net/in.php?7054\"><img src=\"http://gigatop.net/c.php?7054\" alt=\"GigaTop.Net\" /></a>";
print "</small></p></card></wml>";
}
mysql_close();
?>