<?php
	require "commonincludefiles.php";
	
	$str1 = $str2 = $str3 = $str4 = $str5 = $str7 = $str11="";
	
	$qry = "SELECT distinct cu.subject_id,
	(select subject_name from cms_subjectmaster sb where sb.subject_id = cu.subject_id ) as subject_name 
	FROM `cms_upload` cu where `semester_id` =".$_SESSION['cur_semesterid']." and `branch_id`= ".$_SESSION['cur_branchid'].";";
	
	
	
	$result = dbQuery($qry);
	if(dbRows($result) > 0){	
		while($record = dbArray($result)){
			$str1 .= "['".$record['subject_id']."','".$record['subject_name']."'],";	
		}
	}
	

	
	$str1 = substr($str1, 0, strlen($str1)-1);


?>
<script type="text/javascript" language="javascript">
	Ext.namespace('Ext.student');
	Ext.namespace('Ext.semester');
	Ext.student.subject = [<?php echo $str1; ?>];
	
	
</script>