<?
/* STR_SOCKA 1.0 BY STRANNIK WWW.4IKU.RU */

require'config.php';
$align=$set['alignpr'];
$title='Чат для ребят и девчат';
aut();
head();

echo gend.'<b>Выбирай куда направимся ?</b>'.div;

$rooms = $db->sql_query("SELECT * FROM `rooms` ORDER BY `pos` ASC");
if($db->sql_numrows($rooms)!=0){
while($room = $db->sql_fetchrow($rooms)){

if ($room['sartir']==1)echo rowup.'<img src="style/icon/users.gif" alt="c"> <a href="room?rm='.$room['rm'].'&amp;sartir">'.$room['name'].'</a>('.$db->sql_fetchfield($db->sql_query('SELECT COUNT(*) FROM `who` WHERE `room` = "room" and `rm` = "'.$room['rm'].'"'),0).')<br />'.div;
else if ($room['intim']==1)echo rowup.'<img src="style/icon/users.gif" alt="c"> <a href="room?rm='.$room['rm'].'&amp;intim">'.$room['name'].'</a>('.$db->sql_fetchfield($db->sql_query('SELECT COUNT(*) FROM `who` WHERE `room` = "room" and `rm` = "'.$room['rm'].'"'),0).')<br />'.div;
else if ($room['level']<=$user['level'])echo rowup.'<img src="style/icon/users.gif" alt="c"> <a href="room?rm='.$room['rm'].'">'.$room['name'].'</a>('.$db->sql_fetchfield($db->sql_query('SELECT COUNT(*) FROM `who` WHERE `room` = "room" and `rm` = "'.$room['rm'].'"'),0).')<br />'.div;}

}else{
echo 'Комнат нет пока...<br />';
}

echo gb.'<a href="'.H.'enter">Прихожая</a>'.div;

foot();
?>