<?php
require'f_galerie.php';
require'f_conectare.php';
conectare('galerie','galerie');
$titlu='Galerie';
if($is_pc>1)
$head[0].='.rotunjit{border:2px solid #eee;box-shadow:0 3px 2px rgba(0,0,0,0.3);border-radius:5px;margin:0 auto}';
$pic=$conn->query('SELECT`de`,`mica`FROM`galerie_poze`WHERE`valid`>"0"&&`fid`="0"ORDER BY RAND()LIMIT 1')->fetch_row();
$countpics=$conn->query('SELECT COUNT(`id`)FROM`galerie_poze`WHERE`de`="'.$pic[0].'"&&`valid`>0')->fetch_row();
require'f_simbol.php';
$head[5]='<p style="text-align:center"><fieldset><legend style="text-align:center"><strong>Poze aleatorii</strong></legend><a href="/poze-membru/la/'.$pic[0].'-'.seo(nume($pic[0],1)).'"><img '.($is_pc>1?'class="rotunjit" ':'').'src="/'.$pic[1].'" width="128" height="128" /></a><a href="/poze-membru/la/'.$pic[0].'-'.seo(nume($pic[0],1)).'">'.simbol($pic[0]).nume($pic[0]).'</a> cu '.($countpics[0]==1?'o singura poza':'<strong>'.$countpics[0].'</strong> poze').'</fieldset></p>';
require'f_sus.php';
echo$div[4].img('galerie.png',1).'Galerie '.number_format($conn->query('SELECT COUNT(*)FROM`galerie_poze`WHERE`valid`>0')->fetch_row()[0]).' poze'.$div[5].$div[1].'<a href="/poze-baieti"><img src="'.$domenii_statice[1].'male.png" alt="" width="16" height="16" />Poze baieti</a> <strong>'.number_format($conn->query('SELECT COUNT(DISTINCT`de`)FROM`galerie_poze`WHERE`sex`="1"&&`valid`>0')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/poze-fete"><img src="'.$domenii_statice[2].'female.png" alt="" width="16" height="16" />Poze fete</a> <strong>'.number_format($conn->query('SELECT COUNT(DISTINCT`de`)FROM`galerie_poze`WHERE`sex`="2"&&`valid`>0')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/poze-noi">'.img('latest.gif',1).'Poze noi</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`galerie_poze`WHERE`valid`>"0"&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/poze-membrii">'.img('color_swatch_1.png',2).'Membrii cu poze în galerie</a> <strong>'.number_format($conn->query('SELECT COUNT(DISTINCT`de`)FROM`galerie_poze`WHERE`valid`>0')->fetch_row()[0]).'</strong>'.$div[0].$div[4].img('group.gif',1).'Poze conectați: <strong>'.$conn->query('SELECT COUNT(DISTINCT`galerie_poze`.`de`)FROM`galerie_poze`,`membrii_conectati`WHERE`galerie_poze`.`de`=`membrii_conectati`.`de`')->fetch_row()[0].'</strong>'.$div[5].$div[1].'<a href="/poze-baieti-conectati"><img src="'.$domenii_statice[1].'male.png" alt="" width="16" height="16" />Poze baieti conectați</a> <strong>'.number_format($conn->query('SELECT COUNT(DISTINCT`galerie_poze`.`de`)FROM`galerie_poze`,`membrii_conectati`WHERE`galerie_poze`.`de`=`membrii_conectati`.`de`&&`galerie_poze`.`sex`="1"')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/poze-fete-conectate"><img src="'.$domenii_statice[2].'female.png" alt="" width="16" height="16" />Poze fete conectate</a> <strong>'.number_format($conn->query('SELECT COUNT(DISTINCT`galerie_poze`.`de`)FROM`galerie_poze`,`membrii_conectati`WHERE`galerie_poze`.`de`=`membrii_conectati`.`de`&&`galerie_poze`.`sex`="2"')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/albume-poze">'.img('album.png',2).'Albume poze</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`galerie_albume`')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/top-poze-vizitate">'.img('topuri.gif',2).'Top poze vizitate</a>'.$div[0].$div[4].img('color_swatch_1.png',2).'Poze membrii din'.$div[5];
$form[0]='/poze-membrii-din" method="get';
$form[1]=1;
require'f_scris3.php';
$judetele='';
$judete=$conn->query('SELECT DISTINCT`judet`FROM`localitati`ORDER BY`judet`');
while($judet=$judete->fetch_row())
{
$judetele.=$judet[0].'::';
}
$form[2]=$div[1].'Alege judet:<br />'.scris3('go',$judetele.'Alte țări',$conn->query('SELECT`location`FROM`membrii`WHERE`id`="'.$de.'"')->fetch_row()[0]).$div[0];
$form[3]='go';
$form[4]='Alege';
require'f_form.php';
echo$div[1].'<a href="/adauga-poze"><img src="'.$domenii_statice[1].'adauga.gif" alt="" />Adaugă poze</a>'.$div[0].$div[1].'<a href="/adauga-album-poze"><img src="'.$domenii_statice[1].'adauga.gif" alt="" />Adaugă album poze</a>'.$div[0];
if($perm>0)
echo$div[1].'<a href="/admin-adauga-poze"><img src="'.$domenii_statice[1].'adauga.gif" alt="" />Adaugă poze (pentru orice membru)</a>'.$div[0];
$mele=$conn->query('SELECT COUNT(`id`)FROM`galerie_poze`WHERE`de`="'.$de.'"&&`valid`>"0"')->fetch_row()[0];
if($mele>0)
echo$div[1].'<a href="/poze-membru/la/'.$de.'-'.seo(nume($de,1)).'">Poze personale</a> <strong>'.number_format($mele).'</strong>'.$div[0];
require'f_jos.php';