<?php
	require "commonincludefiles.php";
	$str1 = $str2 = "";
	$qry = "SELECT * FROM cms_yearmaster";
	$result = dbQuery($qry);
	if(dbRows($result) > 0){	
		while($record = dbArray($result)){
			$str1 .= "['".$record['year_id']."','".$record['year_name']."','".$record['year_active']."'],";	
		}
	}
	
	$qry = "SELECT * FROM cms_modulemaster where module_active = '1'";
	$result = dbQuery($qry);
	if(dbRows($result) > 0){
		while($record = dbArray($result)){
			$str2 .= "['".$record['module_id']."','".$record['module_fullname']."','".ucfirst($record['module_shortname'])."','".$record['module_active']."'],";	
		}
	}
	$str1 = substr($str1, 0, strlen($str1)-1);
	$str2 = substr($str2, 0, strlen($str2)-1);
?>
<script type="text/javascript" language="javascript">
	Ext.namespace('Ext.login');
	Ext.login.year = [<?php echo $str1; ?>];
	Ext.login.module = [<?php echo $str2; ?>];
</script>