Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/www/admin/
Upload File :
Current File : /home2/wtmwscom/www/admin/product_sale_delete.php

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

?>
<h1>Delete Invest Report</h1>

    <section id="comments">
        <form action="" method="get">
          <p>
              <input style="float: left;" type="text" value="<?php if(isset($_GET['uid'])){ echo $_GET['uid'];}?>" name="uid" placeholder="Search by User Id" />
              <input type="submit" name="submit" id="submit" value="submit">
          </p>
        </form>
    </section>

<table>
    <thead>
<tr >
<th>S.No.</th>
<th>User ID</th>
<th>User name</th>
<th>Amount</th>
<th>Date</th>
<th>Status</th>
<th>Delete</th>

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

$today=date("Y-m-d");
$sqlCondition = !empty($_GET['uid']) ? " WHERE b.login_id= '".$_GET['uid']."' " : '';
$query="select b.uid as uid, b.login_id as login_id, b.name as name, a.rec_id as rec_id,  a.pv_amount as pv_amount, a.date as date, a.status as status from
    product_sale a inner join user b on a.uid = b.uid $sqlCondition order by a.date desc";
$pager = new PS_Pagination($connection, $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->login_id?></td>
    <td><?=$row->name?></td>
    <td><?=$row->pv_amount?></td>
    <td><?=$row->date?></td>
     <td><?=$row->status? 'Closed':'Not closed'?></td>
      <td><a href="product_sale_delete_model.php?iaid=<?php echo $row->rec_id;?>" onclick="return confirm('Are you sure to delete sale for User - <?php echo $row->login_id;?>');">Delete</a></td>
 
</tr>
<?php }
         $i++;   }


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