File manager - Edit - /home/autoph/public_html/connect/home/add_locations.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:580px; overflow:auto; border:0px solid gray; } #submit_name{ width:30%; min-width:150px; margin:20px; padding:20px; } #name, textarea{ width:100%; } </style> </head> <body> <h1 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding-left:5px;color:black'>Add New Location</h1> <div class='bgColor' style='background:lightgray;border:1px solid gray;width:99%;height:95%;height:840px;float:left;margin:5px;min-width:600px'> <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;color:#043062'>Location Information: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=16&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=16&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> <input type="hidden" id="addBy" value="<?php echo $userID;?>"> <input type="hidden" id="addDate" value="<?php echo $toDate;?>"> <div style='border:0px solid red;width:98%;margin:10px;float:left;min-width:500px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Name of New Location:</b><br> <input type="text" id="location" placeholder="Location Name" style='width:30%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:98%;margin:10px;float:left;min-width:500px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Location Description:</b><br> <input type="text" id="desc" placeholder="Location Description" style='width:30%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:100%;margin:5px;float:left;min-width:500px;'> <input type="submit" id="submit_name" value="ADD NEW LOCATION" style='margin:5px;margin-left:10px;font-size:14px;font-weight:bold;font-family:Verdana'> </div> <div id="display_area"> <?php $result = mysql_query("SELECT * FROM vts_check_out_reasons WHERE `out_status`=1 AND `code`='OUT' ORDER BY `out_description` ASC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th>CODE</th> <th>LOCATION NAME</th> <th>DESCRIPTION</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ echo "<tr>"; echo "<td>".$row['out_id']."</td>"; echo "<td>".$row['out_description']."</td>"; echo "<td>".$row['loc_description']."</td>"; echo "</tr>"; } echo "</table>"; ?> </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"); }); //alert("Its working"); $("#submit_name").click(function(){ var location = $("#location").val(); var desc = $("#desc").val(); var addBy = $("#addBy").val(); var addDate = $("#addDate").val(); if (location == "") { alert("Invalid Entry. Please check required information."); return false; } if (desc == "") { alert("Invalid Entry. Please check required information."); return false; } $.ajax({ url: "sub_add_location.php", type: "POST", async: false, data: { "done": 1, "desc" : desc, "location" : location, "addDate" : addDate, "addBy" : addBy }, success: function(data){ alert("New Record Saved."); displayFromDatabase(); $('#desc').val(''); $('#location').val(''); } }) }); }); //retrieve and display function displayFromDatabase(){ $.ajax({ url: "sub_add_location.php", type: "POST", async: false, data: { "display": 1 }, success: function(d){ $("#display_area").html(d); } }); } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings