 <?php
session_start();

if($_SESSION['dbName']==""){
	header("location:../index.php");
}
include("config.inc.php");
include("setup_function.php");


//echo $_SESSION['dbName'];exit;

$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");



$querylog="select * from ".$_SESSION['dbLabel'].".login where user_account='".$_SESSION['useraccount']."'";
$resultlog=mysql_query($querylog) or die(mysql_error());
while($rows=mysql_fetch_array($resultlog)){
	extract($rows);
}

$query="select * from module";
$result=mysql_query($query,$connection) or die(mysql_error());
while($row=mysql_fetch_array($result)){
  extract($row);
  $_SESSION['module']=$Module_Delivery;
}

//mysql_close($connection);
print <<<HERE
<html >
<head><title>HR</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<link rel="stylesheet" type="text/css" media="all" href="css-v2/style.css">


<link rel="stylesheet" type="text/css" media="all" href="css-v2/newstyle.css">
<script type="text/javascript" src="js/tabsClass/tabber.js"></script>
<link rel="stylesheet" href="js/tabsClass/tabber.css" type="text/css" />
<script type="text/javascript" src="js/grid/jquery-1.9.1.js"></script>


<script type="text/javascript" language="javascript">

function inserthouseinfo(){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
				{ 	
					document.getElementById('houseediting').innerHTML=xmlhttp.responseText;
					
				}
		}
  }

  
xmlhttp.open("GET","staff_action.php?actionmode=insertform",true);
xmlhttp.send();
}

	
	
function insertjob(job_id){
		
	var newjobcode= document.getElementById('newjobcode').value;
	var newdescription= document.getElementById('newdescription').value;
	if(job_id == '') actionmode = 'insertjob';
	else  actionmode = 'updatejob';
	
	if(newjobcode == '') {
		alert("Job Code Cannot be Empty!");
		return 0;
	} else {
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
		xmlhttp.onreadystatechange=function()
	{
	if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById('staff_job').innerHTML=xmlhttp.responseText;
			
		}
  }
  
xmlhttp.open("GET","setup_action.php?actionmode="+actionmode+"&job_id="+job_id+"&newjobcode="+newjobcode+"&newdescription="+newdescription,true);
xmlhttp.send();
	}
	}
function deletejob(job_id){
	if (confirm ( "Are you sure you want to Delete this Record ?")){
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById('staff_job').innerHTML=xmlhttp.responseText;
		}
	 }

  
xmlhttp.open("GET","setup_action.php?actionmode=deletejob&job_id="+job_id,true);
xmlhttp.send();
		
	}
}

function clearJob(){
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
	if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById('staff_job').innerHTML=xmlhttp.responseText;
			
		}
	}
  
xmlhttp.open("GET","setup_action.php?actionmode=getjob&job_id=",true);
xmlhttp.send();
	
}	
function getjob(job_id){
	
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
	if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById('staff_job').innerHTML=xmlhttp.responseText;
			
		}
	}
  
xmlhttp.open("GET","setup_action.php?actionmode=getjob&job_id="+job_id,true);
xmlhttp.send();
	
}
	
function insertbank(bank_id){
	var newbankname			= document.getElementById('newbankname').value;
	var newbankbranch		= document.getElementById('newbankbranch').value;
	var Bank_Telephone1		= document.getElementById('Bank_Telephone1').value;
	var Bank_Telephone2		= document.getElementById('Bank_Telephone2').value;
	var Bank_Fax			= document.getElementById('Bank_Fax').value;
	var Bank_Address		= document.getElementById('Bank_Address').value;
	var Bank_Email			= document.getElementById('Bank_Email').value;
	var Bank_Website		= document.getElementById('Bank_Website').value;	
	var Bank_creditlimit1	= document.getElementById('Bank_creditlimit1').value;	
	var Bank_creditlimit2	= document.getElementById('Bank_creditlimit2').value;	
	var Owner_Branch		= document.getElementById('Owner_Branch').value;	
	
	if(bank_id == '') var actionmode = 'insertbank';
	else 	var actionmode = 'updatebank';
		if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_bank').innerHTML=xmlhttp.responseText;
	}
  }
  
xmlhttp.open("GET","setup_action.php?actionmode="+actionmode+"&bank_id="+bank_id+"&newbankname="+newbankname+"&newbankbranch="+newbankbranch+
			"&Bank_Telephone1="+Bank_Telephone1+"&Bank_Telephone2="+Bank_Telephone2+"&Bank_Fax="+Bank_Fax+
			"&Bank_Address="+Bank_Address+"&Bank_Email="+Bank_Email+"&Bank_Website="+Bank_Website+
			"&Bank_creditlimit1="+Bank_creditlimit1+"&Bank_creditlimit2="+Bank_creditlimit2+
			"&Owner_Branch="+Owner_Branch,true);
xmlhttp.send();
		
}

function deletebank(bank_id){
		if (confirm ( "Are you sure you want to Delete this Record ?")){
				if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_bank').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=deletebank&bank_id="+bank_id,true);
xmlhttp.send();
}
}

function getbank(bank_id){
		
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_bank').innerHTML=xmlhttp.responseText;
	}
  }

  xmlhttp.open("GET","setup_action.php?actionmode=getbank&bank_id="+bank_id,true);
	xmlhttp.send();
	
}

function clearBank(){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_bank').innerHTML=xmlhttp.responseText;
	}
  }

	xmlhttp.open("GET","setup_action.php?actionmode=getbank&bank_id=",true);
	xmlhttp.send();

}
function insertcompany(company_code){
	if(company_code == '') var actionmode = 'insertcompany';
	else var actionmode = 'updatecompany';
	var newcompanycode= document.getElementById('newcompanycode').value;
	var newcompanyname= document.getElementById('newcompanyname').value;
		
	if(newcompanycode == ''){
		alert("Company Code Cannot be Empty!")
		return 0;
	} else {
  if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_company').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode="+actionmode+"&company_code="+company_code+"&newcompanyname="+newcompanyname+"&newcompanycode="+newcompanycode,true);
xmlhttp.send();
	}
}

function deletecompany(company_code){
	if (confirm ( "Are you sure you want to Delete this Record ?")){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_company').innerHTML=xmlhttp.responseText;
	}
  }

xmlhttp.open("GET","setup_action.php?actionmode=deletecompany&company_code="+company_code,true);
xmlhttp.send();
}
}

function clearCompany(){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_company').innerHTML=xmlhttp.responseText;
	}
  }
  
xmlhttp.open("GET","setup_action.php?actionmode=getcompany&company_code=",true);
xmlhttp.send();
}	
function getcompany(company_code){
	
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_company').innerHTML=xmlhttp.responseText;
	}
  }
  
xmlhttp.open("GET","setup_action.php?actionmode=getcompany&company_code="+company_code,true);
xmlhttp.send();
	
}

function insertquota(quota_id){
	var quotacode = document.getElementById('quotacode').value;
	var quotaname = document.getElementById('quotaname').value;
	var quotaissuedate = document.getElementById('quotaissuedate').value;
	var quotaexire = document.getElementById('quotaexire').value;
	
	if(document.getElementById('quotaused').checked)
		var quotaused = 1;
	else var quotaused = 0;
	
	if(quota_id == '') var actionmode = 'insertquota';
	else var actionmode = 'updatequota';
	if(quotacode == ''){
		alert("Code Cannot Be Empty!");
		return 0 ;
	} else {
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_quota').innerHTML=xmlhttp.responseText;
	}
}

xmlhttp.open("GET","setup_action.php?actionmode="+actionmode+"&quota_id="+quota_id+"&quotacode="+quotacode+"&quotaname="+quotaname+
		"&quotaissuedate="+quotaissuedate+"&quotaexire="+quotaexire+"&quotaused="+quotaused,true);
xmlhttp.send();
}
}
function clearQuota(){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_quota').innerHTML=xmlhttp.responseText;
	}
  }
  
	xmlhttp.open("GET","setup_action.php?actionmode=getquota&quota_id=",true);
	xmlhttp.send();	
}

function deletequota(quota_id){
	if (confirm ( "Are you sure you want to Delete this Record ?")){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
	else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_quota').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=deletequota&quota_id="+quota_id,true);
xmlhttp.send();
		
	}
	}
	
