Current File : /home/inlingua/www/sensoriumpsychologists.com/backup/franchise/student_assignment_exam_list.php
<?php
include_once('common/session.php');
include_once('../classes/config.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>Final Exam Student List</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=10;
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' 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>Start date</th>
                <th>End date</th> 
                <th>Assignment</th>
                <th>Status</th>
                <th>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'];
?> 
            <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['registration_date'];?></td><td><?php echo $row['next_end_date'];?></td>
               <td><?php if($fexam==5){echo "<span  style=color:green;>Pass All</span>";}else{echo "<span style='color:red;'>Not</span>";}?></td>
                <td>
					<?php
						if($row['status']==1){echo "<span style='color:green;'>Active</span>";}
						if($row['status']==0){echo "<span style='color:red;'>Inactive</span>";}
					?>
                </td>
                <td><a href="payment.php?id=<?php echo $row['student_id'];?>" class="btn btn-danger">payment</a></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'"; 
$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_list.php?page=1'>".'|<'."</a> </li>"; // Goto 1st page  

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