<?php
if($conn->query('SELECT COUNT(*)FROM`alerte`WHERE`citit`="0"&&`la`="'.$de.'"')->fetch_row()[0]>0)
{
$pminfo=$conn->query('SELECT`id`,`text`,`de`,`data`,`raportat`FROM`alerte`WHERE`citit`="0"&&`la`="'.$de.'"')->fetch_row();
require_once'f_profil.php';
require'f_data.php';
echo'<center>'.$div[8].'Alertă de la '.profil($pminfo[2]).':<br /><small>Data: '.data($pminfo[3]).'</small>'.$div[0];
require'f_filtru.php';
$pminfo[1]=filtru($pminfo[1]);
if($pminfo[4]==0&&!in_array($pminfo[2],$id_proprietari)&&!in_array($de,$id_proprietari))
{
require'f_spam.php';
if(spam($pminfo[1]))
$conn->query('UPDATE`alerte`SET`raportat`="'.$id_robot.'"WHERE`id`="'.$pminfo[0].'"');
}
echo$div[12].$pminfo[1].$div[0];
if($conn->query('SELECT COUNT(*)FROM`ignorati`WHERE`la`="'.$de.'"&&`de`="'.$pminfo[2].'"')->fetch_row()[0]>0)
echo$div[7].'Nu poți răspunde la această alertă, deoarece '.nume($pminfo[2]).' te are în lista cu persoane ignorate!'.$div[0];
elseif($de==$pminfo[2])
echo$div[7].'Nu poți să-ți trimiți alertă, deoarece noi promovăm dialogul, nu monologul!'.$div[0];
else
{
$form[0]='/trimite-i-alerta/la/'.$pminfo[2].'-'.seo(nume($pminfo[2],1)).'?alerta='.$pminfo[0].'" method="post';
$form[1]=0;
require'f_textarea.php';
require'f_scris1.php';
$form[2]='Raspunde:<br />'.textarea('pmtext').scris1().'<br />';
$form[3]='pmtext::font::culoare';
$form[5]=1;
$form[4]='Trimite';
require'f_form.php';
}
require'f_sms.php';
echo'<small>'.sms($pminfo[1]).'</small><br /><small><a href="/raporteaza-alerta/id/'.$pminfo[0].'?alerta='.$pminfo[0].'"><img src="'.$domenii_statice[1].'point.gif" alt="!" />Raportează alerta</a></small><br /><small><a href="/dialog-alerte/la/'.$pminfo[2].'-'.seo(nume($pminfo[2],1)).'?alerta='.$pminfo[0].'">'.img('modlog.gif',2).'Dialogul vostru</a></small><br /><small><a href="/zambareti/la/'.$pminfo[2].'-'.seo(nume($pminfo[2],1)).'/tip/alerta?alerta='.$pminfo[0].'">Zâmbăreți</a></small><br />';
$zambareti_favoriti=$conn->query('SELECT COUNT(*)FROM`imagini_zambareti_favoriti`WHERE`de`="'.$de.'"')->fetch_row()[0];
if($zambareti_favoriti>0)
echo'<small><a href="/zambareti-favoriti/la/'.$pminfo[2].'-'.seo(nume($pminfo[2],1)).'/tip/alerta?alerta='.$pminfo[0].'">Zâmbăreți favoriți</a> <strong>'.number_format($zambareti_favoriti).'</strong></small><br />';
echo'<small><a href="/coduri-scriere">Coduri scriere</a></small><br />'.$div[8].'<a href="'.$conn->query('SELECT`link`FROM`membrii_conectati`WHERE`de`="'.$de.'"')->fetch_row()[0].'?alerta='.$pminfo[0].'">'.img('arrow_back.png',1).'Nu răspunde</a>'.$div[0].'</center>';
unset($pinfo,$zambareti_favoriti);
require'f_jos.php';
}
if($conn->query('SELECT COUNT(*)FROM`daruri_oferite`WHERE`citit`="0"&&`la`="'.$de.'"')->fetch_row()[0]>0)
{
echo$div[4].img('cadoul.png',1).'Ai primit un dar!'.$div[5];
$cinfo=$conn->query('SELECT`id`,`de`,`pid`,`data`,`text`FROM`daruri_oferite`WHERE`citit`="0"&&`la`="'.$de.'"')->fetch_row();
$pinfo=$conn->query('SELECT`descriere`,`link`FROM`daruri`WHERE`id`="'.$cinfo[2].'"')->fetch_row();
require_once'f_profil.php';
require'f_filtru.php';
require'f_data.php';
echo$div[10].nume($de).', ai primit un dar de la '.profil($cinfo[1]).'<br />Acesta constă '.$pinfo[0].' <img src="/'.$pinfo[1].'" alt="dar" />'.($cinfo[4]!=''?'<br />Ți-a adresat și mesajul: '.filtru($cinfo[4]):'').'<br /><small>Dar trimis: '.data($cinfo[3]).'</small>'.$div[0];
if($conn->query('SELECT COUNT(*)FROM`ignorati`WHERE`la`="'.$de.'"&&`de`="'.$cinfo[1].'"')->fetch_row()[0]>0)
echo$div[7].'Nu poți răspunde la acest dar, deoarece '.nume($cinfo[1]).' te are în lista cu persoane ignorate!'.$div[0];
elseif($de==$cinfo[1])
echo$div[7].'Nu poți să îți oferi dar ție însuți, pentru că oricum nu are sens să-ți cheltui leii aiuria!'.$div[0];
else
{
$form[0]='/ofera-dar/la/'.$cinfo[1].'-'.seo(nume($cinfo[1],1)).'?dar='.$cinfo[0].'" method="post';
$form[1]=0;
require'f_scris3.php';
$darurile='';
$daruri=$conn->query('SELECT`id`,`nume`,`pret`FROM`daruri`ORDER BY`id`DESC');
while($darul=$daruri->fetch_row())
{
$darurile.=$darul[0].',,'.$darul[1].' ('.number_format($darul[2]).' lei)::';
}
$form[2]=$div[1].'Daca dorești, poți să-i răspunzi tot printr-un dar.<br />Alege dar:<br />'.scris3('id_dar',$darurile).$div[0].$div[1].'Cu mesajul:<br /><input name="pmtext" maxlength="500" />'.$div[0];
unset($daruri,$darul,$darurile);
$form[3]='id_dar::pmtext';
$form[4]='Raspunde-i la dar';
require'f_form.php';
}
echo$div[8].'<a href="'.$conn->query('SELECT`link`FROM`membrii_conectati`WHERE`de`="'.$de.'"')->fetch_row()[0].'?dar='.$cinfo[0].'">'.img('arrow_back.png',1).'Nu răspunde</a>'.$div[0];
unset($cinfo,$pinfo);
require'f_jos.php';
}
$rets='';
if($perm>0)
{
$tot=$conn->query('SELECT COUNT(*)FROM`membrii`WHERE`valid`="0"')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`galerie_poze`WHERE`valid`="0"')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`istoric_nume`WHERE`valid`="0"')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`trivia_intrebari`WHERE`valid`="0"')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`anagrame_cuvinte`WHERE`valid`="0"')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`tichet_intrebari`WHERE`status`=3')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`contact`WHERE`valid`="0"&&(`la`="0"||`la`="'.$de.'")')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`mesaje`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`alerte`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`forum_postari`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`forum_topicuri`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`galerie_poze`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`galerie_comentarii`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`comentarii_profil`WHERE`raportat`>2')->fetch_row()[0];
$tot+=$conn->query('SELECT COUNT(*)FROM`descarcari_fisiere`WHERE`raportat`>2')->fetch_row()[0];
if($tot>0)
$rets.='<tr><td><div id="notificare"><img src="'.$domenii_statice[2].'new.gif" alt="" /><div class="notificare_bula">'.number_format($tot).'</div></div></td><td><a href="/admin-lista-validari">listă validări</a></td></tr>';
unset($tot);
}
$tichete_rezolvate=$conn->query('SELECT COUNT(*)FROM`tichet_intrebari`WHERE`status`="2"&&`de`="'.$de.'"')->fetch_row()[0];
if($tichete_rezolvate>0)
$rets.='<tr><td><div id="notificare"><img src="'.$domenii_statice[2].'new.gif" alt="" /><div class="notificare_bula">'.number_format($tichete_rezolvate).'</div></div></td><td><a href="/tichete/tip/rezolvate">tichete</a></td></tr>';
$mesaje_necitite=$conn->query('SELECT COUNT(*)FROM`mesaje`WHERE`citit`="0"&&`la`="'.$de.'"')->fetch_row()[0];
if($mesaje_necitite>0)
$rets.='<tr><td><div id="notificare"><img src="'.$domenii_statice[2].'new.gif" alt="" /><div class="notificare_bula">'.number_format($mesaje_necitite).'</div></div></td><td><a href="/mesaje/tip/ne-citite">mesaje</a></td></tr>';
$notificari_necitite=$conn->query('SELECT COUNT(*)FROM`notificari`WHERE`citit`="0"&&`la`="'.$de.'"')->fetch_row()[0];
if($notificari_necitite>0)
$rets.='<tr><td><div id="notificare"><img src="'.$domenii_statice[2].'new.gif" alt="" /><div class="notificare_bula">'.number_format($notificari_necitite).'</div></div></td><td><a href="/notificari">notificări</a></td></tr>';
if($rets!='')
echo$div[8].'<table>'.$rets.'</table>'.$div[0];
unset($tichete_rezolvate,$mesaje_necitite,$notificari_necitite,$rets);