<?php
include("../include/session.php");
if(!$session->isAdmin()){
	header("Location: ../Store/denied2.php");
}else{
	include("../storeHeader.php");
	
	$repId = mysql_real_escape_string($_GET['repId']);
	
   
	
	$w=0;
	while ($w < 12) {
	$a = 'a';	
	   ${$a.$w} = '';
	   $w++;
	}
	$repNum='';
	
	
	$repQuery = "SELECT * FROM rad_representatives WHERE repId ='". $repId. "' ";
	$repResult = execsql($repQuery);
	$a1 = mysql_result($repResult, 0, "account");
	$a2 = mysql_result($repResult, 0, "last_name");
	$a3 = mysql_result($repResult, 0, "first_name");
	$a4 = mysql_result($repResult, 0, "designation");
	$a5 = mysql_result($repResult, 0, "cell");
	$a6 = mysql_result($repResult, 0, "id_number");
	$a7 = mysql_result($repResult, 0, "notes");
	
	?>
<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>
<script type="text/javascript">
function checkifempty(){
if (document.form2.account_no_text.value==''){
document.getElementById("add_button").disabled=true
}
else {
document.getElementById("add_button").disabled=false	
}
}
if (document.all || document.getElementById)
setInterval("checkifempty()",100)
</script>
<script type="text/javascript" src="../css/tablesort.js"></script>
<table id="tableMain" width="595">
  <!--begin of tableMain-->
  <tr>
    <td ><div class="headerbox2"> Tocotex Representative</div>
      <p class="main">
        <label class="std"><b><font size="3"><font size="3"><font size="3"><font size="3"><?php echo $a3." ".$a2 ?></font></font></font></font></label>
      </p>
     
      </td>
    <!--center of tableMain-->
  </tr>
  <tr>
    <td><!--center of tableMain-->
      <table width="600" id="tablePlain">
        <tr>
          <td width="113">rep no:</td>
          <td width="159"><b><?php echo $repId ?></b></td>
          <td colspan="2"></td>
        </tr>
        <tr>
          <td>last name:</td>
          <td><b><?php echo $a2 ?></b></td>
          <td>first name</td>
          <td><?php echo $a3 ?></td>
        </tr>
        <tr>
          <td>company:</td>
          <td><?php echo $a1 ?></td>
          <td width="129">&nbsp;</td>
          <td width="179">&nbsp;</td>
        </tr>
        <tr>
          <td>designation</td>
          <td><b><?php echo $a4 ?></b></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>cell</td>
          <td><b><?php echo $a5 ?></b></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>id number</td>
          <td colspan="3"><b><?php echo $a6 ?></b></td>
        </tr>
        <tr>
          <td>notes:</td>
          <td colspan="3"><b><?php echo $a7 ?></b></td>
        </tr>
      </table></td>
  </tr>
  <tr>
  <td><label class="std">&nbsp;&nbsp;&nbsp;&nbsp;</label>
    <input name="button4" type="button" class="linkbutton" id="button4" onclick="MM_goToURL('parent','issuesRep.php?repId=<?php echo $repId?>&amp;date=0&amp;fuel=0');return document.MM_returnValue" value="Issues" />
    <p class="main">
    
<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');return document.MM_returnValue" value="Done" />
  </p>
  </p></td>
  </tr>
</table>
<!--end of tableMain-->
<?php

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