<?php
function getstatut($de)
{
global$conn,$domenii_statice;
$info=$conn->query('SELECT`perm`,`lei`,`sex`,`valid`,`cont_dezactivat`FROM`membrii`WHERE`id`="'.$de.'"')->fetch_row();
$sex=($info[2]=='F'?'a':'');
if($conn->query('SELECT COUNT(*)FROM`membrii_pedepsiti`WHERE`de`="'.$de.'"&&`penalty`="0"')->fetch_row()[0]>0)
return'<s><img src="'.$domenii_statice[1].'simboluri/mut_mare.png" alt="Pus'.$sex.' pe mut!" /></s>';
elseif($info[3]==0)
return'<img src="'.$domenii_statice[2].'simboluri/nevalidat_mare.gif" alt="Ne validat'.$sex.'" />';
elseif($info[4]>0)
return'<img src="'.$domenii_statice[2].'simboluri/dezactivat_mare.png" alt="Dezactivat'.$sex.'" />';
elseif($info[0]>0)
return'<img src="'.$domenii_statice[1].'simboluri/admin_mare.png" alt="'.$info[0].'" />';
elseif($info[1]<1)
return'<img src="'.$domenii_statice[1].'simboluri/0.gif" alt="0%" />';
elseif($info[1]<100)
return'<img src="'.$domenii_statice[1].'simboluri/1.gif" alt="10%" />';
elseif($info[1]<500)
return'<img src="'.$domenii_statice[2].'simboluri/2.gif" alt="20%" />';
elseif($info[1]<1000)
return'<img src="'.$domenii_statice[1].'simboluri/3.gif" alt="30%" />';
elseif($info[1]<5000)
return'<img src="'.$domenii_statice[2].'simboluri/4.gif" alt="40%" />';
elseif($info[1]<10000)
return'<img src="'.$domenii_statice[1].'simboluri/5.gif" alt="50%" />';
elseif($info[1]<50000)
return'<img src="'.$domenii_statice[2].'simboluri/6.gif" alt="60%" />';
elseif($info[1]<100000)
return'<img src="'.$domenii_statice[1].'simboluri/7.gif" alt="70%" />';
elseif($info[1]<500000)
return'<img src="'.$domenii_statice[2].'simboluri/8.gif" alt="80%" />';
elseif($info[1]<1000000)
return'<img src="'.$domenii_statice[1].'simboluri/9.gif" alt="90%" />';
else
return'<img src="'.$domenii_statice[2].'simboluri/10.gif" alt="100%" />';
}
function budres($de,$la)
{
global$conn,$numar_prieteni;
if($de==$la||$conn->query('SELECT COUNT(*)FROM`ignorati`WHERE`la`="'.$de.'"&&`de`="'.$la.'"')->fetch_row()[0]>0)
return 3;
if($conn->query('SELECT COUNT(*)FROM`prieteni`WHERE(`de`="'.$de.'"&&`la`="'.$la.'"||`de`="'.$la.'"&&`la`="'.$de.'")&&`citit`>"0"')->fetch_row()[0]>0)
return 2;
if($conn->query('SELECT COUNT(*)FROM`prieteni`WHERE((`de`="'.$de.'"&&`la`="'.$la.'")||(`de`="'.$la.'"&&`la`="'.$de.'"))&&`citit`="0"')->fetch_row()[0]>0)
return 1;
if($conn->query('SELECT COUNT(*)FROM`prieteni`WHERE(`de`="'.$la.'"||`la`="'.$la.'")&&`citit`>"0"')->fetch_row()[0]>=$numar_prieteni)
return 3;
if($conn->query('SELECT COUNT(*)FROM`prieteni`WHERE(`de`="'.$de.'"||`la`="'.$de.'")&&`citit`>"0"')->fetch_row()[0]>=$numar_prieteni)
return 3;
return 0;
}