<?php
	require "../commonincludefiles.php";
	$str1 = "";	
	/*$order_field = "section_id";
	$order_type  = "ASC";
	$objSection = new SectionMgmt();
	$result = $objSection->getAllRecords(0,0,$condition,$order_field,$order_type) ;

	if(dbRows($result) > 0){	
		while($record = dbArray($result)){
			$str1 .= "['".$record['sectionmaster_id']."','".$record['section_name']."-".$record['section_medium']."'],";	
		}
	}*/

	$objEmployeeMgmt = new EmployeeMgmt();	
	$result = $objEmployeeMgmt->getDesignation() ;
	if(dbRows($result) > 0){	
		while($record = dbArray($result)){
			$str2 .= "['".$record['designation_id']."','".$record['designation_nameeng']."'],";	
		}
	}
	$result = $objEmployeeMgmt->getPayScale();
	$payscale ="";
	if(dbRows($result) > 0){	
		while($record = dbArray($result)){
			$payscale   	= $record["current_payscale"] ." / ".$record["payband"] ." / ".$record["gradepay"] ;
			$str3 .= "['".$record['payscale_id']."','".$payscale."'],";	
		}
	}
	
		
$str1 = substr($str1, 0, strlen($str1)-1);
$str2 = substr($str2, 0, strlen($str2)-1);
$str3 = substr($str3, 0, strlen($str3)-1);
?>
<script type="text/javascript" language="javascript">
	Ext.namespace('Ext.employee');
	Ext.employee.sectionname = [<?php echo $str1; ?>];
	Ext.employee.designation = [<?php echo $str2; ?>];
	Ext.employee.payscale =    [<?php echo $str3; ?>];

</script>