One Hat Cyber Team
Your IP :
216.73.216.240
Server IP :
162.240.106.28
Server :
Linux server.ganesand.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thoa
/
public_html
/
admin
/
Edit File:
mg_bill1.php
<? error_reporting(0); session_start(); include 'config.php'; $_POST['username']=$_SESSION['username']; $_POST['password']=$_SESSION['password']; $sql=mysql_query("select * from admin where USERNAME='".$_POST['username']."' and PASSWORD='".$_POST['password']."'"); if(mysql_num_rows($sql)==1) { $AP_ID = $_GET['AP_ID']; $view = mysql_query("select * from newapplication where AP_ID = '".$AP_ID."'"); // for editing $data = mysql_fetch_array($view); if($_GET['SAI']){ $STS = $_GET['AG_STS']; if($STS == 0){ $upd_sts = mysql_query("UPDATE agentdetails SET AG_STS ='0' WHERE AP_ID ='".$_GET['SAI']."'"); //for changing status } else{ $upd_sts = mysql_query("UPDATE agentdetails SET AG_STS ='1' WHERE AP_ID ='".$_GET['SAI']."'"); } } if($_GET['del_id']){ ?> <?php $del = mysql_query("UPDATE newapplication SET AP_AMT=(AP_AMT-AP_LASTPAY),AP_COUNT=AP_COUNT-1 where AP_ID='".$_GET['del_id']."'"); //for deleting status if($del){?> <script> alert("Last Bill deleted successfully"); window.location= "mg_bill.php"; </script> <?php } if(!$del){?> <script> alert("Last Bill not deleted successfully"); window.location= "mg_bill.php"; </script> <?php } } if($_GET['del_id1']){ ?> <?php $del1 = mysql_query("UPDATE newapplication SET AP_BILL='',AP_AMT=0,AP_COUNT=0 where AP_ID='".$_GET['del_id1']."'"); //for deleting status if($del1){?> <script> alert("All Bills deleted successfully"); window.location= "mg_bill.php"; </script> <?php } if(!$del1){?> <script> alert("All Bills not deleted successfully"); window.location= "mg_bill.php"; </script> <?php } } ?> <script> function del(id){ var del = confirm("Are you sure Want to delete Last Bill"); if(del){ window.location.href = "mg_bill.php?del_id="+id+"&del=1"; } else{ window.location.href = "mg_bill.php"; } } </script> <script> function del1(id){ var del1 = confirm("Are you sure Want to delete All Bills"); if(del1){ window.location.href = "mg_bill.php?del_id1="+id+"&del=1"; } else{ window.location.href = "mg_bill.php"; } } </script> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Admin Panel</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/datepicker3.css" rel="stylesheet"> <link href="css/styles.css" rel="stylesheet"> <link href="css/bootstrap-table.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <script src="js/respond.min.js"></script> <![endif]--> </head> <script type="text/javascript" src="js/tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init({ selector: "textarea", themes: "modern", plugins: [ "advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste" ], toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" }); </script> <script> function getstate(cid){ $.ajax({ type: "GET", url: "../get_state.php?cid="+cid, success: function(result){ $("#state").html(result); } }); } function getcity(sid){ alert $.ajax({ type: "GET", url: "../get_city.php?sid="+sid, success: function(result){ $("#city").html(result); } }); } </script> <body> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse"> <a href="#"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> </button> <a class="navbar-brand" href="#">Admin</a> <ul class="user-menu"> <li class="dropdown pull-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> User <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="#"><span class="glyphicon glyphicon-user"></span> Profile</a></li> <li><a href="#"><span class="glyphicon glyphicon-cog"></span> Settings</a></li> <li><a href="logou.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> </ul> </li> </ul> </div> </div><!-- /.container-fluid --> </nav> <div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar"> <form role="search"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search"> </div> </form> <? include('header.php');?> </div><!--/.sidebar--> <div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main"> <div class="row"> <ol class="breadcrumb"> <li><a href="dash.php"><span class="glyphicon glyphicon-home"></span></a></li> <li class="active">View Bill Details</li> </ol> </div><!--/.row--> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">Bill Details</h2> </div> </div><!--/.row--> <section class="content"> <div class="row"> <!-- left column --> <div class="col-xs-12"> <!-- general form elements --> <div class="box box-primary"> <!-- form start --> <div class="container"> <form role="form" method="post" action="" enctype="multipart/form-data"> <div class="box-body"> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Application No</label> <input type="text" class="form-control" name="uno" value="<?php echo $data['AP_NO']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">User Name</label> <input type="text" class="form-control" name="uname" value="<?php echo $data['AP_NAME']; ?>"> </div> <!-- /.box-body --> <div class="form-group col-sm-11"> <label for="exampleInputFile">Bill Image</label> <?php for($i=1;$i<$data['AP_COUNT']+1;$i++) {?> <iframe src="../../fpdf/<?php echo $data['AP_BILL'].-"$i".".pdf";?>" width="100%" style="height:100%"></iframe> <? //$str = ltrim($data['AP_BILL'], 'New'); if($str){?> <!-- <iframe src="../../fpdf/<?php// echo $str;?>" width="100%" style="height:100%"></iframe> php} --> <? }?> </div> </div> </form> </div> </div> </div> </div> </section> <hr> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading">Bill List Table</div> <div class="container"> <?php $queryear=mysql_query("select * from year ORDER BY Y_LIST DESC"); while($rowyear=mysql_fetch_array($queryear)) {?> <div class="box"> <div class="top"> <?php echo $yr=$rowyear['Y_LIST'];?> </div> <hr> <?php $querypak=mysql_query("select * from package"); while($rowpak=mysql_fetch_array($querypak)) {?> <div class="panel-body bottom"> <div class="box1"> <h4 style="color:red;" class="top1"><?php echo $pk=$rowpak['P_NAME'];?></h4> <div class="panel-body bottom1"> <table data-toggle="table" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-select-item-name="toolbar1" data-pagination="true" data-sort-name="name" data-sort-order="desc"> <thead> <tr> <th data-field="state" data-checkbox="true" >Item ID</th> <th data-field="id" data-sortable="true">Item ID</th> <th data-field="tim" data-sortable="true">Last Payment Date & Time</th> <th data-field="no" data-sortable="true">Application No</th> <th data-field="cname" data-sortable="true">Customer Name</th> <th data-field="status" data-sortable="true">View</th> <th data-field="del" data-sortable="true">Last Bill</th> <th data-field="del1" data-sortable="true">All Bills</th> </tr> </thead> <tbody> <?php $table = mysql_query("select * from newapplication where APP_DATE like '$yr-%-%' AND AP_SEL='$pk' AND AP_BILL!='' ORDER BY AP_BLDATE DESC"); $AP_ID=1; while($row=mysql_fetch_array($table)) { ?> <tr> <td></td> <td><?php echo $AP_ID;?></td> <? $time1 = strtotime($row['AP_BLDATE']); $myFormatForView = date("d/m/Y g:i A", $time1); ?> <td><?php echo $myFormatForView;?></td> <td><?php echo $row['AP_NO'];?></td> <td><?php echo $row['AP_NAME'];?></td> <td><a href= "mg_bill.php?AP_ID=<?php echo $row['AP_ID'];?>">View Bill</a></td> <td><a href="#" onclick="del(<?php echo $row['AP_ID'];?>)">Delete</a></td> <td><a href="#" onclick="del1(<?php echo $row['AP_ID'];?>)">Delete</a></td> </tr> <?php $AP_ID++; }?> </tbody> </table> </div> </div> </div> <? } ?> </div> <? } ?> </div> </div> <br> <hr> <br> </div> </div> <!--/.main--> </div> <script src="js/jquery-1.11.1.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/chart.min.js"></script> <script src="js/chart-data.js"></script> <script src="js/easypiechart.js"></script> <script src="js/easypiechart-data.js"></script> <script src="js/bootstrap-datepicker.js"></script> <script src="js/bootstrap-table.js"></script> <script> $(document).ready(function() { $('ul.subcat').hide(); $('li').click(function(event) { event.stopPropagation(); $('> ul', this).toggle(); }); }); </script> <script> $('.top').on('click', function() { $parent_box = $(this).closest('.box'); $parent_box.siblings().find('.bottom').hide(); $parent_box.find('.bottom').toggle(); }); $('.top1').on('click', function() { $parent_box = $(this).closest('.box1'); $parent_box.siblings().find('.bottom1').hide(); $parent_box.find('.bottom1').toggle(); }); </script> <style> .container .box { width:auto; max-width:900px; } .container .box .top { padding: 12px; background-color: blue; color: white; cursor: pointer; } .container .box .bottom { display: none; } .container .box1 { width:auto; max-width:900px; } .container .box1 .top1 { padding: 12px; background-color: blue; color: white; cursor: pointer; } .container .box1 .bottom1 { display: none; } </style> </body> </html> <? } else { $queryu=mysql_query("select * from admin where ID='1'"); $rowu=mysql_fetch_array($queryu); if($rowu) { $rowu['A_LOG']; $log = $rowu['A_LOG'] - 1; $upd_sts = mysql_query("UPDATE admin SET A_LOG ='$log' where ID='1'"); } header("Location: home.php"); } ?>
Simpan