<?php
require'f_grup.php';
require'f_conectare.php';
conectare('grup '.$pnume,'grup/id/'.$pid.'-'.seo($pinfo[3]));
$head[1]='grupul '.$pnume;
if($is_pc>1&&$pinfo[6]!='')
$head[0].='.rotunjit{border:2px solid #eee;box-shadow:0 3px 2px rgba(0,0,0,0.3);border-radius:5px;margin:0 auto}';
$head[5]='<p style="text-align:center">'.($pinfo[6]!=''?'<a href="/'.str_replace('logo_mic_','logo_mare_',$pinfo[6]).'"><img '.($is_pc>1?'class="rotunjit" ':'').'src="/'.$pinfo[6].'" alt="'.$pid.'" width="128" height="128" /></a><a href="/'.str_replace('logo_mic_','logo_mare_',$pinfo[6]).'"><img src="'.$domenii_statice[2].'zoom.gif" alt="" /></a>':'<a href="'.$domenii_statice[2].'nopic.jpg"><img src="'.$domenii_statice[2].'nopic.jpg" alt="" width="128" height="128" /></a><a href="'.$domenii_statice[2].'nopic.jpg"><img src="'.$domenii_statice[2].'zoom.gif" alt="" /></a>').'</p>';
$titlu='Grup '.$pnume;
require'f_sus.php';
$cango=$conn->query('SELECT COUNT(*)FROM`grup_membrii`WHERE`cid`="'.$pid.'"&&`de`="'.$de.'"&&`citit`>"0"')->fetch_row()[0];
$fid=$conn->query('SELECT`id`FROM`forum_forumuri`WHERE`clid`="'.$pid.'"')->fetch_row()[0];
$rid=$conn->query('SELECT`id`FROM`chat_camere`WHERE`clid`="'.$pid.'"')->fetch_row()[0];
$tps=$conn->query('SELECT COUNT(*)FROM`forum_topicuri`WHERE`fid`="'.$fid.'"')->fetch_row()[0];
$pss=$conn->query('SELECT COUNT(*)FROM`forum_postari`,`forum_topicuri`WHERE`forum_postari`.`tid`=`forum_topicuri`.`id`&&`forum_topicuri`.`fid`="'.$fid.'"')->fetch_row()[0];
require'f_profil.php';
require'f_data.php';
echo$div[4].img('grupuri.png',2).'Grup '.$pnume.$div[5].$div[10].'Identitate grup: <strong>'.$pid.'</strong><br />Proprietar: '.profil($pinfo[1]).'<br /><a href="/membrii-grup/id/'.$pid.'-'.seo($pinfo[3]).'">Membrii</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`grup_membrii`WHERE`cid`="'.$pid.'"&&`citit`>"0"')->fetch_row()[0]).'</strong><br />';
if($cango>0)
echo($conn->query('SELECT`dezabonat`FROM`grup_membrii`WHERE`cid`="'.$pid.'"&&`de`="'.$de.'"')->fetch_row()[0]==0?'Esti abonat la acest grup<br /><a href="/abonare-grup/id/'.$pid.'-'.seo($pinfo[3]).'/tip/dezabonare">Dezabonează-te</a>':'Nu ești abonat la acest grup<br /><a href="/abonare-grup/id/'.$pid.'-'.seo($pinfo[3]).'/tip/abonare">Abonează-te</a>').'<br />';
echo'<small>Creat: '.data($pinfo[2]).'</small><br /><small>BBCode: <strong>[url=/grup/id/'.$pid.'-'.seo($pinfo[3]).']'.$pnume.'[/url]</strong></small>'.$div[0];
if(($cango>0)||$perm>0)
{
echo$div[1].'<a href="/anunturi-grup/id/'.$pid.'-'.seo($pinfo[3]).'">'.img('stiri.png',2).'Anunturi</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`grup_anunturi`WHERE`cid`="'.$pid.'"')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/camera-chat/camera/'.$rid.'-'.seo($pinfo[3]).'/v/0/p/0">'.img('chat.png',1).$pnume.'Chat</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`chat_arhiva`WHERE`cid`="'.$rid.'"')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/forum/forum/'.$fid.'-'.seo($pinfo[3]).'">'.img('forum.png',2).$pnume.'Forum</a> <strong>'.number_format($tps).'/'.number_format($pss).'</strong>'.$div[0];
if($cango>0&&$pinfo[1]!=$de)
echo$div[1].'<a href="/iesi-din-grup/id/'.$pid.'-'.seo($pinfo[3]).'"><img src="'.$domenii_statice[2].'ofl.png" alt="-" width="16" height="16" />Iesi din grup</a>'.$div[0];
else
echo$div[1].'<a href="/intra-in-grup/id/'.$pid.'-'.seo($pinfo[3]).'"><img src="'.$domenii_statice[1].'onl.png" alt="+" width="16" height="16" />Intra în grup</a>'.$div[0];
if($pinfo[1]==$de)
{
echo$div[1].'<a href="/cereri-grup/id/'.$pid.'-'.seo($pinfo[3]).'">'.img('pref.gif',1).'Cereri</a> <strong>'.number_format($conn->query('SELECT COUNT(*)FROM`grup_membrii`WHERE`cid`="'.$pid.'"&&`citit`="0"')->fetch_row()[0]).'</strong>'.$div[0].$div[1].'<a href="/trimite-mass-grup/id/'.$pid.'-'.seo($pinfo[3]).'">'.img('mesaje.png',1).'Trimite mass membrilor grupului '.$pnume.'</a>'.$div[0];
}
}
else
echo$div[1].'Topicuri: <strong>'.$tps.'</strong>'.$div[0].$div[1].'Postări: <strong>'.$pss.'</strong>'.$div[0].$div[1].'Descriere: <br /><strong>'.htmlspecialchars($pinfo[4]).'</strong>'.$div[0].$div[1].'Reguli: <br /><strong>'.htmlspecialchars($pinfo[5]).'</strong>'.$div[0].$div[10].'Suna bine?<br /><a href="/intra-in-grup/id/'.$pid.'-'.seo($pinfo[3]).'"><img src="'.$domenii_statice[1].'onl.png" alt="+" width="16" height="16" />Intra în grup!</a>'.$div[0];
if($pinfo[1]==$de||in_array($de,$id_proprietari))
echo$div[1].'<a href="/editeaza-grup/id/'.$pid.'-'.seo($pinfo[3]).'"><img src="'.$domenii_statice[1].'adauga.gif" alt="" />Editează grup '.$pnume.'</a>'.$div[0].$div[1].'<a href="/sterge-grup/id/'.$pid.'-'.seo($pinfo[3]).'"><img src="'.$domenii_statice[2].'sterge.png" alt="" width="16" height="16" />Șterge grup '.$pnume.'</a>'.$div[0];
require'f_jos.php';