function getquota(quota_id){
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_quota').innerHTML=xmlhttp.responseText;
	}
  }
  
xmlhttp.open("GET","setup_action.php?actionmode=getquota&quota_id="+quota_id,true);
xmlhttp.send();
	
}

function insertreligion(religion_id){
	var religion_code = document.getElementById('religion_code').value;
	var religion_name = document.getElementById('religion_name').value;	
	
	if(religion_id == '') var actionmode = 'insertreligion';
	else  var actionmode = 'updatereligion';
	
	if(religion_code == ''){
		alert("Code Cannot be Empty!");
		return 0;
	} else {
		if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {	
		document.getElementById('staff_religion').innerHTML=xmlhttp.responseText;
	}
 }
	xmlhttp.open("GET","setup_action.php?actionmode="+actionmode+"&religion_id="+religion_id+"&religion_code="+religion_code+"&religion_name="+religion_name,true);
	xmlhttp.send();
	}	
}

function deletereligion(religion_id){
		if (confirm ( "Are you sure you want to Delete this Record ?")){
				if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_religion').innerHTML=xmlhttp.responseText;
	}
  }
  
xmlhttp.open("GET","setup_action.php?actionmode=deletereligion&religion_id="+religion_id,true);
xmlhttp.send();
		
	}
}
	
function getreligion(religion_id){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_religion').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=getreligion&religion_id="+religion_id,true);
xmlhttp.send();
	
}

function clearReligion(){
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_religion').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=getreligion&religion_id=",true);
xmlhttp.send();
	
}
function insertnationality(nationality_id){
	var nationality_code = document.getElementById('nationality_code').value;
	var nationality_name = document.getElementById('nationality_name').value;
	
	if(nationality_id == '') var actionmode = 'insertnationality';
	else var actionmode = 'updatenationality';
		
	if(nationality_code == ''){
		alert("Code Cannot be Empty!");
		return 0;
	} else {
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_nationality').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode="+actionmode+"&nationality_id="+nationality_id+"&nationality_code="+nationality_code+
			"&nationality_name="+nationality_name,true);
xmlhttp.send();
		
	}	
}
function deletenationality(nationality_id){
		if (confirm ( "Are you sure you want to Delete this Record ?")){
				if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
				{ 	
					document.getElementById('staff_nationality').innerHTML=xmlhttp.responseText;
					
				}
		}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=deletenationality&nationality_id="+nationality_id,true);
xmlhttp.send();
		
	}
		
}
	
function getnationality(nationality_id){
		
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_nationality').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=getnationality&nationality_id="+nationality_id,true);
xmlhttp.send();
}
function clearNationality(){
		
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_nationality').innerHTML=xmlhttp.responseText;
	}
  }

  
xmlhttp.open("GET","setup_action.php?actionmode=getnationality&nationality_id=",true);
xmlhttp.send();
}

function searchQuota(){
		if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_quota').innerHTML=xmlhttp.responseText;
	}
  }
	
	var searchquota = document.getElementById("searchquota").value;
  
	xmlhttp.open("GET","setup_action.php?actionmode=searchQuota&searchquota="+searchquota,true);
	xmlhttp.send();
}
function clearQuota(){
		if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		document.getElementById('staff_quota').innerHTML=xmlhttp.responseText;
	}
  }
	
	var searchquota = document.getElementById("searchquota").value;
  
	xmlhttp.open("GET","setup_action.php?actionmode=searchQuota&searchquota=",true);
	xmlhttp.send();
}
</script>

<style type="text/css" media="all">
.detail-header-bg1{
	background_color=black;
}
.style44{
	color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}
</style>

HERE;

echo "<body>";
print <<<HERE
<form enctype="multipart/form-data" method="post" name="staff">
<input type='hidden' name='PTabIndex' id='PTabIndex' value='$PTabIndex'>
HERE;

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



//include_once("menubar.php");
include_once("sidemenu.php");
echo"  </td></tr>
 <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'>House</span></td>
				<td class='message' valign='middle' style='height:26px;'>".htmlspecialchars($message, ENT_QUOTES)."</td>
			</tr></table>
		</td>
	  </tr>";
	
