<?php
function forum($fid)
{
global$conn,$de,$perm;
if($perm>0)
return true;
$cid=$conn->query('SELECT`clid`FROM`forum_forumuri`WHERE`id`="'.$fid.'"')->fetch_row()[0];
if($cid==0)
return true;
else
{
if($conn->query('SELECT COUNT(*)FROM`grup_membrii`WHERE`de`="'.$de.'"&&`cid`="'.$cid.'"')->fetch_row()[0]>0)
return true;
else
return false;
}
return false;
}