
<style rel="stylesheet" type="text/css">

textarea {
	  background-color: white;
	    overflow: auto;
border: none;
}

    .style1
    {
        width: 192px;
    }
    .style2
    {
        width: 177px;
    }
    .auto-style1 {
        width: 115px;
    }
</style>

</head>
<?

if (isset($_REQUEST['uid_staff'])){

	$uid_staff = $_REQUEST['uid_staff']; 

}else{

	$uid_staff = 1;
	
}



include("configi.php");

		$queryclient="select * from " . $_COOKIE['phxcrmclient_id'] . "_staff WHERE uid_staff=" . $uid_staff;
		echo $queryclient;
		$resultclient=mysqli_query($conn, $queryclient);

		while($row=mysqli_fetch_array($resultclient)) { 
		
			$uid_staff				=	$row['uid_staff'];
			$staff_name				=	$row['staff_name'];
			$staff_username			=	$row['staff_username'];
			$staff_status			=	$row['staff_status'];
			$staff_sec_level		=	$row['staff_sec_level'];
			$staff_alloc_num		=	$row['staff_alloc_num'];
		
		}
		
//		$c_cust_since2 = date('d-m-Y', strtotime($c_cust_since)); 
								
	//	if ($c_cust_since2 == "01-01-1970"){
		//	$c_cust_since2 = "";
//		}
								
								
								


?>
<form id="producteditform" >



        <div class="section full mt-2">
         
            <div class="wide-block pt-2 pb-2">
                <form>
                    <div class="form-group boxed">
                        <div class="input-wrapper">
						<label class="label" for="comp_name">Staff/Full Name</label>
                            <input id="comp_name" type="text" readonly class="form-control"   value="<?php echo htmlspecialchars($staff_name); ?>">
						<label class="label" for="comp_name">Staff Username</label>
                            <input id="cont_name" type="text" readonly class="form-control"  value="<?php echo htmlspecialchars($staff_username); ?>">
							<label class="label" for="staff_status">Staff Status</label>
<select name="staff_status" id="staff_status"  class="form-control" >

		 				<? 
if ($staff_status == 'Current') {
	echo "<option value='Current' SELECTED>Current</option>";
	echo "<option value='Historic'>Historic</option>";

}elseif ($c_status == 'Historic') {
	echo "<option value='Current'>Current</option>";
	echo "<option value='Historic' SELECTED>Historic</option>";

	
}


echo "</select>";

?>
							<label class="label" for="staff_sec_level">Staff Security Level</label>
<select name="staff_sec_level" id="staff_sec_level"  class="form-control" >

		 				<? 
if ($staff_sec_level == 'None') {
	echo "<option value='None' SELECTED>None</option>";
	echo "<option value='Superuser'>Superuser</option>";
	echo "<option value='Basic'>Basic</option>";

}elseif ($staff_sec_level == 'Superuser') {
	echo "<option value='None'>None</option>";
	echo "<option value='Superuser' SELECTED>Superuser</option>";
	echo "<option value='Basic'>Basic</option>";

}elseif ($staff_sec_level == 'Basic') {
	echo "<option value='None'>None</option>";
	echo "<option value='Superuser'>Superuser</option>";
	echo "<option value='Basic' SELECTED>Basic</option>";

	
}


echo "</select>";

?>

							<label class="label" for="staff_sec_level">Staff Alloc Number</label>
<select name="staff_alloc_num" id="staff_alloc_num"  class="form-control" >

		 			

	<option <?php if ($staff_alloc_num == 0){ echo " SELECTED ";} ?> value='0'>0</option>
	<option <?php if ($staff_alloc_num == 1){ echo " SELECTED ";} ?> value='1'>1</option>
	<option <?php if ($staff_alloc_num == 2){ echo " SELECTED ";} ?> value='2'>2</option>
	<option <?php if ($staff_alloc_num == 3){ echo " SELECTED ";} ?> value='3'>3</option>
	<option <?php if ($staff_alloc_num == 4){ echo " SELECTED ";} ?> value='4'>4</option>
	<option <?php if ($staff_alloc_num == 5){ echo " SELECTED ";} ?> value='5'>5</option>
	<option <?php if ($staff_alloc_num == 6){ echo " SELECTED ";} ?> value='6'>6</option>
	<option <?php if ($staff_alloc_num == 7){ echo " SELECTED ";} ?> value='7'>7</option>
	<option <?php if ($staff_alloc_num == 8){ echo " SELECTED ";} ?> value='8'>8</option>
	<option <?php if ($staff_alloc_num == 9){ echo " SELECTED ";} ?> value='9'>9</option>
	<option <?php if ($staff_alloc_num == 10){ echo " SELECTED ";} ?> value='10'>10</option>
	<option <?php if ($staff_alloc_num == 11){ echo " SELECTED ";} ?> value='11'>11</option>
	<option <?php if ($staff_alloc_num == 12){ echo " SELECTED ";} ?> value='12'>12</option>


</select>



	<label class="label" for="cell_phone"> Phone Home: </label>

 <input id="home_phone" class='form-control'  readonly  type="text" value="<? echo htmlspecialchars($home_phone); ?>" /> 
	<label class="label" for="work_phone"> Phone Work:</label>
<input id="work_phone" readonly type="text"  class='form-control'   value="<? echo htmlspecialchars($work_phone); ?>"  />

<label class="label" for="cell_phone"> Phone Cell:</label>

     <input id="cell_phone" class='form-control'  class='form-control' readonly type="text"  value="<? echo htmlspecialchars($cell_phone); ?>"  />



	<label class="label" for="email_main"> Email Main: </label>

 <input id="email_main" class='form-control'  readonly  type="text" value="<? echo htmlspecialchars($email); ?>" /> 


	<label class="label" for="email_accounts">  Email Accounts: </label>

 <input id="email_accounts" class='form-control'  readonly  type="text" value="<? echo htmlspecialchars($email_accounts); ?>" /> 
	<label class="label" for="c_bank_account">  Bank Account:</label>

 <input id="c_bank_account" class='form-control'  readonly  type="text" value="<? echo htmlspecialchars($c_bank_acct); ?>" /> 


<label class="label" for="c_bank_account">  Account Address:</label>
 <input id="c_acctaddr1" type="text"  readonly  class='form-control'  value="<? echo htmlspecialchars($c_acctaddr1); ?>"  />
        <input id="c_acctaddr2" type="text" readonly  class='form-control'   value="<? echo htmlspecialchars($c_acctaddr2); ?>"  />
        <input id="c_acctaddr3" type="text" readonly  class='form-control'    value="<? echo htmlspecialchars($c_acctaddr3); ?>"  />
        <input id="c_acctaddr4" type="text" readonly   class='form-control'   value="<? echo htmlspecialchars($c_acctaddr4); ?>"  />
        Attn: <input id="c_acctaddr5" type="text" readonly   class='form-control'   value="<? echo htmlspecialchars($c_acctaddr5); ?>"  />
		
		
<label class="label" for="c_bank_account">  Physical Address:</label>
		        <input id="c_physaddr1" type="text" readonly  class='form-control'  value="<? echo  htmlspecialchars($c_physaddr1); ?>"  />
        <input id="c_physaddr2" type="text"  readonly class='form-control'  value="<? echo  htmlspecialchars($c_physaddr2); ?>"  />
        <input id="c_physaddr3" type="text"  readonly class='form-control'  value="<? echo  htmlspecialchars($c_physaddr3); ?>"  />
        <input id="c_physaddr4" type="text"  readonly class='form-control' value="<? echo  htmlspecialchars($c_physaddr4); ?>"  />
        Attn: <input id="c_physaddr5" type="text"  readonly class='form-control' value="<? echo  htmlspecialchars($c_physaddr5); ?>"  />

		<label class="label" for="c_cust_since">Contact Since</label>
         <input id="c_cust_since" type="text" readonly class="form-control"  value="<?php echo htmlspecialchars($c_cust_since2); ?>">	
<label class="label" for="c_status">Contact Status</label>
<select name="c_status" id="c_status" disabled readonly  class="form-control" >

		 				<? 
if ($c_status == 'Current') {
	echo "<option value='Current' SELECTED>Current</option>";
	echo "<option value='Gone No Address'>Gone No Address</option>";
	echo "<option value='On Hold'>On Hold</option>";
	echo "<option value='Prospect'>Prospect</option>";
}elseif ($c_status == 'Gone No Address') {
	echo "<option value='Current'>Current</option>";
	echo "<option value='Gone No Address' SELECTED>Gone No Address</option>";
	echo "<option value='On Hold'>On Hold</option>";
	echo "<option value='Prospect'>Prospect</option>";
	
}elseif ($c_status == 'On Hold') {
	echo "<option value='Current'>Current</option>";
	echo "<option value='Gone No Address'>Gone No Address</option>";
	echo "<option value='On Hold' SELECTED>On Hold</option>";
	echo "<option value='Prospect'>Prospect</option>";
}elseif ($c_status == 'Prospect') {
	echo "<option value='Current'>Current</option>";
	echo "<option value='Gone No Address'>Gone No Address</option>";
	echo "<option value='On Hold'>On Hold</option>";
	echo "<option value='Prospect' SELECTED>Prospect</option>";
}	


