<?php 
include_once 'class.crud.php';
include_once ('session.php');
?>


 <?php
include 'dbconnect.php';

$sql = "SELECT * FROM account ORDER BY id";
$sql1 = "SELECT * FROM ticket ";
$sql2 = "SELECT * FROM transfer";
$sql3 = "SELECT * FROM account WHERE verify ='N' ORDER BY id DESC LIMIT 200";


if ($result = mysqli_query($connection, $sql)) {
    // Return the number of rows in result set
    $rowcount = mysqli_num_rows($result);

    // Free result set
    mysqli_free_result($result);

    if ($result1 = mysqli_query($connection, $sql1)) {
        // Return the number of rows in result set
        $rowcount1 = mysqli_num_rows($result1);

        // Free result set
        mysqli_free_result($result1);

        if ($result2 = mysqli_query($connection, $sql2)) {
            // Return the number of rows in result set
            $rowcount2 = mysqli_num_rows($result2);

            // Free result set
            mysqli_free_result($result2);

            if ($result3 = mysqli_query($connection, $sql3)) {
                // Return the number of rows in result set
                $rowcount3 = mysqli_num_rows($result3);

                // Free result set
                mysqli_free_result($result3);
            }
        }
    }
}

mysqli_close($connection);
?>


 <?php include 'headeradmin.php'; ?>
 

 <!---begin of Mobile View Here   only from Team-->
 
       <?php include 'menu.php'; ?>
  
  <!---End of Mobile View Here   only from Team-->
  
 

     
     
  
    <div class="container-fluid mt--7">
     <!-- Table -->
      <div class="row">
        <div class="col">
          <div class="card shadow" >
            <div class="card-header border-0">
              <h3 class="mb-0"><a href=""   class="btn btn-danger">ALL CUSTOMER DEBIT/CREDIT ALERT</a></h3>
            </div>
          
           <div class="card-body">
               
               
              
            
               
                <div class="table-responsive m-t-40">
                                    <table id="example2" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0" width="100%">
                                     <thead>
                                 <tr class=" fixed_header">
                                    
                                   	<th>Entry Id</th>
		                         	<th>Account No</th>
									<th>Amount Transfered</th>
                                    <th>Description</th>
                                    <th>Type</th>
                                    <th>Status</th>
                                    <th>Date</th>
                                    <th>Time</th>
                                    <th colspan="2" align="center">Actions</th>
                                    
                                </tr>
                            </thead>
                            <tbody>
<?php
			$query = "SELECT * FROM alerts  ";       
			$records_per_page=2000;
			$newquery = $crud->paging($query,$records_per_page);
			$crud->dataviewcr($newquery);
		 ?> 
                              
                                
                               
    
                            </tbody>
                        </table>
                    </div>
               
               
               <?php $crud->paginglink($query,$records_per_page); ?>
               
               
               
               
               
          </div>
        </div>
      </div>
     </div>
 
    
       <?php include 'foot.php'; ?>