<?php
include("../include/session.php");
if(!$session->isAdmin()){
	header("Location: ../Store/denied2.php");
}else{
	include("../storeHeader.php");
	
	$account_no = mysql_real_escape_string($_GET['account_no']);
	
    
	
	
	$supplierQuery = "SELECT * FROM nam_rad_suppliers WHERE account_no ='". $account_no. "' ";
	$supplierResult = execsql($supplierQuery);
	
	$a1 = mysql_result($supplierResult, 0, "account_no");
	$a2 = mysql_result($supplierResult, 0, "account_name");
	$a3 = mysql_result($supplierResult, 0, "credit_cash");
	$a4 = mysql_result($supplierResult, 0, "phys_address");
	$a5 = mysql_result($supplierResult, 0, "phys_place");
	$a6 = mysql_result($supplierResult, 0, "post_address");
	$a7 = mysql_result($supplierResult, 0, "post_place");
	$a8 = mysql_result($supplierResult, 0, "phone");
	$a9 = mysql_result($supplierResult, 0, "fax");
	
	$a11 = mysql_result($supplierResult, 0, "contact1");
	$a12 = mysql_result($supplierResult, 0, "cell1");
	$a13 = mysql_result($supplierResult, 0, "email1");
	$a14 = mysql_result($supplierResult, 0, "contact2");
	$a15= mysql_result($supplierResult, 0, "cell2");
	$a16 = mysql_result($supplierResult, 0, "email2");
	$a17 = mysql_result($supplierResult, 0, "notes");
	$a18 = mysql_result($supplierResult, 0, "entered_by");
	$a19 = mysql_result($supplierResult, 0, "entry_date");
	$a20 = mysql_result($supplierResult, 0, "country");	
	
	?>
<link href="../css/main.css" rel="stylesheet" type="text/css" />


<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<table id="tableMain" width="595">
  <!--begin of tableMain-->
  <tr>
    <td ><div class="headerbox2"> Supplier Account</div>
     
      <p class="main"><font size="3"><b><font size="3"><b><?php echo $a2 ?></b></font></b></font></p></td>
    <!--center of tableMain-->
  </tr>
  <tr>
    <td><!--center of tableMain-->
      <table width="600" id="tablePlain">
        <tr>
          <td width="113">account no.:</td>
          <td width="176"><b><?php echo $a1 ?></b></td>
          <td colspan="2">
        <b><?php echo $a3 ?></b></td>
        </tr>
        <tr>
          <td>name:</td>
          <td colspan="3"><b><?php echo $a2 ?></b></td>
        </tr>
        <tr>
          <td>physical address:</td>
          <td><?php echo $a4 ?></td>
          <td width="85">place:</td>
          <td width="206"><b><?php echo $a5 ?></b></td>
        </tr>
        <tr>
          <td>postal address:</td>
          <td><b><?php echo $a6 ?></b></td>
          <td>place:</td>
          <td><b><?php echo $a7 ?></b></td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>country:</td>
          <td><b><?php echo $a20 ?></b></td>
        </tr>
        <tr>
          <td>phone:</td>
          <td><b><?php echo $a8 ?></b></td>
          <td>fax:</td>
          <td><b><?php echo $a9 ?></b></td>
        </tr>
        <tr>
          <td>contact person 1:</td>
          <td><b><?php echo $a11 ?></b></td>
          <td>cell:</td>
          <td><b><?php echo $a12 ?></b></td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>e-mail:</td>
          <td><b><?php echo $a13 ?></b></td>
        </tr>
        <tr>
          <td>contact person 2:</td>
          <td><b><?php echo $a14 ?></b></td>
          <td>cell:</td>
          <td><b><?php echo $a15 ?></b></td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>e-mail:</td>
          <td><b><?php echo $a16 ?></b></td>
        </tr>
        <tr>
          <td>notes:</td>
          <td colspan="3"><b><?php echo $a17 ?></b></td>
        </tr>
      </table>
      <b><span class="main">
      <input name="button4" type="button" class="linkbutton" id="button4" onclick="MM_goToURL('parent','receiveStockItem.php?supplierName=<?php echo $a2 ?>&amp;date=0');return document.MM_returnValue" value="Deliveries" />
      </span></b><br />
    <br /></td>
  </tr>
  <tr>
  <td><p class="main">
    <label class="std">&nbsp;&nbsp;&nbsp;&nbsp;</label>
    <input name="button" type="button" class="imagebutton" id="button" onclick="MM_goToURL('parent','showAllProducts.php?cat=Tiles and Accessories&amp;productSelect=All&amp;colorSelect=All');MM_goToURL('parent','showAllProducts.php?cat=Tiles and Accessories&amp;productSelect=All&amp;colorSelect=All');return document.MM_returnValue" value="Done" />
  </p>
  </p></td>
  </tr>
</table>
<!--end of tableMain-->
<?php

	include("../footer.php");
}
?>
