Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/www/member/
Upload File :
Current File : /home2/wtmwscom/www/member/pin1.php

<?php
$title = "Pin Report";
include 'header.php';
include_once('lib/ps_pagination.php');
$uid = $_SESSION['userid'];
$pin_type = array('a'=>999,'b'=>2499,'c'=>4999,);
?>
    <h1>Pin Report</h1>
    <?php echo getMessage();?>
    <section>
        <table style="width: 100%;">
          <thead>
            <tr>
              <th>S. No.</th>
              <th>Pin Number</th>
              <th>Pin Type</th>
              <th>Status</th>
              <th>Date of Transfer</th>
              <th>Date of Used</th>
            </tr>
          </thead>
          <?php 
            $query = "SELECT * FROM dynamicpinnumber WHERE uid='$uid' OR transfer_uid='$uid' ORDER BY recid DESC";
            $pager = new PS_Pagination($link, $query, 20, 5 );
            $pager->setDebug(true);
            $result = $pager->paginate();
            if($result){
          ?>
          <tbody>
            <?php
                if(!isset($_GET['page'])){ $i=1; }else{ $i=(($_GET['page']-1)*20)+1; }
                while ($row = mysqli_fetch_object($result)){
                    $transfer = get_user_detail($row->transfer_uid);
                    $user = get_user_detail($row->uid);
                    //$total = $total+$row->amount;
            ?>
            <tr <?php if($i%2){echo "class='light'";}else{echo "class='dark'";}?>>
              <td><?php echo $i;?></td>
              <td><?php echo $row->pinumber;?></td>
              <td><?php echo $pin_type[$row->type]." INR";?></td>
              <td><?php if($row->status=='transfer'){echo $row->status." (".$transfer->login_id.")";}elseif($row->status=='used'){echo $row->status." (".$user->login_id.")";}else{echo $row->status;}?></td>
              <td><?php if($row->transfer_datetime!='0000-00-00 00:00:00'){echo date("d M, Y h:i A", strtotime($row->transfer_datetime));}?></td>
              <td><?php if($row->used_datetime!='0000-00-00 00:00:00'){echo date("d M, Y h:i A", strtotime($row->used_datetime));}?></td>
            </tr>
            <?php $i++;}?>
          </tbody>
          <?php }?>
        </table>
            <?php echo $pager->renderFullNav();?>
      </section>
<?php include 'footer.php';?>