<?php
	
	$table_string="";
	$faculty_id="";
	if($_SESSION["VedantnrUserRole"] == 'PowerUser')
	{
		$table_string=' You are PowerUser ';
		
	}else{
		$faculty_id="";
		$sql = "select employee_id from cms_employeemaster where user_id ='".$_SESSION["VedantnrUserId"]."'";
		$sql_res = dbQuery($sql);
		$sql_rec = dbArray($sql_res);
		$faculty_id = $sql_rec[0];
		$table_string=' You are Normal User ';
		
		if($faculty_id !=0 && $faculty_id !=""){
		$subject_qry="select sa.*,bra.branch_name ,bat.batch_name,sub.subject_name,lectype.lectype_name
						from 
						cms_subject_allocation sa ,
						cms_branchmaster bra,
						 cms_batchmaster bat,
						 cms_subjectmaster sub,
						 cms_lectype lectype
						where 
						sa.branch_id=bra.branch_id
						AND sa.batch_id=bat.batch_id
						AND sa.subject_id = sub.subject_id 	
						AND sa.lectype 	= lectype.lectype_id 	
						AND employee_id = ".$faculty_id;
		
		$sql_subject = dbQuery($subject_qry);
		if(dbRows($sql_subject)<=0){ 
			$table_string.=' You have not been assigned any subject contact admin ';
		}
		
		}else{
			$table_string='Your Role is Neither Pawoer user nor Employee';
		}
		
	}	
	//echo $table_string;	//exit;
	
	
?>
