Preview: daily-practice-report.php
                Size: 4.51 KB
              
              
                
              
            
            /home/jambtst2015/public_html/giraffeng.com/daily-practice-report.php
            <?php ob_start();
session_start();
include("header.php"); 
	
	if($_SESSION["uid"]=="")
	{
		header('location:login.php');
    exit();
		
	}	?>
<link type="text/css" rel="stylesheet" href="css/sb-admin.css">
<style type="text/css">
td{border:1px solid;}
.report_subject_section ul{
	padding:10px 0 20px 30px;
}
.sub_text{
	color: #339433;
    font-family: "Open Sans",sans-serif;
    padding: 10px 0 0 20px;
    text-align: left;
	font-size:24px;
}
.report_subject_section{
	border:1px solid #339433;
	margin:20px 0 0 0;
}
</style>
<?php
 $id=$_GET['deid'];
$row_result=mysql_fetch_array(mysql_query("SELECT * FROM `daily_practice_results` WHERE id='".$id."'"));
$subject_result=mysql_fetch_array(mysql_query("SELECT * FROM `exam_subject_master` WHERE id='".$row_result['subject_id']."'"));
?>
<section class="header_back_inner"></section>
<input type="hidden" id="cbt_id" value="<?= $cbt_id?>">
	<div align="center" class="inner-mid-section">
	 <div class="container">
	<h2 class="demoHeaders"><span>TEST REPORT For DAILY PRACTICE   <?php echo date('d-m-Y', strtotime($row_result['date']));?></span></h2>
        <div class="test_report_section">
        	<div class="test_date">
            	<p>Test Date: <span><?php echo date('d-m-Y', strtotime($row_result['date']));?> <?php echo date('h:m A', strtotime($results["date"]));?> </span></p>
                <p>Subject: <span><?=$subject_result['subject']?></span></p>
                <p>Score: <span><?php echo $df=($row_result['result']/$row_result['total_questions'])*100;?>%</span></p>
            </div>
            <div class="report_analyse_sec">
            
            	<h2>Topic Analysis: <span>this comprises of all the topics the questions in the paper belong to (% correct).</span></h2>
                
                <div class="topic_analyse_box">
                <ul>
                	<?php
					$result_sql=mysql_query("SELECT * FROM `daily_practice_result_details` WHERE `result_id`='".$row_result['id']."'");
					while($results=mysql_fetch_array($result_sql)) 
					{
					     $topic_res=mysql_query("SELECT * FROM `exam_question_answers_reasons` WHERE `id`='".$results['question_id']."' AND `correct_ans`='".$results['answre']."'");
					$s=mysql_num_rows($topic_res);
					while($topic_results=mysql_fetch_array($topic_res)) 
					{	
				     $topic_results['topic_id'];
					 $topic_name=mysql_fetch_array(mysql_query("SELECT * FROM `exam_topic` WHERE `id`='".$topic_results['topic_id']."'"));
					?>
					
					<?php
					if($topic_name['name']!="")
					{	
					?>
					
					<li><?=$topic_name['name']?>=<?=($s/$row_result['total_questions'])*100?>%</li>
					<?php
					}else
					{						
					?>
					N/A
                    <?php
					}
					}
                   }
                  ?>		
                    	<!--<li>Algebra = 50%</li>-->
                    </ul>
                </div>
                <div class="clear"></div>
            </div>
            <div class="report_subject_section">
				<h1 class="sub_text">We recommend extra studies on these subtopics (“list of subtopics of the questions answered wrongly”)</h1>
                <ul>
                
				<?php
					$result_sql1=mysql_query("SELECT * FROM `daily_practice_result_details` WHERE `result_id`='".$row_result['id']."'");
					while($results1=mysql_fetch_array($result_sql1)) 
					{
					     $topic_res1=mysql_query("SELECT * FROM `exam_question_answers_reasons` WHERE `id`='".$results1['question_id']."' AND `correct_ans`!='".$results1['answre']."'");
					$s1=mysql_num_rows($topic_res1);
					while($topic_results1=mysql_fetch_array($topic_res1)) 
					{	
					 $sub_topic_name=mysql_fetch_array(mysql_query("SELECT * FROM `exam_sub_topic` WHERE `id`='".$topic_results1['sub_topic_id']."'"));
					?>
				<?php
				if($sub_topic_name['name']!="")
				{	
				?>
                	<li><?=$sub_topic_name['name']?>=<?=($s1/$row_result['total_questions'])*100?>%</li>
                <?php
				}
				else
				{
                ?>  				 
                   N/A 
                
				<?php
				}
					}
                   }
                  ?>		
                </ul>
            </div>
            <div class="clear"></div>
            <div class="recommend_box_sec">
            <h3><u>JAMB Recommended Textbooks</u></h3>
            	<h4>"<?=$subject_result['recommended_textbooks']?>" <br /><span>
            </div>
        </div>
	</div> 
<script>
function goBack() {
    window.history.go(-2);
}
</script>
 <a href="all_results.php" class="go-back">Go Back</a>    
	<div class="clear"></div>
    </div>
	<?php include("footer.php"); ?>
                                          Directory Contents
Dirs: 17 × Files: 104