Current File : /home/inlingua/www/sensoriumpsychologists.com/franchise/search_student.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>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.php">
Search: <input type="text" name="search">
<input type="submit" name="submit" value="Submit" >
</form><br>
<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 // End date</th>
<th>Batch</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$search=$_GET['search'];
$sql="SELECT * FROM shristi_student where franchise_id=".$id." AND email LIKE '%$search%'";
//echo $sql;die;
$result = $conn->query($sql);
while($row=$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'];?> //<?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>
</tr>
<?php }?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<?php require("common/footer.php");?>
</div><!-- ./wrapper -->
<?php require("common/footer_links.php");?>
</body>
</html>