<?php
	include("../session.php");
	include("../connect.php");
	$user=$_SESSION['company'];
	$query=mysql_query("select * from company where id='$user'");
	$asd = mysql_fetch_array($query);
	
	$cagent = $asd['agentID'];
	$agentquery=mysql_query("select * from agent where agentID='$cagent'");
	$asdf = mysql_fetch_array($agentquery);
	$cagent1 = $asdf['name'];
	$cagent2 = $asdf['countryCode'];
	$cagent3 = $asdf['contactNo'];
	$cagent4 = $asdf['email'];
	$cagent5 = $asdf['pic'];
?>
<html>
<head>
<title>User Page(Company profile)</title>
<link href="header.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>

<style type="text/css"> 
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
p.flip2,div.panel2,p.flip3,div.panel3
{
margin:0px;
padding:5px;
text-align:left;
background:#FFFFFF;
border:solid 1px #c3c3c3;
}
div.panel
{
height:70px;
display:none;
}
div.panel2,div.panel3
{
height:70px;
}
td.asd1
{
background:#F781BE;
}
td.asd2
{
background:#F5A9F2;
}
</style>
</head>
<body>
<center>
<table class=corners cellspacing=1 cellpadding=10 width=700 align=center>
<tr>
<td>
<form action="<?php echo "editInfo2.php"?>" method="POST">
<fieldset>
<legend><h3>Agent Profile</h3></legend>
	<table align=center width=600 cellpadding=5 cellspacing=3 border=0>
		<tr>
			<th colspan = "2" align = "center"><h2><font color="#000000"><?php echo $cagent?></font></h2></th>
		</tr>
		<tr>
			<th colspan = "2" align = "center"><img src="../admin/agent/upload/<?php echo $cagent5?>" height="200" width="150" class="inbox" border="none"/></th>
		</tr>
		<tr>
			<td align = "right" width="35%" class=asd1><b>Agent Name : </b></td>
			<td align = "left" class=asd2><?php echo $cagent1?> </td>
		</tr>
		
		<tr>
			<td align = "right" width="35%" class=asd1><b>Contact Number : </b></td>
			<td align = "left" class=asd2><?php echo $cagent2?> - <?php echo $cagent3?> </td>
		</tr>
		
		<tr>
			<td align = "right" width="35%" class=asd1><b>Email Address: </b></td>
			<td align = "left" class=asd2><?php echo $cagent4?> </td>
		</tr>
		
		
	</table>
	</fieldset>
	</form>
		</td>
		</tr>
	</table>
	</center>
</body>
</html>
<?php 
include("../closeconnection.php");
?>