<?PHP
function utime (){
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime(); 

// build query
$query="select ";
$query.="first_name, ";
$query.="username ";
$query.="from user where sid='".addslashes(trim($sid))."'";

// execute query
$rs=@mysql_fetch_row(mysql_query($query));

// define variables
$xifirst_name=stripslashes($rs[0]);
$xiusername=stripslashes($rs[1]);

echo("
<HTML>
<HEAD>
  <TITLE>:&lt;&gt;: WHM AutoPilot :&lt;&gt;: Web Host Client Management System</TITLE>
<style>
 td{ font-family:tahoma,Tahoma; font-size:8pt; } 
</style>
<style>
	 body, td, center, p {font-family:tahoma, arial, helvetica; font-size: 11px; color: #000000} div {font-family:tahoma, arial, helvetica; font-size: 11px} A:link { text-decoration: underline: none; none; color:#000000;} A:visited { text-decoration: underline: none; none; color:#000000;} A:hover { text-decoration: underline; font-weight: none;color:#990000;} .linkTable { PADDING-LEFT: 5px }

	 table fieldset
		{
		background-color: #F0F0F0;
		border-width: 1px; 
		border-color: #003F63;
		border-style: solid; 
		padding: 3px 3px 3px 3px;
		-moz-border-radius: 4px;
		}

	#standard legend
		{
		background: url(themes/blue/images/newnav2_23.jpg);

    	border-width:1px 1px 1px 1px;
    	border-color:#003F63;
    	border-style:solid;
    	color:#fff;

        margin:0px 0px 5px 0px;

    	font-weight:bold;
    	text-transform:uppercase;
    	font-size:90%;
    	text-align:left;
    	width:186px;
    	padding:3px 6px;
		}
	#sidebar legend
		{
		color: #fff;
		background: #003F63;
		border: 1px solid #003F63;
		padding: 2px 6px;
		font-size:13px;
		font-weight: 800
		}
	#notes legend
		{
		color: #fff;
		background: green;
		border: 1px solid green;
		padding: 2px 6px;
		}
	#el01 legend {padding:0}
	#el02 legend {
		color:#00f;
		background-color:#ddd;
	}
	#el03 legend {background:url(/i/icon-info.gif) no-repeat 100% 50%}
	#el04 legend {margin:0}
	#el05 legend {border:2px dotted #00f}
	#el06 legend {
		position:absolute;
		top:0;
		left:0;
	}
	#el07 legend {font-family: Courier New, Courier}
	#el08 legend {font-size:2em}
	#el09 legend {font-size:0.5em}
	#el10 legend {font-weight:bold}
	#el11 legend {padding:2em}
	#el12 legend {text-align:right}
	
	div.wrapper
		{
		width: 99%;
		background-color: #FFFFFF; 
		border-width: 1px; 
		border-color: #40a3de;
		border-style: solid; 
		padding: 2px 2px 2px 2px;
		-moz-border-radius: 4px;
		}
	div.wrapper_red
		{
		width: 99%;
		background-color: #FFFFFF; 
		border-width: 1px; 
		border-color: #990000;
		border-style: solid; 
		padding: 2px 2px 2px 2px;
		-moz-border-radius: 4px;
		}
	div.wrapper_shade
		{
		width: 95%;
		background-color: #c6e2ff; 
		border-width: 1px; 
		border-color: #40a3de;
		border-style: solid; 
		padding: 4px 4px 4px 4px;
		-moz-border-radius: 4px;
		}
	div.wrapper_required
		{
		width: 97%;
		background-color: #ffd5d5; 
		border-width: 1px; 
		border-color: #990000;
		border-style: dotted; 
		padding: 4px 4px 4px 4px;
		-moz-border-radius: 4px;
		}
	div.wrapper_success
		{
		width: 98%;
		background-color: #ccffcc; 
		border-width: 1px; 
		border-color: green;
		border-style: solid; 
		padding: 4px 4px 4px 4px;
		-moz-border-radius: 4px;
		}
	div.wrapper_field
		{
		width: 99%;
		background-color: #e3e3e3; 
		border-width: 1px; 
		border-color: #999999;
		border-style: dotted; 
		padding: 2px 4px 4px 2px;
		}


	</style>
<script type=\"text/javascript\" language=\"JavaScript1.2\" src=\"".$http_images."/stm31.js\"></script>
<SCRIPT language='JavaScript' src='".$http_web."/inc/overlib.js'></SCRIPT>
<DIV id=overDiv style='Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute'></DIV>
	
<SCRIPT LANGUAGE=\"JavaScript\">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->
</script>
</HEAD>
<BODY BGCOLOR='#ffffff' leftMargin='0' topMargin='0' bottomMargin='0'
rightMargin='0' MARGINWIDTH='0' MARGINHEIGHT='0'>

<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0'
CELLPADDING='0'>
  <TR>
    <TD WIDTH='100%' BACKGROUND='".$http_images."/newnav2_tableback.jpg'>
	");
?>
<TABLE ID="Table_01"
WIDTH="800" HEIGHT="75" BORDER="0" CELLPADDING="0" CELLSPACING="0">
  <TR>
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_01.jpg" WIDTH="4" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_02.jpg" WIDTH="78" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_03.jpg" WIDTH="73" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_04.jpg" WIDTH="73" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_05.jpg" WIDTH="73" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_06.jpg" WIDTH="73" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_07.jpg" WIDTH="73" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_08.jpg" WIDTH="79" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_09.jpg" WIDTH="221" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_10.jpg" WIDTH="42" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_11.jpg" WIDTH="11" HEIGHT="38"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
  </TR>
  <TR>
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_12.jpg" WIDTH="4" HEIGHT="37"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD COLSPAN="7">
	<!--NOEDIT-->
	<script type="text/javascript" language="JavaScript1.2">
<!--
stm_bm(["menu48c8",430,"","<?PHP echo $http_images; ?>/blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","",0],this);
stm_bp("p0",[0,4,0,0,0,0,0,0,100,"",-2,"",-2,90,0,0,"#000000","#f1f2ee","",3,0,0,"#000000"]);
stm_ai("p0i0",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_13.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_13.jpg",78,37,0,"","_self","","","","",0,0,0,"","",0,0,0,0,1,"#f1f2ee",0,"#93a070",1,"","",3,3,0,0,"#fffff7","#000000","#000000","#ffffff","8pt 'Tahoma','Arial'","8pt 'Tahoma','Arial'",0,0]);
stm_bp("p1",[1,4,0,0,2,3,0,0,100,"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.43)",-2,"",-2,67,2,3,"#999999","#ffffff","",3,1,1,"#aca899"]);
stm_aix("p1i0","p0i0",[0,"Add New Server","","",-1,-1,0,"<?PHP echo $http_admin;?>/server_config.php?sid=<?PHP echo $sid;?>","_self","","Add New Server","","",0,0,0,"","",0,0,0,0,1,"#ffffff",0,"#999999",0,"","",3,3,0,0,"#fffff7","#000000","#000000","#ffffff","8pt Trebuchet MS","8pt Trebuchet MS"]);
stm_aix("p1i1","p1i0",[0,"Manage All Servers","","",-1,-1,0,"<?PHP echo $http_admin;?>/server_edit.php?sid=<?PHP echo $sid;?>","_self","",""]);
stm_aix("p1i2","p1i1",[0,"Server Rotation","","",-1,-1,0,"<?PHP echo $http_admin;?>/server_position.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p1i3","p1i1",[0,"WHM Import Tool","","",-1,-1,0,"<?PHP echo $http_admin;?>/csv.php?sid=<?PHP echo $sid;?>"]);
stm_ep();
stm_aix("p0i1","p0i0",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_14.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_14.jpg",73,37,0,"<?PHP echo $http_admin;?>/payment_process.php?sid=<?PHP echo $sid;?>","_self","","Activate and Edit Payment Gateways","","",0,0,0,"","",0,0,0,0,1,"#f1f2ee",0,"#93a070",0]);
stm_aix("p0i2","p0i1",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_15.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_15.jpg",73,37,0,"","_self","",""]);
stm_bpx("p2","p1",[]);
stm_aix("p2i0","p1i1",[0,"Add New Account","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_management.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p2i1","p1i1",[0,"View All Accounts","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_view_edit.php?sid=<?PHP echo $sid;?>&status=99"]);
stm_aix("p2i2","p2i1",[0,"View Pending Accounts","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_view_edit.php?sid=<?PHP echo $sid;?>&status=0"]);
stm_aix("p2i3","p2i1",[0,"View Active Accounts","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_view_edit.php?sid=<?PHP echo $sid;?>&status=1"]);
stm_aix("p2i4","p2i1",[0,"View Suspended Accounts","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_view_edit.php?sid=<?PHP echo $sid;?>&status=2"]);
stm_aix("p2i5","p2i1",[0,"View Cancelled Accounts","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_view_edit.php?sid=<?PHP echo $sid;?>&status=5"]);
stm_aix("p2i6","p2i1",[0,"View Pending Cancels","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_view_edit.php?sid=<?PHP echo $sid;?>&status=4"]);
stm_aix("p2i7","p1i1",[0,"Cancellation Requests","","",-1,-1,0,"<?PHP echo $http_admin;?>/client_cancel_account.php?sid=<?PHP echo $sid;?>"]);
stm_ep();
stm_aix("p0i3","p0i2",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_16.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_16.jpg"]);
stm_bpx("p3","p1",[]);
stm_aix("p3i0","p1i1",[0,"Add Shared Package","","",-1,-1,0,"<?PHP echo $http_admin;?>/plan_build.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i1","p1i1",[0,"Add Dedicated Server Package","","",-1,-1,0,"<?PHP echo $http_admin;?>/plan_build_dedicated.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i2","p1i1",[0,"Edit Packages","","",-1,-1,0,"<?PHP echo $http_admin;?>/plan_edit.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i3","p1i1",[0,"Package Group Editor","","",-1,-1,0,"<?PHP echo $http_admin;?>/group_editor.php?sid=<?PHP echo $sid;?>"]);
stm_ai("p3i4",[6,2,"#333333","",-1,-1,0]);
stm_aix("p3i5","p1i1",[0,"Add Reseller Profile","","",-1,-1,0,"<?PHP echo $http_admin;?>/reseller_profile.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i6","p1i1",[0,"Edit Reseller Profiles","","",-1,-1,0,"<?PHP echo $http_admin;?>/reseller_profile_edit.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i7","p3i4",[]);
stm_aix("p3i8","p1i1",[0,"Add New Addon","","",-1,-1,0,"<?PHP echo $http_admin;?>/addon_build.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i9","p1i1",[0,"Edit Existing Addons","","",-1,-1,0,"<?PHP echo $http_admin;?>/addon_edit.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i10","p1i1",[0,"Addon Group Editor","","",-1,-1,0,"<?PHP echo $http_admin;?>/addon_group_editor.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i11","p3i4",[]);
stm_aix("p3i12","p1i1",[0,"Add New Coupon","","",-1,-1,0,"<?PHP echo $http_admin;?>/coupon_build.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i13","p1i1",[0,"Edit Existing Coupons","","",-1,-1,0,"<?PHP echo $http_admin;?>/coupon_edit.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p3i14","p1i1",[0,"Edit Domain Pricing","","",-1,-1,0,"<?PHP echo $http_admin;?>/domain_specs.php?sid=<?PHP echo $sid;?>"]);
stm_ep();
stm_aix("p0i4","p0i2",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_17.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_17.jpg"]);
stm_bpx("p4","p1",[]);
stm_aix("p4i0","p1i1",[0,"Affiliate Accounting","","",-1,-1,0,"<?PHP echo $http_admin;?>/affiliate_accounting.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p4i1","p1i1",[0,"View Affiliate Details","","",-1,-1,0,"<?PHP echo $http_admin;?>/affiliate_details.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p4i2","p1i1",[0,"Affiliate Plan Activation","","",-1,-1,0,"<?PHP echo $http_admin;?>/affiliate_plan_edit.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p4i3","p1i1",[0,"Affiliate User Requests","","",-1,-1,0,"<?PHP echo $http_admin;?>/affiliate_approve.php?sid=<?PHP echo $sid;?>"]);
stm_ep();
stm_aix("p0i5","p0i2",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_18.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_18.jpg"]);
stm_bpx("p5","p1",[]);
stm_aix("p5i0","p1i1",[0,"Weekly Sales Reports","","",-1,-1,0,"<?PHP echo $http_admin;?>/report_weekly_sales.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p5i1","p1i1",[0,"Revenue Per Server","","",-1,-1,0,"<?PHP echo $http_admin;?>/reports_monthly_revenue.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p5i2","p1i1",[0,"New Signups - Monthly","","",-1,-1,0,"<?PHP echo $http_admin;?>/reports_new_signups.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p5i3","p1i1",[0,"Daily Invoice Report","","",-1,-1,0,"<?PHP echo $http_admin;?>/reports_daily_invoice.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p5i4","p1i1",[0,"Daily Service Invoice Report","","",-1,-1,0,"<?PHP echo $http_admin;?>/reports_daily_invoice_service.php?sid=<?PHP echo $sid;?>"]);
stm_aix("p5i5","p1i1",[0,"Invoice Report [ Range ]","","",-1,-1,0,"<?PHP echo $http_admin;?>/invoice_reporting.php?sid=<?PHP echo $sid;?>"]);
stm_ep();
stm_aix("p0i6","p0i1",[2,"","<?PHP echo $http_images; ?>/v2_nav_2007_19.jpg","<?PHP echo $http_images; ?>/v2_nav_2007_19.jpg",79,37,0,"<?PHP echo $http_admin;?>/invoice.php?sid=<?PHP echo $sid;?>","_self","","Manage Hosting and Service Invoices","","",0,0,0,"","",0,0,0,0,2]);
stm_ep();
stm_em();
//-->
</script>

	<!--/NOEDIT-->
	</TD> 
     
     
     
     
     
     
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_20.jpg" WIDTH="221" HEIGHT="37"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
    <TD><A HREF="<?PHP echo $http_admin; ?>/index2.php?sid=<?PHP echo $sid; ?>"><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_21.jpg" WIDTH="42" HEIGHT="37" border="0" ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></A></TD> 
    <TD><IMG SRC="<?PHP echo $http_images; ?>/v2_nav_2007_22.jpg" WIDTH="11" HEIGHT="37"
      ALT="" NATURALSIZEFLAG="0" ALIGN="BOTTOM"></TD> 
  </TR>
</TABLE>

	
<?PHP
echo("
	<TABLE WIDTH='780' BORDER='0' CELLPADDING='0' CELLSPACING='0'>
        <TR>
          <TD><IMG SRC='".$http_images."/newnav2_23.jpg' WIDTH='7' HEIGHT='19' NATURALSIZEFLAG='0'
            ALIGN='BOTTOM'></TD> 
          <TD COLSPAN='7' BACKGROUND='".$http_images."/newnav2_23.jpg' WIDTH='519'
          HEIGHT='19'><B><FONT COLOR='#ffffff' SIZE='-2' FACE='Tahoma'>Logged
            in as:  ".trim($xiusername)."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href='".$http_admin."/logout.php?sid=".$sid."'><font color='#FFFFFF'>Logout</font></a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Version ".$current_mib_version."</FONT></B></TD>
           
          <TD BACKGROUND='".$http_images."/newnav2_23.jpg' WIDTH='205' HEIGHT='19'>
            <P><CENTER><B><FONT COLOR='#ffffff' SIZE='-2' FACE='Tahoma'><SCRIPT language='JavaScript'><!--
			var dayNames = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
			var monthNames = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
			// apparently there's a bug in netscape for y2k...
			var now = new Date();
			var IE4 = (document.all) ? true : false;
			var year = (IE4) ? now.getYear() : 1900 + now.getYear();
			document.write(dayNames[now.getDay()] + ', ' + monthNames[now.getMonth()] + ' ' + now.getDate() + ', ' + year);		
		//--></FONT></SCRIPT>&nbsp;&nbsp;&nbsp;</B></CENTER></TD>
          <TD><IMG SRC='".$http_images."/newnav2_23.jpg' WIDTH='41' HEIGHT='19' 
            NATURALSIZEFLAG='0' ALIGN='BOTTOM'></TD> 
          <TD><IMG SRC='".$http_images."/newnav2_23.jpg' WIDTH='8' HEIGHT='19' NATURALSIZEFLAG='0'
            ALIGN='BOTTOM'></TD> 
        </TR>
      </TABLE></TD>
  </TR>
</TABLE><BR>
");
?>