File manager - Edit - /home/autoph/public_html/connect/home/add_dealer.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:500px; 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 Dealerships</h1> <i style='font-family:Verdana;font-size:10px;color:gray;padding-left:5px'>You need to setup Dealer's Information before you can proceed with other transactions. You can also setup dealer's service area capacity and monthly UR's target for comprehensive data analytics</i> <div style='border:1px solid gray;width:99%;height:826px;min-height:540px;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'>Dealership Information: <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> <div id="comment_input_from" style='border-bottom:1px solid gray'> <div style='border:0px solid red;width:50%;margin:5px;float:left;min-width:150px'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Select Company:</b><br> <select id='company' style='width:100%;min-width:150px;float:left;margin:5px'> <option value="0"></option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_company` WHERE `comp_status`='1' ORDER BY `comp_name` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['comp_id']."'>".$out['comp_name']."</option>"; } ?> </select> </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:48%;margin:5px;float:right;min-width:150px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Dealer Code:</b><br> <input type="text" id="dealCode" placeholder="Dealer Code" style='width:98%;min-width:100px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:50%;margin:5px;float:left;min-width:150px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Dealer/Office Name:</b><br> <input type="text" id="dealName" placeholder="Name of Dealership/Office" style='width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:48%;margin:5px;float:right;min-width:150px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Contact Information:</b><br> <input type="text" id="contact" placeholder="Contact Information" style='width:98%;min-width:100px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:50%;margin:5px;float:left;min-width:150px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>City/Municipality:</b><br> <input type="text" id="address" placeholder="Office/Dealer Address" style='width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:48%;margin:5px;float:right;min-width:150px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-right:5px;font-weight:normal'>Office Address:</b><br> <input type="text" id="location" placeholder="Location (City / Municipality)" style='width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div><br> <input type="submit" id="submit_name" value="ADD NEW DEALER" 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_dealerships WHERE `deal_status`=1 ORDER BY `date` DESC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th>CODE</th> <th>COMPANY</th> <th>DEALERSHIP</th> <th>ADDRESS</th> <th>CITY</th> <th>STATUS</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ echo "<tr>"; echo "<td>".$row['deal_code']."</td>"; echo "<td>"; $compCode = mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='".$row['comp_id']."'"),0); echo $compCode; echo "</td>"; echo "<td>".$row['deal_name']."</td>"; echo "<td>".$row['deal_address']."</td>"; echo "<td>".$row['deal_city']."</td>"; echo "<td>"; if($row['deal_status']==1){echo 'Active';}else{echo 'InActive';} echo"</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 dealCode = $("#dealCode").val(); var dealName = $("#dealName").val(); var address = $("#address").val(); var location = $("#location").val(); var contact = $("#contact").val(); var company = $("#company").val(); var addBy = $("#addBy").val(); var addDate = $("#addDate").val(); if (company == "") { alert("Company Name must be selected first"); return false; } if (dealName == "") { alert("Dealer / Office name is a required filed"); return false; } if (address == "") { alert("Dealership Address must be filled up"); return false; } $.ajax({ url: "sub_add_dealer.php", type: "POST", async: false, data: { "done": 1, "dealCode" : dealCode, "dealName" : dealName, "address" : address, "location" : location, "contact" : contact, "addDate" : addDate, "addBy" : addBy, "company": company }, success: function(data){ alert("New Record Saved."); displayFromDatabase(); $('#dealCode').val(''); $('#dealName').val(''); $('#address').val(''); $('#contact').val(''); $('#location').val(''); $('#company').val(''); } }) }); }); //retrieve and display function displayFromDatabase(){ $.ajax({ url: "sub_add_dealer.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