✏️ 正在编辑: SubAdmin.php
路径:
/home/llpreacharge/public_html/SubAdmin/SubAdmin.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php session_start(); if($_SESSION['subadm']) { $Adminid= $_SESSION['subadm']; $userid=1111; } else { header('location:../login.php'); } ?> <?php include'connection.php'; include'time.php'; ini_set('memory_limit', '-1'); $query8="select * from wallet where Userid='$userid' order by Id desc"; $result8=mysqli_query($con,$query8); $data8=mysqli_fetch_array($result8); $currentbal= $data8['Balance']; $TotalIdeaBal=0; $TotalJioBal=0; $TotalVodaBal=0; $TotalAirtelBal=0; $quMyAPI="select * from myapi where Operator='Idea'"; $reMyAPI=mysqli_query($con,$quMyAPI); while($dataMyAPI=mysqli_fetch_array($reMyAPI)) { $LapuIdeaBal=$dataMyAPI['LapuBal']; $TotalIdeaBal=$TotalIdeaBal+$LapuIdeaBal; } $quMyApiJio="select * from myapi where Operator='Reliance Jio'"; $reMyApiJio=mysqli_query($con,$quMyApiJio); while($dataMyApiJio=mysqli_fetch_array($reMyApiJio)) { $LapuJioBal=$dataMyApiJio['LapuBal']; $TotalJioBal=$TotalJioBal+$LapuJioBal; } $quMyApiVoda1="select * from myapi where Operator='Voda'"; $reMyApiVoda1=mysqli_query($con,$quMyApiVoda1); while($dataMyApiVoda1=mysqli_fetch_array($reMyApiVoda1)) { $LapuVoda1Bal=$dataMyApiVoda1['LapuBal']; $TotalVodaBal=$TotalVodaBal+$LapuVoda1Bal; } $quMyApiAirtel="select * from myapi where Operator='Airtel'"; $reMyApiAirtel=mysqli_query($con,$quMyApiAirtel); while($dataMyApiAirtel=mysqli_fetch_array($reMyApiAirtel)) { $LapuAirtelBal=$dataMyApiAirtel['LapuBal']; $TotalAirtelBal=$TotalAirtelBal+$LapuAirtelBal; } $quMyApiTata="select * from myapi where Operator='Tata'"; $reMyApiTata=mysqli_query($con,$quMyApiTata); while($dataMyApiTata=mysqli_fetch_array($reMyApiTata)) { $LapuTataBal=$dataMyApiTata['LapuBal']; $TotalTataBal=$TotalTataBal+$LapuTataBal; } $ActualIdeaBal=$TotalIdeaBal*100/104; $ActualJioBal=$TotalJioBal*100/106; $ActualVodaBal=$TotalVodaBal*100/104; $ActualAirtelBal=$TotalAirtelBal*100/103; $ActualTataBal=$TotalTataBal*100/103; $UniqueAPIBal=0; ?> <html> <head> <style> body{background:url(bg.jpg); background-size:cover; margin:0; padding:0; width:1580px;} #mydiv { position: absolute; z-index: 9; background-color: #f1f1f1; text-align: center; border: 1px solid #d3d3d3; } #mydivheader { padding: 10px; cursor: move; z-index: 10; background-color: #2196F3; color: #fff; } .head{background:; width:1450px; height:90px; margin:0px;} #p1{font-size:34px; float:left; Margin:10 0 0 45px; color:#996420; font-weight:bold;} #p2{font-size:20px; float:left; margin:28 0 0 -8px; color:#eaa040; font-family:Courier;} #p3{font-size:15px; font-family:Comic Sans MS; float:left; color:#996420; margin-top:48px; margin-left:-153px;} .h2{background:white; width:400px; height:70px; margin:10 200px; float:left;} #link0{float:right; margin:10 10 0 0px; font-size:20px; text-decoration:none; color:white; background:red; padding:5px; border-radius:4px;} #link1{float:right; margin:10 10 0 0px; font-size:20px; text-decoration:none; color:white; background:green; padding:5px; border-radius:4px;} #link2{float:left; margin:10 0 0 20px; font-size:20px; background:white;color:Green; padding:5px; border-radius:4px;} #link0:hover{ padding:5px; border-radius:4px; color:black;} #time{float:right;} .menu{background:#996420; height:40px; width:1450px; margin-left:10px; padding:0; line-height:40px;} .menu ul{padding:0; margin:0; position:relative; display:inline-block;} .menu ul li{list-style:none; float:left; width:170px; line-height:40px; text-align:center; font-size:17px; margin:0; padding:0; color:white;} .menu ul li ul {display:none;} .menu ul li:hover{background:#d1994a; cursor:pointer;} .menu ul li:hover ul {display:block; z-index:2;} .menu ul li:hover ul li{background:#d1994a; border-top:solid white 0.1px;} .menu ul li ul li:hover{background:#996420; color:white;} .menu ul li ul li:hover a{ color:white;} .menu ul li a{ text-decoration:none; color:white;} #a1{border:none; color:white;} .menu{letter-spacing:1px;} #AFLI{background:white; width:170px; height:40px; float:left; margin:15 0 0 10px; text-align:center; line-height:40px; border-radius:5px;} #anchr{font-size:20px; text-decoration:none; padding:5 1px; margin:100 10px;} .notifi{background:#995702; width:840px; height:70px; margin:5 5 5 300px; border-radius:8px;} .imgdiv{background:; width:60px; height:60px; float:left; margin:0 15px;} #notifidiv{background:red; width:40px; height:40px; margin:0 0 0 30px; border-radius:50%; text-align:center; line-height:40px; color:white; font-size:20px; z-index:4; float:left; position:absolute;} img{width:60px; height:60px; float:left; margin:7px;} .content{background:; width:1030px; margin:5px; float:left;} .content1{background:; width:160px; height:160px; margin:5px; float:left;} .content1 table{width:160px; height:160px; border-collapse:collapse; text-align:center;} .content1 table th{height:60px; background:green; color:white; font-size:17px;} .content1 table td{height:100px; font-size:25px; background:#eafaec;} #bal1,#bal2,#bal3,#bal4,#bal5,#bal6,#bal7,#bal8,#bal9{display:none;} #roy1,#roy2,#roy3,#roy4,#roy5,#roy6,#roy7,#roy8,#roy9{display:none;} .ApiBalDiv{width:260px; height:500px; background:; float:left; margin:15 10 10 0px;} #tableApiBal{text-align:center; width:360px; margin:0px; border-collapse:collapse; background:white; text-decoration:none;} #tableApiBal th{font-size:20px; text-decoration:none; background:gray; color:white;} #tableApiBal td{font-size:20px; text-decoration:none; background:#ffffff; color:black;} .foot{margin:0 0 0 100px; width:1350px; text-align:center; height:140px; float:left;} #siteseal{background:; width:300px; height:50px; float:left} </style> </head> <body onLoad="apibal()"> <?php $rechApiBal=0; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://www.kwikapi.com/api/v2/balance.php?api_key=8tyeubd-prieyeiw-854125-75yhr-8454adz", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => false, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { $data2=json_decode($response); $KwikApiBal = $data2->response->balance; } ?> <?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "http://sms2.kwikapi.com/getSMSCredit?username=sameermansuri111&apikey=dc086ecd-1a22-4928-9e4e-69703230fd4e", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => false, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", )); $response1 = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { //echo $response1; $rep1=str_replace(',"TRANS"]]',"","$response1"); $kwikSmsBal=str_replace('[[',"","$rep1"); //$data3=json_decode($response1); //echo $kwikSmsBal = $data3->$response1->TRANS; } //DIZI_PAY API BALANCE// $apiUsrId=6; $apiToken="e0330b377da0041bf360f65f150cd41d"; $url="http://dizipayapi.com/API/Balance?UserID=$apiUsrId&Token=$apiToken"; $request_timeout = 60; // 60 seconds timeout $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, $request_timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $request_timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); $curl_error = curl_errno($ch); $getserver= curl_getinfo($ch); curl_close($ch); $data2=json_decode($output); $errorcode = $data2->errorcode; $DiziPayApiBal = $data2->bal; //Ozzy_PAY API BALANCE// $apiUsrId=170; $apiToken="2bc8fc628274544b5ba8445989e865ec"; $url="http://ozzyrecharge.com/API/Balance?UserID=$apiUsrId&Token=$apiToken"; $request_timeout = 60; // 60 seconds timeout $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, $request_timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $request_timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); $curl_error = curl_errno($ch); $getserver= curl_getinfo($ch); curl_close($ch); $data2=json_decode($output); $errorcode = $data2->errorcode; $OzzyApiBal = $data2->bal; //Perfect Paisa API Balance // $token2="b968b63cabae4d9aa26b4c252e13be11"; $url2="https://www.perfectpaisa.in/apiservice.asmx/GetBalance?apiToken=$token2"; $request_timeout = 60; // 60 seconds timeout $ch2 = curl_init(); curl_setopt($ch2, CURLOPT_URL, $url2); curl_setopt($ch2, CURLOPT_TIMEOUT, $request_timeout); curl_setopt($ch2, CURLOPT_CONNECTTIMEOUT, $request_timeout); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1); $output2 = curl_exec($ch2); $curl_error = curl_errno($ch2); $getserver= curl_getinfo($ch2); curl_close($ch2); $xml2 = simplexml_load_string($output2); $PP_API_Bal= floor($xml2); $upatePP_Api="update myapi set LapuBal='$PP_API_Bal' where LapuNumber='PP_Api'"; mysqli_query($con,$upatePP_Api); ?> <div class="head"> <p id="p1">LLP</p> <p id="p2">Recharge</p> <p id="p3">The Complete Solution</p> <a id="link0" href="logout.php">Log Out</a> <p id="link1"><?php echo "Welcome $userid Admin"; ?></p> <div class="notifi"> <?php include'notification.php'; ?> <div id="AFLI"> <?php include'connection.php'; $quGetAutoFailedStatus="select Status from Auto_Failed where Id='1'"; $reGetAutoFailedStatus=mysqli_query($con,$quGetAutoFailedStatus); $dataGetAutoFailedStatus=mysqli_fetch_array($reGetAutoFailedStatus); $AutoFailedStatus=$dataGetAutoFailedStatus['Status']; if($AutoFailedStatus=="Active") { echo "<a id='anchr' href='auto_failed_deactive.php' style='font-size:17px; color:green;'>Auto Failed Active</a>"; } else { echo "<a id='anchr' href='auto_failed_active.php' style='font-size:17px; color:red;'>Auto Failed Deactive</a>"; } ?> </div> </div> </div> <?php include 'menu.php'; ?> <div class="content"> <?php include'connection.php'; $queryAdmin="select * from admin"; $resultAdmin=mysqli_query($con,$queryAdmin); $rowAdmin=mysqli_num_rows($resultAdmin); $quApiUsr="select * from retailer where ApiActive='1'"; $reApiUsr=mysqli_query($con,$quApiUsr); $rowApiUsr=mysqli_num_rows($reApiUsr); $queryMd="select * from masterdis"; $resultMd=mysqli_query($con,$queryMd); $rowMd=mysqli_num_rows($resultMd); $sumMdBal=0; while($mdData=mysqli_fetch_array($resultMd)) { $totalMdBal=$mdData['Balance']; $sumMdBal=$sumMdBal+$totalMdBal; } $querydis="select * from distributer"; $resultdis=mysqli_query($con,$querydis); $rowdis=mysqli_num_rows($resultdis); $sumDisBal=0; while($disData=mysqli_fetch_array($resultdis)) { $totalDisBal=$disData['Balance']; $sumDisBal=$sumDisBal+$totalDisBal; } $querylb="select * from distributer where Balance<5000"; $resultlb=mysqli_query($con,$querylb); $rowlb=mysqli_num_rows($resultlb); $query1="select * from retailer"; $result1=mysqli_query($con,$query1); $row1=mysqli_num_rows($result1); $sumRet=0; while($row11=mysqli_fetch_array($result1)) { $retalrBal=$row11['Balance']; $sumRet=$sumRet+$retalrBal; } $sum2=0; include'time.php'; $query2="select * from recharge where Status='SUCCESS' and Rechargedate='$date'"; $result2=mysqli_query($con,$query2); while($row2=mysqli_fetch_array($result2)) { $rechbal=$row2['Amount']; $sum2=$sum2+$rechbal; } $query3="select * from commwallet where Userid='$userid'"; $result3=mysqli_query($con,$query3); $sum3=0; while($row3=mysqli_fetch_array($result3)) { $data3=$row3['Balance']; $sum3=$sum3+$data3; } $query4="select * from commwallet where Active='0'"; $result4=mysqli_query($con,$query4); $sum4=0; while($row4=mysqli_fetch_array($result4)) { $data4=$row4['Balance']; $sum4=$sum4+$data4; } $query5="select * from commwallet where Userid='$userid' and Active='1'"; $result5=mysqli_query($con,$query5); $sum5=0; while($row5=mysqli_fetch_array($result5)) { $data5=$row5['Balance']; $sum5=$sum5+$data5; } $query6="select * from retailer where Balance<1000"; $result6=mysqli_query($con,$query6); $row6=mysqli_num_rows($result6); $date1=date_create($date); date_sub($date1,date_interval_create_from_date_string("7 days")); $resultdate=date_format($date1,"Y-m-d"); $querydeac="select * from retailer where Lastrechdate<'$resultdate'"; $resultdeac=mysqli_query($con,$querydeac); $rowdeac=mysqli_num_rows($resultdeac); ?> <div class="content"> <a href="view_admin.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Admin</th></tr> <tr><td><?php echo $rowAdmin; ?></td></tr> </table> </div> </a> <a href="View_Api_User.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total API User</th></tr> <tr><td><?php echo $rowApiUsr; ?></td></tr> </table> </div> </a> <a href="view_distributer.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Distributers</th></tr> <tr><td><?php echo $rowdis; ?></td></tr> </table> </div> </a> <a href="low_bal_distributer.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Low Balance Distributers</th></tr> <tr><td><?php echo $rowlb; ?></td></tr> </table> </div> </a> <a href="view_retailer.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Retailers</th></tr> <tr><td><?php echo $row1; ?></td></tr> </table> </div> </a> <a href="lazy_retailer.php" target="_blank"><div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Lazy Retailers</th></tr> <tr><td><?php echo $rowdeac; ?></td></tr> </table> </div></a> <a href="View_Lowbal_retailer.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Low Balance Retailers</th></tr> <tr><td><?php echo $row6; ?></td></tr> </table> </div> </a> <a href="withdraw_commision.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Admin Balance</th></tr> <tr><td><?php echo floor($currentbal); ?></td></tr> </table> </div> </a> <a href="view_md.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total MD. Balance</th></tr> <tr><td><?php echo floor($sumMdBal); ?></td></tr> </table> </div> </a> <a href="view_distributer.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Distributers Balance</th></tr> <tr><td><?php echo floor($sumDisBal); ?></td></tr> </table> </div> </a> <a href="view_retailer.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Retailers Balance</th></tr> <tr><td><?php echo floor($sumRet); ?></td></tr> </table> </div> </a> <a href="withdraw_commision.php" target="_blank"> <div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Pending Commission</th></tr> <tr><td><?php echo floor($sum4); ?></td></tr> </table> </div> </a> <a href="recharge_history.php" target="_blank"><div class="content1"> <table border="1" cellpadding="8"> <tr><th>User Wallet Balance</th></tr> <tr><td><?php $totalUserWalletBal=$sumMdBal+$sumDisBal+$sumRet+$sum4; echo floor($totalUserWalletBal); ?></td></tr> </table> </div></a> <a href="recharge_history.php" target="_blank"><div class="content1"> <table border="1" cellpadding="8"> <tr><th>Total Wallet Balance</th></tr> <tr><td><?php $totalWalletBal=$currentbal+$sumMdBal+$sumDisBal+$sumRet+$sum4; echo floor($totalWalletBal); ?></td></tr> </table> </div></a> <a href="admin_recharge_history.php" target="_blank"><div class="content1"> <table border="1" cellpadding="8"> <tr><th>Today Recharge Amount</th></tr> <tr><td><?php echo $sum2; ?></td></tr> </table> </div></a> <?php $ActualIdeaBal=$TotalIdeaBal*100/104; $ActualJioBal=$TotalJioBal*100/106; $ActualVodaBal=$TotalVodaBal*100/104; $ActualAirtelBal=$TotalAirtelBal*100/103; //$TotalApiBal=$TotalIdeaBal+$TotalJioBal+$TotalVodaBal+$TotalAirtelBal+$rechApiBal+$KwikApiBal+$UniqueAPIBal+$DiziPayApiBal+$PP_API_Bal+$OzzyApiBal; $TotalApiBal=$ActualIdeaBal+$ActualJioBal+$ActualVodaBal+$ActualAirtelBal+$ActualTataBal+$rechApiBal+$KwikApiBal+$UniqueAPIBal+$DiziPayApiBal+$PP_API_Bal+$OzzyApiBal; $Managebal=$totalWalletBal-$TotalApiBal; $BenefitBal=2000000-$Managebal; $RestBal=$Managebal-2000000; ?> <a href="AdminDiff.php" target="_blank"><div class="content1"> <table border="1" cellpadding="8"> <tr><th>LLP Account Differences</th></tr> <tr><td><?php echo floor($BenefitBal); ?></td></tr> </table> </div></a> </div> </div> <a href="AllApiBal.php" target="_blank"><div class="ApiBalDiv"> <?php $ViROTotalRech=0; $AirtelROTotalRech=0; $AirtelTotalRech=0; $TataTotalRech=0; $IdeaTotalRech=0; $JioTotalRech=0; $VodaTotalRech=0; $RechTotalRech=0; $UniqTotalRech=0; $KwikTotalRech=0; $DiziTotalRech=0; $PPTotalRech=0; $OzzyTotalRech=0; date_default_timezone_set("asia/kolkata"); $dateApiBal=date("Y-m-d"); $dateAB=date_create($dateApiBal); date_sub($dateAB,date_interval_create_from_date_string("1 days")); $resultdateAB=date_format($dateAB,"Y-m-d"); // Total Recharge Of Tommarrow. $queryViRO="select * from recharge where Companyname='Vi_RO' AND API='My_API2' and Status='SUCCESS' and Rechargedate='$resultdateAB' OR Companyname='Vi_RO' AND API='My_API' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultViRO=mysqli_query($con,$queryViRO); while($dataViRO=mysqli_fetch_array($resultViRO)) { $ViRechO=$dataViRO['Amount']; $ViROTotalRech=$ViROTotalRech+$ViRechO; } $queryARO="select * from recharge where Companyname='Airtel_RO' AND API='My_API2' and Status='SUCCESS' and Rechargedate='$resultdateAB' OR Companyname='Airtel_RO' AND API='My_API' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultARO=mysqli_query($con,$queryARO); while($dataARO=mysqli_fetch_array($resultARO)) { $AirtelRechO=$dataARO['Amount']; $AirtelROTotalRech=$AirtelROTotalRech+$AirtelRechO; } $queryAR="select * from recharge where Companyname='Airtel' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultAR=mysqli_query($con,$queryAR); while($dataAR=mysqli_fetch_array($resultAR)) { $AirtelRech=$dataAR['Amount']; $AirtelTotalRech=$AirtelTotalRech+$AirtelRech; } $queryIR="select * from recharge where Companyname='Idea' and API='My_API2' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultIR=mysqli_query($con,$queryIR); while($dataIR=mysqli_fetch_array($resultIR)) { $IdeaRech=$dataIR['Amount']; $IdeaTotalRech=$IdeaTotalRech+$IdeaRech; } $queryJR="select * from recharge where Companyname='Reliance Jio' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultJR=mysqli_query($con,$queryJR); while($dataJR=mysqli_fetch_array($resultJR)) { $JioRech=$dataJR['Amount']; $JioTotalRech=$JioTotalRech+$JioRech; } $queryVR="select * from recharge where Companyname='Vodafone' and API='My_API2' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultVR=mysqli_query($con,$queryVR); while($dataVR=mysqli_fetch_array($resultVR)) { $VodaRech=$dataVR['Amount']; $VodaTotalRech=$VodaTotalRech+$VodaRech; } $queryTR="select * from recharge where Companyname='TATA SKY DTH' and API='My_API2' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultTR=mysqli_query($con,$queryTR); while($dataTR=mysqli_fetch_array($resultTR)) { $TataRech=$dataTR['Amount']; $TataTotalRech=$TataTotalRech+$TataRech; } $queryRR="select * from recharge where API='Rech_API' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultRR=mysqli_query($con,$queryRR); while($dataRR=mysqli_fetch_array($resultRR)) { $RechRech=$dataRR['Amount']; $RechTotalRech=$RechTotalRech+$RechRech; } $queryUR="select * from recharge where API='Unique_API' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultUR=mysqli_query($con,$queryUR); while($dataUR=mysqli_fetch_array($resultUR)) { $UniqRech=$dataUR['Amount']; $UniqTotalRech=$UniqTotalRech+$UniqRech; } $queryKR="select * from recharge where API='Kwik_API' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultKR=mysqli_query($con,$queryKR); while($dataKR=mysqli_fetch_array($resultKR)) { $KwikRech=$dataKR['Amount']; $KwikTotalRech=$KwikTotalRech+$KwikRech; } $queryDizi="select * from recharge where API='DiziPay_Api' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultDizi=mysqli_query($con,$queryDizi); while($dataDizi=mysqli_fetch_array($resultDizi)) { $DiziRech=$dataDizi['Amount']; $DiziTotalRech=$DiziTotalRech+$DiziRech; } $queryPP="select * from recharge where API='PP_Api' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultPP=mysqli_query($con,$queryPP); while($dataPP=mysqli_fetch_array($resultPP)) { $PPRech=$dataPP['Amount']; $PPTotalRech=$PPTotalRech+$PPRech; } $queryOzzy="select * from recharge where API='Ozzy_Api' and Status='SUCCESS' and Rechargedate='$resultdateAB'"; $resultOzzy=mysqli_query($con,$queryOzzy); while($dataOzzy=mysqli_fetch_array($resultOzzy)) { $OzzyRech=$dataOzzy['Amount']; $OzzyTotalRech=$OzzyTotalRech+$OzzyRech; } // Total Recharge Of Today. $ViROTotalRechtoday=0; $AirtelROTotalRechtoday=0; $AirtelTotalRechtoday=0; $IdeaTotalRechtoday=0; $JioTotalRechtoday=0; $VodaTotalRechtoday=0; $TataTotalRechtoday=0; $RechTotalRechtoday=0; $UniqTotalRechtoday=0; $KwikTotalRechtoday=0; $DiziTotalRechtoday=0; $PPTotalRechtoday=0; $OzzyTotalRechtoday=0; $ViROTotalRoToday=0; $AirtelROTotalRoToday=0; $IdeaTotalRoToday=0; $VodaTotalRoToday=0; $queryViROtodayRO="select * from recharge where Companyname='Vi_RO' AND API='My_API2' and Status='SUCCESS' and Rechargedate='$dateApiBal' OR Companyname='Vi_RO' AND API='My_API' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultViROtodayRO=mysqli_query($con,$queryViROtodayRO); while($dataViOtodayRO=mysqli_fetch_array($resultViROtodayRO)) { $ViRechROtoday=$dataViOtodayRO['Amount']; $ViROTotalRechtoday=$ViROTotalRechtoday+$ViRechROtoday; $ViRoTodayRO=$dataViOtodayRO['R_Offer']; $ViROTotalRoToday=$ViROTotalRoToday+$ViRoTodayRO; } $queryAROtodayRO="select * from recharge where Companyname='Airtel_RO' AND API='My_API2' and Status='SUCCESS' and Rechargedate='$dateApiBal' OR Companyname='Airtel_RO' AND API='My_API' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultAROtodayRO=mysqli_query($con,$queryAROtodayRO); while($dataAROtodayRO=mysqli_fetch_array($resultAROtodayRO)) { $AirtelRechROtoday=$dataAROtodayRO['Amount']; $AirtelROTotalRechtoday=$AirtelROTotalRechtoday+$AirtelRechROtoday; $AirtelRoTodayRO=$dataAROtodayRO['R_Offer']; $AirtelROTotalRoToday=$AirtelROTotalRoToday+$AirtelRoTodayRO; } $queryJRtoday="select * from recharge where Companyname='Reliance Jio' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultJRtoday=mysqli_query($con,$queryJRtoday); while($dataJRtoday=mysqli_fetch_array($resultJRtoday)) { $JioRechtoday=$dataJRtoday['Amount']; $JioTotalRechtoday=$JioTotalRechtoday+$JioRechtoday; } $queryVRtoday="select * from recharge where Companyname='Vodafone' and API='My_API2' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultVRtoday=mysqli_query($con,$queryVRtoday); while($dataVRtoday=mysqli_fetch_array($resultVRtoday)) { $VodaRechtoday=$dataVRtoday['Amount']; $VodaTotalRechtoday=$VodaTotalRechtoday+$VodaRechtoday; $VodaRoToday=$dataVRtoday['R_Offer']; $VodaTotalRoToday=$VodaTotalRoToday+$VodaRoToday; } $queryTRtoday="select * from recharge where Companyname='TATA SKY DTH' and API='My_API2' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultTRtoday=mysqli_query($con,$queryTRtoday); while($dataTRtoday=mysqli_fetch_array($resultTRtoday)) { $TataRechtoday=$dataTRtoday['Amount']; $TataTotalRechtoday=$TataTotalRechtoday+$TataRechtoday; } $queryRRtoday="select * from recharge where API='Rech_API' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultRRtoday=mysqli_query($con,$queryRRtoday); while($dataRRtoday=mysqli_fetch_array($resultRRtoday)) { $RechRechtoday=$dataRRtoday['Amount']; $RechTotalRechtoday=$RechTotalRechtoday+$RechRechtoday; } $queryURtoday="select * from recharge where API='Unique_API' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultURtoday=mysqli_query($con,$queryURtoday); while($dataURtoday=mysqli_fetch_array($resultURtoday)) { $UniqRechtoday=$dataURtoday['Amount']; $UniqTotalRechtoday=$UniqTotalRechtoday+$UniqRechtoday; } $queryKRtoday="select * from recharge where API='Kwik_API' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultKRtoday=mysqli_query($con,$queryKRtoday); while($dataKRtoday=mysqli_fetch_array($resultKRtoday)) { $KwikRechtoday=$dataKRtoday['Amount']; $KwikTotalRechtoday=$KwikTotalRechtoday+$KwikRechtoday; } $queryDizitoday="select * from recharge where API='DiziPay_Api' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultDizitoday=mysqli_query($con,$queryDizitoday); while($dataDizitoday=mysqli_fetch_array($resultDizitoday)) { $DiziRechtoday=$dataDizitoday['Amount']; $DiziTotalRechtoday=$DiziTotalRechtoday+$DiziRechtoday; } $queryPPtoday="select * from recharge where API='PP_Api' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultPPtoday=mysqli_query($con,$queryPPtoday); while($dataPPtoday=mysqli_fetch_array($resultPPtoday)) { $PPRechtoday=$dataPPtoday['Amount']; $PPTotalRechtoday=$PPTotalRechtoday+$PPRechtoday; } $queryOzzytoday="select * from recharge where API='Ozzy_Api' and Status='SUCCESS' and Rechargedate='$dateApiBal'"; $resultOzzytoday=mysqli_query($con,$queryOzzytoday); while($dataOzzytoday=mysqli_fetch_array($resultOzzytoday)) { $OzzyRechtoday=$dataOzzytoday['Amount']; $OzzyTotalRechtoday=$OzzyTotalRechtoday+$OzzyRechtoday; } ?> <script> function apibal() { var i; for(i=1;i<=15;i++) { Indicate("bal"+i,"roy"+i,"tdbal"+i); } } function Indicate(a,b,c) { var bal = parseFloat(document.getElementById(a).value); var roy = parseFloat(document.getElementById(b).value); if(bal<roy*1.5) { document.getElementById(c).style.background="red"; document.getElementById(c).style.color="white"; } } </script> <table border="1" cellpadding="5" id="tableApiBal"> <tr> <th>API</th> <th>BAL</th> <th>TOY</th> <th>TOT</th> <th>RO</th> </tr> <tr> <td>Vi-RO</td> <td id="tdbal0"></td> <td><input type="text" id="roy1" value="<?php echo $ViROTotalRech; ?>"/><?php echo $ViROTotalRech; ?></td> <td><?php echo $ViROTotalRechtoday; ?></td> <td><?php echo floor($ViROTotalRoToday); ?></td> </tr> <tr> <td>A-RO</td> <td id="tdbal0"></td> <td><input type="text" id="roy1" value="<?php echo $AirtelROTotalRech; ?>"/><?php echo $AirtelROTotalRech; ?></td> <td><?php echo $AirtelROTotalRechtoday; ?></td> <td><?php echo floor($AirtelROTotalRoToday); ?></td> </tr> <tr> <td>Airtel</td> <td id="tdbal1"><input type="text" id="bal1" value="<?php echo floor($TotalAirtelBal); ?>"/><?php echo floor($TotalAirtelBal); ?></td> <td><input type="text" id="roy1" value="<?php echo $AirtelTotalRech; ?>"/><?php echo $AirtelTotalRech; ?></td> <td><?php echo $AirtelTotalRechtoday; ?></td> <td><?php echo floor($AirtelTotalRoToday); ?></td> </tr> <tr> <td>Idea</td> <td id="tdbal2"><input type="text" id="bal2" value="<?php echo floor($TotalIdeaBal); ?>"/><?php echo floor($TotalIdeaBal); ?></td> <td><input type="text" id="roy2" value="<?php echo $IdeaTotalRech; ?>"/><?php echo $IdeaTotalRech; ?></td> <td><?php echo $IdeaTotalRechtoday; ?></td> <td><?php echo floor($IdeaTotalRoToday); ?></td> </tr> <tr> <td>Jio</td> <td id="tdbal3"><input type="text" id="bal3" value="<?php echo floor($TotalJioBal); ?>"/><?php echo floor($TotalJioBal); ?></td> <td><input type="text" id="roy3" value="<?php echo $JioTotalRech; ?>"/><?php echo $JioTotalRech; ?></td> <td><?php echo $JioTotalRechtoday; ?></td> <td></td> </tr> <tr> <td>Voda</td> <td id="tdbal4"><input type="text" id="bal4" value="<?php echo floor($TotalVodaBal); ?>"/><?php echo floor($TotalVodaBal); ?></td> <td><input type="text" id="roy4" value="<?php echo $VodaTotalRech; ?>"/><?php echo $VodaTotalRech; ?></td> <td><?php echo $VodaTotalRechtoday; ?></td> <td><?php echo floor($VodaTotalRoToday); ?></td> </tr> <tr> <td>RechApi</td> <td id="tdbal5"><input type="text" id="bal5" value="<?php echo floor($rechApiBal); ?>"/><?php echo floor($rechApiBal); ?></td> <td><input type="text" id="roy5" value="<?php echo $RechTotalRech; ?>"/><?php echo $RechTotalRech; ?></td> <td><?php echo $RechTotalRechtoday; ?></td> <td></td> </tr> <tr> <td>UniqApi</td> <td id="tdbal6"><input type="text" id="bal6" value="<?php echo floor($UniqueAPIBal); ?>"/><?php echo floor($UniqueAPIBal); ?></td> <td><input type="text" id="roy6" value="<?php echo $UniqTotalRech; ?>"/><?php echo $UniqTotalRech; ?></td> <td><?php echo $UniqTotalRechtoday; ?></td> <td></td> </tr> <tr> <td >KwikApi</td> <td id="tdbal7"><input type="text" id="bal7" value="<?php echo floor($KwikApiBal); ?>"/><?php echo floor($KwikApiBal); ?></td> <td><input type="text" id="roy7" value="<?php echo $KwikTotalRech; ?>"/><?php echo $KwikTotalRech; ?></td> <td><?php echo $KwikTotalRechtoday; ?></td> <td></td> </tr> <tr> <td >DiziApi</td> <td id="tdbal8"><input type="text" id="bal8" value="<?php echo floor($DiziPayApiBal); ?>"/><?php echo floor($DiziPayApiBal); ?></td> <td><input type="text" id="roy8" value="<?php echo $DiziTotalRech; ?>"/><?php echo $DiziTotalRech; ?></td> <td><?php echo $DiziTotalRechtoday; ?></td> <td></td> </tr> <tr> <td >PP_Api</td> <td id="tdbal9"><input type="text" id="bal9" value="<?php echo floor($PP_API_Bal); ?>"/><?php echo floor($PP_API_Bal); ?></td> <td><input type="text" id="roy9" value="<?php echo $PPTotalRech; ?>"/><?php echo $PPTotalRech; ?></td> <td><?php echo $PPTotalRechtoday; ?></td> <td></td> </tr> <tr> <td >OzzyApi</td> <td id="tdbal8" title="Ozzy API Bal"><input type="text" id="bal8" value="<?php echo floor($OzzyApiBal); ?>"/><?php echo floor($OzzyApiBal); ?></td> <td><input type="text" id="roy8" value="<?php echo $OzzyTotalRech; ?>"/><?php echo $OzzyTotalRech; ?></td> <td><?php echo $OzzyTotalRechtoday; ?></td> <td></td> </tr> <tr> <td>Tata Sky</td> <td id="tdbal9"><input type="text" id="bal9" value="<?php echo floor($TotalTataBal); ?>"/><?php echo floor($TotalTataBal); ?></td> <td><input type="text" id="roy9" value="<?php echo $TataTotalRech; ?>"/><?php echo $TataTotalRech; ?></td> <td><?php echo $TataTotalRechtoday; ?></td> <td></td> </tr> <?php $AllBankBal=0; $quBank="select * from bank"; $reBank=mysqli_query($con,$quBank); while($dataBank=mysqli_fetch_array($reBank)) { $TotalBankBal=0; $AllBank=$dataBank['Bankname']; $BankId=$dataBank['Id']; $quGetBankBal="select * from Bank_Account_Txn where Bank_Name='$AllBank'"; $reGetBankBal=mysqli_query($con,$quGetBankBal); while($dataGetBankBal=mysqli_fetch_array($reGetBankBal)) { $Txn=$dataGetBankBal['Txn']; $TotalBankBal=$TotalBankBal+$Txn; } $AllBankBal=$AllBankBal+$TotalBankBal; } $TotalBizBal=$TotalApiBal+$RestBal+$AllBankBal; $BizDiff=$TotalBizBal-$totalUserWalletBal; ?> <tr> <td>Total BAL</td> <td><?php echo floor($TotalApiBal); ?></td> <td></td> <td></td> <td></td> </tr> <tr> <td>Biz Diff</td> <td title="Total Business Balance"><?php echo floor($TotalBizBal); ?></td> <td title="Total User Balance"><?php echo floor($totalUserWalletBal); ?></td> <td title="Business Difference"><?php echo floor($BizDiff); ?></td> <td></td> </tr> <tr> <td>SMS BAL</td> <td><?php echo floor($kwikSmsBal); ?></td> <td></td> <td></td> <td></td> </tr> </table> </div></a> </body> </html>
💾 保存文件
← 返回文件管理器