<?php
include("includes/site_info.php");
include('session_handler.inc');

if(!preg_match("/\/home.php/",$_SERVER['HTTP_REFERER'])){
	echo "<script>location.href='" . $CONST_LINK_ROOT . "/home.php#cacc'</script>"; die;
}

$WUserID = $_SESSION['Sess_UserId'];
$WUsername = $_SESSION['Sess_UserName'];
$result=mysql_query("SELECT mem_ContactName, mem_AccountNick, mem_PayeeName, mem_ContactEmail, mem_ContactMobile, mem_PayeeTown, mem_PayeeCity, mem_PayeeState, mem_PayeeZipcode, Title FROM market_Account LEFT JOIN Geo_Countries ON (mem_PayeeCountry = CountryId) WHERE mem_userid=$WUserID",$link);
$sql_array = mysql_fetch_object($result);

?>

<div id="top_panel" class="submenu">
	<?php include ("panel_top.php"); ?>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td valign="top"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="white_back_t_xb">
				<tr>
					<td colspan="2"><div class="light_orang_h">
							<div style="background-color:#0000FF; width:10px; height:10px; float:left; margin-top:3px; margin-right:5px;"><img src="images/spacer.gif" width="10" height="10"></div>
							Where shall we send your checks? </div>
						<div class="right white_back padding_tb_5"><a class="button" title="All Listings" href="#ceditAcc?tab=acc&type=payee" onclick="javascript: callpage(this.href);" rel="subpage_link">Edit</a></div>
						<div class="dot_line"><img src="images/spacer.gif" width="1" height="1"></div>
						<div class="solid_line"><img src="images/spacer.gif" width="1" height="1"></div></td>
				</tr>
				<tr>
					<td width="10">&nbsp;</td>
					<td><table width="100%" border="0" cellspacing="0" cellpadding="5" class="white_back_t_xb">
							<tr>
								<td width="150">Payee Name</td>
								<td><strong>
									<?=ucwords(strtolower($sql_array->mem_PayeeName))?>
									</strong></td>
							</tr>
							<tr>
								<td>Street Address</td>
								<td><strong>
									<?=ucwords(strtolower($sql_array->mem_PayeeTown))?>
								</strong></td>
							</tr>
							<tr>
								<td>City/Town</td>
								<td><strong>
									<?=ucwords(strtolower($sql_array->mem_PayeeCity))?>
									</strong></td>
							</tr>
							<tr>
								<td>State </td>
								<td><strong>
									<?=ucwords(strtolower($sql_array->mem_PayeeState))?>
									</strong></td>
							</tr>
							<tr>
								<td>Country </td>
								<td><strong>
									<?=$sql_array->Title?>
									</strong></td>
							</tr>
							<tr>
								<td>Postcode/Zipcode </td>
								<td><strong>
									<?=strtoupper($sql_array->mem_PayeeZipcode)?>
									</strong></td>
							</tr>
						</table></td>
				</tr>
				<tr>
					<td colspan="2"><div class="light_orang_h">
							<div style="background-color:#0000FF; width:10px; height:10px; float:left; margin-top:3px; margin-right:5px;"><img src="images/spacer.gif" width="10" height="10"></div>
							How can we contact you?</div>
						<div class="right white_back padding_tb_5"><a class="button" title="All Listings" href="#ceditAcc?tab=acc&type=contact" onclick="javascript: callpage(this.href);" rel="subpage_link">Edit</a></div>
						<div class="dot_line"><img src="images/spacer.gif" width="1" height="1" /></div>
						<div class="solid_line"><img src="images/spacer.gif" width="1" height="1" /></div></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><table width="100%" border="0" cellspacing="0" cellpadding="5" class="white_back_t_xb">
							<tr>
								<td width="150"> Full name </td>
								<td><strong>
									<?=ucwords(strtolower($sql_array->mem_ContactName))?>
									</strong></td>
							</tr>
							<tr>
								<td width="150"> Email </td>
								<td><strong>
									<?=$sql_array->mem_ContactEmail?>
									</strong></td>
							</tr>
							<tr>
								<td width="150"> Mobile No </td>
								<td><strong>
									<?=$sql_array->mem_ContactMobile?>
									</strong></td>
							</tr>
						</table></td>
				</tr>
				<tr>
					<td colspan="2"><div class="light_orang_h">
							<div style="background-color:#0000FF; width:10px; height:10px; float:left; margin-top:3px; margin-right:5px;"><img src="images/spacer.gif" width="10" height="10"></div>
							Marketer Account Name </div>
						<div class="dot_line"><img src="images/spacer.gif" width="1" height="1" /></div>
						<div class="solid_line"><img src="images/spacer.gif" width="1" height="1" /></div></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><table width="100%" border="0" cellspacing="0" cellpadding="5" class="white_back_t_xb">
							<tr>
								<td width="150">Account Name</td>
								<td><strong>
									<?=$sql_array->mem_AccountNick?>
									</strong></td>
							</tr>
						</table></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
			</table></td>
	</tr>
</table>