echo"<tr><td  height='18'  valign='top' id='content-top2'>";	
echo"</td></tr>";
echo"<tr><td align=left  id='content-body'>";
echo"<table border=0 align=left width=800> <tr  >";
echo " </table>";

if(isset($_GET['warning_to_change']) && $_GET['warning_to_change'] > 0)
{
   echo "<script>
         alert('You have to change your password!!');
		 </script>";
		 
}
 
 echo"<tr></tr>
	 </table></td></tr>
	</table>";


 print <<<HERE
	<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
			};
			
			
			//mycode get ledger names
			
			

</script>


<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;}
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;}

</style>

</head>



<body>


HERE;


	$querysetup="select grid_color1,grid_color2,DecimalBase, DecimalBase1, DecimalBase2, base1, base2, maxperpage from setup";
$resultsetup=mysql_query($querysetup,$connection) or die(mysql_error());
if($result=mysql_fetch_array($resultsetup)){
	$grid_color1=$result[0];
$grid_color2=$result[1];}

echo "<input type='hidden' name='PTabIndex' id='PTabIndex' value='$PTabIndex'>
	<input type='hidden' name='staff_code' id='staff_code' value='$staff_code'>";	
echo "<table border='0' cellpadding='0' cellspacing='0' border='0'  align='center' class='layout-width'>";
//get Tab to view tab number

	echo"<tr min-height=''>
			<td align=left id='content-body'>";
	 echo"   <div class='tabber' id='tab1' style='width: 1100px; min-height:500px; 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='jobs'>jobs</h2>";
		echo"		<div id='datagrid-d1' style='height:400px;width:1080px;border:0px solid #000000;'>";
			
			
					echo "<div id='staff_job'>";
					draw_job($job_id,$connection);
				echo "</div>";	
			

echo"			</div>";      
echo"		</div> "; 



echo"	<div class='tabbertab'>
					<h2 title='bank'>bank</h2>";
		echo"		<div id='datagrid-d1' style='overflow-x:scroll;height:400px;width:1080px;border:0px solid #000000;'>";
			
			echo "<div id='staff_bank'>";
			draw_bank($bank_id, $connection);
		
			
	
echo "</div>";

echo"			</div>";      
echo"		</div>"; 

echo"	<div class='tabbertab'>
					<h2 title='company'>company</h2>";
echo"		<div id='datagrid-d1' style='height:400px;width:1080px;border:0px solid #000000;'>";
echo "<div id='staff_company'>";
	draw_company($company_code,$connection);
echo "</div>";





echo"			</div>";      
echo"		</div>"; 

echo"	<div class='tabbertab'>
					<h2 title='quota'>quota</h2>";
		echo"		<div id='datagrid-d1' style='height:400px;width:1080px;border:0px solid #000000;'>";
		
			
			echo "<div id='staff_quota'>";
			
			draw_quota($quota_id,$searchquota,$connection);
	
echo "</div>";

echo"		</div>";      
echo"		</div>"; 

echo"	<div class='tabbertab'>
					<h2 title='religion'>religions</h2>";
		echo"		<div id='datagrid-d1' style='height:400px;width:1080px;border:0px solid #000000;'>";
		
			echo "<div id='staff_religion'>";
			
			draw_religions($religion_id,$connection);
	
echo "</div>";
echo"			</div>";      
echo"		</div>"; 
echo"	<div class='tabbertab'>
					<h2 title='nationality'>nationality</h2>";
		echo"		<div id='datagrid-d1' style='height:400px;width:1080px;border:0px solid #000000;'>";
		
			echo "<div id='staff_nationality'>";
			
			draw_nationality($nationality_id,$connection);
	
echo "</div>
";




echo"			</div>";      
echo"		</div>"; 


echo "</div>";
//echo "</td></tr>";
echo" <tr height='30'><td align='center' id='content-bottom' ></td></tr>";


include("footer.php");

echo" </table> ";//end of last table menu

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>";

print <<<HERE
</form>
</body>
</html>
HERE;
?>

