<?PHP
// start the client menu
echo("
<table width='725' border='0' cellspacing='1' cellpadding='2'>
	");
if (trim($show_client)=="1")
	{
	echo("
		<form action='".$PHP_SELF."' method='POST'>
		<input type='hidden' name='sid' value='".trim($sid)."'>
		<input type='hidden' name='oid' value='".trim($oid)."'>
		<input type='hidden' name='sid' value='".trim($sid)."'>
		<input type='hidden' name='show_client' value='".trim($show_client)."'>
		<input type='hidden' name='show_domain' value='".trim($show_domain)."'>
		<input type='hidden' name='show_account' value='".trim($show_account)."'>
		<input type='hidden' name='resolved_date' value='".trim($resolved_date)."'>
		<input type='hidden' name='uid' value='".trim($uid)."'>
		<input type='hidden' name='whm_id' value='".trim($whm_id)."'>
		<input type='hidden' name='status' value='".trim($status)."'>
		".((isset($in))?"<input type='hidden' name='in' value='".$in."'>":"")."
		".((isset($ix))?"<input type='hidden' name='ix' value='".$ix."'>":"")."
		".((isset($p))?"<input type='hidden' name='p' value='".$p."'>":"")."
		".((isset($pg))?"<input type='hidden' name='pg' value='".$pg."'>":"")."
		");
	}
echo("
	<tr>
		<td width='49%' align='left' valign='top'><img src='".$http_images."/menu_arrow.gif'><b>Client Information</b><img src='".$http_images."/space.gif' width='200' height='1'></td>
		<td width='51%' align='left' valign='top'>[<a href='".$http_admin."/client_view.php?sid=".trim($sid)."&oid=".trim($oid)."".((trim($show_client)=="1")?"&show_client=0":"&show_client=1")."&show_domain=".trim($show_domain)."&show_account=".trim($show_account)."".((isset($in))?"&in=5":"")."".((isset($ix))?"&ix=5":"")."".((isset($p))?"&p=".$p."":"")."".((isset($pg))?"&pg=".$pg."":"")."'>".((trim($show_client)=="0")?"Show":"Hide")."</a>]</td>
	</tr>
</table>
	");
if (trim($show_client)=="1")
	{
	echo("
	<table width='725' border='0' cellspacing='1' cellpadding='2'>
		");
# added 7/16/2003
# ---------------------------------------------------------------------------------
echo("
				<tr>
					<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Change Ownership of Account:</td>
					<td width='75%' align='left' valign='top'><select name='change_ownership' ".$input_style.">
					<option value='x'>Make no change of ownership</option>
	");
$r90="select ";
$r90.="uid, ";
$r90.="zip_code, ";
$r90.="username, ";
$r90.="first_name, ";
$r90.="last_name ";
$r90.="from ";
$r90.="user ";
$r90.="order by ";
$r90.="first_name asc";

$rs91=mysql_query($r90);
while ($r92=mysql_fetch_row($rs91)) { echo "<option value='".$r92[0]."'>".$r92[3]." ".$r92[4]." [".$r92[2]."][".$r92[1]."]</option>\n"; }
echo("
					</select></td>
				</tr>
	");
# ---------------------------------------------------------------------------------
# added 7/16/2003
echo("
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Client Name:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='20' maxlength='255' type='text' name='first_name' value='".trim($first_name)."'> <input ".$input_style." width='15' maxlength='255' type='text' name='last_name' value='".trim($last_name)."'></td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Organization Name:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='43' maxlength='255' type='text' name='organization_name' value='".trim($organization_name)."'></td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Address:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='43' maxlength='255' type='text' name='street_address_1' value='".trim($street_address_1)."'></td>
		</tr>
	
		<tr>
			<td width='25%' align='left' valign='top'></td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='43' maxlength='255' type='text' name='street_address_2' value='".trim($street_address_2)."'></td>
		</tr>
	
		<tr>
			<td width='25%' align='left' valign='top'></td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='12' maxlength='255' type='text' name='city' value='".trim($city)."'> , <input ".$input_style." size='13' maxlength='255' type='text' name='state' value='".trim($state)."'> <input ".$input_style." size='10' maxlength='255' type='text' name='zip_code' value='".trim($zip_code)."'> <input ".$input_style." size='2' maxlength='255' type='text' name='country' value='".trim($country)."'></td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Phone Number:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='43' maxlength='255' type='text' name='phone' value='".trim($phone)."'></td>
		</tr>
	");
if (strlen(trim($fax))!=0)
		{
		echo("
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Fax Number:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='43' maxlength='255' type='text' name='fax' value='".trim($fax)."'></td>
		</tr>
			");
		}
echo("
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>eMail:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='43' maxlength='255' type='text' name='email' value='".trim($email)."'></td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>User Created on:</td>
			<td width='75%' align='left' valign='top'><input ".$input_style." size='15' maxlength='255' type='text' name='user_ogcreate' value='".date("m/d/Y", $ogcreate)."'> ex. MM/DD/YYYY</td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>How were we found?</td>
			<td width='75%' align='left' valign='top'>".$advert."".((trim($advert_other)!="")?"".$advert_other."":"")."</td>
		</tr>
	");
if (trim($referrer_id)!="")
		{
		$ri=mysql_fetch_row(mysql_query("select first_name, last_name from user where uid='".addslashes(trim($referrer_id))."'"));
		echo("
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Referred by:</td>
			<td width='75%' align='left' valign='top'>".stripslashes($ri[0])." ".stripslashes($ri[1])."</td>
		</tr>
			");
		}
echo("
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='200' height='2'></td>
			<td width='75%' align='left' valign='top'><img src='".$http_images."/space.gif' width='400' height='2'></td>
		</tr>
		");
if (trim($client_ip)!="")
		{
		echo("
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Clients Local IP:</td>
			<td width='75%' align='left' valign='top' style='padding: 8'>Ordered from IP:  <B>".trim($client_ip)."</B> - - <a href='http://www.ripe.net/perl/whois?form_type=simple&full_query_string=&searchtext=".trim($client_ip)."&do_search=Search' target='_blank'><font color=red><b>Click to Trace</a></b><BR><font size='-2'>only captured on orders that go through order system</td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Clients Local ISP:</td>
			<td width='75%' align='left' valign='top' style='padding: 4'>IP traced back to:  <B>".trim($client_host)."</B></td>
		</tr>
			");
		}
echo("
		<tr>
			<td width='25%' align='left' valign='top'></td>
			<td width='75%' align='left' valign='top'><input ".$button_style." type='submit' name='edit_user' value='Update Client Information Now'></td>
		</tr>
	</table>
	</form>
		");
	}
// end the client menu
?>