UnknownSec Bypass
403
:
/
var
/
www
/
cotutilitydash
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
manage_area.php
<?php include "header.php"?> <?php include "sidemenu.php"?> <div id="page-wrapper"> <div class="col-md-12 graphs"> <div class="xs"> <h3>Manage Area</h3> <div class="well1 white"> <input type="hidden" class="form-control1" id="hdid" name="hdid"> <fieldset> <div class="form-group"> <label class="control-label">Area Name</label> <input type="text" id="txtareaname" name="txtareaname" class="form-control1 ng-invalid ng-invalid-required ng-touched" required=""> </div> <div class="form-group"> <button type="submit" id="btnsave" onclick="curdarea();" class="btn btn-primary">SAVE</button> <button type="submit" class="btn btn-default" id="btnreset" onclick="clearall();">Reset</button> </div> </fieldset> </div> <div class="bs-example4 tab-content" data-example-id="simple-responsive-table"> <h3>Area List</h3> <div class="table-responsive"> <?php $sql= "SELECT id,area,case when isdeleted=0 then 'ACTIVE' else 'DEACTIVE' end as status from mastertb where identifier='1' order by id DESC"; $result=mysqli_query($conn, $sql) or die("Query Failed."); if (mysqli_num_rows($result)>0) { ?> <table id="studtable" class="table table-striped table-bordered"> <thead> <tr> <th>No.</th> <!-- <th>ID</th> --> <th>Area Name</th> <th>Status</th> <th></th> <th></th> </tr> </thead> <tbody> <?php $serial= 1; while ($row = mysqli_fetch_assoc($result)) { ?> <tr> <td><?php echo $serial ?></td> <!-- <td><?php echo $row['id']; ?></td> --> <td> <?php echo $row['area']; ?> </td> <td> <?php echo $row['status']; ?> </td> <td align="center"> <a href="#" onclick="edit(<?php echo $row['id']; ?>);" style="corsor:pointer"><i class=" glyphicon glyphicon-pencil"></i></a> <a </td> <td align="center"> <a href="#" onclick="remove(<?php echo $row['id']; ?>);"><i class="glyphicon glyphicon-trash"></i></a> </td> </tr> <?php $serial++; } } ?> </tbody> </table> </div><!-- /.table-responsive --> </div> </div> <script> $(document).ready(function() { checkpermission(); $("#studtable").DataTable({ bLengthChange: true, "iDisplayLength": 10, bInfo: false, responsive: true, "bAutoWidth": false }); }); function clearall() { $('#hdid').val(""); $('#txtareaname').val(""); document.getElementById("btnsave").innerHTML = "SAVE"; checkpermission(); } function remove(id) { var id = id; var identifier=1; try { var urlgetcode = 'get_arealist.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&id=' + id +'&identifier=' + identifier, dataType: 'json', async: true, cache: false, success: function(data) { $('#hdid').val(data.parcode); $('#txtareaname').val(data.parname); if (data.status == 0) { document.getElementById("btnsave").innerHTML = "DEACTIVE"; } else { document.getElementById("btnsave").innerHTML = "ACTIVE"; } checkpermission(); }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } return; } function checkpermission() { var formname = "manage_area.php"; try { var urlgetcode = 'get_permissiondetails.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&formname=' + formname, dataType: 'json', async: true, cache: false, success: function(data) { var btntext = document.getElementById("btnsave").innerHTML; if (btntext == "SAVE") { if (data.add == 0) { $(btnsave).prop("disabled", true); alert( "You do not have permission to add area please contact to administrator"); return; } else { $(btnsave).prop("disabled", false); } } else if (btntext == "UPDATE") { if (data.edit == 0) { $(btnsave).prop("disabled", true); alert( "You do not have permission to edit area please contact to administrator"); return; } else { $(btnsave).prop("disabled", false); } } else if (btntext == "DEACTIVE") { if (data.delete == 0) { $(btnsave).prop("disabled", true); alert( "You do not have permission to deactive area please contact to administrator"); return; } else { $(btnsave).prop("disabled", false); } } else if (btntext == "ACTIVE") { if (data.delete == 0) { $(btnsave).prop("disabled", true); alert( "You do not have permission to active area please contact to administrator"); return; } else { $(btnsave).prop("disabled", false); } } }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } return; } function edit(id) { var id = id; var identifier=1; try { var urlgetcode = 'get_arealist.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&id=' + id+'&identifier=' + identifier, dataType: 'json', async: true, cache: false, success: function(data) { $('#hdid').val(data.parcode); $('#txtareaname').val(data.parname); document.getElementById("btnsave").innerHTML = "UPDATE"; checkpermission(); }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } return; } function curdarea() { var flag = true; var inputField1 = document.getElementById("txtareaname"); if (inputField1.value == "") { flag = false; alert("Please enter area."); document.getElementById("txtareaname").focus(); return false; } var area = document.getElementById("txtareaname").value; var id = document.getElementById("hdid").value; var btnopration = document.getElementById("btnsave").innerHTML; var identifier = 1; try { if (flag == true) { var text = "Do you want to " + btnopration + " the area"; if (confirm(text) == false) { flag = false; return false; } var urlgetcode = 'mst_curd_area.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&area=' + area + '&id=' + id + '&btnopration=' + btnopration + '&identifier=' + identifier, dataType: 'json', async: true, cache: false, success: function(data) { alert(data); window.location.href = "manage_area.php"; $('#hdid').val(""); $('#testdepartmentname').val(""); }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <?php include "footer.php"?>
Copyright © 2025 - UnknownSec