@extends('themes.default1.agent.layout.agent') @section('Tickets') class="active" @stop @section('ticket-bar') active @stop @section('PageHeader')

{{Lang::get('lang.ticket-details')}}

@stop user_id)->first(); $assignedto = App\User::where('id', '=', $tickets->assigned_to)->first(); $agent_group = Auth::user()->assign_group; $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where('group_status', '=', '1')->first(); ?> @section('sidebar')
  • {!! Lang::get('lang.Ticket_Information') !!}
  • {!! Lang::get('lang.Ticket_Id') !!}
    #{{$tickets->ticket_number}}
  • {!! Lang::get('lang.User') !!}
    {{$user->user_name}}
  • @if($tickets->assigned_to > 0) {!! Lang::get('lang.Assigned_To') !!}
    {{$assignedto->first_name}}
    @else {!! Lang::get('lang.Unassigned') !!} @endif
  • {!! Lang::get('lang.ticket_ratings') !!}
  • get(); ?> @foreach($ratings as $rating) @if($rating->rating_area == 'Helpdesk Area') id)->where('ticket_id', '=', $tickets->id)->first(); if ($rating_value == null) { $ratingval = '0'; } else { $ratingval = $rating_value->rating_value; } ?> {!! $rating->name !!}: rating_scale; $i++) { ?> /> @else id)->where('ticket_id', '=', $tickets->id)->avg('rating_value'); if ($rating_value == null) { $avg_rating = '0'; } else { $avg_rate = explode('.', $rating_value); $avg_rating = $avg_rate[0]; } ?> {!! $rating->name !!}: rating_scale; $i++) { ?> /> @endif @endforeach
  • @stop title != "") { $title = wordwrap($thread->title, 70, "
    \n"); } else { $title = ""; } ?> @section('content')

    {!! $thread->getSubject() !!}

    id)); if ($group->can_edit_ticket == 1) { ?> can_assign_ticket == 1) { ?> @if($tickets->assigned_to == Auth::user()->id) @endif {!! Lang::get('lang.generate_pdf') !!}
    can_delete_ticket == 1 || $group->can_ban_email == 1) { ?>
    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)->get(); ?> @foreach($response as $last) created_at; ?> @endforeach {!! Lang::get('lang.last_response') !!}: {{ UTC::usertimezone($ResponseDate) }}
    status)->first(); ?>priority_id)->first(); ?>dept_id)->first(); ?> @if($user->ban > 0) @endif
    {!! Lang::get('lang.status') !!}: {{$status->name}}
    {!! Lang::get('lang.priority') !!}: {{$priority->priority_desc}}
    {!! Lang::get('lang.department') !!}: {{$dept123->name}}
    {!! Lang::get('lang.email') !!}: {{str_limit($user->email,30)}}
    {!! Lang::get('lang.this_ticket_is_under_banned_user')!!}
    user_id)->first(); $TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $thread->ticket_id)->where('is_internal', '=', 0)->max('id'); $TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->where('is_internal', '=', 0)->first(); $LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first(); if ($LastResponse->role == "user") { $rep = "#F39C12"; $username = $LastResponse->first_name . " " . $LastResponse->last_name; if ($LastResponse->first_name == null || $LastResponse->first_name == '') { $username = $LastResponse->user_name; } } else { $rep = "#000"; $username = $LastResponse->first_name . " " . $LastResponse->last_name; if ($LastResponse->first_name == null || $LastResponse->last_name == null) { $username = $LastResponse->user_name; } } if ($tickets->source > 0) { $ticket_source = App\Model\helpdesk\Ticket\Ticket_source::where('id', '=', $tickets->source)->first(); $ticket_source = $ticket_source->value; } else $ticket_source = $tickets->source; ?>
    @if($user->phone_number !=null)
    @endif @if($user->mobile !=null)@endif help_topic_id)->first(); ?>
    {!! Lang::get('lang.phone') !!}: {{$user->phone_number}}
    {!! Lang::get('lang.mobile') !!}: {{$user->ext . $user->mobile}}
    {!! Lang::get('lang.source') !!}: {{$ticket_source}}
    {!! Lang::get('lang.help_topic') !!}: {{$help_topic->topic}}
    {!! Lang::get('lang.last_message') !!}: {{str_limit($username,30)}}
    {!! Lang::get('lang.organization') !!}: {!!$LastResponse->getOrgWithLink()!!}
    id)->orderBy('id', 'DESC')->paginate(10); $ij = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->first(); ?>
      setPath(url('/thread/' . $tickets->id))->render(); ?>
    • created_at; $ConvDate = explode(' ', $ConvDate1); $date = $ConvDate[0]; $time = $ConvDate[1]; $time = substr($time, 0, -3); if (isset($data) && $date == $data) { } else { ?> {{date_format($conversation->created_at, 'd/m/Y')}} user_id != null) { $role = App\User::where('id', '=', $conversation->user_id)->first(); } ?>
    • is_internal) { ?> user_id != null) { if ($role->role == 'agent' || $role->role == 'admin') { ?> role == 'user') { ?> id)->first(); if ($attachment == null) { $body = $conversation->body; $body = $conversation->thread($body); } else { // dd($attachment->file); // print $attachment->file; // header("Content-type: image/jpeg"); // echo " "; $body = $conversation->body; $body = $conversation->thread($body); $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get(); // $i = 0; foreach ($attachments as $attachment) { // $i++; if (mime($attachment->type)==true) { $image = @imagecreatefromstring($attachment->file); ob_start(); imagejpeg($image, null, 80); $data = ob_get_contents(); ob_end_clean(); $var = ''; // echo $var; // echo $attachment->name; // $body = explode($attachment->name, $body); $body = str_replace($attachment->name, "data:image/" . $attachment->type . ";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); } } else { } } // echo $body; // $body = explode($attachment->file, $body); // $body = $body[0]; } $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($conversation->user_id != null) { if ($conversation->is_internal) { $color = '#A19CFF'; // echo $color; } else { if ($role->role == 'agent' || $role->role == 'admin') { $color = '#F9B03B'; } elseif ($role->role == 'user') { $color = '#38D8FF'; } else { $color = '#605CA8'; } } } ?>
      @if($role) @if($role->role != null) @if($role->role != 'user' && $conversation->is_internal != 1) @foreach($ratings as $rating) @if($rating->rating_area == 'Comment Area') id)->where('thread_id', '=', $conversation->id)->first(); if ($rating_value == null) { $ratingval = '0'; } else { $ratingval = $rating_value->rating_value; } ?>   @endif @endforeach @endif @endif @endif
      {!! $rating->name !!}  
      rating_scale; $i++) { ?> />     

      user_id != null) { if ($role->first_name == '' || $role->first_name == null) { $usernam = $role->user_name; } else { $usernam = $role->first_name . " " . $role->last_name; } } else { $usernam = Lang::get('lang.system'); } ?>
      @if($conversation->user_id != null) User Image @else img-circle img-bordered-sm @endif @if($conversation->user_id != null) {!! str_limit($usernam,30) !!} @else {!! str_limit($usernam,30) !!} @endif {{UTC::usertimezone($conversation->created_at)}} @if($conversation->id == $ij->id) @endif

      @if($conversation->firstContent()=='yes')
      @else {!! $body !!} @endif @if($conversation->id == $ij->id) id)->get(); ?> @if(isset($ticket_form_datas))
      @foreach($ticket_form_datas as $ticket_form_data) @endforeach @endif @endif


    • id ?>
      • setPath(url('/thread/' . $tickets->id))->render(); ?>
    can_edit_ticket == 1) { ?> can_ban_email == 1) { ?> can_assign_ticket == 1) { ?>
    first(); ?> @stop