Current File : /home/inlingua/public_html/sensoriumpsychologists.com/backup/franchise/student_payment_list.php |
<?php
include_once('common/session.php');
include_once('../classes/config.php');
?>
<?php
//$result=$query->select_where('shristi_student','franchise_id',"$id");
?>
<?php include_once('common/project_header.php');?>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>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;">
<form method="get" action="search_student_payment.php">
Search: <input type="text" name="search" placeholder="search by Email">
<input type="submit" name="submit" value="Submit" >
</form><br>
<?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' 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>Batch</th>
<th>Status</th>
<th>payment</th>
<th>result</th>
</tr>
</thead>
<tbody>
<?php
while($row =$rs_result->fetch_assoc()) {
?>
<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 echo $row['join_batch'];?></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;
$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');?>