File manager - Edit - /home/autoph/public_html/voc/home/add_new_service_appointment.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> <!-- CODE FOR MODEL DROPDOWN AUTO Loading --> <script> function showUser(str) { if (str == "") { document.getElementById("para").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("para").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","add_new_appointment_load_model.php?q="+str,true); xmlhttp.send(); } } </script> <!-- CODE FOR MODEL DROPDOWN AUTO Loading --> <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:255px; overflow:auto; border:0px solid gray; } #submit_name{ width:30%; min-width:150px; margin:20px; padding:20px; } #name, textarea{ width:100%; } .vertical-menu { width: 250px; background-color: #e0f5fa ; } </style> </head> <?php if(isset($_GET['appt_import'])){ echo "<div style='width:500px;padding:0px;border:1px solid gray;height:250px;position:absolute;top:10px;left:10px;z-index:99999;background:white'>"; ?> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;color:#043062'>Upload New Service Appointment (CSV Format): <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=11' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> <?php include 'import_appointment_csv.php';?> </div> <?php echo "</div>"; } ?> <body> <div id="display_area" style='background:transparent;text-align:center;position:relative;width:500px;height:50px;float:right;font-family:Verdana;font-size:15px;color:red;border:0px solid red;padding:10px'> </div> <h1 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding-left:5px;color:black'>Add Service Appointment</h1> <i style='font-family:Verdana;font-size:10px;color:gray;padding-left:5px'>This module will allow you to Add, Edit or Delete service appointment to the system. </i> <div style='border:1px solid gray;width:99%;height:95%;min-height:540px;float:left;margin:5px;background:white'> <div class='bgColor' style='vertical-align:top;height:25px;margin:0px;width:100%;border-bottom:1px solid gray;padding:2px;padding-right:5px;font-family:Verdana;font-weight:normal;color:#043062'>Calendar: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=11&appt_import=import' alt="Import Appointment from CSV" style='font-family:Verdana;font-size:12px;' > Import ✫ </a><!--IMPORT--> <a href='expot_appointment_to_excel.php' alt="Export Appointment from CSV" style='font-family:Verdana;font-size:12px;' > Export ✫ </a><!--E--> <a href='#' style='font-family:Verdana;font-size:12px;' onclick="viewList()" > View </a> <!--EXTRACT LIST OF COMPANY AND EXPORT TO EXCEL--> <a href='mainindex.php?id=11' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> </div> <div style='width:100%;padding:5px;margin-left:0px;margin-top:0px;border-top:1px solid #9ea5a5;background-color:#f1f5f5'> <div style='min-width:400px;position:relative;float:left;border:1px solid gray;width:50%;height:100%;background:lightgray'> <?php $monthNames = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); if (!isset($_REQUEST["month"])) $_REQUEST["month"] = date("n"); if (!isset($_REQUEST["year"])) $_REQUEST["year"] = date("Y"); $cMonth = $_REQUEST["month"]; $cYear = $_REQUEST["year"]; $prev_year = $cYear; $next_year = $cYear; $prev_month = $cMonth-1; $next_month = $cMonth+1; if ($prev_month == 0 ) { $prev_month = 12; $prev_year = $cYear - 1; } if ($next_month == 13 ) { $next_month = 1; $next_year = $cYear + 1; } ?> <table width="100%" style='border:1px solid white'> <tr> <td align="center" style="color:#FFFFFF;height:40px;background:#fff;border:0px solid blue"> <table width="100%" style='border:0px solid red'> <tr align="center" style='background:gray'> <td valign='top' bgcolor="white" style="background:white;border:0px solid blue;color:#FFFFFF;height:40px"> <table width="100%" style='background:red'> <tr> <td width="20%" align="center" style='padding:0px;maring:0px;border:0px solid white'> <a href="<?php echo $_SERVER["PHP_SELF"] . "?id=11&month=". $prev_month . "&year=" . $prev_year . "&view=tasks"; ?>" style="color:blue;font-size:35px;;text-decoration:none"> ⇽ </a></td> <td valign='middle' width="60%" align='center' style="border:0px solid white;color:blue;font-size:20px;font-weight:bold"><?php echo $monthNames[$cMonth-1].' '.$cYear; ?> </td> <td width="20%" align="center" style=' border:0px solid white'> <a href="<?php echo $_SERVER["PHP_SELF"] . "?id=11&month=". $next_month . "&year=" . $next_year . "&view=tasks"; ?>" style="color:blue;font-size:35px;text-decoration:none">⇾</a> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="center" style="color:#000;height:360px;background:#fff;border:0px solid red"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign='middle' bgcolor="#086A87" style="width:12.5%;color:#f00;font-size:11px;background:#F5BCA9;padding-left:5px;height:30px">Sunday</td> <td align="left" valign='middle' bgcolor="#086A87" style="width:15%;color:#00f;font-size:11px;background:#58FA82;padding-left:5px">Monday</td> <td align="left" valign='middle' bgcolor="#999999" style="width:15%;color:#00f;font-size:11px;background:#58FA82;padding-left:5px">Tuesday</td> <td align="left" valign='middle' bgcolor="#999999" style="width:15%;color:#00f;font-size:11px;background:#58FA82;padding-left:5px">Wednesday</td> <td align="left" valign='middle' bgcolor="#999999" style="width:15%;color:#00f;font-size:11px;background:#58FA82;padding-left:5px">Thursday</td> <td align="left" valign='middle' bgcolor="#999999" style="width:15%;color:#00f;font-size:11px;background:#58FA82;padding-left:5px">Friday</td> <td align="left" valign='middle' bgcolor="#999999" style="width:12.5%;color:orange;font-size:11px;background:#F3E2A9;padding-left:5px">Saturday</td> </tr> <?php $timestamp = mktime(0,0,0,$cMonth,1,$cYear); $maxday = date("t",$timestamp); $thismonth = getdate($timestamp); $startday = $thismonth['wday']; for ($i=0; $i<($maxday+$startday); $i++) { $myDay=str_pad(($i-$startday + 1), 2, 0, STR_PAD_LEFT); $myMonth=str_pad(($prev_month+1), 2, 0, STR_PAD_LEFT); if(($i % 7) == 0 ) echo "<tr>"; $selectedDate=$i-$startday + 1; if($i < $startday) echo "<td style='background: #f5f2ea;border:0px solid lightgray'></td>"; else echo "<td align='left' valign='top' style='background: #fff;padding:2px;height:75px;width:10%;border:1px solid #d3d1cd '>"; $curDay = str_pad($cYear."/".($prev_month + 1), 2,0, STR_PAD_LEFT)."/".str_pad((($i-$startday) + 1),2, 0, STR_PAD_LEFT); $curSelDate = date_format(strtotime($curDay), "Y/mm/d"); $selDate = date("Y/m/d", strtotime($curDay)); if($selectedDate < 1){ }else{ echo "<div style='border-radius:20px;background:white;font-color:black;padding:2px;width:5%;min-width:30px;float-right;margin-left:2px;margin-top:48px;text-align:center;font-size:12px;color:blue;position:absolute;border:0px solid black'>"; $clickDate= $selDate; //echo $dealID; $countDateAppt = mysql_result(mysql_query("SELECT COUNT('s_id') FROM vts_service_transaction WHERE `s_deal_code`='$dealID' AND `appt_date`='$clickDate' || `transferred_to`='$dealID' AND `appt_date`='$clickDate' "),0); echo $countDateAppt; echo"</div>"; //HIGHT CURRENT DATE if($selectedDate == $mycDay){ echo "<div class='vertical-menu' style='display:block;height:100%;width:100%;border:1px solid #cff8b6 '> <a href='mainindex.php?id=11&d=1&sid=".$selDate."' style='display:block;height:100%;width:100%;background:#77f37b;border:1px solid #15c61a;font-weight:bold;px;color:red;font-size:20px'>".$selectedDate."</a></div>"; }else if($selectedDate < $mycDay && $mycMonth == $myMonth){ echo "<div class='vertical-menu' style='display:block;height:100%;width:100%;border:1px solid #cff8b6 '> <a href='mainindex.php?id=11&d=1&sid=".$selDate."' style='display:block;height:100%;width:100%;font-size:20px;color:gray'>".$selectedDate."</a> </div>"; }else{ echo "<div class='vertical-menu' style='display:block;height:100%;width:100%;border:1px solid #cff8b6 '> <a href='mainindex.php?id=11&d=1&sid=".$selDate."' style='display:block;height:100%;width:100%;font-size:20px'>".$selectedDate."</a> </div>"; } } echo "</td>"; if(($i % 7) == 6 ) echo "</tr>"; } ?> </table> </td> </tr> </table> <!-- ======================================================== --> </div> <div style='min-width:400px;float:left;border:0px solid blue;width:50%;height:100%;background:white;min-height:503px;overflow:auto'> <?php $pickDate=$_GET['sid']; $selDateView = date("Y/m/d", strtotime($pickDate)); echo "<div class='bgColor' style='vertical-align:top;height:45px;margin:0px;width:100%;border-bottom:1px solid gray;padding:3px;font-family:Verdana;font-weight:normal;color:#000;font-size:25px;font-weight:normal;'> ♲ Date: ".$pickDate ."<div style='float:right;font-family:Verdana;font-size:25px;font-weight:bold;padding-right:5px;margin-top:-5px'>"; if($pickDate > $toDate){ $availabe='Enable'; $bColor=''; }else{ $availabe='Disabled'; $bColor='lightgray'; $aColor='gray'; } ?> <center><input type="submit" id="send" <?php echo $availabe;?> value="+ Add New" onclick="showHide()" style='background:<?php echo $bColor;?>;font-size:12px;color:<?php echo $aColor;?>;height:30px;width:85px;text-align:center;padding:0px'> <input type="submit" id="sendA" value="☶ View List" onclick="viewList()" style='height:30px;width:95px;text-align:center;padding:0px'></center> <!--////////////////////////////////////////////////////////////////// --> <!--////////////////////////////////////////////////////////////////// --> <div id="details_div" style="display:none;position:absolute;top:20px;left:20px;width:800px;height:90%;min-height:600px;z-index:99999;background:white;border:1px solid gray"> <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;color:#043062;font-size:16px'>☶ Appointment Summary: <div style='padding-right:5px;float:right;font-family:Verdana;font-size:15px;'> <a href='#' onclick="viewList()" style='font-weight:bold'> ✕ </a> </div> </div> <div style='width:100%;height:90%;min-height:675px;float:right;font-family:Verdana;font-size:12px;border:0px solid red'> <!--////////////////////////////CONTENT////////////////////////////////////// --> <div style='width:100%;border-bottom:1px solid lightgray;height:60px;padding:5px' class="bgColor"> <b style='margin-left:20px;padding-right:5px'>⚲ Search Date:</b> <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="text" id="searchDate" value="<?php echo $selDateView;?>" style="width:200px;padding:5px;font-family:Verdana;font-size:14px"> <input type="submit" id="submit_search" value="Search..." style='margin-left:2px;padding:5px;width:100px;font-family:Verdana;font-size:14px;height:30px'> </div> <div style='width:100%;border-bottom:0px solid red;height:60px;padding:1px;height:615px;overflow:auto' id="display_appt"> </div> <?php ?> </div> </div> </div> <!--////////////////////////////////////////////////////////////////// --> <!--////////////////////////////////////////////////////////////////// --> <div id="hidden_div" style="display:none;position:absolute;top:20px;left:20px;width:500px;height:600px;z-index:99999;background:white;border:1px solid gray"> <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;color:#043062;font-size:16px'>Add New Service Appointment: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' onclick="showHide()" style='font-weight:bold;padding-right:5px'> ✕ </a> </div> </div> <div style='vertical-align:top;height:570px;margin:0px;width:100%;border:0px solid red;padding:5px;font-family:Verdana;font-weight:normal;color:#043062'> <input type="hidden" id="MyDealID" value="<?php echo $dealID;?>"> <input type="hidden" id="MyCompID" value="<?php echo $compID;?>"> <input type="hidden" id="addDate" value="<?php echo $toDate;?>"> <input type="hidden" id="addTime" value="<?php echo $myCurTime;?>"> <input type="hidden" id="addBy" value="<?php echo $userID;?>"> <div style='border:0px solid red;width:40%;margin:3px;float:left;min-width:200px;margin-left:10px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Vehicle Plate:</b><br> <input type="text" id="carPlate" placeholder="" style='text-align:center;font-size:20px;font-weight:bold;padding:7px;width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:40%;margin:3px;float:right;min-width:200px;margin-left:15px;margin-right:20px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Select Brand:</b><br> <select id='brandSelected' onchange="showUser(this.value)" style='padding:7px;width:100%;float:left'> <option>--Select Brand--</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_id']."'>".$out['b_name']."</option>"; } ?> </select> </div> <div style='border:0px solid red;width:40%;margin:3px;float:left;min-width:200px;margin-left:15px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Vehicle Model:</b><br> <select id='para' style='padding:7px;width:100%;min-width:150px;float:left'> </select> </div> <div style='border:0px solid red;width:40%;margin:3px;float:right;min-width:200px;margin-left:15px;;margin-right:20px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Service Type:</b><br> <select id='serviceType' style='padding:7px;width:100%;min-width:150px;float:left;'> <option value=''>--Select Service Type--</option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_service_type` WHERE `status`='1' ORDER BY `serv_desc` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['code']."'>".$out['serv_desc']."</option>"; } ?> </select> </div> <div style='border:0px solid red;width:40%;margin:3px;float:left;min-width:200px;margin-left:10px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Select Date:</b><br> <input type="text" id="apptDate" value="<?php echo $_GET['sid'];?>" readonly style='text-align:center;font-size:12px;font-weight:bold;padding:7px;width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:40%;margin:3px;float:right;min-width:200px;margin-left:15px;;margin-right:20px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Time Slot:</b><br> <select id='timeSlot' style='padding:7px;width:100%;min-width:150px;float:left;'> <option value=''>--Select Time Slot--</option> <?php $optionTIME=mysql_query("SELECT * FROM `vts_service_slots` WHERE `active`='1' AND `deal_id`='$dealID' ORDER BY `time_slot` ASC"); $SelAptDate =$_GET['sid']; while($tim=mysql_fetch_array($optionTIME)){ $slCap = $tim['time_slot_capacity']; $slCode = $tim['slot_id']; $checkIfMax = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `time_slot_code`='$slCode' AND `appt_date`='$SelAptDate' AND `s_deal_code`='$dealID'"),0); if($checkIfMax < $slCap){ echo "<option value='".$tim['slot_id']."'>".$tim['time_slot']."</option>"; }else{ } } ?> </select> </div> <div style='border:0px solid red;width:90%;margin:3px;float:left;min-width:465px;margin-left:10px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Contact Information:</b><br> <input type="text" id="carContactNo" placeholder="Phone/Mobile Number" style='padding:7px;width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"> </div> <div style='border:0px solid red;width:90%;margin:3px;float:left;min-width:465px;margin-left:10px;'> <b style='font-family:Verdana;font-size:12px;color:#727373;margin-left:5px;font-weight:normal'>Customer Concerns/Remarks:</b><br> <textarea rows="2" type="text" id="carServiceDesc" placeholder="Remarks/Notes" style='padding:7px;width:98%;min-width:150px;float:left;margin:5px' onkeyup="this.value = this.value.toUpperCase();"></textarea> </div> <div style='border:0px solid red;width:90%;margin:3px;float:left;min-width:465px;margin-left:10px;'> <br> <center><input type="submit" id="submit_appt" value="Add Record" style="width:50%"></center> </div> </div> <!--////////////////////////////////////////////////////////////////// --> <?php //<!--EXTRACT LIST OF COMPANY AND EXPORT TO EXCEL--> echo "</div> </div> "; $loadTimeSlot = mysql_query("SELECT * FROM `vts_service_slots` WHERE `active`='1' AND `deal_id`='$dealID' ORDER BY `slot_id` ASC"); $dealCap=mysql_result(mysql_query("SELECT `area_capacity` FROM `vts_dealerships` WHERE `deal_id`='$dealID'"),0); $targetUR=mysql_result(mysql_query("SELECT `target_ur` FROM `vts_targeturs` WHERE `deal_id`='$dealID'"),0); //echo $targetUR; if(!empty($_GET['sid'])){ echo "<table style='width:100%'>"; echo "<thead>"; echo "<tr>"; echo "<th>TIME SLOT</th>"; echo "<th>Capacity</th>"; echo "<th>Booked</th>"; echo "<th>Available</th>"; echo "</tr>"; echo "<thead>"; while($row = mysql_fetch_array($loadTimeSlot)){ $tC=$row['slot_id']; $tcCount = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_deal_code`='$dealID' AND `appt_date`='$pickDate' || `transferred_to`='$dealID' AND `time_slot_code`='$tC' AND `appt_date`='$pickDate'"),0); $getBookedPerSlot = mysql_result(mysql_query("SELECT COUNT('s_id') FROM `vts_service_transaction` WHERE `s_deal_code`='$dealID' AND `time_slot_code`='$tC' AND `appt_date`='$pickDate' || `transferred_to`='$dealID' AND `time_slot_code`='$tC' AND `appt_date`='$pickDate'"),0); $avialableSlot = $row['time_slot_capacity']-$getBookedPerSlot; echo "<tr>"; echo "<td>".$row['time_slot']."</td>"; echo "<td style='text-align:center'>".$row['time_slot_capacity']."</td>"; echo "<td style='text-align:center'>".$getBookedPerSlot."</td>"; echo "<td style='text-align:center'>".$avialableSlot."</td>"; echo "</tr>"; } echo "</table>"; } ?> </div> </div> </div> </body> </html> <!-- JQUERY FROM GOOGLE API --> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript"> $(function() { $("#lets_search").bind('submit',function() { var picDate = $('#picDate').val(); if (picDate == "") { alert("Invalid Entry. Please select Valid Date."); return false; } $.post('check_save_in_out.php',{picDate:picDate}, function(data){ $("#search_results").html(data); }); return false; }); }); </script> <script type="text/javascript"> function showHide() { var div = document.getElementById("hidden_div"); if (div.style.display == 'none') { div.style.display = ''; } else { div.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> <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"); model-para brandSelected vehicleColor vehicleMake vehicleTransmission vehicleNotes $("#submit_appt").click(function(){ var addDate = $("#addDate").val(); var addTime = $("#addTime").val(); var carPlate = $("#carPlate").val(); var addBy = $("#addBy").val(); var MyDealID = $("#MyDealID").val(); var MyCompID = $("#MyCompID").val(); var brandSelected = $("#brandSelected").val(); var para = $("#para").val(); var serviceType = $("#serviceType").val(); var apptDate = $("#apptDate").val(); var timeSlot = $("#timeSlot").val(); var carContactNo = $("#carContactNo").val(); var carServiceDesc = $("#carServiceDesc").val(); if (apptDate < addDate) { alert("Error: Invalid Date Entry."); return false; } if (carPlate == "") { alert("Please Complete all required information. [Missing Plate Number]"); return false; } if (apptDate == "") { alert("Please Complete all required information. [Missing Service Schedule or Invalid Date]"); return false; } if (timeSlot == "--Select Time Slot--") { alert("Please Complete all required information. [ Invalid Time Slot Selection ]"); return false; } $.ajax({ url: "add_new_appointment_save_record.php", type: "POST", async: false, data: { "done": 1, "addDate":addDate, "addBy":addBy, "addTime":addTime, "carPlate":carPlate, "MyDealID":MyDealID, "MyCompID":MyCompID, "brandSelected":brandSelected, "para":para, "serviceType":serviceType, "apptDate":apptDate, "timeSlot":timeSlot, "carContactNo":carContactNo, "carServiceDesc": carServiceDesc }, success: function(data){ //alert("New Record Saved."); displayFromDatabase(); $('#carPlate').val(''); $('#apptDate').val(''); $('#timeSlot').val(''); $('#carContactNo').val(''); $('#carServiceDesc').val(''); } }) }); //LOAD SERVICE APPOINTMENT BASED ON GIVEN DATE //alert("Its working"); model-para brandSelected vehicleColor vehicleMake vehicleTransmission vehicleNotes $("#submit_search").click(function(){ var searchDate = $("#searchDate").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); if (searchDate == "") { alert("Invalid Date. Please select date and click search button."); return false; } $.ajax({ url: "load_service_appointment.php", type: "POST", async: false, data: { "search": 1, "sCompID": sCompID, "sDealID": sDealID, "searchDate": searchDate }, success: function(data){ //alert("New Record Saved."); displayAppointment(); //$('#searchDate').val(''); } }) }); //LOAD SERVICE APPOINTMENT BASED ON GIVEN DATE }); //retrieve and display function displayFromDatabase(){ $.ajax({ url: "add_new_appointment_save_record.php", type: "POST", async: false, data: { "display": 1 }, success: function(d){ $("#display_area").html(d); alert("New Appointment has been saved."); } }); } function displayAppointment(){ var searchDate = $("#searchDate").val(); var sCompID = $("#sCompID").val(); var sDealID = $("#sDealID").val(); $.ajax({ url: "load_service_appointment.php", type: "POST", async: false, data: { "displaySearch": 1, "sCompID": sCompID, "sDealID": sDealID, "searchDate": searchDate }, success: function(d){ $("#display_appt").html(d); } }); } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings