<?php require "_header.php";?>
<script language="javascript" type="text/javascript">
document.getElementById("main-content").style.display = 'none';
</script>
<style type="text/css">
	.table-report{
		font-family:Verdana, Geneva, sans-serif;
		font-size:12px;
		text-align:left;
		border-right:0px none;
		border-bottom:0px none;
	}
	.table-report-inner{
		font-family:Verdana, Geneva, sans-serif;
		font-size:12px;
	}
	.table-report tr{
		padding:2px 2px 2px 2px;
	}
	.table-report td{
		padding:2px 2px 2px 2px;
		border-top:0px none;
		border-left:0px none;
	}
	.table-report th{
		padding:2px 2px 2px 2px;
		font-weight:bold;
		text-align:left;
		border-top:0px none;
		border-left:0px none;
	}	
	.break { page-break-before: always; }
</style>
<div id="main-report">
<?php
if($_SESSION['aCollegeId']!="" && isset($_SESSION['aCollegeId'])) 
{ 	
	$student_id 	= $_SESSION['student_id'];
	
	?>
	<center><h4>Feedback Report Information</h4></center>
    <br />
    <br/>
    <?php 
	   			$qry ="SELECT 
						fb.createdon,
						alo.subject_id,alo.employee_id,
						sub.subject_name,
						sub.subject_code,
						emp.employee_name,
						fb.result_id
					FROM 
						 `cms_subjectmaster` sub,
						 `cms_employeemaster` emp,
						 `cms_subject_allocation` alo
						 left join  `feedback_que_result` fb  on fb.employee_id = alo.employee_id AND fb.subject_id = alo.subject_id and fb.student_id='".$student_id."'
					WHERE 
					alo.employee_id = emp.employee_id 
					and emp.employee_active='Yes' 
					AND alo.lectype=1
					AND alo.subject_id = sub.subject_id
					AND alo.branch_id='".$_SESSION['cur_branchid']."'
					AND alo.semester_id='".$_SESSION['cur_semesterid']."'		
					AND alo.div_id='".$_SESSION['cur_divison']."'				
					group by  alo.subject_id,alo.employee_id";
				
				$result1=dbQuery($qry);
				if(dbRows($result1)>0) {
					?>
	<table class="table-report" border="1" cellpadding="0" cellspacing="0" width="100%" >
		<tr style="background-color:#CCC;">
        <th width="10%" style="text-align:center; font-weight:bold;font-size:12px ">SrNo.</th>
        <th width="35%" style="text-align:center; font-weight:bold;font-size:12px ">Subject name</th>
        <th width="30%" style="text-align:center; font-weight:bold;font-size:12px ">Employee name</th>
        <th width="25%" style="text-align:center; font-weight:bold;font-size:12px ">Feedback Date</th>
         </tr>
		<?php 
		$srno = 1;
				
        while($row=dbArray($result1))
        {	
			$style="color:#008000;";
			if($row['result_id']==''){
				$style="color: #FF0000;";
			}
		?>
            <tr style="<?php echo $style; ?>">
            <td style="text-align:center;"><?php echo $srno ?></td>
            <td style="text-align:left;"><?php echo $row['subject_name'].' ['.$row['subject_code'].']'; ?></td>
            <td style="text-align:left;"><?php echo $row['employee_name']; ?></td>
            <td style="text-align:left;"><?php echo ($row['createdon']!=''?date('d-m-Y H:i:s',strtotime($row['createdon'])):''); ?></td>
            </tr>
        
		<?php $srno++; } ?>
	</table>
<?php
	}
	else{
		echo "NO DATA FOUND!";	
	}
}
	?>
</div>
<?php 
	require "_footer.php";
?>
                            