<?php
require'f_chat.php';
require'f_conectare.php';
conectare('arhiva camera chat '.$cnume,'arhiva-camera-chat/camera/'.$cid.'-'.seo($cinfo[1]).'/v/0/p/0');
$titlu='Arhiva camera chat '.$cnume;
require'f_tabelare.php';
require'f_sus.php';
echo$div[4].'Arhiva camera chat '.$cnume.$div[5];
if($perm>1)
echo$div[1].'<a href="/admin-sterge-arhiva-chat'.$x2.'"><img src="'.$domenii_statice[2].'sterge.png" alt="" width="16" height="16" />Șterge arhiva</a>'.$div[0];
echo$div[1].'<a href="/arhiva-private-camera-chat'.$x2.'">Private</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`chat_arhiva`WHERE`cid`="'.$cid.'"&&`la`="'.$de.'"')->fetch_row()[0]).'</strong>'.$div[0];
if($perm>0)
echo$div[1].'<a href="/arhiva-private-camera-chat'.$x2.'/tip/toate">Privatele tuturor</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`chat_arhiva`WHERE`cid`="'.$cid.'"&&`la`>0')->fetch_row()[0]).'</strong>'.$div[0];
$elemente=$conn->query('SELECT COUNT(*)FROM`chat_arhiva`WHERE`cid`="'.$cid.'"&&`la`="0"')->fetch_row()[0];
if($elemente>0)
{
require'f_paginare1.php';
echo'<table'.$clasa_tabel.'>';
$items=$conn->query('SELECT`de`,`data`,`text`,`id`FROM`chat_arhiva`WHERE`cid`="'.$cid.'"&&`la`="0"ORDER BY`data`DESC LIMIT '.$limit_start.','.$pe_pagina);
require'f_data.php';
require'f_profil.php';
require'f_filtru.php';
while($item=$items->fetch_row())
{
echo'<tr><td'.$clasa_kk.'><a href="/profil-membru/la/'.$item[0].'-'.seo(nume($item[0],1)).'">'.avatar($item[0]).'</a></td><td'.$clasa_k.'>'.$clasa_n.profil($item[0]).'<small> - '.data($item[1]).'</small>'.$div[0].($is_pc=='1'?'':'<div class="'.($item[3]%2?'verde':'orange').'">').filtru($item[2]).$div[0].'</td></tr>';
}
echo'</table>';
require'f_paginare2.php';
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Arhiva este goala!'.$div[0];
require'f_jos.php';