diff --git a/ticket.php b/ticket.php index f17abfed..9504190e 100644 --- a/ticket.php +++ b/ticket.php @@ -70,12 +70,14 @@ if(isset($_GET['ticket_id'])){ $contact_mobile = formatPhoneNumber($row['contact_mobile']); $asset_id = $row['asset_id']; + $asset_ip = htmlentities($row['asset_ip']); $asset_name = htmlentities($row['asset_name']); $asset_type = htmlentities($row['asset_type']); $asset_make = htmlentities($row['asset_make']); $asset_model = htmlentities($row['asset_model']); $asset_serial = htmlentities($row['asset_serial']); $asset_os = htmlentities($row['asset_os']); + $asset_warranty_expire = $row['asset_warranty_expire']; $location_name = $row['location_name']; $location_address = $row['location_address']; @@ -145,6 +147,18 @@ if(isset($_GET['ticket_id'])){ $client_tag_name_display_array[] = " $client_tag_name"; } $client_tags_display = implode(' ', $client_tag_name_display_array); + + // Get the asset warranty expiry + $date = date('Y-m-d H:i:s'); + $dt_value = $asset_warranty_expire; //sample date + $warranty_check = date('m/d/Y',strtotime('-8 hours')); + + if($dt_value <= $date){ + $dt_value = "Expired on $asset_warranty_expire"; $color ='red'; + }else{ + $color = 'green'; + } + ?> @@ -392,20 +406,7 @@ if(isset($_GET['ticket_id'])){

Asset

- -
- - -
- - - + Asset name:
- + OS: +
+ + IP: +
+ + + Model: +
+ + + + Service Tag: +
+ + + + Warranty expire: