<?

session_start();

include ("config.php");
if(isset($_SESSION['nume'])) {
      	$userb = ''.$_SESSION['nume'].'';
 $getuser="SELECT * from utilizatori WHERE nume='$userb'";
  $getuser2=mysql_query($getuser) or die("COuld not draw cookies");
  $getuser3=mysql_fetch_array($getuser2);
  if(strlen($getuser3[nume])>1)
  {
    $_SESSION['user']=$getuser3[nume];        
if($getuser3[status]>=2)
    {
?>
<html>
<link href="style_c.css" rel="stylesheet" type="text/css" />
<?
include ("header.html");
?>
<table width='950' cellspacing='0' cellpadding='0' align='center'>

<?
include ("right.html");
?>
<td width='760' valign='top' class='continut'>

<table cellspacing='0' cellpadding='10'  width='100%'>
<tr>
<td>
<!-- CONTINUTUL !!!! -->
<table align='right' width='230' cellspacing='0' cellpadding='3'><tr>
<tr>
<td>


<table width='100%' class='border' cellspacing='0'>

<?

include("config.php");
$ban = $_GET["ban"];
$id = $_GET["ban"];
$motiv = $_POST["motiv"];
$reclamant = $_POST["userok"];

///// ban
if($ban = "$id"){
$uprecords="Update utilizatori set banned='Yes' , motiv='$motiv' , reclamant='$reclamant' where id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was banned";		
   }

///unban  
$unban = $_GET["unban"];
$id = $_GET["unban"];

if($unban = "$id"){
$uprecords="Update utilizatori set banned='no' where id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was unbanned";		
   }  

/////warn 1
$warn = $_GET["warn"];
$id = $_GET["warn"];
if($warn = "$id"){
$uprecords="Update utilizatori set warn='1' where id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was warned";		
   }    

/////warn 2
$warn2 = $_GET["warn2"];
$id = $_GET["warn2"];
if($warn2 = "$id"){
$uprecords="Update utilizatori set warn='2' where id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was 2 warned";		
   }

//////////warn 3  
$warn3 = $_GET["warn3"];
$id = $_GET["warn3"];
if($warn3 = "$id"){
$uprecords="Update utilizatori set warn='3' where id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was 3 warned";		
  } 

//////////Delete user
$delete = $_GET["delete"];
$id = $_GET["delete"];
if($delete = "$id"){
$uprecords="DELETE FROM utilizatori WHERE id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was <b>DELETED!!!</b>";		
  }

////delete avt 
$avt = $_GET["avt"];
$id = $_GET["avt"];
if($avt = "$id"){
$uprecords="Update utilizatori set setavatar='0' where id='$id'";

  mysql_query($uprecords) or die("Could not update records"); 
print "Avatar deleted!";		
   }  
 
$banip = $_GET["banip"];
$id = $_GET["banip"];
$user = $_POST["userok"];
$ip = $_POST["ip"];
$motiv = $_POST["motiv"];

if($banip = "$id"){
$uprecords="INSERT INTO banip (ip , motiv , user) VALUES ('$ip' , '$motiv' , '$user')";

  mysql_query($uprecords) or die("Could not update records"); 
print "User was Baned Ip For Ever";		
   }      
?>

<!-- SFARSIT CONTINUT!!! -->      <center>

	</center>


</td></tr></table></table></table>
</tr>

<tr>
<td width='180'>&nbsp;
</td>
<?
include ("flooter.html");
?>

</td>
</tr>
</table>
<body>
</html>
<?
}}}
?>