Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/member/
Upload File :
Current File : /home2/wtmwscom/public_html/member/bank_account.php

<?php 
$title= "Profile";
include 'header.php';
include_once('lib/ps_pagination.php');
$uid =$_SESSION['userid'];
$result=mysqli_query($connection,"SELECT * FROM user WHERE uid='".$uid."'");
$row=mysqli_fetch_object($result);
$country = mysqli_fetch_object(mysqli_query($connection,"SELECT short_name FROM country WHERE country_id='$row->country'"))->short_name;
$refer = mysqli_fetch_object(mysqli_query($connection,"SELECT login_id, name, mobile, email FROM user WHERE uid='$row->refer_id'"));
$manager = mysqli_fetch_object(mysqli_query($connection,"SELECT login_id, name, mobile, email FROM user WHERE uid='$row->manager_id'"));
?>
<style type="text/css">
    th{
        text-align: left;
    }
</style>
    <h2>Bank Accounts</h2>
    
    <section>
         <?php echo getMessage();?>
        <h4><a href="add_bank_account.php">Add Accounts</a></h4>
        <table>
          <thead>
            <tr>
                <th>S. No</th>
                <!--<th>ID</th>-->
                <th>Account Name</th>
                <th>Account No.</th>
                <th>Account Holder</th>
                <th>Bank Name</th>
                <th>IFSC</th>
                <th>Action</th>
            </tr>
          </thead>
          <tbody>
            <?php
            $query = "SELECT * FROM `bank_details` WHERE `uid`='".$uid."' ORDER BY `datetime` DESC";
            if(!isset($_GET['page'])){$i=1;}else{$i=(($_GET['page']-1)*20)+1;}
            $pager = new PS_Pagination($link, $query, 20, 5);
            $pager->setDebug(true);
            $rs = $pager->paginate();
            if($rs){
                while ($bank = mysqli_fetch_object($rs)){
                ?>
            <tr <?php if($i%2){echo "class='light'";}else{echo "class='dark'";}?>>
              <td><?php echo $i;?></td>
              <!--<td><?php echo $bank->recid;?></td>-->
              <td><?php echo $bank->account_name;?></td>
              <td><?php echo $bank->account_number;?></td>
              <td><?php echo $bank->account_holder_name;?></td>
              <td><?php echo $bank->bank_name;?></td>
              <td><?php echo $bank->ifsc;?></td>
              <td><a href="edit_bank_detail.php?id=<?php echo $bank->recid?>">Edit</a>
                  <!--| <a href="javascript:void;" onclick="if(confirm('Are you sure you want to delete this account?')){window.location='delete_bank_account.php?id=<?php echo $bank->recid?>'}">Delete</a>-->
              </td>
            </tr>
            <?php 
            $i++;}
            }?>
          </tbody>
        </table>
            <?php echo $pager->renderFullNav();?>  
    </section>
<?php include 'footer.php';?>