echo "</select>";

?>


<label class="label" for="c_favourable">Contact Quality</label>
<select name="c_favourable" class="form-control" id="c_favourable" disabled readonly  >

		 	 	 				<? 


if ($c_favourable == 'Unproven') {
	echo "<option value='Unproven' SELECTED>Unproven</option>";
	echo "<option value='Good'>Good</option>";
	echo "<option value='Excellent'>Excellent</option>";
	echo "<option value='Bad'>Bad</option>";
}elseif ($c_favourable == 'Good') {
	echo "<option value='Unproven'>Unproven</option>";
	echo "<option value='Good'  SELECTED>Good</option>";
	echo "<option value='Excellent'>Excellent</option>";
	echo "<option value='Bad'>Bad</option>";
}elseif ($c_favourable == 'Excellent') {
	echo "<option value='Unproven'>Unproven</option>";
	echo "<option value='Good'>Good</option>";
	echo "<option value='Excellent'  SELECTED>Excellent</option>";
	echo "<option value='Bad'>Bad</option>";
}elseif ($c_favourable == 'Bad') {
	echo "<option value='Unproven'>Unproven</option>";
	echo "<option value='Good'>Good</option>";
	echo "<option value='Excellent'>Excellent</option>";
	echo "<option value='Bad'  SELECTED>Bad</option>";
 
}

echo "</select>";

?>
<label class="label" for="c_mktg_ind">Send Mktg:</label>

		<?
echo "<select name='c_mktg_ind'  class='form-control' disabled readonly id = 'c_mktg_ind' >";

if ($c_mktg_ind == 'Yes') {

	echo "<option value='Yes' SELECTED>Yes</option>";
	echo "<option value='No'>No</option>";

}else {

	echo "<option value='Yes'>Yes</option>";
	echo "<option value='No' SELECTED>No</option>";

	}
	

echo "</select>";
	?>


		<label class="label" for="c_credlimit"> Credit Limit:</label>
         <input id="c_credlimit" readonly  type="text"  class='form-control' value="<? echo htmlspecialchars($c_credlimit); ?>" />

		<label class="label" for="c_credterms"> Credit Terms:</label>
         <input id="c_credterms" readonly  type="text"  class='form-control' value="<? echo htmlspecialchars($c_credterms); ?>" />

		<label class="label" for="c_discount"> Discount:</label>
         <input id="c_discount" readonly  type="text"  class='form-control' value="<? echo htmlspecialchars($c_discount); ?>" />


	<label class="label" for="cell_phone"> Fax: </label>

<input id="fax_phone" class='form-control'  readonly  type="text"   value="<? echo htmlspecialchars($fax_phone); ?>"  />
	



	<label class="label" for="website">  Web:</label>

 <input id="website" class='form-control'  readonly  type="text" value="<? echo htmlspecialchars($website); ?>" /> 



<label class="label" for="c_favcmts">  Comments:</label>
		       <textarea id="c_favcmts" readonly  name="c_favcmts" rows="4" class='form-control'><?php echo "$c_favcmts"; ?></textarea>	
  
<label class="label" for="c_favcmts">  Categories:</label>


				<?
include("configi.php");
$querycc="SELECT * FROM " . $_COOKIE['phxcrmclient_id'] . "_client_category WHERE cc_uid_staff = " . $uid_staff . ";";
//echo $querycc;
$resultcc=mysqli_query($conn, $querycc);

//mysql_close();                
?>
<table>

<?
$icc = 0;

 while($rowcc=mysqli_fetch_array($resultcc)) { 
 
	$cc_category				 = $rowcc['cc_category']; 
	echo "<tr>";
		echo "<td> " . $cc_category . "</td>";
	echo "</tr>";
	$icc = $icc + 1;
}

	if ($icc == 0){
		echo "<tr>";
		echo "<td>"; 
	echo "No Categories are loaded for this Client";
	echo "</td>"; 
	echo "</tr>";
	}
	

?>

</table>

  </div>
				</form>
			</div>
		</div>
		






  <input name="MM_insert" type="hidden" value="form1" />
</form>
