<?php
	error_reporting(0);
	define('INCLUDE_CHECK',true);
	session_start();
	require ('classes/config.php');
	require_once('classes/session.php');
	
	
?>
<title>OSCOTECH, ESA-OKE :: Admin-Dashboard > Web Payment Log</title>


        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Web Payment Log</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                	<div class="well" style="background:#FFF">
                    	<form method="post" action="" role="form">
                        	<div class="form-group input-group">
                                <input type="text" class="form-control" placeholder="Search for Surname, Form No, Email Address"name="searchtxt" title="Enter name for search " autocomplete="off">
                                <span class="input-group-btn">
                                    <input type="submit" class="btn btn-danger" name="btnsearch" value="Search" id="button-search" title="Search Student">
                                </span>
                            </div>
                        </form>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Student Details Table
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <th>S/N</th>
                                            <th>TRANS REF NO</th>
                                            <th>DATE/TIME</th>
                                            <th>AMOUNT</th>
                                            <th>RESPONSE DESC</th>            
                                            <th>RESPONSE CODE</th>
                                            <th>CUSTOMER NAME</th>
                                            <th>CUSTOMER ID</th>
                                        </tr>
                                    </thead>
					<?php
                        $key="";
                        if(isset($_POST['searchtxt']))
                            $key=$_POST['searchtxt'];
                        
                        if($key !="")
                            $sql=mysql_query("SElECT * FROM webpaylog WHERE txnref='$key' OR custid='$key' OR resposecode='$key'");
                        else
                            $sql=mysql_query("SELECT * FROM webpaylog");
                        
                            
                           
                        $i=0;
                        while($row=mysql_fetch_array($sql)){
							$emailS=$row['email'];
                        $i++;
                        $color=($i%2==0)?"lightblue":"white";
                    ?>
                                    <tbody>
                                        <tr >
                                        	<td><?php echo $i;?></td>
                                            <td><?php echo $row['txnref'];?></td>
                                            <td><?php echo $row['datetime'];?></td>
                                            <td><?php echo $row['amount'];?></td>
                                            <td><?php echo $row['responsedesc'];?></td>
                                            <td><?php echo $row['responsecode'];?></td>
                                            <td><?php echo $row['custname'];?></td>
                                            <td><?php echo $row['custid'];?></td>
                                         <!--   <td><a href="?action=update_student&opr=upd&rs_id=<?php echo $row['id'];?>" title="Update"><img src="images/icon-48-edit.png" /></a></td> -->
                                        </tr>
                                    </tbody>
                          <?php	
							}														
							?>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                            
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->

        </div>
        <!-- /#page-wrapper -->
        

    </div>
    <!-- /#wrapper -->
    
