File manager - Edit - /home/autoph/public_html/voc/home/telephone_directory.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:490px; overflow:auto; border:0px solid red; } #submit_name{ width:30%; min-width:150px; margin:20px; padding:20px; } #name, textarea{ width:100%; } </style> </head> <body> <?php //echo "User Brand:". $userBrand; ?> <div style='border:1px solid gray;width:99%;height:865pxpx;float:left;margin:5px;min-width:600px;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;color:#043062'>SALES DIRECTORY <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=13&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=13&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="activeBrand" value="<?php echo $userBrand;?>"> <div id="comment_input_from" style='border:0px solid gray;background:white'> <h1 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding-left:5px;color:black'>SALES / FLEET SALES DIRECORTY</h1> <div style="float:left;width:60%;border:0px solid red;background:white;height:auto"> <div style="float:left;width:49%;border:0px solid red;background:white;height:auto"> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>BRAND:</b><br> <select id='myBrand' style='width:90%;min-width:150px;float:left;margin:5px'> <option value="0"></option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_brands` WHERE `b_status`='1' ORDER BY `b_name` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['b_name']."'>".$out['b_name']."</option>"; } ?> </select> </div> <div style="float:left;width:49%;border:0px solid red;background:white;height:auto"> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>NAME OF EMPLOYEE:</b><br> <input type="text" id="empName" placeholder="Name" style='width:90%;min-width:100px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> </div> <div style="float:left;width:60%;border:0px solid red;background:white;height:auto"> <div style="float:left;width:49%;border:0px solid red;background:white;height:auto"> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>PRIMARY MOBILE:</b><br> <input type="text" id="pMobile" placeholder="Mobile Number" style='width:90%;min-width:150px;float:left;margin:5px'"> </div> <div style="float:left;width:49%;border:0px solid red;background:white;height:auto"> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>SECONDARY MOBILE:</b><br> <input type="text" id="sMobile" placeholder="Mobile Number" style='width:90%;min-width:100px;float:left;margin:5px'"> </div> </div> <div style="float:left;width:60%;border:0px solid red;background:white;height:auto"> <div style="float:left;width:49%;border:0px solid red;background:white;height:auto"> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>E-MAIL:</b><br> <input type="text" id="emailAdd" placeholder="E-mail Address" style='width:90%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style="float:left;width:49%;border:0px solid red;background:white;height:auto"> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal'>POSITION:</b><br> <select id='myPosition' style='width:90%;min-width:150px;float:left;margin:5px'> <option value="0"></option> <?php $optionSQL=mysql_query("SELECT * FROM `db_positions` WHERE `status`='1' ORDER BY `position_title` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['position_title']."'>".$out['position_title']."</option>"; } ?> </select> </div> </div> <div style="float:left;width:100%;border-bottom:2px solid gray;background:white;height:auto;padding:20px;"> <input type="submit" id="submit_name" value="SAVE NEW CONTACT" style='margin:5px;margin-left:10px;font-size:14px;font-weight:bold;font-family:Verdana'> </div> </div> <div id="display_area"> <?php $result = mysql_query("SELECT * FROM telephone_directory WHERE `brand_name`='$userBrand' ORDER BY `brand_name` DESC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th>BRAND</th> <th>NAME</th> <th>PRIMARY MOBILE</th> <th>SECONDARY MOBILE</th> <th>E-MAIL</th> <th>POSITION</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ echo "<tr>"; echo "<td>".$row['brand_name']."</td>"; echo "<td>".$row['u_name']."</td>"; echo "<td>".$row['mobile_a']."</td>"; echo "<td>".$row['mobile_b']."</td>"; echo "<td>".$row['e_mail']."</td>"; echo "<td>".$row['position']."</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 myPosition = $("#myPosition").val(); var emailAdd = $("#emailAdd").val(); var sMobile = $("#sMobile").val(); var pMobile = $("#pMobile").val(); var empName = $("#empName").val(); var myBrand = $("#myBrand").val(); var activeBrand = $("#activeBrand").val(); if (myPosition == "") { alert("Company Name must be selected first"); return false; } if (emailAdd == "") { alert("Dealer / Office name is a required filed"); return false; } if (pMobile == "") { alert("Dealership Address must be filled up"); return false; } $.ajax({ url: "save_new_directory_contact.php", type: "POST", async: false, data: { "done": 1, "myPosition" : myPosition, "emailAdd" : emailAdd, "sMobile" : sMobile, "pMobile" : pMobile, "myBrand" : myBrand, "activeBrand" : activeBrand, "empName" : empName }, success: function(d){ alert("New Record Saved."); //displayFromDatabase(); $('#myPosition').val(''); $('#emailAdd').val(''); $('#sMobile').val(''); $('#pMobile').val(''); $('#myBrand').val(''); $('#empName').val(''); $("#display_area").html(d); } }) }); }); //retrieve and display function displayFromDatabase(){ $.ajax({ url: "save_new_directory_contact.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