<?

include '../../config.php';
include '../../func.php';
head();

$all = mysql_result(mysql_query("SELECT count(*) FROM `room`"), 0);

echo link1 . 'Всего: <b>'.$all.'</b> комнат' . div;

$result = mysql_query("SELECT * FROM room");
while($room = mysql_fetch_assoc($result)){
    echo link2 . "<a href=\"../chat/chat.php?room=".$room['id']."\">".$room['room']."</a> [<a href=\"room_edit.php?room=".$room['id']."\">Править</a>]  [<a href=\"room_delete.php?room=".$room['id']."\">Удалить</a>]" . div;
}

echo link1 . '<a href="room_add.php">Создать комнату</a>' . div;
;