<?
session_start();
include("test.php");
include("opendb.php");
include("includes/function.php");
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='ind.php' </script>";
  return;
}
$us=mysqli_query($db,"select level from bruser where username='$user'")or die(mysqli_error($db));
$r=mysqli_fetch_row($us);
$user_level=$r[0];
 //print "User Level:".$user_level;
        
?>
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>World Wide Automotive Center</title>
    <script src=" rightclick_deactive.js"></script> 
    <script type="text/javascript" src="scripts/jquery-latest.js"></script>
	
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>

    <script type="text/javascript">
        $(function() {
          if ($.browser.msie && $.browser.version.substr(0,1)<7)
          {
			$('li').has('ul').mouseover(function(){
				$(this).children('ul').show();
				}).mouseout(function(){
				$(this).children('ul').hide();
				})
          }
        });        
    </script>
	<script type="text/javascript">
    $(document).ready(function() {
        var cont_left = $("#container").position().left;
        $("a img").hover(function() {
            // hover in
            //$(this).parent().parent().css("z-index", 1);
            $(this).animate({
               height: "110",
               width: "110",
              
            }, "fast");
        }, function() {
            // hover out
         //   $(this).parent().parent().css("z-index", 0);
            $(this).animate({
                height: "80",
                width: "80",
                
            }, "fast");
        });
        
        $(".img").each(function(index) {
            var left = (index * 160) + cont_left;
            $(this).css("left", left + "px");
        });
    });




    </script>

<link rel="stylesheet" href="cal/jquery-ui.css" />
  <script src="cal/jquery-1.9.1.js"></script>
  <script src="cal/jquery-ui1.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <script>
  $(function() {
    $( "#dob" ).datepicker();
     });

$(function() { 
    $( "#doj" ).datepicker();
  });
$(function() {
    
    $( "#dor" ).datepicker();
  });
$(function() {
    
    $( "#visaexpdate" ).datepicker();
  });
$(function() {
    
    $( "#passportexpdate" ).datepicker();
  });
  </script>

<!-- js code below for active enter with textfield-->


<script type="text/javascript">

/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

</script>


<style>
.cont
	{
         background-color:white;
         border:5px solid grey;
         border-collapse:collapse;
      
    
	}

