File manager - Edit - /home/autoph/public_html/voc/home/user_lists.php
Back
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .loader { border: 16px solid #f3f3f3; border-radius: 50%; border-top: 16px solid blue; border-bottom: 16px solid blue; width: 120px; height: 120px; -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <title></title> <style type="text/css"> body{ background:#fafcfc; } a{ text-decoration:none; } } #wrapper{ width:50%; height:auto; margin:10px auto; border:1px solid #cbcbcb; background:white; } #comment_input_from li{ list-style-type:none; margin:5px auto; } #comment_input_from{ width:100%; margin:0px; background: #dde2e4 ; padding:10px; } #display_area{ width:100%; margin:00px auto; background:#fafcfc; padding:2px; height:200px; overflow:auto; border:0px solid gray; } #submit_name{ width:30%; min-width:150px; margin:20px; padding:20px; } #name, textarea{ width:100%; } </style> </head> <!----==============================================================-----> <script> function showUser(str) { if (str == "") { document.getElementById("uDealer").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("uDealer").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","load_dealer_by_company.php?q="+str,true); xmlhttp.send(); } } </script> <!----==============================================================-----> <script type="text/javascript"> function showAdd() { var div = document.getElementById("addForm"); var divD= document.getElementById("display_area"); if (div.style.display == 'none') { div.style.display = ''; divD.style.display = 'none'; } else { divD.style.display = 'none'; } } function showDisplayArea() { var divA = document.getElementById("addForm"); var divD = document.getElementById("display_area"); if (divD.style.display == 'none') { divD.style.display = ''; divA.style.display = 'none'; } else { divD.style.display = ''; divA.style.display = 'none'; } } function viewList() { var div = document.getElementById("details_div"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } </script> <body> <div style='border:1px solid gray;width:100%;height:100%;float:left;margin:0px;min-width:800px;background:white'> <div class='bgColor' style='vertical-align:top;height:35px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:18px;color:#043062'> User's Database: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=14&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=14&ex=true' class='hideClick hidden' > ✉ </a> <!--EXTRACT LIST OF COMPANY AND EXPORT TO EXCEL--> <a href='mainindex.php?id=1' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> </div> <div style='border-bottom:1px solid gray;width:100%;min-width:400px'> <div style='border:0px solid red;border-bottom:1px solid gray;background:lightgray;padding:5px;height:60px;width:100%;margin:0px;float:left;min-width:150px'> <input type="text" id="searchString" placeholder="Search based on LastName, First Name, E-mail, Mobile" style='width:30%;min-width:100px;float:left;margin:5px;margin-right:-5px;border-right:0px solid red' onkeyup="this.value = this.value.toUpperCase();"> <input onclick="showDisplayArea()" type="submit" id="submit_name" value="Search..." style="width:10%;margin:0px;float:left;height:38px;padding:3px;margin:5px;border-radius:0px 3px 3px 0px;"> <input type="submit" id="submit_view_reports" value="☰ Reports" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" id="submit_view_list" value="☳ View List" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" id="submit_import" value="≚ Import" onclick="showImport()" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" id="submit_export" value="≙ Export" onclick="showExport()" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> <input type="submit" onclick="showAdd()" id="submit_add_new" value="✛ Add New" style="width:8%;margin:0px;float:right;height:30px;padding:3px;margin:2px;border-radius: 0px;"> </div> </div> <!-- ============================================================================ --> <!-- ============================================================================ --> <div id="display_area" style='height:500px;display:none;border:0px solid blue'> </div> <!-- ============================================================================ --> <!-- ============================================================================ --> <div id="addForm" style='display:block;z-index:9999;margin-top:58px;height:500px;border:0px solid red'> <input type="hidden" id="sCompID" value="<?php echo $compID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="sDealID" value="<?php echo $dealID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svDate" value="<?php echo $toDate;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svTime" value="<?php echo $myCurTime;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="hidden" id="svUserID" value="<?php echo $userID;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <div style='background:white;border:1px solid gray; width:99.3%;margin:5px;float:left;min-width:400px;height:100%'> <div class='bgColor' style='background:lightgray;vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:14px;color:#043062'> ✛ Add New User <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=23&d=4' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='#' onclick="showAdd()" style='font-weight:bold'> ✕ </a> </div> </div> <div style='border:0px solid red;width:20%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Username:</b><br> <input type="text" id="uName" placeholder="" style='width:98%;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>First Name:</b><br> <input type="text" id="uFname" placeholder="" style='width:98%;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Last Name:</b><br> <input type="text" id="uLname" placeholder="" style='width:98%;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:20%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Employee ID:</b><br> <input type="text" id="uEmpID" placeholder="" style='width:98%;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Position / Title:</b><br> <input type="text" id="uTitle" placeholder="" style='width:98%;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Mobile Number:</b><br> <input type="text" id="uMobile" placeholder="" style='width:98%;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:25%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Email Address:</b><br> <input type="text" id="uEmail" placeholder="" style="width:98%;margin:5px"> </div> <div style='border:0px solid red;width:25%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Company:</b><br> <select id='uCompany' style='width:98%;margin:5px' onchange="showUser(this.value)" > <?php $getRight=mysql_query("SELECT * FROM `vts_company` WHERE `comp_status`='1' order by `comp_name` ASC "); while($aRow=mysql_fetch_array($getRight)){ echo "<option value=".$aRow['comp_id'].">".$aRow['comp_name']."</option>"; } ?> </select> </div> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Dealership:</b><br> <select id='uDealer' style='width:98%;margin:5px'> </select> </div> <div style='border:0px solid red;width:25%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Password:</b><br> <input type="password" id="uPassA" placeholder="" style="width:98%;margin:5px"> </div> <div style='border:0px solid red;width:25%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Confirm Password:</b><br> <input type="password" id="uPassB" placeholder="" style='width:98%;margin:5px'> </div> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal;margin-left:5px'>Role:</b><br> <select id='uRole' style='width:98%;margin:5px'> <?php $getRight=mysql_query("SELECT * FROM `vts_access_privilege` WHERE `a_status`='1' order by `a_desc` ASC "); while($aRow=mysql_fetch_array($getRight)){ echo "<option value=".$aRow['a_id'].">".$aRow['a_desc']."</option>"; } ?> </select> </div> <br> <div style='border:0px solid red;width:30%;margin:10px;float:left;min-width:100px;background:transparent'> <input type='submit' id='SaveNewUser' value="Save Record" style="width:150px"> </div> <div id="viewIfExist" style='padding:10px;height:30px;border:0px solid red;width:50%;margin:10px;float:left;min-width:100px;background:transparent;font-family:Calibri;font-size:18px;color:red'> </div> </div> </div> </div> </body> </html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="wait" style="display:none;width:69px;height:89px;border:0px solid red;position:absolute;top:50%;left:50%;padding:2px;"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading..</div> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //loading gif animator during query or page load $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); //====================//CHECK IF USER ALREADY EXIST IN THE DATABASE============================================================================ //START OF FUNCTION================= SAVING NEW RECORD $("#save_new_db").click(function(){ var svViber = $("#svViber").val(); var svFB = $("#svFB").val(); var svsMobile = $("#svsMobile").val(); var svEmail = $("#svEmail").val(); var svMunicipality = $("#svMunicipality").val(); var svCity = $("#svCity").val(); var svHomeAddress = $("#svHomeAddress").val(); var svBday = $("#svBday").val(); var svGender = $("#svGender").val(); var svLname = $("#svLname").val(); var svFname = $("#svFname").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); var svDate = $("#svDate").val(); var svTime = $("#svTime").val(); var svUserID= $("#svUserID").val(); if (svLname == "") { alert("Error: Please input Lastname"); return false; } if (svFname == "") { alert("Error: Please input Firsname"); return false; } if (svsMobile == "") { alert("Error: Please input Mobile Number"); return false; } if (svEmail == "") { alert("Error: Please input E-mail Address"); return false; } $.ajax({ url: "sub_add_new_customer.php", type: "POST", async: false, data: { "done": 1, "svViber" : svViber, "svFB" : svFB, "svsMobile" : svsMobile, "svEmail" : svEmail, "svMunicipality" : svMunicipality, "svCity" : svCity, "svHomeAddress" : svHomeAddress, "svBday" : svBday, "svGender" : svGender, "svLname" : svLname, "svFname" : svFname, "sCompID" : sCompID, "sDealID" : sDealID, "svDate" : svDate, "svTime" : svTime, "svUserID": svUserID }, success: function(data){ alert("New Record Saved."); displayFromDatabase(); $('#svFname').val(''); $('#svLname').val(''); $('#svsMobile').val(''); $('#svEmail').val(''); $('#svHomeAddress').val(''); $('#svCity').val(''); } }) }); //====================//CHECK IF USER ALREADY EXIST IN THE DATABASE============================================================================ $("#SaveNewUser").click(function(){ var uName = $("#uName").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); var svDate = $("#svDate").val(); var svTime = $("#svTime").val(); var svUserID = $("#svUserID").val(); var uFname = $("#uFname").val(); var uLname = $("#uLname").val(); var uMobile = $("#uMobile").val(); var uEmail = $("#uEmail").val(); var uPassB = $("#uPassB").val(); var uPassA = $("#uPassA").val(); var uRole = $("#uRole").val(); var uTitle = $("#uTitle").val(); var uEmpID = $("#uEmpID").val(); if (uName == "") { alert("Please input your username..."); return false; } if (uEmpID == "") { alert("Please input your Assigned Employy Number..."); return false; } if (uFname == "") { alert("First Name is a required field..."); return false; } if (uLname == "") { alert("Last Name is a required field..."); return false; } if (uEmail == "") { alert("E-mail is a required field..."); return false; } if (uMobile == "") { alert("Mobile Number is a required field..."); return false; } if (uPassA != uPassB) { alert("Error! Invalid Password or password didn't matched. Please re-type your password"); return false; } $.ajax({ url: "user_check_if_exist.php", type: "POST", async: false, data: { "done": 1, "uName" : uName }, success: function(data){ //alert("New Record Saved."); displayCheckMsg(); } }) }); //DISPLAY MESSAGE IF USER EXIST================= function displayCheckMsg(){ var uName = $("#uName").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); var svDate = $("#svDate").val(); var svTime = $("#svTime").val(); var svUserID = $("#svUserID").val(); var uFname = $("#uFname").val(); var uLname = $("#uLname").val(); var uMobile = $("#uMobile").val(); var uEmail = $("#uEmail").val(); var uPassB = $("#uPassB").val(); var uPassA = $("#uPassA").val(); var uRole = $("#uRole").val(); var uTitle = $("#uTitle").val(); var uEmpID = $("#uEmpID").val(); $.ajax({ url: "user_check_if_exist.php", type: "POST", async: false, data: { "uName" : uName, "uEmpID" : uEmpID, "sCompID" : sCompID, "sDealID" : sDealID, "svDate" : svDate, "svTime" : svTime, "uTitle" : uTitle, "svUserID" : svUserID, "uFname" : uFname, "uLname" : uLname, "uMobile" : uMobile, "uEmail" : uEmail, "uPassB" : uPassB, "uPassA" : uPassA, "uRole" : uRole, "display" : 1 }, success: function(d){ $("#viewIfExist").html(d); $('#uName').val(''); $('#uFname').val(''); $('#uLname').val(''); $('#uMobile').val(''); $('#uEmail').val(''); $('#uPassA').val(''); $('#uPassB').val(''); $('#uRole').val(''); $('#uTitle').val(''); $('#uEmpID').val(''); } }); } //====================//CHECK IF USER ALREADY EXIST IN THE DATABASE============================================================================ }); </script> <script type="text/javascript"> $(document).ready(function(){ //loading gif animator during query or page load $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); //START OF FUNCTION================= SAVING NEW RECORD $("#submit_name").click(function(){ var searchString = $("#searchString").val(); if (searchString == "") { alert("Error: Invalid Input Data"); return false; } $.ajax({ url: "search_load_found_users.php", type: "POST", async: false, data: { "done": 1, "searchString": searchString }, success: function(data){ displayFromDatabase(); $('#searchString').val(''); } }) }); //END OF FUNCTION================= }); function displayFromDatabase(){ var searchString = $("#searchString").val(); $.ajax({ url: "search_load_found_users.php", type: "POST", async: false, data: { "searchString": searchString, "display": 1 }, success: function(d){ $("#display_area").html(d); } }); } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings