<?php
require'f_chat.php';
require'f_conectare.php';
conectare('chat','chat');
$titlu='Chat';
require'f_sus.php';
if($de>0)
require'f_nou.php';
echo$div[4].img('arrow_next.png',2).'Chat'.$div[5];
$camere=$conn->query('SELECT`id`,`nume`FROM`chat_camere`WHERE`static`="1"&&`clid`="0"');
while($camera=$camere->fetch_row())
{
echo$div[1].'<a href="/intra-pe-chat/camera/'.$camera[0].'-'.seo($camera[1]).'">'.img('arrow_next.png',2).htmlspecialchars($camera[1]).'</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`chat_conectati`WHERE`cid`="'.$camera[0].'"')->fetch_row()[0]).'</strong>';
if($perm>0)
echo'<strong> - </strong><a href="/camera-chat/camera/'.$camera[0].'-'.seo($camera[1]).'/v/1/p/0">'.img('administrare.png',1).'Intra pe invizibil</a>';
echo$div[0];
}
echo$div[4].img('arrow_next.png',2).'Camere temporare'.$div[5];
$camere=$conn->query('SELECT`id`,`nume`,`parola`FROM`chat_camere`WHERE`static`="0"');
while($camera=$camere->fetch_row())
{
$conectati=$conn->query('SELECT COUNT(*)FROM`chat_conectati`WHERE`cid`="'.$camera[0].'"')->fetch_row()[0];
if($camera[2]=='')
echo$div[1].'<a href="/camera-chat/camera/'.$camera[0].'-'.seo($camera[1]).'/v/0/p/0">'.htmlspecialchars($camera[1]).'</a> <strong>'.number_format($conectati).'</strong>'.$div[0];
else
{
echo$div[4].htmlspecialchars($camera[1]).' ('.$conectati.')'.$div[5];
$form[0]='/camera-chat/camera/'.$camera[0].'-'.seo($camera[1]).'/v/0" method="get';
$form[1]=0;
$form[2]=$div[1].'Introdu parola:<br /><input name="tid" maxlength="10" />'.$div[0];
$form[3]='tid';
$form[4]='Intra';
require'f_form.php';
}
}
echo$div[1].'<a href="/adauga-camere-chat">'.img('arrow_next.png',2).'Adaugă camere chat (temporare)</a>'.$div[0].$div[1].'<a href="/top-chat">'.img('topuri.gif',2).'Top chat</a>'.$div[0];
require'f_jos.php';