Current File : /home/inlingua/www/sensoriumpsychologists.com/franchise/student_final_exam_list.php
<?php
include_once('common/session.php');
include_once('../classes/config.php');
?>
<?php 
@$ides=$_GET['ides'];
extract($_REQUEST);
if(isset($ides)){
	$sql="UPDATE shristi_student SET final_exam_payment='1' WHERE  student_id='".$ides."'";
	echo $sql;
	$result=$conn->query($sql);	

	if($result){
		$message->success();
		echo "<meta http-equiv=\"refresh\" content=\"3;URL=student_pass_all_assignment_list.php\">";	
	}
}
?>
<?php
//$result=$query->select_where('shristi_student','franchise_id',"$id");
?>
<!DOCTYPE html>
<html>
  <head>
    <title>Shristi</title>
    <?php require("common/head_links.php");?>
</head>
<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
          <?php require("common/header.php");?>
  		  <?php require("common/left_side_bar.php");?>
      <div class="content-wrapper"> 
            <!-- Content Header (Page header) -->
            <section class="content-header">
              <h1>Student Final Exam list's</h1>
            </section>
            <section class="content">
              <div class="row">
                <div class="col-xs-12">
                  <div class="box">
                    <div class="box-body" style="padding:50px 15px;">
                    <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">Advance Search</button>
               <div id="demo" class="collapse">             
               <div class="row">
               <div class="col-md-4"></div>
					<div class="col-md-12">
						<form action="search_final_exam_student.php"  class='form-horizontal form-column form-bordered'>
									<div class="span4">
										<div class="control-group">
											
							<select name="batch">
                               <option value="">Select Batch</option>
                               <option value="January">January</option>
                               <option value="July">July</option>
                            </select>
                            <select name="year"  class='input-large' data-rule-required="true">
                                            <option value="">Select  Batch year</option>
                                        <?php for($i=2016;$i<2051;$i++){?>    
                                            <option value="<?php echo $i;?>"><?php echo $i;?></option>
                                         <?php }?>
                                  </select>
										</div>
									</div>
									<div class="span6">
										<div class="control-group">
											<button type="submit" class="btn btn-primary">Search</button>
										</div>
                                     </div>
								</form>
					</div>
				</div>
                </div>
       
          
    <?php 
$num_rec_per_page=15;
if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; }; 
$start_from = ($page-1) * $num_rec_per_page; 
$sql = "SELECT * FROM shristi_student where franchise_id='$id' AND final_exam='0' AND status='1' AND final_exam_payment='1' LIMIT $start_from, $num_rec_per_page"; 
$rs_result = $conn->query($sql); //run the query
?> 
  <table id="example" class="table table-bordered" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Name</th>
                <th>Email</th>
                <th>Code</th>
                <th>Course</th>
                <th>Password</th>
                <th>Batch</th>
                <th>Final Exam payment</th>
                <th>result</th>
            </tr>
        </thead>
        <tbody>
<?php 
while($row =$rs_result->fetch_assoc()) {
/*$fexam=$row['assignment1']+$row['assignment2']+$row['assignment3']+$row['assignment4']+$row['assignment5'];
if($fexam==5){*/	 
?> 
            <tr>
                <td><?php echo $row['fname'];?>  <?php echo $row['lname'];?></td>
                <td><?php echo $row['email'];?></td>
                <td><?php echo $row['registration_no'];?></td>
                <td align="center">
					<?php 
						$cresult=$query->select_where('shristi_course','courses_id',$row['courses_id']);
						$crow=$cresult->fetch_assoc();
						echo $crow['name'];
					?>
                </td>
                <td><?php echo $row['password2'];?></td>
                <td><?php echo $row['join_batch'];?> // <?php echo $row['join_batch_year'];?></td>
                <td><?php if($row['status']==1){echo "<span style='color:red;'><strong>Paid</strong></span>";}?></td>
                <td><a href="student_result.php?id=<?php echo $row['student_id'];?>" class="btn btn-success">result</a></td>
             </tr>
<?php 
}//} 
?> </tbody>
</table>
<?php 
$sql = "SELECT * FROM shristi_student where franchise_id='$id' And final_exam='0' and status='1' AND final_exam_payment='1'"; 
$rs_result = $conn->query($sql); //run the query
$total_records = $rs_result->num_rows;  //count number of records
$total_pages = ceil($total_records / $num_rec_per_page); 
echo "<ul class='pagination'>";

echo "<li class='active'><a href='student_final_exam_list.php?page=1'>".'|<'."</a> </li>"; // Goto 1st page  

for ($i=1; $i<=$total_pages; $i++) { 
            echo "<li><a href='student_final_exam_list.php?page=".$i."'>".$i."</a> </li>"; 
}; 
echo "<li><a href='student_final_exam_list.php?page=$total_pages'>".'>|'."</a></li> "; // Goto last page
echo "</ul>";
?>    
        
       
           </div>
          </div>
          </div>
          </div>
        </section>
 <?php include_once('common/project_footer.php');?>