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

$thisclient=1;
$now=time()+$config[31][1]*3600;

if($choice==""._YES."") {

	$query="UPDATE hd_clients SET active=-1 WHERE clientid='".$_SESSION['hd_clientid']."' LIMIT 1";

	if(mysql_query($query,$db_link)) {
		logevent('_CLIENT_DELETED',$_SESSION['hd_clientid'],$_SESSION['hd_idc']);
		messagetop(_CLIENT_DELETED,'','tickets.php?clientid='.$_SESSION['hd_clientid'].'',1);
	}else{
		messagetop(_CLIENT_COULD_NOT_BE_DELETED,mysql_error(),'tickets.php?clientid='.$_SESSION['hd_clientid'].'',0);
	}




}else{

	include("head_template.php");
	$result=mysql_query("SELECT clientid, last, first, email FROM hd_clients WHERE clientid=".$_SESSION['hd_clientid']."",$db_link);

	echo '
<div class="container">
	<div class="row">


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

';


	print("<b><font size=4 color=red>"._DELETE_THIS_CLIENT."?</font></b>".tip(76));

	while($row = mysql_fetch_array($result))
	{
		print("<br><br><br><b>"._CLIENT_ID.":</b> ".$row[clientid]);
		print("<br><b>"._LAST_NAME.":</b> ".$row[last]);
		print("&nbsp;&nbsp;&nbsp;&nbsp;<b>"._FIRST_NAME.":</b> ".$row[first]);
		print("<br><b>"._EMAIL.":</b> ".$row[email]."<br>");
	}

	print("<br><br><br>");
	print("<table cellspacing='0' cellpadding='0'><tr>");
	redbutton("deleteclient.php?choice="._YES."&clientid=".$_SESSION['hd_clientid']."",strtoupper(_YES));
	yellowbutton('tickets.php?clientid='.$_SESSION['hd_clientid'].'',strtoupper(_NO));
	print("</tr></table>");
echo '
		</td>
		</tr>
		</table>
</div>
</div>
';
	include("foot_template.php");
}
?>
	