<?php
include_once '../session/admin-session.php';
include_once '../classes/class_admin.php';
include_once '../classes/validation.php';
include_once '../classes/common.php';
include_once 'read-configration.php';
ob_start();

$ObjDB = new class_db();
$log = new common();
$objadm = new class_admin();
$val = new validation();

$sub_code2 = $_POST['sub_code'];
$fac_code2 = $_POST['fac_code'];
$sub_title2 = $_POST['sub_title'];
$sub_regg2 = $_POST['sub_regg'];
$name2 = $_POST['name'];
$response2 = $_POST['response'];
$abstain2 = $_POST['abstain'];
$score2 = $_POST['submit'];
$for_sem2 = $_POST['for_sem'];

$semb1 = $for_sem2;
$objadm->sem_num = $semb1;
$sname = $objadm->GetSemList();
list($semb1_name) = mysqli_fetch_array($sname);

// $semb1_name = 'AUG 2022';

$query4="SELECT comment FROM isr_answers_gen4_tbl where b1_sem = '$semb1' and fac_code = '$fac_code2' and sub_code = '$sub_code2' and comment !=''";
$ObjDB->sproc_name = $query4;
$res_query4 = $ObjDB->SelectQuery();

$stu_view = "";
$i=1;
while ($row4 = mysqli_fetch_array($res_query4)) {
	$stu_view .= "<p>".$i."-".$row4["comment"]."</p>";
        $i=$i+1;
}
?>
<div class="container-fluid">
    <div class="row">
        <div class="col-xl-12 col-xxl-12 col-sm-12">
            <div class="card">
                <div class="card-header">
                    <h5 class="card-title">Student Feedback</h5>
                </div>
                <div class="card-body">
                    <div class="row">
                        <table class="table table-bordered align-middle" style="font-size:14px; margin-top:10px;">
<tr><td>Semester</td><td><?php  echo $semb1_name; ?></td></tr>
<tr><td>Course Code</td><td><?php  echo $sub_code2; ?></td></tr>
<tr><td>Course Title</td><td><?php  echo $sub_title2; ?></td></tr>
<!-- <tr><td>Registered</td><td><?  echo $sub_regg2; ?></td></tr> -->
<tr><td>Instructor</td><td><?php  echo $name2; ?></td></tr>
<tr><td>Responded</td><td><?php  echo $response2; ?></td></tr>
<tr><td>Abstain</td><td><?php  echo $abstain2; ?></td></tr>
<tr><td>Score</td><td><?php  echo $score2; ?></td></tr>
<tr><td colspan=2><?php echo $stu_view; ?></td></tr>
</table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php
$pagemaincontent = ob_get_contents();
ob_clean();
$PAGENAME = 'feedback_fauculty_student';
$HTMLTITLE = '';
$HTMLDESCRIPTION = '';
$HTMLKEYWORDS = '';
include("admin-master.php");
?>