File manager - Edit - /home/autoph/public_html/connect/home/search_load_found_unit.php
Back
<?php include 'core/init.php'; $userID=$user_data['u_id']; $dealID= $user_data['dealer']; $compID= $user_data['company']; $toDate = date_create() ->format("Y/m/d"); $toTime =Explode(":", date('H:i:s')); $currentTime = date("H:i:s"); $query = mysql_query("SELECT * FROM vts_vehicle_lists WHERE v_plate='".$_POST['value']."'"); $vPlate=$_POST['value']; $checkIfWIthOpenTransfer = mysql_result(mysql_query("SELECT COUNT(`t_id`) FROM `vts_vehicle_transfer_for_service` WHERE `t_plate`='$vPlate' AND `t_deal_id`='$dealID' AND `closed`='0'"),0); ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> function showMoreInfo() { var div = document.getElementById("showMoreInformation"); if (div.style.display == 'none') { div.style.display = ''; } else { div.style.display = 'none'; } } </script> <script language="javascript" type="text/javascript"> function showApptInfo(row) { var x=row.cells; document.getElementById("viewRODetails").value = x[0].innerHTML; } </script> <div id = "ro_information" style='position:absolute;width:800px;height:400px;background:#e5e3e2;border:1px solid red;display:none;top:50px;left:50px;z-index:999999'> <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:14px'> Repair Order Information:<div style='padding-right:5px;float:right;font-family:Verdana;font-size:15px;'> <a href="#" style='font-weight:bold'> ✕ </a> </div> <?php echo $_GET['d'];?> </div> </div> <?php if(mysql_num_rows($query) > 0){ echo '<div style="width:100%;border:0px solid red;text-align:left;float:left:font-family:Verdana;font-size:14px;font-weight:normal;padding:1px;color:blue;min-width:250px;height:100%">'; //========================================================= echo '<div style="margin:1px;min-width:250px;width:32%;float:left;position:relative;border:0px solid gray;border-right:1px dashed gray;height:100%;min-height:200px">'; echo "<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'> Vehicle Information: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=9&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=9&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>"; ?> <?php //VEHICLE INFORMATION DATA GOES HERE... echo '<div style="padding:5px;margin:1px; width:100%;float:left;position:relative;border:0px solid gray;height:93%;min-height:200px">'; $getData = mysql_query("SELECT * FROM `vts_vehicle_lists` WHERE `v_plate`='$vPlate'"); echo "<table style='width:100%'>"; while($row=mysql_fetch_array($getData)){ $custID = $row['cust_id']; $sellerDealer = mysql_result(mysql_query("SELECT `deal_name` FROM `vts_dealerships` WHERE `deal_id`='".$row['sold_by_dealer']."'"),0); $vLocation = mysql_result(mysql_query("SELECT `deal_name` FROM `vts_dealerships` WHERE `deal_id`='".$row['v_location_id']."'"),0); $vAction = mysql_result(mysql_query("SELECT `out_description` FROM `vts_check_out_reasons` WHERE `out_id`='".$row['action_id']."'"),0); //$serviceUpdate = mysql_result(mysql_query("SELECT `status` FROM `vts_service_logs` WHERE `v_plate`='".$row['v_plate']."' AND `date` "),0); echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Sold By:</td>"; echo "<td style='width:50%;border:0px solid white'>".$sellerDealer."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Vehicle Brand:</td>"; echo "<td style='width:50%;border:0px solid white'>".$row['v_brand']."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Vehicle Plate:</td>"; echo "<td style='width:50%;border:0px solid white'>".$row['v_plate']."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'> Varriant:</td>"; echo "<td style='width:50%;border:0px solid white'>".$row['v_model']."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'> Make:</td>"; echo "<td style='width:50%;border:0px solid white'>".$row['v_make']."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Color:</td>"; echo "<td style='width:50%;border:0px solid white'>".$row['v_color']."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Dealer Location:</td>"; echo "<td style='width:50%;border:0px solid white'>".$vLocation."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Last Action Taken:</td>"; echo "<td style='width:50%;border:0px solid white'>".$vAction."</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan='2' style=' border:0px solid white;border-bottom:0px solid gray'></td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>CUSTOMER INFORMATION:</td>"; echo "<td style='width:50%;border:0px solid white'></td>"; echo "</tr>"; echo "<tr>"; $custFName = mysql_result(mysql_query("SELECT `cust_fname` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $custLName = mysql_result(mysql_query("SELECT `cust_lname` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $vEmail = mysql_result(mysql_query("SELECT `cust_email` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $vMobile = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $gender = mysql_result(mysql_query("SELECT `cust_mobile` FROM `vts_customers` WHERE `c_id`='$custID'"),0); $fb = mysql_result(mysql_query("SELECT `cust_fb` FROM `vts_customers` WHERE `c_id`='$custID'"),0); echo "<td style='width:40%;border:0px solid white'>Full Name:</td>"; echo "<td style='width:50%;border:0px solid white'>".$custFName." ".$custLName."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Contact Information:</td>"; echo "<td style='width:50%;border:0px solid white'>".$vMobile."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>E-mail Address:</td>"; echo "<td style='width:50%;border:0px solid white'>".$vEmail ."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>Gender:</td>"; echo "<td style='width:50%;border:0px solid white'> ".$gender."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:40%;border:0px solid white'>FB Account:</td>"; echo "<td style='width:50%;border:0px solid white'>".$fb."</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; echo "</div>"; //========================================================= echo '<div style="margin:1px;min-width:300px;width:32%;float:left;position:relative;border:0px solid gray;border-right:1px dashed gray;height:100%;min-height:200px">'; echo "<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'> Service History: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=9&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=9&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>"; //VEHICLE SERVICE INFORMATION DATA GOES HERE... $getINOUT = mysql_query("SELECT * FROM `vts_service_transaction` WHERE `s_v_plate`='$vPlate' ORDER BY `s_date`, `s_time` DESC"); echo "<table style='width:100%'>"; echo "<tr>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>RO#</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>Type</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>date In</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>Date Closed</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>Reason</td>"; echo "</tr>"; while($sRow=mysql_fetch_array($getINOUT)){ $viewRO = $sRow['s_ro_no']; $dealCHKID = $sRow['s_deal_code']; $dealActionID = $sRow['location_code']; $dealCHKName = mysql_result(mysql_query("SELECT `deal_code` FROM `vts_dealerships` WHERE `deal_id`='$dealCHKID'"),0); $sByID = $sRow['add_by']; $addByName= mysql_result(mysql_query("SELECT `u_fname` FROM `vts_users` WHERE `add_by`='$sByID'"),0); $sType= $sRow['s_appt_type']; $sTypeName= mysql_result(mysql_query("SELECT `code` FROM `vts_service_type` WHERE `serv_id`='$sType'"),0); $tSlot = mysql_result(mysql_query("SELECT `time_slot` FROM `vts_service_slots` WHERE `slot_id`='".$sRow['time_slot_code']."'"),0); ?><tr onclick="javascript:showApptInfo(this);"><?php echo "<td style='border:0px solid white;font-size:10px'>".$sRow['s_ro_no']."</a></td>"; echo "<td style='border:0px solid white;font-size:10px'><a href='#?ro=".$sRow['s_ro_no']."' >".$sRow['s_appt_type']."</a></td>"; echo "<td style='border:0px solid white;font-size:10px'><a href='#?ro=".$sRow['s_ro_no']."' >".$sRow['appt_date']."</a></td>"; echo "<td style='border:0px solid white;font-size:10px'><a href='#?ro=".$sRow['s_ro_no']."' >".$sRow['date_closed']."</a></td>"; echo "<td style='border:0px solid white;font-size:10px'><a href='#?ro=".$sRow['s_ro_no']."' >".$sRow['closed_reason']."</a></td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; ?> <?php //========================================================= echo '<div style="margin:1px;min-width:250px;width:35%;float:left;position:relative;border:0px solid gray;border-right:1px dashed gray;height:100%;min-height:200px">'; echo "<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'> Check-In / Check-Out History: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='mainindex.php?id=9&ex=refresh' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href='mainindex.php?id=9&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>"; //VEHICLE CHECK-IN/OUT INFORMATION DATA GOES HERE... $getINOUT = mysql_query("SELECT * FROM `vts_in_out_history` WHERE `chk_plate`='$vPlate' ORDER BY `date`, `time` DESC"); echo "<table style='width:100%'>"; echo "<tr>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>Date</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>Time</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>TR</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>K.M</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>LOC</td>"; echo "<td style='border:0px solid white;border-bottom:1px solid gray;font-size:10px'>Tran</td>"; echo "</tr>"; while($cRow=mysql_fetch_array($getINOUT)){ $dealCHKID = $cRow['dealer_code']; $dealActionID = $cRow['location_code']; $dealCHKName = mysql_result(mysql_query("SELECT `deal_code` FROM `vts_dealerships` WHERE `deal_id`='$dealCHKID'"),0); $dealActionID = $cRow['location_code']; $dealActionName = mysql_result(mysql_query("SELECT `out_description` FROM `vts_check_out_reasons` WHERE `out_id`='$dealActionID'"),0); $outByID = $cRow['user_id']; $outByName= mysql_result(mysql_query("SELECT `out_description` FROM `vts_check_out_reasons` WHERE `out_id`='$dealActionID'"),0); echo "<tr>"; echo "<td style='border:0px solid white;font-size:10px'>".$cRow['date']."</td>"; echo "<td style='border:0px solid white;font-size:10px'>".$cRow['time']."</td>"; echo "<td style='border:0px solid white;font-size:10px'>".$cRow['chk_transaction']."</td>"; echo "<td style='border:0px solid white;font-size:10px'>".$cRow['chk_km']."</td>"; echo "<td style='border:0px solid white;font-size:10px'>".$dealCHKName."</td>"; echo "<td style='border:0px solid white;font-size:10px'>".$dealActionName."</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; //========================================================= echo "</div>"; }else{ echo "No Record Fountd."; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings