| Current Path : /home2/wtmwscom/www/member/ |
| Current File : /home2/wtmwscom/www/member/task_income.php |
<?php
$title= "Task Income";
include 'header.php';
include_once('lib/ps_pagination.php');
$uid = $_SESSION['userid'];
$total = 0;
?>
<h1>Task Income Report</h1>
<?php echo getMessage();?>
<section>
<table style="width: 100%;">
<thead>
<tr>
<th>S. No.</th>
<th>Amount</th>
<th>Date</th>
<th>Status</th>
</tr>
</thead>
<?php
$query = "SELECT uid, amount, datetime, status FROM campaign_income WHERE `uid`='".$uid."' ORDER BY `datetime` DESC";
$pager = new PS_Pagination($link, $query, 50, 5 );
$pager->setDebug(true);
$result = $pager->paginate();
if($result){
?>
<tbody>
<?php
if(!isset($_GET['page'])){ $i=1; }else{ $i=(($_GET['page']-1)*50)+1; }
while ($row = mysqli_fetch_object($result)){
$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->amount;?></td>
<td><?php echo date("d M, Y h:i A", strtotime($row->datetime));?></td>
<td><?php echo $row->status==1?"Closed":"Not closed";?></td>
</tr>
<?php $i++;}?>
</tbody>
<thead>
<tr>
<th colspan="2" style="text-align: right;">Total Amount:</th>
<th colspan="2" style="text-align: left;"><?php echo $total?></th>
</tr>
</thead>
<?php }?>
</table>
<?php echo $pager->renderFullNav();?>
</section>
<?php include 'footer.php';?>