Current File : /home/inlingua/public_html/sensoriumpsychologists.com/franchise/student_result.php |
<?php
include_once("common/head_links.php");
include_once("../classes/config.php");
?>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php include_once("common/header.php");?>
<?php include_once("common/left_side_bar.php");?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
</h1>
</section>
<!-- Main content -->
<section class="content">
<?php
$id=$_GET['id'];
$result=$query->select_where_field('shristi_assignment_result','user_id',$id,"AND status='1'");
$row=$result->fetch_assoc();
$results=$query->select_where_field('shristi_final_result','user_id',$id,"AND status='1'");
$rows=$results->fetch_assoc();
?>
<!-- Info boxes -->
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8 col-sm-8 col-xs-8">
<table class="franchise_p table table-striped">
<tr>
<td colspan="11"> <h1>Student result</h1></td></tr>
<tr>
<th>Exam Types</th>
<th>Total Question</th>
<th>Right Answers</th>
<th>Wrong Answers</th>
<th>Total Marks</th>
<th>Total %</th>
</tr>
<?php
$right = $row['right_answer'];
$wrong = $row['wrong_answer'];
$total = $row['right_answer'];
$right_answer = $rows['right_answer'];
$wrong_answer = $rows['wrong_answer'];
$total_marks = $rows['right_answer'];
?>
<tr>
<td>Assignment Result</td>
<td><?php
$resulta=$query->select_where('shristi_assignment','status','1');
echo $rowa=$resulta->num_rows;
?>
</td>
<td><?php echo $right; ?></td>
<td><?php echo $wrong; ?></td>
<td><?php echo $total; ?></td>
<td> <?php
if($total==0){echo "Enable To get Your %";}
else{ $percentage = ($right/ $rowa ) * 100;
if($percentage<=50){
echo "<p class='btn btn-danger' style='color:black;'>$percentage</p>";
}else{echo "<p class='btn btn-success' style='color:green;'>$percentage</p>";}
}
?></td>
</tr>
<tr>
<td>Final Result</td>
<td>
<?php
$results12=$query->select_where('shristi_final_test','status','1');
echo $arow=$results12->num_rows;
?>
</td>
<td><?php echo $right_answer; ?></td>
<td><?php echo $wrong_answer; ?></td>
<td><?php echo $total_marks; ?></td>
<td>
<?php
if($total_marks==0){echo "Enable To get Your %";}
else{ $new_width = ($right_answer/ $arow ) * 100;
if($new_width<=50){
echo "<p class='btn btn-danger' style='color:black;'>$new_width</p>";
}else{echo "<p class='btn btn-success' style='color:green;'>$new_width</p>";}
}
?>
</td>
</tr>
</table>
</div>
</div>
</section>
</div>
<?php include_once("common/footer.php");?>
</div><!-- ./wrapper -->
<?php include_once("common/footer_links.php");?>
</body>
</html>