#det td,th{
margin:5px;
padding:5px;
}
</style>
<style>
th{background-color:steelblue;color:white}
</style>
<script src="css3-dropdown-menu-demo_files/bsa.js" async="" type="text/javascript"></script><script async="async" src="css3-dropdown-menu-demo_files/s_a5f348233fceef06ba365ab392938d10.js" id="_bsap_js_a5f348233fceef06ba365ab392938d10" type="text/javascript"></script><style id="bsa_css" type="text/css">.one{position:relative}.one .bsa_it_ad{display:block;padding:15px;border:1px solid #e1e1e1;background:#f9f9f9;font-family:helvetica,arial,sans-serif;line-height:100%;position:relative}.one .bsa_it_ad a{text-decoration:none}.one .bsa_it_ad a:hover{text-decoration:none}.one .bsa_it_ad .bsa_it_t{display:block;font-size:12px;font-weight:bold;color:#212121;line-height:125%;padding:0 0 5px 0}.one .bsa_it_ad .bsa_it_d{display:block;font-size:11px;color:#434343;font-size:12px;line-height:135%}.one .bsa_it_ad .bsa_it_i{float:left;margin:0 15px 10px 0}.one .bsa_it_p{display:block;text-align:right;position:absolute;bottom:10px;right:15px}.one .bsa_it_p a{font-size:10px;color:#666;text-decoration:none}.one .bsa_it_ad .bsa_it_p a:hover{font-style:italic}</style></head>
<body style="background-color:white;">
<div class='cont' style="padding:0px;margin:0px;">
<link type="text/css" href="css/redmond/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
$(function(){

$(".regno").live("keydown.autocomplete",function(){

$regno = $(this);

$row = $regno.parent().parent();
$(this).autocomplete({
		source: function( request, response ) {

		$.ajax({
			url: "search1.php",
			dataType: "json",
			data: "key="+$regno.val(),
			success: function( data ) {
				response( $.map( data, function( item ) {
					return {
						label: item.regno+' | '+  item.chasisno + '| '+ item.make +'|'+item.model    ,
						value: item.regno,
						name:item.chasisno,
						qty:item.make,
						price:item.model,
						


					}
				}));
			}
		});
	}
	
,
	minLength: 2,
	select: function( event, ui ) {

	$row.find('.chasisno').val(ui.item.name);
	$row.find('.make').val(ui.item.qty);
	$row.find('.model').val(ui.item.price);
	
	
	/*log( ui.item ?
	"Selected: " + ui.item.label :
	"Nothing selected, input was " + this.value);
	*/
	 }
	
	});

					
});







});
</script>







<?php echo "<body >\n"; ?>

<link href="css1/xp.css" type="text/css" rel="stylesheet" media="print,screen"  />


<?
session_start();
include("opendb.php");

?>


<title>XCS</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-latest.js"></script>
<body >
<form name='f1' action='<?print $PHP_SELF?>' onSubmit="return valid()" method='post'> 
<br>
Employee Details >>
<center>
<body bgcolor="#0033FF">
<br>
<form action="" method="post">

<table width="100%" border="1" align="center" height='100%' id='det'>

<?
 $res=mysqli_query($db,"select * from empprofile where EmpNo='$empno' ");
//echo "select * from empprofile where EmpNo='$empno' and brcode='$brcode'";
 $row=mysqli_fetch_row($res);
?>
<tr>
    <td bgcolor="lavender" align='left'><strong>Employee Name</td><td bgcolor="lavender">:</td> </strong><td colspan='4' bgcolor="lavender"><?print $row[1]; ?></strong></td>
    </tr>


   
 <tr>
<td ><b>Employee Number</b></td><td>:</td>

<td ><?print $empno?></td>
<td ><b>Id no</b></td><td>:</td>
    <td ><?print $row[17]; ?></td>

  <tr>   
  <tr>
    
    <td ><b>Date of Birth</b></td><td>:</td>


    <td ><?print datetoHtml($row[2]); ?></td>
   
    <td  ><b>Sex</b></td><td>:</td>
    <td ><?print $row[3]; ?></td>
   
  </tr>
 


 <tr>
    <td ><b>Address</b></td><td>:</td>
    <td ><?print $row[8]; ?></td>
    <td ><b>Mobile</td><td>:</td>
    <td ><?print $row[9]; ?></td>
  </tr>

  <tr>
<td  ><b>Department</b></td><td>:</td>
    <td ><?print $row[4]; ?></td>
 <td ><b>Telephone</b> </td><td>:</td><td ><?print $row[10]; ?></td>
 
  </tr>
 

<tr>
    <td ><b>Designation</b></td><td>:</td>
    <td ><?print $row[5]; ?> </td>
    
<td  ><b>Status<b></td><td>:</td>
    <td ><?print $row[11];?> </td>
    </tr>
<tr>
    <td ><b>Joining Date</b></td><td>:</td>
    <td ><?print datetoHtml($row[6]); ?></td>
    
<td ><b>Releaved on<b></td><td>:</td>
    <td ><?print datetoHtml($row[7]); ?></td>
 
    </tr>
<tr>
    <td ><b>Pay Per Day<b></td><td>:</td>
    <td ><?print $row[12]; ?></td>
    
<td ><b>Nationality</b></td><td>:</td>
    <td ><?print $row[15]; ?></td>
 
    </tr>
<tr>
    
    
<td><b>Passport No</b> </td><td>:</td>
    <td ><?print $row[16]; ?></td>

 <td ><b>Passport Expiry date</b> </td><td>:</td>
    <td ><?print datetoHtml($row[14]); ?></td>
    </tr>

<tr>
    <td ><b>Visa Expiry date</b></td><td>:</td>
    <td ><?print datetoHtml($row[13]); ?></td>
    
 <td ><b>Remarks</b></td><td>:</td>
    <td ><?print $row[18]; ?></td>
 
    </tr>

  






 </table>

</form>