Your IP : 216.73.216.26


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

<?php
$title= "Invest Report";
include 'header.php';
include_once('lib/ps_pagination.php');
$uid = $_SESSION['userid'];
//$param = '';
//$param .= !empty($_GET['uid']) ? "&amp;uid=".$_GET['uid'] : '';

?>
<h1>Invest Report</h1>
<table>
    <thead>
<tr >
<th>S.No.</th>
<th>User ID</th>
<th>User name</th>
<th>Amount</th>
<th>Date</th>
<th>Month</th>
<th>Year</th>
<th>Status</th>   

</tr>
</thead>
<tbody>
<?php

$today=date("Y-m-d");
$sqlCondition = " WHERE a.uid = '$uid' ";
$query="select b.uid as uid, b.name as name, a.month as month, a.year as year, a.amount as amount, a.date as date, a.status as status from
    invest_amount a inner join user b on a.uid = b.uid  $sqlCondition order by a.date desc";
$pager = new PS_Pagination($link, $query, 20, 5, $param);
            $pager->setDebug(true);
            $result = $pager->paginate();
            if($result){
                if(!isset($_GET['page'])){ $i=1; }else{ $i=(($_GET['page']-1)*20)+1; }
                while ($row = mysqli_fetch_object($result)){
            ?>
            <tr <?php if($i%2){echo "class='light'";}else{echo "class='dark'";}?> >
              
            
             
    <td><?=$i?></td>
    <td><?=$row->uid?></td>
    <td><?=$row->name?></td>
    <td><?=$row->amount?></td>
    <td><?=$row->date?></td>
    <td><?=$row->month?></td>
    <td><?=$row->year?></td>
      <td><?=$row->status? 'Closed':'Not closed'?></td>
</tr>
<?php }
         $i++;   }


?>
    </tbody>
</table>
 <?php echo $pager->renderFullNav();?>
<?php include 'footer.php';?>