<?php
include("postget.php");
include_once("common.php");
checklevel(4,$_REQUEST['clientid']);

if(!$name){print("No User Specified.");exit();}
if($choice=='yes')
{
	//	include("dbinfo.php");
	$query="SELECT access FROM hd_users WHERE name='$name'";
	$result=mysql_query($query,$db_link);
	$one=mysql_fetch_row($result);
	if($one[0]<=$_SESSION['hd_accesslvl'])
	{
		$query="DELETE FROM hd_users WHERE name='$name'";
		if(!mysql_query($query,$db_link)){
			messagetop(_ERROR,mysql_error(),'users.php',0);
		}else{
			messagetop(_THE_CHANGES_WHERE_MADE_SUCCESSFULLY,'','users.php',1);
		}
	}else{
		messagetop(_ACCESS_DENIED,'','users.php',0);
	}

}else{
	include("head_template.php");
	echo '
<div class="container">
	<div class="row">


<table width="98%" class="table table-bordered">
		<tr>
		<td align="center" width="100%">
';
	echo _USERS;
echo '
		</td>
		</tr>
';	$imagenAmostrar = "trash_.png";
	
echo '
			<tr valign="top">
				<td>

';


	print("<h2>"._DELETE." ".$name."?</h2><br>");

	print("<br><table cellspacing='0' cellpadding='0' border='0'><tr>");
	redbutton("users3.php?name=".$name."&choice=yes",_DELETE);
	yellowbutton("users.php",_RETURN);
	print("</tr></table>");

echo '
		</td>
		</tr>
		</table>
</div>
</div>
';
	include("foot_template.php");

}

?>