File manager - Edit - /home/autoph/public_html/connect/home/time_slots.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 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:0px solid gray;width:100%;height:100%;float:left;margin:0px;min-width:400px;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'> Time Slot Setup: <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 id="display_area" style='height:500px;display:none;border:0px solid blue'> </div> <!-- ============================================================================ --> <!-- ============================================================================ --> <div id="addForm" style='display:block;z-index:9999;margin-top:0px;height:500px;border:0px solid red;width:100%'> <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 class ="subBody" style='background:white;border:1px solid gray; width:40%;margin:5px;float:left;min-width:400px;height:97%'> <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'> ✛ Service Capacity Setup <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=003&d=10' 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:40%;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'>Time Slot:</b><br> <input type="text" id="tSlot" placeholder="8:00 AM/PM" 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'>Capacity:</b><br> <input type="number" id="tCapacity" min="1" placeholder="" style='text-align:center;width:50%;margin:5px;font-family:Calibri;font-size:24px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:95%;margin:10px;float:left;min-width:100px'> <hr> </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> <div id="viewIfExist" class ="subBody" style='background:white;border:1px solid gray; width:58%;margin:5px;float:left;min-width:400px;height:97%;overflow:auto'> <div class='bgColor' style='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'> ✛ Active Time Slot: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=003' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> </div> <?php if(isset($_GET['xID'])== true){ $myXID =$_GET['xID']; mysql_query("UPDATE `vts_service_slots` SET `active`='0' WHERE `slot_id` = '$myXID'"); } $result = mysql_query("SELECT * FROM vts_service_slots WHERE `deal_id`='$dealID' AND `active` = 1 ORDER BY `slot_id` ASC"); echo "<table style='width:100%;border:0px solid red;border-collapse:collapse'>"; echo "<thead> <tr> <th>TIME SLOT</th> <th>CAPACITY</th> <th>EFFECTIVITY DATE</th> <th style='text-align:center'>-</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ echo "<tr>"; echo "<td>".$row['time_slot']."</td>"; echo "<td style='text-align:center;'>".$row['time_slot_capacity']."</td>"; echo "<td>".$row['date_added']."</td>"; echo "<td style='text-align:center;'><a href='mainindex.php?id=003&d=10&x=true&xID=".$row['slot_id']."' style='font-size:12px;color:red'>✕</a></td>"; echo "</tr>"; } echo "</table>"; if(isset($_GET['xID'])== true){ echo "<p style='padding:10px'>Record No. ".$_GET['xID']." has been deleted...</p>"; } ?> </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============================================================================ tCapacity tSlot sCompID sDealID svDate svTime svUserID $("#SaveNewUser").click(function(){ var tSlot = $("#tSlot").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); var svDate = $("#svDate").val(); var svTime = $("#svTime").val(); var svUserID = $("#svUserID").val(); var tCapacity = $("#tCapacity").val(); if (tSlot == "") { alert("Please input your username..."); return false; } if (tCapacity == "") { alert("Please input your Assigned Employy Number..."); return false; } $.ajax({ url: "add_time_slot.php", type: "POST", async: false, data: { "done": 1, "tSlot" : tSlot }, success: function(data){ //alert("New Record Saved."); displayCheckMsg(); } }) }); //DISPLAY MESSAGE IF USER EXIST================= function displayCheckMsg(){ var tSlot = $("#tSlot").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); var svDate = $("#svDate").val(); var svTime = $("#svTime").val(); var svUserID = $("#svUserID").val(); var tCapacity = $("#tCapacity").val(); $.ajax({ url: "add_time_slot.php", type: "POST", async: false, data: { "sCompID" : sCompID, "sDealID" : sDealID, "svDate" : svDate, "svTime" : svTime, "svUserID" : svUserID, "tCapacity" : tCapacity, "tSlot" : tSlot, "display" : 1 }, success: function(d){ $("#viewIfExist").html(d); $('#tSlot').val(''); $('#tCapacity').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.04 |
proxy
|
phpinfo
|
Settings