<?php

$query=mysql_query("select * from company where id='$user'");	
	$asd = mysql_fetch_array($query);
	$cname=$asd['cName'];
	$validdate =$asd['expireDate'];
	
	$cagent = $asd['agentID'];
	$agentquery=mysql_query("select * from agent where agentID='$cagent'");
	$asdf = mysql_fetch_array($agentquery);
	$cagentName = $asdf['name'];
	
$query2=mysql_query("select * from inbox where companyID='$user' and status='unread'");
$num=mysql_num_rows($query2);
?>
<html>	
<head>
<script type="text/javascript">
function checkmail(num){
	var yyy = num;
	if (yyy <=0){
		alert("No Mail");
		return false;
	}else{
		return true;
	}
	
}
function comingsoon(){
	alert("Waiting Android application to support this function");
	return false;
}
</script>
</head>
<body>
<link rel="stylesheet" type="text/css" href="facebox/facebox.css" />
<script language="javascript" src="jquery.js"></script>
<script language="javascript" src="facebox/facebox.js"></script>

<script language="javascript">
$(document).ready(function() {
    $('a[rel*=facebox]').facebox();
})
</script>
<table border=0 width=100% cellspacing=1 cellpadding=3 class=corners2>
		<tr>
			<td colspan=2 align=left>
			</td>
			</tr>
		<tr>
			<th align=left>&nbsp&nbsp&nbspCompany :</th>
			<th><?php echo $cname?></th>
			</tr>
		<tr>
			<th align=left>&nbsp&nbsp&nbspAgent :</th>
			<th><a href="<?php echo "agentinfo.php";?>" rel="facebox"><?php echo $cagentName?></th></a>
			</tr>	
		<tr>
			<th align=left>&nbsp&nbsp&nbspLicense Expire Day :</th>
			<th><?php echo $validdate?></th>
		</tr>
		
		<tr>
			<td colspan=2>
			<br/>
				<p class="flip" id="setting"><img src="../images/setting.png" width=14 height=14 border=none />
					&nbsp;Notice</p>
				
					<a href="<?php echo"notice/inboxFeed2.php";?>" onclick="return checkmail(<?php echo $num;?>)"><p class="flipA">&nbsp&nbsp&nbsp&nbsp<img src="../images/indox.jpg" height=13 class="inbox" border="none"/>
						&nbsp;Company Message&nbsp;<font color=red>(<?php echo $num;?>)</font></p></a>
					<a href="<?php echo "notice/bFeedback.php";?>" onclick="return comingsoon()">
						<p class="flipB">&nbsp&nbsp&nbsp&nbsp<img src="../images/indox.jpg" height=13 class="inbox" border="none"/>
						&nbsp;Customer Message&nbsp;</font></p></a>
					<a href="<?php echo"paypal.php";?>"><p class="flipA">&nbsp&nbsp&nbsp&nbsp<img src="../images/rate.gif" height=16 class="inbox" border="none"/>
						&nbsp;Update License</p></a>
					
				<br/>
				<br/>
				<p class="flip" id="setting"><img src="../images/setting.png" width=14 height=14 border=none />
					&nbsp;Setting</p>
				
					<a href="<?php echo "changePass.php";?>" rel="facebox"><p class="flipA">&nbsp&nbsp&nbsp&nbspChange password</p></a>
					<a href="<?php echo "loginRecord.php";?>" rel="facebox">
						<p class="flipB">&nbsp&nbsp&nbsp&nbspLogin History</p></a>
					<a href="companyinfo.php" rel="facebox" >
						<p class="flipA">&nbsp&nbsp&nbsp&nbspProfile</p></a>
					
				<br/>	
			</td>
			</tr>
		
	</table>
</body>
</html>
<!------End password-------> 
