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
/
View File Name :
mg_quota.php
<?php error_reporting(0); session_start(); include 'config.php'; $_POST['username']=$_SESSION['username']; $_POST['password']=$_SESSION['password']; $sql=mysqli_query($con,"select * from admin where USERNAME='".$_POST['username']."' and PASSWORD='".$_POST['password']."'"); if(mysqli_num_rows($sql)==1) { $QU_ID = $_GET['MEID']; $view = mysqli_query($con,"select * from quota where QU_ID = '".$QU_ID."'"); // for editing $datab = mysqli_fetch_array($view); date_default_timezone_set("Asia/Kolkata"); if($_GET['del_id']){ ?> <?php $del = mysqli_query($con,"delete from quota where QU_ID='".$_GET['del_id']."'"); //for deleting status if($del){?> <script> alert("Memeber quota deleted sucessfully"); window.location= "mg_quota.php"; </script> <?php } if(!$del){?> <script> alert("Memeber quota Not deleted sucessfully"); window.location= "mg_quota.php"; </script> <?php } } if($_POST['submit']){ $name = mysqli_real_escape_string($con,$_POST['name']); $num = mysqli_real_escape_string($con,$_POST['num']); $year = mysqli_real_escape_string($con,$_POST['year']); $basic = mysqli_real_escape_string($con,$_POST['basic']); $add = mysqli_real_escape_string($con,$_POST['add']); if($_GET['MEID']==""){ //for inserting new register $ins = mysqli_query($con,"insert into quota (QU_NAME,QU_NUM,QU_BASIC,QU_ADD,QU_YR) values ('$name','$num','$basic','$add','$year')"); if(ins){?> <script> alert("Inserted sucessfully"); </script><?php } } else { $upd = mysqli_query($con,"update quota set QU_NAME='$name',QU_NUM='$num',QU_BASIC='$basic',QU_ADD='$add',QU_YR='$year' WHERE QU_ID ='".$QU_ID."'"); if($upd){?> <script>alert("updated sucessfully"); window.location ="mg_quota.php" </script> <?php } } } ?> <!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", forced_root_block : 'p' 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" }); function cal(str,st1) { $.ajax({ type: "GET", url: "csgst.php?q="+str+"&state="+str1, success: function(result){ $("#taxvalue").html(result); } }); } function cal1(str) { document.getElementById("am1").enabled = true; document.getElementById("am2").disabled = true; $.ajax({ type: "GET", url: "igst.php?q="+str, success: function(result){ $("#taxvalue1").html(result); } }); } </script> <script> // for cancelling confirm function cancel(id){ var cancel = confirm("Are you sure Want to cancel"); if(cancel){ window.location.href = "mg_bill.php?SAI1="+id+"&NI_CANCEL=0"; } else{ window.location.href = "mg_bill.php"; } } </script> <script> function cust1(cid){ var cid1 = (escape(cid)); $.ajax({ type: "GET", url: "get_quota.php?cid="+cid1, success: function(result){ $("#custid").html(result); } }); } </script> <body> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a href="#"><button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </a> <a class="navbar-brand" href="#"><img src="../images/logo/thoa.png" style="width:50px;height:50px;margin-top:-10px;"> <b>THOA Menu</b></a> <ul class="user-menu"> <li class="dropdown pull-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="../images/team/6.jpg" style="border-radius:40%;width:35px;height:35px;"> MR. N.AHAMED THAMBI<span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="logou.php" style="color:red;"><span class="glyphicon glyphicon-off"></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> <?php 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">Manage Quota quota</li> </ol> </div><!--/.row--> <section class="content" > <div class="row"> <div class="col-lg-12"> <h2 class="page-header view1">To create Quota</h2> </div> </div><!--/.row--> <div class="row"> <!-- left column --> <div class="col-lg-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="form-group col-sm-10"> <div class="form-group col-sm-6"> <label for="exampleInputEmail1">Year:</label> <select class="form-control" id="year" name="year"> <?php if($QU_ID) {?> <option value="<?php echo $datab['QU_YR'];?>"><?php echo $datab['QU_YR'];?></option> <?php $queryear=mysqli_query($con,"select * from year ORDER BY Y_LIST DESC"); while($rowyear=mysqli_fetch_array($queryear)) {?> <option value="<?php echo $rowyear['Y_LIST'];?>"><?php echo $rowyear['Y_LIST'];?></option> <?php } } else {?> <?php $queryear=mysqli_query($con,"select * from year ORDER BY Y_LIST DESC"); while($rowyear=mysqli_fetch_array($queryear)) {?> <option value='<?php echo $rowyear['Y_LIST'];?>'<?php if($rowyear['Y_LIST']=='2019') echo ' selected'; ?>><?php echo $rowyear['Y_LIST'];?></option> <?php }}?> </select> </div> </div> <?php if($QU_ID) {?> <div class="form-group col-sm-10"> <div class="form-group col-sm-6"> <label for="exampleInputEmail1">Membership Name:</label> <input type="text" class="form-control" id="demo" name="name" value="<?php echo $datab['QU_NAME']; ?>" readonly> </div> <div class="form-group col-sm-6"> <label for="exampleInputEmail1">Membership Number:</label> <input type="text" class="form-control" id="demo" name="num" value="<?php echo $datab['QU_NUM']; ?>" readonly> </div> </div> <div class="form-group col-sm-10"> <div class="form-group col-sm-6"> <label for="exampleInputEmail1">Basic Quota: </label> <textarea class="form-control" rows="1" id="basic" name="basic"><?php echo $datab['QU_BASIC']; ?></textarea> </div> <div class="form-group col-sm-6"> <label for="exampleInputEmail1" >Additional Quota: </label> <textarea class="form-control" rows="1" id="add" name="add"><?php echo $datab['QU_ADD']; ?></textarea> </div> </div> <?php } else { ?> <div class="form-group col-sm-10"> <div class="form-group col-sm-6"> <label for="exampleInputEmail1">Membership Name:</label> <select class="form-control" onclick="cust1(this.value);" id="demo" name="name" required> <option value="">Select</option> <?php $querys=mysqli_query($con,"select * from list GROUP BY ME_NAME ORDER BY ME_NAME ASC"); while($rows=mysqli_fetch_array($querys)) {?> <option value="<?php echo $rows['ME_NAME'];?>"><?php echo $rows['ME_NAME'];?></option> <?php }?> </select> </div> </div> <div id="custid"> </div> <?php }?> <!-- <div class="form-group col-sm-10"> <div class="form-group col-sm-3"> <label for="exampleInputEmail1">Enter Taxable Amount: </label> <input type="text" class="form-control" id="tax" name="tax" onkeyup="cal(cost1.value,cost2.value,cost3.value,this.value)"> </div> </div> --> <div class="box-footer col-sm-10"> <button type="submit" name="submit" value="submit" class="btn btn-primary">Click here to generate</button> <hr> <br> </div> </form> </div> </div> </div> </div> </section> <hr> <div class="row" style="position: absolute;width:100%;"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading view1">Memebers quota</div> <div class="container"> <?php $queryear=mysqli_query($con,"select * from year ORDER BY Y_LIST DESC"); while($rowyear=mysqli_fetch_array($queryear)) {?> <div class="box"> <div class="top"> <?php echo $yr=$rowyear['Y_LIST'];?> </div> <hr> <div class="panel-body bottom"> <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="name1" data-sortable="true">MEMBERSHIP NUMBER</th> <th data-field="sname" data-sortable="true">TOUR NAME</th> <th data-field="status" data-sortable="true">Status</th> </tr> </thead> <tbody> <?php $table = mysqli_query($con,"select * from quota WHERE QU_YR='$yr' ORDER BY QU_ID DESC"); $SID=1; while($row=mysqli_fetch_array($table)) { ?> <tr> <td></td> <td><?php echo $SID;?></td> <td><?php echo $row['QU_NUM'];?></td> <td><?php echo $row['QU_NAME'];?></td> <td><a href= "mg_quota.php?MEID=<?php echo $row['QU_ID'];?>">Edit</a>/<a href="#" onclick="del(<?php echo $row['QU_ID'];?>)">Delete</a></td> </tr> <?php $SID++; }?> </tbody> </table> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <!--/.main--> <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(); }); }); function cal(str,str1,str2) { $.ajax({ type: "GET", url: "taxvalue.php?a1="+str+"&a2="+str1+"&a3="+str2, success: function(result){ $("#taxvalue").html(result); } }); } function cal1(str,str1) { document.getElementById("am1").enabled = true; document.getElementById("am2").disabled = true; $.ajax({ type: "GET", url: "igst.php?q="+str+"&state="+str1, success: function(result){ $("#taxvalue1").html(result); } }); } </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(); }); $("#cyes").hide(); function extra(val){ if(val == 'DD') { $("#cyes").show(); } else if(val == 'Cheque') { $("#cyes").show(); } else if(val == 'RTGS') { $("#cyes").show(); } else if(val != 'no'){ $("#cyes").hide(); } } function extra1(val){ if(val == 'yes'){ $("#pno").hide(); $("#pyes").show(); document.getElementById("am2").disabled = true; document.getElementById("am1").disabled = false; } else if(val == 'no'){ $("#pyes").hide(); $("#pno").show(); document.getElementById("am2").disabled = false; document.getElementById("am1").disabled = true; } } $("#pno").hide(); $("#pyes").hide(); </script> <script> function del(id){ var del = confirm("Are you sure Want to delete"); if(del){ window.location.href = "mg_quota.php?del_id="+id+"&del=1"; } else{ window.location.href = "mg_quota.php"; } } </script> <style> .container .box1 .top1 { padding: 12px; background-color: blue; color: white; cursor: pointer; } .container .box1 .bottom1 { display: none; } .container .box .top { padding: 12px; background-color: blue; color: white; cursor: pointer; } .container .box .bottom { display: none; } @media (min-width: 501px) and (max-width: 2000px){ .container .box { width:auto; max-width:900px; } .container .box1 { width:auto; max-width:900px; } } @media (min-width: 5px) and (max-width: 500px){ .container .box { width:100%; max-width:350px; } .container .box1 { width:100%; max-width:350px; } .view1 { font-size:14px; font-weight: bold; text-decoration: underline; } } </style> </body> </html> <?php } else { $queryu=mysqli_query($con,"select * from admin where ID='1'"); $rowu=mysqli_fetch_array($queryu); if($rowu) { $rowu['A_LOG']; $log = $rowu['A_LOG'] - 1; $upd_sts = mysqli_query($con,"UPDATE admin SET A_LOG ='$log' where ID='1'"); } header("Location: home.php"); } ?>