File manager - Edit - /home/autoph/public_html/connect/home/load_found_searched_vehicle.php
Back
<?php include 'core/init.php'; //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); //error_reporting(1); $compID= $user_data['company']; if(isset($_POST['done'])){ $bBrand = mysql_escape_string($_POST['bBrand']); $searchText = mysql_escape_string($_POST['searchText']); $result = mysql_query("SELECT * FROM db_vehicle_inventory WHERE `description` LIKE '%$searchText%' || `cs_number` LIKE '%$searchText%' || `brand_code` LIKE '%$searchText%' ORDER BY `brand_code` ASC"); echo "<b style='float:left;width:40%;padding:5px;border:0px solid red;text-align:left;font-family:Arial;font-size:14px;color:bl #f09490;font-weight:bold'> ".$bBrand." ".$selModel." <i style='font-size:14px;font-weight:normal'> - Latest Inventory Information</i></b>"; echo "<table style='width:100%;'>"; echo "<thead> <tr> <th style='width:10%'>UNIT LOCATION</th> <th style='width:10%'>YEAR MODEL</th> <th style='width:10%'>COLOR</th> <th style='width:10%'>CS #</th> <th style='width:15%'>VIN #</th> <th style='width:5%'>STOCK</th> <th style='width:5%'>STATUS</th> <th style='width:10%'>DATE RECEIVED</th> <th style='width:7%'>AGING</th> <th style='min-width:150px'>ACTION</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ if($row['reserved']==0 && $row['incoming_unit']==0){ $incomoing = 0; $status= "Available"; $txtColor='Black'; }else if($row['reserved']==1 && $row['incoming_unit']==0){ $status= "Reserved"; $incomoing = 0; $txtColor=' #0c5bdc'; }else{ $status= "Incoming"; $txtColor='#ec6209'; $incomoing = 1; } ?><tr onclick="javascript:getSelectedVIN(this);"><?php echo "<td style='text-align:left;color:$txtColor'>".$row['unit_location']."</td>"; echo "<td style='text-align:left;color:$txtColor'>".$row['year_model']."</td>"; echo "<td style='text-align:left;color:$txtColor'>".$row['color']."</td>"; echo "<td style='text-align:left;color:$txtColor'>".$row['cs_number']."</td>"; echo "<td style='text-align:left;color:$txtColor'>".$row['vin_number']."</td>"; echo "<td style='text-align:left;color:$txtColor'>".$row['status']."</td>"; echo "<td style='text-align:left;font-family:Arial;color:$txtColor'>"; echo $status; echo"</td>"; echo "<td style='text-align:;color:$txtColor'>".$row['date_received']."</td>"; echo "<td style='text-align:left;color:$txtColor'>"; $olddate = $row['date_received']; $now = time(); // or your date as well $your_date = strtotime($olddate); $datediff = $now - $your_date; echo "<b>".round($datediff / (60 * 60 * 24)) ." </b> <i style='font-family:Arial;font-size:10px'>Days</i>"; echo"</td>"; echo "<td style='text-align:center;padding:0px;color:$txtColor'>"; if($status != 'Incoming'){ if($row['reserved']==0){ echo "<button id='reservedUnit' onclick='viewReservationForm()' style='background: #fae288; width:40%;padding:3px;font-family:Arial;font-size:12px;color:blue;margin:2px;border:1px solid #f7a644;border-radius:0px;margin-right:5px'>Reserve</button>"; echo "<button id='releasedUnit' onclick='viewReleasingForm()' style='background:#82d2fa; width:40%;padding:3px;font-family:Arial;font-size:12px;color:red;margin:2px;border:1px solid #22b1f8;border-radius:0px;margin-left:5px'>Release</button>"; }else{ echo "<button id='UnTagUnit' onclick='viewUntagForm()' style='background:#aefa88; width:40%;padding:3px;font-family:Arial;font-size:12px;color:blue;margin:2px;border:1px solid #18cb12;border-radius:0px;margin-right:5px'>Untag</button>"; echo "<button id='releasedUnit' onclick='viewReleasingForm()' style='background:#82d2fa; width:40%;padding:3px;font-family:Arial;font-size:12px;color:red;margin:2px;border:1px solid #22b1f8;border-radius:0px;margin-left:5px'>Release</button>"; } }else{ echo "<button id='availableUnit' onclick='viewDeliveryForm()' style='background:#63fb83; width:85%;padding:3px;font-family:Arial;font-size:12px;color:blue;margin:2px;border:1px solid #f7a644;border-radius:0px;'>Confirm Delivery</button>"; } echo "</td>"; echo "</tr>"; } echo "</table>"; exit(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings