<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<?php
include ("../navigation/header.php");
$page_name = "Orders-main";
include ("../navigation/access.php");

if ($permission_num==1) {
	include ("../navigation/store_sidebar.php");

$cust_id = $_GET['cust_id'];
	
$table_name2 = $_SESSION['db_prefix']."_customer";
$customer_query = "SELECT * FROM $table_name2 WHERE cust_id ='".$cust_id."' ";
$customer_result = mySQL_query($customer_query);
$customer_num = mysql_num_rows($customer_result);	

$a0 = mysql_result($customer_result, 0, "comp_name");
$a5 = mysql_result($customer_result, 0, "contact_1");
$a6 = mysql_result($customer_result, 0, "account_type");
$a7 = mysql_result($customer_result, 0, "bag_box").' '.mysql_result($customer_result, 0, "box_no");
$a9 = mysql_result($customer_result, 0, "postal_place");
$a10 = mysql_result($customer_result, 0, "phys_address");
$a11 = mysql_result($customer_result, 0, "phys_place");
$a12 = mysql_result($customer_result, 0, "web_site");
$a13 = mysql_result($customer_result, 0, "VAT_no");
$a15 = mysql_result($customer_result, 0, "email_2");
$a23 = mysql_result($customer_result, 0, "fax");
$a24 = mysql_result($customer_result, 0, "phone");
$a26 = mysql_result($customer_result, 0, "country");
$a29 = mysql_result($customer_result, 0, "email_1");
$a30 = mysql_result($customer_result, 0, "cell_1");
$a32 = mysql_result($customer_result, 0, "cell_2");
$a35 = mysql_result($customer_result, 0, "contact_2");
$a36 = mysql_result($customer_result, 0, "notes");


?>
<!--style sheets-->
<!--reference to main.css removed-->
<link rel="stylesheet" type="text/css" href="../css/tooltip.css" />

<!--jscript-->
<script language="JavaScript" src="../jscript/tablesort.js"  type="text/javascript"></script> 
<script language="JavaScript" src="../jscript/tooltip.js"  type="text/javascript"></script>  

</head>
<body>

<div class="main_frame" style="height:610px;">
  <table id="tableMain" > <!--begin of tableMain-->
    <tr>
      <td width="830" height="62" valign="top" ><div class="page_head_frame">
        
        <table width="809" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><label class="label_page_head">Account</label>
              &nbsp;&nbsp;&nbsp;<label class="label_page_head_2"> <?php echo $a0 ?></label></td>
            </tr>
        </table>
      </div>
        <br />

<br /></td> <!--center of tableMain-->
</tr>
<tr>
<td height="93"> <!--center of tableMain-->
<div class="page_middle_frame">
<div align="left">Company details</div>
  <table width="680" id="table_details_display">
    <tr>
      <td width="101" height="25">Client name:</td>
      <td width="148"><b><?php echo $a0?></b></td>
      <td width="163">&nbsp;</td>
      <td width="141">&nbsp;</td>
      <td width="103">&nbsp;</td>
    </tr>
    <tr>
      <td height="25">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>Account status:</td>
      <td><?php if ($a6!="new") { echo $a6; } else { echo "no account"; } ?></td>
    </tr>
  </table>
</div>
</td>
</tr>
<tr>
<td>
<div class="page_middle_frame">
<div align="left">Contact details</div>
  <table width="679" id="table_details_display">
    <tr>
      <td width="132" height="25">Postal address:</td>
      <td width="131"><b><?php echo $a7?></b></td>
      <td width="84">Postal place:</td>
      <td width="99"><b><?php echo $a9?></b></td>
      <td width="69">Country:</td>
      <td width="136"><b><?php echo $a26?></b></td>
    </tr>
    <tr>
      <td height="25">Physical address:</td>
      <td><b><?php echo $a10?></b></td>
      <td>Place:</td>
      <td><b><?php echo $a11?></b></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="25">Phone:</td>
      <td><b><?php echo $a24?></b></td>
      <td>Fax:</td>
      <td><b><?php echo $a23?></b></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="25">VAT registration no::</td>
      <td><b><?php echo $a13?></b></td>
      <td>web site:</td>
      <td colspan="3">&nbsp;</td>
      </tr>
  </table>
</div>

</td>
</tr>
<tr>
<td height="220">
<div class="page_middle_frame">
<div align="left">Company contacts</div>
  <table width="678" id="table_details_display">
    <tr>
      <td width="132" height="25">Contact 1:</td>
      <td width="130"><b><?php echo $a5?></b></td>
      <td width="70">Cell:</td>
      <td width="110"><b><?php echo $a30 ?></b></td>
      <td width="76">&nbsp;</td>
      <td width="132">&nbsp;</td>
    </tr>
    <tr>
      <td height="25">e-mail:</td>
      <td colspan="2"><b><a href="mailto:<?php echo $a29 ?>"><?php echo $a29 ?></a></b></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="25">Contact 2:</td>
      <td><b><?php echo $a35?></b></td>
      <td>Cell:</td>
      <td><b><?php echo $a32?></b></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="25">e-mail:</td>
      <td colspan="2"><b><a href="mailto:<?php echo $a15 ?>"><?php echo $a15 ?></a></b></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="25">web site:</td>
      <td colspan="5"><a href="http://<?php echo $a12 ?>" target="_blank" ><?php echo $a12?> </a></td>
      </tr>
  </table>
</div>

<div class="page_middle_frame">
<div align="left">Miscelaneous</div>
  <table width="678" id="table_details_display">
    <tr>
      <td width="131" height="25">Notes</td>
      <td width="535"><b><?php echo $a36?></b></td>
    </tr>
  </table>
</div></td>
</tr>
</table>  <!--end of tableMain-->
  
</div>

<?php include ('../navigation/side_bar.php'); ?>

</body>
<?php } else { ?>
<script> needToConfirm = false; </script>
<?php
$_SESSION['denied_return'] = "store/store_main.php?date=0&branch=&subCatSelect=Tiles";	
include ("../navigation/store_sidebar.php");?>
	<body onLoad="accessdenied(); return false">
	</body>
<?php }
?>
</html>