✏️ 正在编辑: minus_amount.php
路径:
/home/llpreacharge/public_html/LLPRECHARGE/Admin/minus_amount.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php include'session.php'; include'../connection.php'; include'../functions.php'; ?> <html> <head> <title>Minus Lapu Amount</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%; height:450px; margin:0 1%; padding:10px; overflow:auto; margin:10px 0; } .div1 input, .div1 select{ height:35px; width:200px; font-size:15px; padding:2px 10px; border-radius:5px; border:solid #6b5127 1px; 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%; height:550px; float:left; text-align:center; padding:10px 20px; overflow:auto; } INPUT{padding:5px 10px; border-radius:4px;} .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:; height:35px; border:solid black 1px; padding:2px 5px; } table tr:hover{background-color:gray; color:white;} table tr:hover a{color:white;} .deactAnchor{background:green; color:white; padding:2px 5px; border-radius:3px; cursor:pointer;} #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>Minus Lapu Amount :-</p></div> <div class="msg"><marquee><?php include'../msg.php'; ?></marquee></msg> </div><hr> <div class="data-content"> <div class="div2" id="downlinePlace"> <script> function deacMinus(Arg) { var txnDeactiveId = Arg; var AjaxName = "Ajax17"; var xmlhttpState = new XMLHttpRequest(); xmlhttpState.open("GET","Ajax.php?AjaxName="+AjaxName+"&txnDeactiveId="+txnDeactiveId, false) xmlhttpState.send(null); if(xmlhttpState.responseText=="Deactivate") { document.getElementById(txnDeactiveId).style.display = "none"; } } </script> <?php if(isset($_GET['lapuDate'])) { $lapuDate=$_GET['lapuDate']; $lapuNo=$_GET['lapuNo']; echo '<form method="post"><input type="submit" name="update" value="DEACTIVE ALL"></form>'; if(isset($_POST['update'])) { $UpdateQu="UPDATE recharge SET Minus='1' WHERE rechargedate='$lapuDate' AND LapuNo='$lapuNo'"; if(mysqli_query($con,$UpdateQu)) { echo "UPDATED SUCCESSFULLY"; } } } ?> <form method="post"> <input type="submit" Value="All Minus Deactive" name="AllDeactive"> </form> <?php if(isset($_POST['AllDeactive'])) { $DeactiveAllMinus="UPDATE recharge SET Minus='1' WHERE Minus='0' AND DiffLock='0'"; if(mysqli_query($con,$DeactiveAllMinus)) { echo "<center><h3>All Minus Deactivated Successfully !</h3></center>"; } } ?> <table cellpadding="20" border="2"> <tr> <th>Sl.</th> <th>Date</th> <th>Time</th> <th>API</th> <th>Lapu Owner</th> <th>Lapu No.</th> <th>Lapu Bal</th> <th>Diff</th> <th>COUNT ROW</th> <th>Order Id</th> <th>#</th> <th>#</th> <th>LAD</th> </tr> <?php $data1 = "r.Id, r.Date, r.Time, r.Api, r.Lapu, r.ApiBal, r.Diff, r.DiffLock,"; $data2 = "s.Name"; $LJrNl = "LEFT JOIN seller_lapu AS l ON r.Lapu=l.LapuNo"; $LJrNs = "LEFT JOIN Seller AS s ON l.SellerId=s.Id"; $where1 = "r.Diff<-10 AND r.Minus='0'"; $where2 = ""; if(isset($_GET['lapuDate'])) { $lapuDate = $_GET['lapuDate']; $lapuNo = $_GET['lapuNo']; $where2 = "AND r.Date='$lapuDate' AND r.Lapu='$lapuNo'"; } $sl=0; $quRech = "SELECT $data1 $data2 FROM recharge AS r $LJrNl $LJrNs WHERE $where1 $where2 ORDER BY Id DESC"; $reRech = mysqli_query($con,$quRech); while($dataRech=mysqli_fetch_array($reRech)) { $sl=$sl+1; $slDiff=0; $orderId = $dataRech[0]; $Date = $dataRech[1]; $Time = $dataRech[2]; $Api = $dataRech[3]; $Lapu = $dataRech[4]; $ApiBal = $dataRech[5]; $Diff = $dataRech[6]; $DiffLock = $dataRech[7]; $Seller = $dataRech[8]; $TotRechAmt1=0; $TotRechAmt2=0; $TotR_Offer1=0; $TotR_Offer2=0; $quDiff1 = "SELECT Amount, R_offer, ApiBal FROM recharge WHERE Lapu='$Lapu' AND Id<'$orderId' AND Status='SUCCESS' ORDER BY Id DESC LIMIT 5"; $reDiff1 = mysqli_query($con,$quDiff1); $count_reDiff1=mysqli_num_rows($reDiff1); while($dataDiff1=mysqli_fetch_array($reDiff1)) { $TotRechAmt1 = $TotRechAmt1+$dataDiff1[0]; $TotR_Offer1 = (int)$TotR_Offer1+(int)$dataDiff1[1]; $LapuOpBal = (int)$dataDiff1[2]+(int)$dataDiff1[0]-(int)$dataDiff1[1]; } $quDiff2="SELECT Amount, R_offer, ApiBal FROM recharge WHERE Lapu='$Lapu' AND Id>='$orderId' AND Status='SUCCESS' ORDER BY Id ASC LIMIT 5"; $reDiff2=mysqli_query($con,$quDiff2); $count_reDiff2=mysqli_num_rows($reDiff2); while($dataDiff2=mysqli_fetch_array($reDiff2)) { $TotRechAmt2 = $TotRechAmt2+$dataDiff2[0]; $TotR_Offer2 = (int)$TotR_Offer2+(int)$dataDiff2[1]; $LapuClBal = $dataDiff2[2]; } $totRechAmount=$TotRechAmt1+$TotRechAmt2; $totR_Offer=$TotR_Offer1+$TotR_Offer2; $remainBal=$LapuOpBal-$totRechAmount+$totR_Offer; $diff=(int)$LapuClBal-(int)$remainBal; $title = "OpBal = ".$LapuOpBal.", TotRechAmt = ".$totRechAmount.", TotR_Offer = ".$totR_Offer.", ClBal = ".$LapuClBal; $countRow=0; if($count_reDiff1>=5 && $count_reDiff2>=5) { $countRow=5; } $absDiff=abs($diff); if(floor($absDiff)==0 && $countRow==5) { $fontColor = "style='color:#126105'"; $rechId = $dataRech['Id']; $quDeactiveTxn="UPDATE recharge SET Minus='1' WHERE Id='$rechId'"; mysqli_query($con,$quDeactiveTxn); } else { $fontColor="style='color:red'"; } echo "<tr >"; echo "<td>".$sl."</td>"; echo "<td><a href='minus_amount.php?lapuDate=".$Date."&lapuNo=".$Lapu."' target='blank_'>".$Date."</td>"; echo "<td>".$Time."</td>"; echo "<td>".$Api."</td>"; echo "<td>".$Seller."</td>"; echo "<td><a href='recharge_by_lapu.php?lapuNo=".$Lapu."&rechId=".$orderId."&rechDate=".$Date."' target='_blank'>".$Lapu."</td>"; echo "<td>".$dataRech['ApiBal']."</td>"; echo "<td title='".$title."'><h4 $fontColor>".$Diff."<h4></td>"; echo "<td>".$count_reDiff1." - ".$count_reDiff2."</td>"; echo "<td><a href='check_txn_status.php?rechId=".$orderId."' target='_blank'>".$orderId."</td>"; echo "<td>"; if($DiffLock==0) { echo "<a class='deactAnchor' id='".$orderId."' onclick='deacMinus(".$orderId.")'>Deactive</a>"; } echo "</td>"; echo "<td>"; if($DiffLock==0) { echo "<a href='Action.php?ActionName=Action2&TxnId=".$orderId."'>UNLOCK</a>"; } else { echo "<a href='Action.php?ActionName=Action2&TxnId=".$orderId."'>LOCK</a>"; } echo "</td>"; echo "<td title='".$title."'>".round($diff)."</td>"; echo "</tr>"; } ?> </table> </div> </div> </div> </div> <?php require'footer.php'; ?> </body> </html>
💾 保存文件
← 返回文件管理器