✏️ 正在编辑: lapuTxnBySeller.php
路径:
/home/llpreacharge/public_html/LLPRECHARGE/Admin/lapuTxnBySeller.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php include'session.php'; include'../connection.php'; include'../functions.php'; ?> <html> <head> <title>Lapu's Total Txn</title> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="icon" href="images/logo.png" type="image/gif" sizes="16x16"> <!-- Admin CSS File Link --> <link rel="stylesheet" href="css/style.css"> <!-- User JAVA SCRIPT File Link --> <script type="text/javascript" src="js/script.js"></script> <!-- Font Awesome Icone --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <style> .div1{ background:; width:98%; margin:0 1%; padding:10px; } .div1 input, .div1 select{ height:35px; width:200px; font-size:15px; padding:2px 10px; border-radius:5px; border:solid #6b5127 1px; overflow:hidden; margin:5px 10px; } input[type=submit]{ background:#6b5127; color:white; cursor:pointer; transition:1s; } input[type=submit]:hover{ background:white; color:#883333; border:solid #6b5127 1px; transition:1s; } .div2{ background:#f7f7f7; width:100%; float:left; text-align:center; padding:10px 20px; overflow:auto; } .div2 table{ width:98%; text-align:center; font-size:14px; border-collapse:collapse; padding:2px 10px; margin:1%; } table th{ background:#6b5127; color:white; height:40px; border:solid white 1px; padding:2px 5px; } table td{ background:white; height:35px; border:solid black 1px; padding:2px 5px; } #lapuList{display:none;} .fa-check, .fa-ban{font-size:20px;} @media(max-width:768px) { .div1{ background:; width:100%; height:auto; margin:10px 0 0 0; padding:0; text-align:center; } .div1 input, .div1 select{ width:90%; margin:10px; } .div2{ width:100%; margin:10px 0 0 0; padding:0px; text-align:center; } } </style> <link rel="stylesheet" href="css/mediaStyle.css"> </head> <body> <!--Header Divison--> <?php require'header.php'; ?> <!--Container Division--> <div class="container"> <?php include'menu.php'; ?> <div class="content"> <div class="head"> <div class="title"><p>Lapu's Total Txn :-</p></div> <div class="msg"><marquee><?php include'../msg.php'; ?></marquee></msg> </div><hr> <div class="data-content"> <?php if(isset($_POST['submit'])) { $fDateValue = $_POST['fdate']; $lDateValue = $_POST['ldate']; $seller = $_POST['seller']; } else { $fDateValue=$date; $lDateValue=$date; } ?> <form method="post"> <div class="div1"> <input type="date" name="fdate" id="date1" value="<?php echo $fDateValue; ?>"> <input type="date" name="ldate" id="date2" value="<?php echo $lDateValue; ?>"> <select name="seller" id="seller"> <option>ALL</option> <?php $quSeller = "SELECT * FROM Seller ORDER BY Name"; $reSeller = mysqli_query($con,$quSeller); while($dataSeller = mysqli_fetch_array($reSeller)) { if($seller==$dataSeller['Id']) { echo "<option selected value='".$dataSeller['Id']."'>".$dataSeller['Name']." - ".$dataSeller['City']."</option>"; } else { echo "<option value='".$dataSeller['Id']."'>".$dataSeller['Name']." - ".$dataSeller['City']."</option>"; } } ?> </select> <input type="submit" name="submit" value="Submit" onclick='showLoader()'> </div> </form> <div class="div2" id="downlinePlace"> <table cellpadding="20" border="2"> <tr> <th>Sl.</th> <th>Seller</th></th> <th>Lapu</th> <th>Txn</th> </tr> <?php //$resultdate=getBackDate($date,7); $sl=0; $totalTxn=0; if(isset($_POST['submit'])) { $fdate = $_POST['fdate']; $ldate = $_POST['ldate']; $seller = $_POST['seller']; $update = "UPDATE seller_lapu SET LapuTxn='0'"; mysqli_query($con,$update); if($seller=="ALL") { $quLapu = "SELECT * FROM seller_lapu"; $quLapu1 = "SELECT * FROM seller_lapu ORDER BY LapuTxn DESC"; } else { $quLapu = "SELECT * FROM seller_lapu WHERE SellerId='$seller'"; $quLapu1 = "SELECT * FROM seller_lapu WHERE SellerId='$seller' ORDER BY LapuTxn DESC"; } $reLapu = mysqli_query($con,$quLapu); while($dataLapu=mysqli_fetch_array($reLapu)) { $lapuNo = $dataLapu['LapuNo']; $lapuTxn = 0; $quTxn = "SELECT SUM(Amount) FROM recharge WHERE Lapu='$lapuNo' AND Date>='$fdate' AND Date<='$ldate' AND Status='SUCCESS'"; $reTxn = mysqli_query($con,$quTxn); $dataTxn = mysqli_fetch_array($reTxn); $lapuTxn = $dataTxn[0] ?? 0; $update1 = "UPDATE seller_lapu SET LapuTxn='$lapuTxn' WHERE LapuNo='$lapuNo'"; mysqli_query($con,$update1); } $sellerName = ''; $reLapu1 = mysqli_query($con,$quLapu1); while($dataLapu1=mysqli_fetch_array($reLapu1)) { if($dataLapu1['LapuTxn']>0) { $SellerId = $dataLapu1['SellerId']; $quSellrName = "SELECT Name FROM Seller WHERE Id='$SellerId'"; $reSellerName = mysqli_query($con,$quSellrName); $dataSellname = mysqli_fetch_array($reSellerName); $sellerName = $dataSellname['Name']; $sl=$sl+1; echo "<tr>"; echo "<td>".$sl."</td>"; echo "<td>".$sellerName."</td>"; echo "<td>".$dataLapu1['LapuNo']."</td>"; echo "<td>".$dataLapu1['LapuTxn']."</td>"; echo "</tr>"; $totalTxn = $totalTxn+(int)$dataLapu1['LapuTxn']; } } echo "<tr>"; echo "<th>".$fdate." To ".$ldate."</th>"; echo "<th>".$dataSellname['Name']."</th>"; echo "<th>Total Txn</th>"; echo "<th>".$totalTxn."</th>"; echo "</tr>"; } ?> </table> </div> </div> </div> </div> <?php require'footer.php'; ?> </body> </html>
💾 保存文件
← 返回文件管理器