Current File : /home/inlingua/public_html/sensoriumpsychologists.com/backup/franchise/student_account.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 Account 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">
							<div class="col-md-4 example">
                           <span> From :</span>			
							<input type="hidden" id="example6" name="start" class="form-control col-xs-4">
                            </div>
                            <div class="col-md-4 example">	
                            To :		
							<input type="hidden" id="example3" name="end" class="form-control col-xs-4">
                            </div>
										</div>
									</div>
									<div class="span6">
										<div class="control-group">
                                        <br>
											<button type="submit" class="btn btn-primary">Search</button>
										</div>
                                     </div>
								</form>
					</div>
				</div>
                </div>
                <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>Start date</th>
                <th>Order Id</th> 
                <th>Amount</th>
                <th>Mode</th>
                <th>Status</th>
                <th>payment</th>
                <th>result</th>
            </tr>
        </thead>
        <tbody>
<?php 
while($row =$rs_result->fetch_assoc()) {
$ids=$row['student_id'];	
$result1=$query->select_where('shristi_students_payment','student_id',$ids);
$rows=$result1->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><?php echo $row['registration_date'];?></td>
                <td><?php echo $rows['order_number'];?></td>
                <td><?php echo $rows['amount'];?></td>
                <td><?php echo $rows['payment_mode'];
				if($rows['payment_mode']=='DD'){
					echo $rows['dd_no'];echo "<br>";
					echo $rows['bank'];
				}
				?>
                
                </td>
                <td><?php echo $rows['status'];?></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');?> 
<style>
#example6{float: left;width: 33%;}.example .day{width: 18%;}.example .month{width: 23%;}.example select {
    padding: 7px 4px;
    background: #ffffff;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    margin: 0 3px;
	float:left;
	width:20%;}
#example3{float: left;width: 33%;}.example .day{width: 18%;}.example .month{width: 23%;}.example select {
    padding: 7px 4px;
    background: #ffffff;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    margin: 0 3px;
	float:left;
	width:20%;
}.example select.invalid {
    color: #E9403C;border-color:#F00 !important;
}</style>
<script src="js/jquery.date-dropdowns.min.js"></script>
<script>
			$(function() {
				$("#example1").dateDropdowns();

				$("#example2").dateDropdowns({
					submitFieldName: 'example2',
					submitFormat: "dd/mm/yyyy"
				});

				$("#example3").dateDropdowns({
					submitFieldName: 'example3',
					defaultDate: '<?php echo date("Y-m-d");?>'
				});

				$("#example4").dateDropdowns({
					submitFieldName: 'example4',
					minAge: 18
				});

				$("#example5").dateDropdowns({
					submitFieldName: 'example5',
					displayFormat: 'mdy'
				});

				$("#example6").dateDropdowns({
					submitFieldName: 'example6',
					defaultDate: '<?php echo date("Y-m-d");?>'
				});

				$("#example7").dateDropdowns({
					submitFieldName: 'example7',
					submitFormat: 'unix',
					defaultDateFormat: 'unix'
				});

				$("#example8").dateDropdowns({
					submitFieldName: 'example8',
					submitFormat: 'unix',
					defaultDateFormat: 'unix',
					defaultDate: 456692066
				});

				$("#example9").dateDropdowns({
                    submitFieldName: 'example9',
					submitFormat: 'unix',
					defaultDateFormat: 'unix'
				});
                $("#example10").dateDropdowns({
                    submitFieldName: 'example10',
                    required: true
                });
                $("#example11").dateDropdowns({
        			yearLabel: 'Anno',
        			monthLabel: 'Mense',
        			dayLabel: 'Die',
        			submitFieldName: 'example11',
    			});
                // Set all hidden fields to type text for the demo
				$('.example input[type="hidden"]').attr('type', 'text').attr('readonly', 'readonly');
			});
</script>