uawdijnntqw1x1x1
IP : 216.73.216.26
Hostname : server.wtmmart.in
Kernel : Linux server.wtmmart.in 4.18.0-553.45.1.el8_10.x86_64 #1 SMP Wed Mar 19 09:44:46 EDT 2025 x86_64
Disable Function : exec,passthru,shell_exec,system
OS : Linux
PATH:
/
home2
/
wtmwscom
/
public_html
/
admin
/
images
/
admin_sale_report.php
/
/
<?php $title = "admin sale report"; include 'header.php'; //$useridMAINN=$_SESSION['userid']; ?> <script src="../js/jquery-ui.js" type="text/javascript"></script> <link rel="stylesheet" href="../css/jquery-ui.css" /> <script> $(function() { $( ".datepicker" ).datepicker({ dateFormat: "yy-mm-dd",changeMonth: true });}); </script> <h3>Product Sale report </h3> <div style="margin: 20px"> <form method="get"> <span>From Date <input type="text" class="datepicker" name="from_date" value="<?php if(isset($_GET['from_date'])) echo $_GET['from_date'];?>"/></span> <span>To Date <input type="text" class="datepicker" name="to_date" value="<?php if(isset($_GET['to_date'])) echo $_GET['to_date'];?>" /></span> <span> <input type="submit" name="submit" value="submit"/></span> </form> </div> <table border="1" class="table_style"> <thead> <tr> <th>Sno.</th> <th> P. Code </th> <th> P. Name </th> <th> User ID </th> <th> Franchise ID </th> <th> Franchise Name </th> <th> P. Cost </th> <th>B.V.</th> <th>Amount</th> <th> Qty. </th> <th>Sale date</th> </tr> </thead> <tbody> <?php //$fid = $_SESSION['fid']; $count = 1; $date_cond = !empty($_GET['submit']) ? " AND ps.date BETWEEN '".$_GET['from_date']."' AND '".$_GET['to_date']."'" : ''; $query = "select pr.pcode as pcode, pr.pname as pname, pr.pv as pv, pr.pcost as pcost, u.uid as uid, f.fid as fid, f.store_name as name, ps.quantity as quantity, ps.pv_amount as pv_amount, ps.date as date from product as pr, user as u, product_sale as ps, franchise as f where pr.pid = ps.pid and u.uid = ps.uid and f.fid = ps.fid $date_cond order by ps.date desc"; //Include the PS_Pagination class include_once('lib/ps_pagination.php'); /* * Create a PS_Pagination object * * $conn = MySQL connection object * $sql = SQl Query to paginate * 10 = Number of rows per page * 5 = Number of links * "param1=valu1¶m2=value2" = You can append your own parameters to paginations links */ if(!empty($_GET['submit'])){ $from_date = $_GET['from_date']; $to_date = $_GET['to_date']; $param = "from_date=$from_date&to_date=$to_date&submit=submit"; } $pager = new PS_Pagination($connection, $query, 20, 5,$param); /* * Enable debugging if you want o view query errors */ $pager->setDebug(true); /* * The paginate() function returns a mysql result set * or false if no rows are returned by the query */ $rs = $pager->paginate(); if(!$rs) exit(""); while($row = mysqli_fetch_object($rs)){ $amount = $row->pcost * $row->quantity; echo "<tr><td>$count</td><td>$row->pcode</td> <td>$row->pname</td> <td>$row->uid</td> <td>$row->fid</td><td>$row->name</td><td>$row->pcost</td> <td>$row->pv</td><td>$amount</td><td>$row->quantity</td> <td>".date('d/m/y', strtotime($row->date))."</td> <tr> "; $count++; } ?> </tbody> </table> <?php //Display the full navigation in one go echo $pager->renderFullNav(); ?> <br/> <?php include('footer.php'); ?>
/home2/wtmwscom/public_html/admin/images/admin_sale_report.php