<?php

session_start();
header("Content-type: text/html; charset=".$_SESSION['encodingmode']);
if($_SESSION['dbName']==""){
header("location:../index.php");
}


include("config.inc.php");
include("function.inc.php");
include("Forms_DataGrid1.php");
include("Form_House_Function.php");
 
$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass'])
		or die("Could not connect to DB");
		
			
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");
if(	$_SESSION['encodingmode'] == 'utf8' || $_SESSION['encodingmode'] == 'utf-8'){
	mysql_query("SET NAMES 'utf8'"); 
	mysql_query('SET CHARACTER SET utf8'); 
	mysql_set_charset('utf8', $connection);
}

$actionmode = $_POST["actionmode"]; if ($actionmode == ""){$actionmode = $_GET["actionmode"];}   
$mainaction = $_POST["mainaction"]; if ($mainaction == ""){$mainaction = $_GET["mainaction"];}   

if (empty($mainaction))
	$mainaction = 'insert';

if ($datefrom ==''){$datefrom=date("d-m-Y");}
if ($dateto ==''){$dateto=date("d-m-Y");}
print <<<HERE
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<script type="text/javascript" src="js/tabsClass/tabber.js"></script>
	<link rel="stylesheet" href="js/tabsClass/tabber.css" type="text/css" />

<link rel="stylesheet" type="text/css" media="all" href="css-v2/style.css">
<link type="text/css" rel="stylesheet" href="dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
<SCRIPT type="text/javascript" src="dhtmlgoodies_calendar.js?random=20060118"></script>
<LINK REL="stylesheet" TYPE="text/css" MEDIA="all" HREF="tabs.css">


