priority_id)->first();
                    ?>
                    
                        
                            
                    
                
                
                                sla;
                                $SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $sla)->first();
                                ?>
                                {!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} 
                            
                            
                                {!! Lang::get('lang.created_date') !!}:  {{ UTC::usertimezone($tickets->created_at) }}
                            
                            
                                {!! Lang::get('lang.due_date') !!}: 
                                created_at;
                                $time = date_create($time);
                                date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
                                echo UTC::usertimezone(date_format($time, 'Y-m-d H:i:s'));
                                ?>
                            
                            
                                id)->where('is_internal', '=', 0)->get(); ?>
                                @foreach($response as $last)
                                        created_at; ?>
                                @endforeach
                                {!! Lang::get('lang.last_response') !!}:  {{ UTC::usertimezone($ResponseDate)}}
                            
                        | {!! Lang::get('lang.status') !!}:status)->first(); ?> @if($status->id == 1) | {{$status->name}}@elseif($status->id == 2) | {{$status->name}}@elseif($status->id == 3) | {{$status->name}}@endif | 
| {!! Lang::get('lang.priority') !!}:priority_id)->first(); ?> @if($priority->priority_id == 1) | {{$priority->priority_desc}}@elseif($priority->priority_id == 2) | {{$priority->priority_desc}}@elseif($priority->priority_id == 3) | {{$priority->priority_desc}}@endif | 
| {!! Lang::get('lang.department') !!}:help_topic_id)->first(); $department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first(); ?> | {!! $department->name !!} | 
| {!! Lang::get('lang.help_topic') !!}:help_topic_id)->first(); ?> | {{$help_topic->topic}} | 
| {!! Lang::get('lang.last_message') !!}: | {{ucwords($last->poster)}} | 
id)->where('is_internal', '=', 0)->paginate(10);
foreach ($conversations as $conversation) {
    $ConvDate1 = $conversation->created_at;
    $ConvDate = explode(' ', $ConvDate1);
    $date = $ConvDate[0];
    $time = $ConvDate[1];
    $time = substr($time, 0, -3);
    if (isset($data) && $date == $data) {
    } else {
        $data = $ConvDate[0];
    }
    $role = App\User::where('id', '=', $conversation->user_id)->first();
    $attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
    if ($attachment == null) {
        $body = $conversation->body;
    } else {
        $body = $conversation->body;
        $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
        foreach ($attachments as $attachment) {
            if ($attachment->type == 'pdf') {
            } elseif ($attachment->type == 'docx') {
            } else {
                $image = @imagecreatefromstring($attachment->file);
                ob_start();
                imagejpeg($image, null, 80);
                $data = ob_get_contents();
                ob_end_clean();
                $var = ' . ') ';
                $body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
                $string = $body;
                $start = "";
                $end = "";
                if (strpos($string, $start) == false || strpos($string, $start) == false) {
                } else {
                    $ini = strpos($string, $start);
                    $ini += strlen($start);
                    $len = strpos($string, $end, $ini) - $ini;
                    $parsed = substr($string, $ini, $len);
                    $body2 = $parsed;
                    $body = str_replace($body2, " ", $body);
                }
            }
        }
    }
    $string = $body;
    $start = "";
    $end = "";
    if (strpos($string, $start) == false || strpos($string, $start) == false) {
    } else {
        $ini = strpos($string, $start);
        $ini += strlen($start);
        $len = strpos($string, $end, $ini) - $ini;
        $parsed = substr($string, $ini, $len);
        $body2 = $parsed;
        $body = str_replace($body2, " ", $body);
    }
    ?>
';
                $body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
                $string = $body;
                $start = "";
                $end = "";
                if (strpos($string, $start) == false || strpos($string, $start) == false) {
                } else {
                    $ini = strpos($string, $start);
                    $ini += strlen($start);
                    $len = strpos($string, $end, $ini) - $ini;
                    $parsed = substr($string, $ini, $len);
                    $body2 = $parsed;
                    $body = str_replace($body2, " ", $body);
                }
            }
        }
    }
    $string = $body;
    $start = "";
    $end = "";
    if (strpos($string, $start) == false || strpos($string, $start) == false) {
    } else {
        $ini = strpos($string, $start);
        $ini += strlen($start);
        $len = strpos($string, $end, $ini) - $ini;
        $parsed = substr($string, $ini, $len);
        $body2 = $parsed;
        $body = str_replace($body2, " ", $body);
    }
    ?>
    
@if(Session::has('success1'))
                    
                        
                            
                                
                            
                        
                    
                    
                        
                    
                    {!! Form::close() !!}
                
            
        
    setPath(route('show.ticket', ['ids' => $tickets->id, 'code' => $token]))->render(); ?>
@if(Session::has('success1'))
    
    
    {{Session::get('success1')}}
@endif
@if(Session::has('fails1'))
    
    {!! Lang::get('lang.alert') !!}!
    
    {{Session::get('fails1')}}
@endif
id; ?>
                
{!! $body !!}
" . $i . " Attachments
"; } ?>size; $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; $power = $size > 0 ? floor(log($size, 1024)) : 0; $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power]; if ($attachment->poster == 'ATTACHMENT') { if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') { $image = @imagecreatefromstring($attachment->file); ob_start(); imagejpeg($image, null, 80); $data = ob_get_contents(); ob_end_clean(); $var = ' . ') ';
                                    echo '
';
                                    echo '- ' . $var . '' . $attachment->name . '
 
 
';
                                } else {
                                    $var = '' . strtoupper($attachment->type) . '' . $attachment->name . '
 ';
                                    echo '- ' . $var . '';
                                }
                            }
                        }
                        ?>
' . $value . '
' . $value . '