mirror of
https://github.com/itflow-org/itflow
synced 2026-03-05 21:34:51 +00:00
127
ticket.php
127
ticket.php
@@ -148,17 +148,21 @@ if(isset($_GET['ticket_id'])){
|
|||||||
}
|
}
|
||||||
$client_tags_display = implode(' ', $client_tag_name_display_array);
|
$client_tags_display = implode(' ', $client_tag_name_display_array);
|
||||||
|
|
||||||
// Get the asset warranty expiry
|
// Get & format asset warranty expiry
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
$dt_value = $asset_warranty_expire; //sample date
|
$dt_value = $asset_warranty_expire; //sample date
|
||||||
$warranty_check = date('m/d/Y',strtotime('-8 hours'));
|
$warranty_check = date('m/d/Y',strtotime('-8 hours'));
|
||||||
|
|
||||||
if($dt_value <= $date){
|
if($dt_value <= $date){
|
||||||
$dt_value = "Expired on $asset_warranty_expire"; $color ='red';
|
$dt_value = "Expired on $asset_warranty_expire"; $warranty_status_color ='red';
|
||||||
}else{
|
}else{
|
||||||
$color = 'green';
|
$warranty_status_color = 'green';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($asset_warranty_expire == '0000-00-00'){
|
||||||
|
$dt_value = "None"; $warranty_status_color ='red';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -333,6 +337,7 @@ if(isset($_GET['ticket_id'])){
|
|||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
<!-- Client card -->
|
||||||
<div class="card card-body card-outline card-primary mb-3">
|
<div class="card card-body card-outline card-primary mb-3">
|
||||||
<div>
|
<div>
|
||||||
<h5><strong><?php echo $client_name; ?></strong></h5>
|
<h5><strong><?php echo $client_name; ?></strong></h5>
|
||||||
@@ -353,8 +358,8 @@ if(isset($_GET['ticket_id'])){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Client contact card -->
|
||||||
<?php if(!empty($contact_id)){ ?>
|
<?php if(!empty($contact_id)){ ?>
|
||||||
|
|
||||||
<div class="card card-body card-outline card-dark mb-3">
|
<div class="card card-body card-outline card-dark mb-3">
|
||||||
<div>
|
<div>
|
||||||
<h4 class="text-secondary">Contact</h4>
|
<h4 class="text-secondary">Contact</h4>
|
||||||
@@ -401,78 +406,70 @@ if(isset($_GET['ticket_id'])){
|
|||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if(!empty($asset_id)){ ?>
|
<!-- Ticket Details card -->
|
||||||
|
|
||||||
<div class="card card-body card-outline card-dark mb-3">
|
|
||||||
<div>
|
|
||||||
<h4 class="text-secondary">Asset</h4>
|
|
||||||
<i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2 mb-2"></i> Asset name: <strong><?php echo $asset_name; ?></strong>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_os)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> OS: <?php echo $asset_os; ?>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_ip)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-network-wired text-secondary ml-1 mr-2 mb-2"></i> IP: <?php echo "$asset_ip"; ?>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_make)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Model: <?php echo "$asset_make $asset_model"; ?>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_serial)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-barcode text-secondary ml-1 mr-2 mb-2"></i> Service Tag: <?php echo $asset_serial; ?>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if(!empty($asset_warranty_expire)){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Warranty expire: <strong><font color="<?php echo $color?>" > <?php echo $dt_value?></font></strong>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="card card-body card-outline card-dark mb-3">
|
<div class="card card-body card-outline card-dark mb-3">
|
||||||
<h4 class="text-secondary">Details</h4>
|
<h4 class="text-secondary">Details</h4>
|
||||||
<div class="ml-1"><i class="fa fa-fw fa-thermometer-half text-secondary mr-2 mb-2"></i><?php echo $ticket_priority_display; ?></div>
|
<div class="ml-1"><i class="fa fa-fw fa-thermometer-half text-secondary mr-2 mb-2"></i><?php echo $ticket_priority_display; ?></div>
|
||||||
<div class="ml-1"><i class="fa fa-fw fa-calendar text-secondary mr-2 mb-2"></i>Created on: <?php echo $ticket_created_at; ?></div>
|
<div class="ml-1"><i class="fa fa-fw fa-calendar text-secondary mr-2 mb-2"></i>Created on: <?php echo $ticket_created_at; ?></div>
|
||||||
<div class="ml-1"><i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i>Created by: <?php echo $ticket_created_by_display; ?></div>
|
<div class="ml-1"><i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i>Created by: <?php echo $ticket_created_by_display; ?></div>
|
||||||
<?php
|
<?php
|
||||||
if($ticket_status == "Closed"){
|
if($ticket_status == "Closed"){
|
||||||
$sql_closed_by = mysqli_query($mysqli,"SELECT * FROM tickets, users WHERE ticket_closed_by = user_id");
|
$sql_closed_by = mysqli_query($mysqli,"SELECT * FROM tickets, users WHERE ticket_closed_by = user_id");
|
||||||
$row = mysqli_fetch_array($sql_closed_by);
|
$row = mysqli_fetch_array($sql_closed_by);
|
||||||
$ticket_closed_by_display = $row['user_name'];
|
$ticket_closed_by_display = $row['user_name'];
|
||||||
?>
|
?>
|
||||||
<div class="ml-1"><i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i>Closed by: <?php echo strtoupper($ticket_closed_by_display); ?></a></div>
|
<div class="ml-1"><i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i>Closed by: <?php echo strtoupper($ticket_closed_by_display); ?></a></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if(!empty($ticket_total_reply_time)){ ?>
|
<?php if(!empty($ticket_total_reply_time)){ ?>
|
||||||
<div class="ml-1"><i class="fa fa-fw fa-check text-secondary mr-2 mb-2"></i>Total time worked: <?php echo $ticket_total_reply_time; ?></div>
|
<div class="ml-1"><i class="fa fa-fw fa-check text-secondary mr-2 mb-2"></i>Total time worked: <?php echo $ticket_total_reply_time; ?></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Ticket asset details card -->
|
||||||
|
<?php if(!empty($asset_id)){ ?>
|
||||||
|
<div class="card card-body card-outline card-dark mb-3">
|
||||||
|
<div>
|
||||||
|
<h4 class="text-secondary">Asset</h4>
|
||||||
|
<i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2 mb-2"></i> Asset name: <strong><?php echo $asset_name; ?></strong>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php if(!empty($asset_os)) { ?>
|
||||||
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> OS: <?php echo $asset_os; ?>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($asset_ip)) { ?>
|
||||||
|
<i class="fa fa-fw fa-network-wired text-secondary ml-1 mr-2 mb-2"></i> IP: <?php echo "$asset_ip"; ?>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($asset_make)) { ?>
|
||||||
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Model: <?php echo "$asset_make $asset_model"; ?>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($asset_serial)) {
|
||||||
|
?>
|
||||||
|
<i class="fa fa-fw fa-barcode text-secondary ml-1 mr-2 mb-2"></i> Service Tag: <?php echo $asset_serial; ?>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($asset_warranty_expire)) {
|
||||||
|
?>
|
||||||
|
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2 mb-2"></i> Warranty expires: <strong><font color="<?php echo $warranty_status_color ?>"> <?php echo $dt_value ?></font></strong>
|
||||||
|
<br>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<form action="post.php" method="post">
|
<form action="post.php" method="post">
|
||||||
<input type="hidden" name="ticket_id" value="<?php echo $ticket_id; ?>">
|
<input type="hidden" name="ticket_id" value="<?php echo $ticket_id; ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user