<?php
require'f_profill.php';
require'f_conectare.php';
conectare('statistici membru '.$unume,'statistici-membru'.$x2);
$head[1]='activitati membru '.$unume;
$titlu='Statistici membru '.$unume;
$back[1]='<a href="/conectati">'.img('group.gif',1).'Conectați</a>';
require'f_avatar.php';
require'f_sus.php';
$detalii_membru=$conn->query('SELECT`otime`,`mesaje_chat`,`postari`,`top_alerte`,`top_mesaje`,`mesaje_instant`,`data`,`activitate`,`lastvst`,`puncte_joc`,`vizite`FROM`membrii`WHERE`id`="'.$la.'"')->fetch_row();
$top_conectati=$conn->query('SELECT COUNT(*)FROM`membrii`WHERE`otime`>"'.$detalii_membru[0].'"')->fetch_row()[0]+1;
$pagini=ceil($top_conectati/($_COOKIE['pe_pagina']??10));
echo$div[4].img('chart_bar.png',1).'Statistici membru '.nume($la).$div[5].$div[10].profil($la,'Profil membru '.nume($la)).'<strong> - </strong><a href="/detalii-membru'.$x2.'">detalii membru '.nume($la).'</a>'.$div[0].$div[1].'Mesaje chat: <strong>'.number_format($detalii_membru[1]).'</strong>'.$div[0].$div[1].'<a href="/top-conectati'.($pagini>1?'/pagina/'.$pagini:'').'">'.img('topuri.gif',2).'Loc în top conectați</a> <strong>'.number_format($top_conectati).'</strong>'.$div[0];
$topicuri=$conn->query('SELECT COUNT(*)FROM`forum_topicuri`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($topicuri>0)
echo$div[1].'<a href="/topicuri-membru'.$x2.'">Topicuri</a> <strong>'.number_format($topicuri).'</strong>'.$div[0];
$abonamente_topicuri=$conn->query('SELECT COUNT(*)FROM`forum_abonati_topicuri`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($abonamente_topicuri>0)
echo$div[1].'<a href="/abonamente-topicuri-membru'.$x2.'">Abonamente la topicuri</a> <strong>'.number_format($abonamente_topicuri).'</strong>'.$div[0];
$postari=$conn->query('SELECT COUNT(*)FROM`forum_postari`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($postari>0)
echo$div[1].'<a href="/postari-membru'.$x2.'">Postări</a> <strong>'.number_format($postari).' din '.number_format($detalii_membru[2]).'</strong>'.$div[0];
$intrebari_trivia=$conn->query('SELECT COUNT(*)FROM`trivia_intrebari`WHERE`valid`>"0"&&`de`="'.$la.'"')->fetch_row()[0];
if($intrebari_trivia>0)
echo$div[1].'<a href="/intrebari-trivia'.$x2.'">'.img('trivia.png',1).'Întrebări trivia</a> <strong>'.number_format($intrebari_trivia).'</strong>'.$div[0];
$cuvinte_anagrame=$conn->query('SELECT COUNT(*)FROM`anagrame_cuvinte`WHERE`valid`>"0"&&`de`="'.$la.'"')->fetch_row()[0];
if($cuvinte_anagrame>0)
echo$div[1].'<a href="/cuvinte-anagrame'.$x2.'">'.img('anagrame.png',1).'Cuvinte Anagrame</a> <strong>'.number_format($cuvinte_anagrame).'</strong>'.$div[0];
$grupuri=$conn->query('SELECT COUNT(*)FROM`grupuri`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($grupuri>0)
echo$div[1].'<a href="/grupuri-membru'.$x2.'">'.img('grupuri.png',2).'Grupuri</a> <strong>'.number_format($grupuri).'</strong>'.$div[0];
$membru_grupuri=$conn->query('SELECT COUNT(*)FROM`grup_membrii`WHERE`de`="'.$la.'"&&`citit`>"0"')->fetch_row()[0];
if($membru_grupuri>0)
echo$div[1].'<a href="/grupuri-in-care-este-membru'.$x2.'">Membru în</a> <strong>'.number_format($membru_grupuri).' grupuri</strong>'.$div[0];
$fisiere=$conn->query('SELECT COUNT(*)FROM`descarcari_fisiere`WHERE`vizibil`>"0"&&`de`="'.$la.'"')->fetch_row()[0];
if($fisiere>0)
echo$div[1].'<a href="/sorteaza-fisiere-descarcari'.$x2.'">Fișiere la descărcări</a> <strong>'.number_format($fisiere).'</strong>'.$div[0];
$cantari=$conn->query('SELECT COUNT(*)FROM`cantari`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($cantari>0)
echo$div[1].'<a href="/cantari'.$x2.'">'.img('cantari.png',1).'Cântări</a> <strong>'.number_format($cantari).'</strong>'.$div[0];
$articole=$conn->query('SELECT COUNT(*)FROM`blog_articole`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($articole>0)
echo$div[1].'<a href="/blog'.$x2.'">'.img('carti.gif',2).'Articole în blog</a> <strong>'.number_format($articole).'</strong>'.$div[0];
$meditatii=$conn->query('SELECT COUNT(*)FROM`meditatii`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($meditatii>0)
echo$div[1].'<a href="/meditatii'.$x2.'">'.img('meditatii.gif',2).'Meditații</a> <strong>'.number_format($meditatii).'</strong>'.$div[0];
$devotionale=$conn->query('SELECT COUNT(*)FROM`devotionale`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($devotionale>0)
echo$div[1].'<a href="/devotionale'.$x2.'">'.img('devotionale.png',2).'Devoționale</a> <strong>'.number_format($devotionale).'</strong>'.$div[0];
$poezii=$conn->query('SELECT COUNT(*)FROM`poezii`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($poezii>0)
echo$div[1].'<a href="/poezii'.$x2.'">'.img('poezii.png',1).'Poezii</a> <strong>'.number_format($poezii).'</strong>'.$div[0];
$maxime=$conn->query('SELECT COUNT(*)FROM`maxime`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($maxime>0)
echo$div[1].'<a href="/maxime'.$x2.'">'.img('maxime.gif',1).'Maxime</a> <strong>'.number_format($maxime).'</strong>'.$div[0];
$smsuri=$conn->query('SELECT COUNT(*)FROM`sms`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($smsuri>0)
echo$div[1].'<a href="/smsuri'.$x2.'">'.img('sms.png',2).'SMS-uri</a> <strong>'.number_format($smsuri).'</strong>'.$div[0];
$bancuri=$conn->query('SELECT COUNT(*)FROM`bancuri`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($bancuri>0)
echo$div[1].'<a href="/bancuri'.$x2.'">'.img('sms.png',2).'Bancuri</a> <strong>'.number_format($bancuri).'</strong>'.$div[0];
$stiri=$conn->query('SELECT COUNT(*)FROM`stiri`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($stiri>0)
echo$div[1].'<a href="/stiri'.$x2.'">'.img('stiri.png',2).'Știri</a> <strong>'.number_format($stiri).'</strong>'.$div[0];
$carti=$conn->query('SELECT COUNT(*)FROM`biblioteca_carti`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($carti>0)
echo$div[1].'<a href="/biblioteca'.$x2.'">'.img('biblioteca.gif',1).'Biblioteca</a> <strong>'.number_format($carti).'</strong>'.$div[0];
$chestionare=$conn->query('SELECT COUNT(*)FROM`chestionar_intrebari`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($chestionare>0)
echo$div[1].'<a href="/chestionare'.$x2.'">'.img('vot.gif',2).'Chestionare</a> <strong>'.number_format($chestionare).'</strong>'.$div[0];
$produse=$conn->query('SELECT COUNT(*)FROM`magazin_cumparaturi`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($produse>0)
echo$div[1].'<a href="/produse-membru'.$x2.'">'.img('animalshop.gif',1).'Produse cumparate</a> <strong>'.number_format($produse).'</strong>'.$div[0];
$comentarii_poze=$conn->query('SELECT COUNT(*)FROM`galerie_comentarii`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($comentarii_poze>0)
echo$div[1].'<a href="/comentarii-poze-membru'.$x2.'">Comentarii poze</a> <strong>'.number_format($comentarii_poze).'</strong>'.$div[0];
$comentarii_profil=$conn->query('SELECT COUNT(*)FROM`comentarii_profil`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($comentarii_profil>0)
echo$div[1].'<a href="/comentarii-profil-membru'.$x2.'">Comentarii profil</a> <strong>'.number_format($comentarii_profil).'</strong>'.$div[0];
$mesaje_instant=$conn->query('SELECT COUNT(*)FROM`mesaje_instant`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($mesaje_instant>0)
echo$div[1].'<a href="/mesaje-instant'.$x2.'">Mesaje instant</a> <strong>'.number_format($mesaje_instant).' din '.number_format($detalii_membru[5]).'</strong>'.$div[0];
$mesaje_instant_admini=$conn->query('SELECT COUNT(*)FROM`mesaje_instant_admini`WHERE`de`="'.$la.'"')->fetch_row()[0];
if($mesaje_instant_admini>0)
echo$div[1].'<a href="/mesaje-instant-admini'.$x2.'">Mesaje instant admini</a> <strong>'.number_format($mesaje_instant_admini).' din '.number_format($detalii_membru[5]).'</strong>'.$div[0];
require'f_data.php';
$sex_la=($uinfo[2]=='F'?'ă':'');
echo$div[1].'Alerte trimise: <strong>'.number_format($detalii_membru[3]).'</strong>'.$div[0].$div[1].'Mesaje trimise: <strong>'.number_format($detalii_membru[4]).'</strong>'.$div[0].$div[1].'Puncte jocuri: <strong>'.number_format($detalii_membru[9]).'</strong>'.$div[0].$div[1].'Inregistrat'.$sex_la.': <small>'.data($detalii_membru[6]).'</small>'.$div[0].$div[1].'Ultima data activ'.$sex_la.': <small>'.data($detalii_membru[7]).'</small>'.$div[0].$div[1].'Ultima vizita: <small>'.data($detalii_membru[8]).'</small>'.$div[0].$div[1].'Vizite pe '.$adresasite[2].': <strong>'.$detalii_membru[10].'</strong>'.$div[0];
$etime=mktime(0,0,0,3,6,2007);
if($etime>$detalii_membru[6])
$dtime=$_SERVER['REQUEST_TIME']-$etime;
else
$dtime=$_SERVER['REQUEST_TIME']-$detalii_membru[6];
require'f_ramas.php';
$sage=$_SERVER['REQUEST_TIME']-$detalii_membru[6];
@[$nr1,$nr2]=explode('.',($detalii_membru[0]/$sage*100));
if($nr2[0]=='')
$nr2[0]=0;
if(@$nr2[1]=='')
$nr2[1]=0;
echo$div[1].'Timp total online: <strong>'.ramas($detalii_membru[0]).'</strong>'.$div[0].$div[1].'Conectat'.$sex_la.' zilnic: <strong>'.ramas(ceil($detalii_membru[0]/ceil($dtime/86400))).'</strong>'.$div[0].$div[1].'Pe '.$adresasite[2].' de: <strong>'.number_format(ceil($sage/86400)).' zile</strong>'.$div[0].$div[1].'Procentaj timp conectat'.$sex_la.': <strong>'.$nr1.$nr2[0].$nr2[1].'%</strong>'.$div[0];
require'f_jos.php';