<script type="text/javascript" language="javascript">
var tabberOptions = {
		'manualStartup':true , 
		'onClick': function(argsObj) {
			
			var t = argsObj.tabber; /* Tabber object */
			var id = t.id; /* ID of the main tabber DIV */
			var i = argsObj.index; /* Which tab was clicked (0 is the first tab) */
			var e = argsObj.event; /* Event object */
			
			if (id == 'tab1') 
				document.getElementById('PTabIndex').value = i;
			} , 
			
			/* Optional: set an ID for each tab navigation link */
		
			'addLinkId': true
			};
			
			


	function getreport(){
			var carlist=document.formstaffreport.carlist.checked;
			var fuel=document.formstaffreport.fuel.checked;
			var expireoption=document.formstaffreport.expirationoption.value;
		
		var r1 = 0;	
		if(document.getElementById('r1').checked)
			var r1 = 1;	
		if( r1 == 1){
			var staff_Cdname1 = document.formstaffreport.staff_Cdname1.value;
			var staff_Cdname2 = document.formstaffreport.staff_Cdname2.value;
			
			var datefrom = document.formstaffreport.datefrom.value;
			var dateto = document.formstaffreport.dateto.value;
			
			var grpby = document.formstaffreport.grpby.value;
			
			window.open("Rep_StaffList.php?staff_Cdname1="+staff_Cdname1+"&staff_Cdname2="+staff_Cdname2+"&datefrom="+datefrom+"&dateto="+dateto+"&grpby="+grpby);
		} else {
			if(carlist){get_CarList();}
			else if(fuel){get_FuelReport();}
			else if (expireoption<=5){ get_Staff_report();}
			else if (expireoption>5){get_Car_report(expireoption);}
		}		
	}
	
	function showliststaff(str){

  window.open('List_Staff_ft.php?str='+str,'mywindow','width=850,height=550,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
	}
	function showlistvehicle(str){

  window.open('List_vehicle.php?str='+str,'mywindow','width=850,height=550,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}

	function get_staff_name(){
	var staffname1=document.formstaffreport.staff_Cdname1.value;
	var staffname2=document.formstaffreport.staff_Cdname2.value;
	document.getElementById("staff_namefrom").value=staffname1;
	document.getElementById("staff_nameto").value=staffname2;
	
	}
	
function get_Staff_report(){

	
	
	var stafffrom=document.getElementById('staff_Cdname1').value;

	var staffto=document.getElementById('staff_Cdname2').value;
	
	var expireoption=document.formstaffreport.expirationoption.value;

	var datefrom=document.getElementById('datefrom').value;
	var dateto=document.getElementById('dateto').value;
	
	
	
window.open('Staff_View_Report.php?expireoption='+expireoption+'&stafffrom='+stafffrom+'&staffto='+staffto+'&datefrom='+datefrom+'&dateto='+dateto);

}

function get_Car_report(index){
	
	var stafffrom=document.getElementById('staff_Cdname1').value;

	var staffto=document.getElementById('staff_Cdname2').value;
	
	var expireoption=document.formstaffreport.expirationoption.value
	
	var datefrom=document.getElementById('datefrom').value;
	var dateto=document.getElementById('dateto').value;
	var cartype=document.getElementById('cartype').value;
	
	if (index == 12) 
		var str = 'Rep_VehicleServices';
	else if (index == 13) 
		var str = 'Rep_VehicleFuel';
	else if (index == 14) 
		var str = 'Rep_HouseElectricity';
	else if (index == 15) 
		var str = 'Rep_HouseGenerator';
	else	
		var str = 'Car_View_Report';	
	window.open(str+'.php?expireoption='+expireoption+'&stafffrom='+stafffrom+'&staffto='+staffto+'&datefrom='+datefrom+'&dateto='+dateto+'&cartype='+cartype);
}

function get_CarList(){
	var carlist=document.formstaffreport.carlist.checked;
	if(carlist){
		document.formstaffreport.expirationoption.checked=false;
	var cartype=document.getElementById('cartype').value;
	var groupby=document.formstaffreport.groupby.value;
	
	window.open('Car_View_List.php?cartype='+cartype+'&groupby='+groupby);
		
	}
}
function get_FuelReport(){
	var fuel=document.formstaffreport.fuel.checked;
	if(fuel){
	var cartype=document.getElementById('cartype').value;
	var groupby=document.formstaffreport.groupby.value;
	var fromplate=document.formstaffreport.fromplate.value;
	var toplate=document.formstaffreport.toplate.value;
	var datefrom=document.getElementById('datefrom').value;
	var dateto=document.getElementById('dateto').value;
	window.open('Rep_CarFuelList.php?fromplate='+fromplate+'&toplate='+toplate+'&datefrom='+datefrom+'&dateto='+dateto+'&cartype='+cartype);
		
	}
}
function openAttach(){
	var sc = 'Attachements';
	var vform = 'Attachements';
	win = window.open('UploadImages.php?vform='+vform+'&sc='+sc, 'Upload', 'toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=990,height=600,top=60,left=100');		
	win.creator = self;
	win.focus();	
}

</script>

<title>Reports</title>

<script type="text/javascript" src="js/grid/UI_DataGrid.js"></script>
<script type="text/javascript" src="js/grid/jquery-1.9.1.js"></script>


<link type="text/css" href="js/calendar/jquery.datepick.css" rel="stylesheet">
<script type="text/javascript" src="js/calendar/jquery.datepick.js"></script>

<link type="text/css" href="js/grid/scripts/jquery-ui.css" rel="stylesheet">
<script type="text/javascript" src="js/grid/scripts/jquery-ui.min.js"></script>





<script type="text/javascript" src="dropdown.js"></script>
<script type="text/javascript" language="javascript">


</script>


<link rel="stylesheet" type="text/css" media="all" href="js/grid/UI_DataGrid_V1.css">


<style type="text/css">

body , td , th {
	font-family: Verdana ,  Arial ,  Helvetica ,  sans-serif;
	font-size: 11px;
	}
	body {

	margin-top: 2px;
	margin-left: 1px;
}
a:link {
	text-decoration: none;
	color: #0000FF;
}
a:visited {
	text-decoration: none;
	color: #0000FF;
}
a:hover {
	text-decoration: none;
	color: #0000FF;
}
a:active {
	text-decoration: none;
	color: #0000FF;
}
.style1 {
	color: #000000;
font-weight: bold;
font-size: 11px;
font-family: Verdana, Geneva, sans-serif;
	}
.style12 {
	font-size: 9px;
	color: #999999;
	font-weight: bold;
}
.style15 {color: #5151FF; font-size: 10px;}
.style16 {
	font-size: 16px;
	color: #FF0000;
	font-weight: bold;
	font-family: "Times New Roman" ,  Times ,  serif;
}
.style17 {font-size: 9px}
.style25 {color: #999999; font-weight: bold; font-size: 10px; }
.style26 {color: #FF0000}
.style27 {color: #999999 ;font-size: 10px;}
.style28 {color: #FFFFFF ;font-size: 10px;}
.style44{
	color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}
input:focus {border:1px solid #1e87a5;background-color:#f2f2f2;}
select:focus {border:1px solid #1e87a5;}

input:hover {border:1px solid #1e87a5;background-color:#f2f2f2;}
select:hover {border:1px solid #1e87a5;}

#table1:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	cursor:pointer;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;

}
#table2:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#table3:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
 // ...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#tabledt1:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#tabledt2:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;
cursor:pointer;

}

#tabledt3:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  //...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#table5:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  //...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#table6:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#table7:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;
cursor:pointer;
}
#table8:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  // ...and now for the proper property 
  transition:.9s;
cursor:pointer;
}

table.sample {
	border-width: 0px;
	border-spacing: 3px;
	border-style: double;
	border-color: gray;
	border-collapse: collapse;
	background-color: white;
}
table.sample th {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #DCDCDC;
	-moz-border-radius: ;
}
table.sample td {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #E5E5E5;
	-moz-border-radius: ;
}


tablesalary.sample {
	border-width: 0px;
	border-spacing: 3px;
	border-style: double;
	border-color: gray;
	border-collapse: collapse;
	background-color: white;
}
tablesalary.sample th {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #DCDCDC;
	-moz-border-radius: ;
}
tablesalary.sample td {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #E5E5E5;
	-moz-border-radius: ;
}

.roundedtext_countrycode {
    cursor: pointer;
    border: 1px solid transparent;
    height: 20px;
    width: 100%;
    background: transparent;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
color: #000000;}




#table1:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	cursor:pointer;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;

}
#table2:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#table3:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#tabledt1:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#tabledt2:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;

}

#tabledt3:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#table5:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#table6:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#table7:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}
#table8:hover {
	background-color:#f2f2f2;
	border:1px solid #E2E2E2;
	-o-transition:.9s;
  -ms-transition:.9s;
  -moz-transition:.9s;
  -webkit-transition:.9s;
  /* ...and now for the proper property */
  transition:.9s;
cursor:pointer;
}

table.sample {
	border-width: 0px;
	border-spacing: 3px;
	border-style: double;
	border-color: gray;
	border-collapse: collapse;
	background-color: white;
}
table.sample th {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #DCDCDC;
	-moz-border-radius: ;
}
table.sample td {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #E5E5E5;
	-moz-border-radius: ;
}


tablesalary.sample {
	border-width: 0px;
	border-spacing: 3px;
	border-style: double;
	border-color: gray;
	border-collapse: collapse;
	background-color: white;
}
tablesalary.sample th {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #DCDCDC;
	-moz-border-radius: ;
}
tablesalary.sample td {
	border-width: 1px;
	padding: 0px;
	border-style: solid;
	border-color: #E5E5E5;
	-moz-border-radius: ;
}


</style>

<link type="text/css" rel="stylesheet" href="dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
<SCRIPT type="text/javascript" src="dhtmlgoodies_calendar.js?random=20060118"></script>

</head>
<body onload=\"get_staff_name(); \">
<form name='formstaffreport' method='post'>"
HERE;

 
//echo "<input type='hidden' name='house_code' value='$house_code' id='house_code'>";
	echo "<input type='hidden' name='PTabIndex' id='PTabIndex' value='$PTabIndex'>";
	//<input type='hidden' name='actionmode' value='$actionmode'>
	//<input type='hidden' name='mainaction' value='$mainaction'>";

echo"<table cellpadding='0' cellspacing='0' border='0'  align='center' class='layout-width'>";
include_once("header.php");
echo" <tr><td  valign='top'>";

include_once("sidemenu.php");
echo"  </td></tr>";


echo" <tr style='height:26px;'>
		<td  valign='top' id='content-top'>
			<table border='0' cellpadding='0' cellspacing='0' style='table-layout:fixed; height:26px;' class='layout-width'>
			<tr style='height:26px;'>
				<td style='width:38px; height:26px;'>&nbsp;</td>
				<td valign='middle' style='width:300px; height:26px;'><span class='title'>";
			echo "Reports";
			echo"</span></td>
				<td class='message' valign='middle' style='height:26px;'>".htmlspecialchars($message, ENT_QUOTES)."</td>
			</tr></table>
		</td>
	  </tr>";

echo"<tr>
		<td  height='34'  valign='top' id='content-top2'>
			<table border='0' cellpadding='0' cellspacing='0' class='layout-width'>
			<tr>
				<td width='30'  height='34'>&nbsp;</td>
				<td valign='middle' height='34' width='720px' align='left'>";
	
echo"	</td></tr></table>";
echo"</td></tr>";				

echo"<tr><td id='content-body'>";
echo"  		<table border='0' cellpadding='0' cellspacing='0' align='left' valign='center' >";
			
	echo "<tr><td>
	
	<div id='houseediting'>";
	
	echo "<input type='hidden' value='staffexpire' name='staffexpire'>";
echo "&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button onclick=\"getreport(); return false;\"><span><span>Preview</span></span></button>
<button onclick=\"openAttach(); return false;\"><span><span>Attachments</span></span></button>
<br><br>";
		echo "<table  border='0' style=' margin-left:50px;'>";
	echo "<col width=100>";
	echo "<col width=50>";
	echo "<col width=250>";
	
	echo "<col width=35>";
	//echo "<col width=50>";
	
	echo "<col width=150>";
	echo "<col width=150>";
	echo "<col width=35>";
	echo "<col width=160>";
	echo "<col width=160>";
	
	echo "<tr><td colspan='3'>";
			echo "<fieldset><legend><span class='style1'>Employee Id</span></legend>";
				echo "<table border='0' >";
				echo "<col width=50>";
				echo "<col width=50>";
				echo "<col width=230>";
				
				
				$selectstaffquery="select staff_code,Staff_fullName from staff order by staff_code";
				
		
					echo "<tr>
							<td>From </td>";
							
echo "<td align='right' colspan='2'><input type='text' name='staff_Cdname1' id='staff_Cdname1' style='width:50px'> 
							<input type='text' name='staff_namefrom' id='staff_namefrom' readonly  style='width:200px'>
							
							
							<img src='img/btnopen.jpg' title=' Select Project ' width='15' height='15' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showliststaff(1); '  />
							</td>
							
						</tr>
						<tr>
							<td>To</td>";
							
							
							echo "<td align='right' colspan='2'><input type='text' name='staff_Cdname2' id='staff_Cdname2' style='width:50px'> 
							<input type='text' name='staff_nameto' id='staff_nameto' readonly  style='width:200px'>
							<img src='img/btnopen.jpg' title=' Select Project ' width='15' height='15' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showliststaff(2); '  />
							</td>
							
						</tr>
						
					</table>
				</fieldset>";
			
	echo "</td>";
	echo "<td></td>";
	echo "<td colspan='2'>";
			echo "<fieldset><legend><span class='style1'>Date</span></legend>";
				echo "<table border='0' >";
				echo "<col width=100>";
				
				echo "<col width=300>";
					echo "<tr>
							<td>From </td>
							
							<td><input type='text' name='datefrom' id='datefrom' value='$datefrom'  style='width:170px'>
							
							<a HREF='#' onClick=\"displayCalendar(document.formstaffreport.datefrom,'dd-mm-yyyy',this); return false;\" NAME=\"anchor1\" ID=\"anchor1\" >";
							
 echo"<image src='./img/cal.gif' border=0 align=center ></image></a>
							</td>
						</tr>
						<tr>
							<td>To </td>
							
							<td><input type='text' name='dateto' id='dateto' value='$dateto' style='width:170px'>
							<a HREF='#' onClick=\"displayCalendar(document.formstaffreport.dateto,'dd-mm-yyyy',this); return false;\" NAME=\"anchor1\" ID=\"anchor1\" >";
							
 echo"<image src='./img/cal.gif' border=0 align=center ></image></a></td>
						</tr>
					</table>
				</fieldset>";
			
	echo "</td>";
	echo "<td></td>";
	
	echo "<td colspan='2'>";
			echo "<fieldset><legend><span class='style1'>Vehicle</span></legend>";
				echo "<table border='0' >";
				echo "<col width=50>";
				
				echo "<col width=230>";
				
				
				$selectstaffquery="select staff_code,Staff_fullName from staff order by staff_code";
				
		
					echo "<tr>
							<td>From </td>";
							
echo "<td align='right' colspan='2'> 
							<input type='text' name='fromplate' id='fromplate' readonly  style='width:200px'>
							
							
							<img src='img/btnopen.jpg' title=' Select Project ' width='15' height='15' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistvehicle(1); '  />
							</td>
							
						</tr>
						<tr>
							<td>To</td>";
							
							
							echo "<td align='right' colspan='2'>
							<input type='text' name='toplate' id='toplate' readonly  style='width:200px'>
							<img src='img/btnopen.jpg' title=' Select Project ' width='15' height='15' border='0' onMouseOver=\"style.cursor='hand'\" onClick='showlistvehicle(2); '  />
							</td>
							
						</tr>
						
					</table>
				</fieldset>";
			
	echo "</td>";
	
	
	echo "</tr>";

			
echo"				</table>";

			
	
echo "</div>
</td></tr>";
//echo "<tr height='10px'></tr>";

	
						echo "<tr height='40px'></tr>";
echo"<tr min-height='100'>
			<td align='center' >";
			 echo"   <div class='tabber' id='tab1' style='width: 1100px; min-height:350px; margin-left: 50px;  margin-top:10px; float:left; text-align:left;'> ";
			$styleoption=" style='vertical-align:middle; width:152px; font-family:monospace; font-size:initial ; font-weight:bold;'";
				////
			echo"	<div class='tabbertab'>
					<h2 title='Staff Paper'>Staff Paper</h2>";
		echo"		<div id='datagrid-d1' style='width:1080px; min-height:auto; margin-top:5px; border:0px solid gray;'>";
	
			//begin staff in house
			
	echo "<div id='expiredoption' >";
	
							echo "<table >
				<col width='300'><col width='100'><col width='300'>
				<tr><td >";							
				
									echo "<fieldset><legend><span class='style1'>Select Expired option</span></legend>";
									echo "<table >
											<col width='300'>";
											
											echo "<tr height='50px'><td ><input type='radio' name='expirationoption'   value='1' >Passport</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='2'>Inssurance</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='3' >Re-visa</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='4' >Resident Permit</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='5' onchange=\"get_Staff_report(); return false;\">Quota</td></tr>
											
												";
												
									
									echo "</table>";
									echo "</fieldset>";
									
									echo "</td><td></td>";
						echo "<td align='center' valign='top'>
								<table width=300px align='center'>
									<tr><td><b><input type='checkbox' name='r1' id='r1' > Staff List Rport<b></td></tr>
									<tr><td><b>Group by</b> &nbsp;&nbsp;<select name='grpby' id='grpby' style='width:100px;'>
										<option value=''></option>
										<option value='1'>project</option>
									</select></td></tr>
								</table></td>";			
									echo "</tr>";
									
									echo "</table>";
										echo "</div>";
		
		echo "	</div></div>";
			//end staff in house
			//begin generator
		echo"	<div class='tabbertab'>
					<h2 title='Car Paper'>vehicle Paper</h2>";
		echo"		<div id='datagrid-d1' style='width:1080px; height:auto; margin-top:5px; border:0px solid gray;'>";
		
		echo "<div id='car paper'>";
									
				echo "<table border='0'>
				<col width='300'>
				<col width='300'>
				<tr><td >";
									echo "<fieldset><legend><span class='style1'>Select Report option</span></legend>";
									echo "<table border='0' >
											<col width='300'>";

											echo "<tr height='50px'><td ><input type='radio' name='expirationoption'   value='6' >Vehicle licence</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='7' >Inssurance</td></tr>
											
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='8' >Roadworthiness</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='9' >Driving licence</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='10' >Hackney Permit</td></tr>		
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='11' >Trailer Road Permit</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='12' >Services</td></tr>
											<tr height='50px'><td ><input type='radio' name='expirationoption'  value='13' >Fuel</td></tr>";
												
												
									
									echo "</table>";
									echo "</fieldset>";
									echo "<br>";
									echo "<fieldset><legend>option</legend>
									<input type='checkbox' name='carlist' id='carlist' >Vehicle list<br><br>
									<input type='checkbox' name='fuel' id='fuel' >Fuel<br>
									
									
									</fieldset>";
									echo "</td>
									<td style='vertical-align: text-top;'><table>
									<col width='300'>
									<tr><td><fieldset><legend>Filter By</legend>";
									$cartypequery="select * from vehicletype";
									$cartype=mysql_query($cartypequery,$connection);
									
									 echo"Car Type<select name='cartype' id='cartype' >";
									echo "<option value=''></option>";
									while($cartyperes=mysql_fetch_array($cartype)){
									echo "<option value='$cartyperes[0]'>$cartyperes[1]</option>";}
									echo "</select>
									
									</fieldset></td></tr>
									
									
										<tr><td><fieldset><legend>Group By</legend>
									
									<input type='radio' name='groupby'  value='none'  checked>None <br><br>
									<input type='radio' name='groupby'  value='cartype'  >Car Type
									
									</fieldset></td></tr>
									</table></td>
									</tr>";
									echo "</table>";
										echo "</div>";
		
			
			echo "</div></div>";
			//end generator
			// house tab
			echo"	<div class='tabbertab'>
					<h2 title='House Paper'>House Paper</h2>";
			echo"		<div id='datagrid-d1' style='width:1080px; height:auto; margin-top:5px; border:0px solid gray;'>";
			
			echo "<div id='house paper'>";
			echo "<table border='0'>
				<col width='300'>
				<col width='300'>
				<tr><td >";
					echo "<fieldset><legend><span class='style1'>Select Report option</span></legend>";
					echo "<table border='0' >
							<col width='300'>";
					echo "<tr height='50px'><td ><input type='radio' name='expirationoption'   value='14' >Electricity</td></tr>
							<tr height='50px'><td ><input type='radio' name='expirationoption'  value='15' >Generator</td></tr>";
								
					echo "</table>";
					echo "</fieldset>";
					echo "</td>
					<td style='vertical-align: text-top;'></td>
					</tr>";
					echo "</table>";
				echo "</div>";
		
			
			echo "</div></div>";
			// end house tab
			
			
			
			echo "</div></td></tr>";

echo "</table> ";

echo "</td></tr>";

echo "<tr height='30'><td align='center' id='content-bottom' ></td></tr>";  
echo" </table>  ";//end of last table menu
echo "
</form>";
echo"<script type=\"text/javascript\" language=\"javascript\">";
echo"	tabberAutomatic(tabberOptions);";
echo"   vTabIndex = document.getElementById('PTabIndex').value; ";
echo"	if (document.getElementById('tab1')) document.getElementById('tab1').tabber.tabShow(vTabIndex); ";
echo"</script>";
echo "</body>";




function selectData($conn, $query){
		$result = mysql_query($query, $conn);
		$cur = mysql_fetch_row($result);		
		return $cur;
	}
//Method to Insert/ Update/ Delete Record in Database
function updateData($conn, $query, $commit){
	if (mysql_query($query, $conn)){				
		return true;
	}else{
		return false;
	}
}



?>
