@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | @endif |
22 | 22 | <?php |
23 | 23 | define('PROBE_VERSION', '1.0'); |
24 | -define('PROBE_FOR', 'Faveo HELPDESK '. Config::get('app.version').' and Newer'); |
|
24 | +define('PROBE_FOR', 'Faveo HELPDESK '.Config::get('app.version').' and Newer'); |
|
25 | 25 | define('STATUS_OK', 'Ok'); |
26 | 26 | define('STATUS_WARNING', 'Warning'); |
27 | 27 | define('STATUS_ERROR', 'Error'); |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | |
55 | 55 | function validate_php(&$results) { |
56 | 56 | if (version_compare(PHP_VERSION, '5.5') == -1) { |
57 | - $results[] = new TestResult('Minimum PHP version required in order to run Faveo HELPDESK is PHP 5.5. Your PHP version: ' . PHP_VERSION, STATUS_ERROR); |
|
57 | + $results[] = new TestResult('Minimum PHP version required in order to run Faveo HELPDESK is PHP 5.5. Your PHP version: '.PHP_VERSION, STATUS_ERROR); |
|
58 | 58 | return false; |
59 | 59 | } else { |
60 | - $results[] = new TestResult('Your PHP version is ' . PHP_VERSION, STATUS_OK); |
|
60 | + $results[] = new TestResult('Your PHP version is '.PHP_VERSION, STATUS_OK); |
|
61 | 61 | return true; |
62 | 62 | } // if |
63 | 63 | } // validate_php |
@@ -94,18 +94,18 @@ discard block |
||
94 | 94 | function checkFilePermission(&$results) |
95 | 95 | { |
96 | 96 | $path2 = base_path().DIRECTORY_SEPARATOR.'storage'; |
97 | - $f2 = substr(sprintf("%o",fileperms($path2)),-3); |
|
98 | - if (file_exists(base_path() . DIRECTORY_SEPARATOR . "example.env")) { |
|
97 | + $f2 = substr(sprintf("%o", fileperms($path2)), -3); |
|
98 | + if (file_exists(base_path().DIRECTORY_SEPARATOR."example.env")) { |
|
99 | 99 | $path1 = base_path().DIRECTORY_SEPARATOR.'example.env'; |
100 | - $f1 = substr(sprintf("%o",fileperms($path1)),-3); |
|
100 | + $f1 = substr(sprintf("%o", fileperms($path1)), -3); |
|
101 | 101 | } else { |
102 | 102 | $f1 = '644'; |
103 | 103 | } |
104 | - if( $f1 >= '644' && $f2 >= '755') { |
|
104 | + if ($f1 >= '644' && $f2 >= '755') { |
|
105 | 105 | $results[] = new TestResult('File permission looks fine', STATUS_OK); |
106 | 106 | return true; |
107 | 107 | } else { |
108 | - if(isset($path1)){ |
|
108 | + if (isset($path1)) { |
|
109 | 109 | $results[] = new TestResult('File permissions needed.<ul><b>Change file permission for following files</b><li>'.$path1.'%nbsp: \'644\'</li><li>'.$path2.'%nbsp: \'755\'</li></ul></br>Change the permission manually on your server or <a href="change-file-permission">click here.</a>', STATUS_ERROR); |
110 | 110 | } else { |
111 | 111 | $results[] = new TestResult('File permissions needed.<ul><b>Change file permission to "755" for following files</b><li>'.$path2.'</li></ul></br>Change the permission manually on your server or <a href="change-file-permission">click here.</a>', STATUS_ERROR); |
@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | $formatted_memory_limit = $memory_limit === -1 ? 'unlimited' : format_file_size($memory_limit); |
126 | 126 | |
127 | 127 | if ($memory_limit === -1 || $memory_limit >= 67108864) { |
128 | - $results[] = new TestResult('Your memory limit is: ' . $formatted_memory_limit, STATUS_OK); |
|
128 | + $results[] = new TestResult('Your memory limit is: '.$formatted_memory_limit, STATUS_OK); |
|
129 | 129 | return true; |
130 | 130 | } else { |
131 | - $results[] = new TestResult('Your memory is too low to complete the installation. Minimal value is 64MB, and you have it set to ' . $formatted_memory_limit, STATUS_ERROR); |
|
131 | + $results[] = new TestResult('Your memory is too low to complete the installation. Minimal value is 64MB, and you have it set to '.$formatted_memory_limit, STATUS_ERROR); |
|
132 | 132 | return false; |
133 | 133 | } // if |
134 | 134 | } // validate_memory_limit |
@@ -153,11 +153,11 @@ discard block |
||
153 | 153 | foreach ($data as $unit => $bytes) { |
154 | 154 | $in_unit = $value / $bytes; |
155 | 155 | if ($in_unit > 0.9) { |
156 | - return trim(trim(number_format($in_unit, 2), '0'), '.') . $unit; |
|
156 | + return trim(trim(number_format($in_unit, 2), '0'), '.').$unit; |
|
157 | 157 | } // if |
158 | 158 | } // foreach |
159 | 159 | |
160 | - return $value . 'b'; |
|
160 | + return $value.'b'; |
|
161 | 161 | } // format_file_size |
162 | 162 | |
163 | 163 | function validate_zend_compatibility_mode(&$results) { |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | foreach ($sets as $key) { |
235 | 235 | $key = trim($key); |
236 | 236 | foreach ($required_functions as $value) { |
237 | - if($key == $value) { |
|
237 | + if ($key == $value) { |
|
238 | 238 | if (strpos(ini_get('disable_functions'), $key) !== false) { |
239 | 239 | $results[] = new TestResult("Function '$value' is required in order to run Faveo Helpdesk. Please check php.ini to enable this function or contact your server administrator", STATUS_ERROR); |
240 | 240 | $ok = false; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | function checkMaxExecutiontime(&$results) |
251 | 251 | { |
252 | 252 | $ok = true; |
253 | - if ((int)ini_get('max_execution_time') >= 120) { |
|
253 | + if ((int) ini_get('max_execution_time') >= 120) { |
|
254 | 254 | $results[] = new TestResult("Maximum execution time is as per requirement.", STATUS_OK); |
255 | 255 | } else { |
256 | 256 | $results[] = new TestResult("Maximum execution time is too low. Recommneded execution time is 120 seconds ", STATUS_WARNING); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | <p class="setup-actions step"> |
274 | 274 | <?php |
275 | 275 | foreach ($results as $result) { |
276 | - print '<span class="' . strtolower($result->status) . '">' . $result->status . '</span> — ' . $result->message . '<br/>'; |
|
276 | + print '<span class="'.strtolower($result->status).'">'.$result->status.'</span> — '.$result->message.'<br/>'; |
|
277 | 277 | } // foreach |
278 | 278 | ?> |
279 | 279 | </p> |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | @foreach($categorys as $category) |
54 | 54 | <?php |
55 | -$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get(); |
|
55 | +$num = \App\Model\kb\Relationship::where('category_id', '=', $category->id)->get(); |
|
56 | 56 | $article_id = $num->lists('article_id'); |
57 | 57 | $numcount = count($article_id); |
58 | 58 | ?> |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | <?php |
5 | 5 | //dd($arti); |
6 | -$all = App\Model\kb\Relationship::where('article_id','=', $arti->id)->get(); |
|
6 | +$all = App\Model\kb\Relationship::where('article_id', '=', $arti->id)->get(); |
|
7 | 7 | //dd($all); |
8 | 8 | /* from whole attribute pick the article_id */ |
9 | 9 | $category_id = $all->lists('category_id')->toArray(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | <?php $categorys = App\Model\kb\Category::all(); ?> |
145 | 145 | @foreach($categorys as $category) |
146 | 146 | <?php |
147 | -$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get(); |
|
147 | +$num = \App\Model\kb\Relationship::where('category_id', '=', $category->id)->get(); |
|
148 | 148 | $article_id = $num->lists('article_id'); |
149 | 149 | $numcount = count($article_id); |
150 | 150 | ?> |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | @foreach($categorys as $category) |
45 | 45 | <?php |
46 | -$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get(); |
|
46 | +$num = \App\Model\kb\Relationship::where('category_id', '=', $category->id)->get(); |
|
47 | 47 | $article_id = $num->lists('article_id'); |
48 | 48 | $numcount = count($article_id); |
49 | 49 | ?> |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $article = $article->where('status', '1'); |
67 | 67 | } |
68 | 68 | $article = $article->where('type', '1'); |
69 | - $article = $article->orderBy('publish_time','desc')->get(); |
|
69 | + $article = $article->orderBy('publish_time', 'desc')->get(); |
|
70 | 70 | ?> |
71 | 71 | @forelse($article as $arti) |
72 | 72 | <li> |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | @section('HeadInclude') |
3 | 3 | <link href="{{asset("lb-faveo/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" /> |
4 | 4 | @stop |
5 | -<?php $user = App\User::where('id', '=', $ticket->user_id)->first();?> |
|
6 | -<?php $assignedto = App\User::where('id', '=', $ticket->assigned_to)->first();?> |
|
5 | +<?php $user = App\User::where('id', '=', $ticket->user_id)->first(); ?> |
|
6 | +<?php $assignedto = App\User::where('id', '=', $ticket->assigned_to)->first(); ?> |
|
7 | 7 | @section('breadcrumb') |
8 | 8 | |
9 | 9 | <div class="site-hero clearfix"> |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | ?> |
91 | 91 | </div> |
92 | 92 | <div class="col-md-3"> |
93 | - <?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();?> |
|
93 | + <?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get(); ?> |
|
94 | 94 | @foreach($response as $last) |
95 | - <?php $ResponseDate = $last->created_at;?> |
|
95 | + <?php $ResponseDate = $last->created_at; ?> |
|
96 | 96 | @endforeach |
97 | 97 | <b>Last Response: </b> {{ UTC::usertimezone($ResponseDate) }} |
98 | 98 | </div> |
@@ -110,28 +110,28 @@ discard block |
||
110 | 110 | <div class="col-md-6"> |
111 | 111 | <table class="table table-hover"id="refresh"> |
112 | 112 | <tr><td><b>Ticket Number: </b></td><div><td>{{$ticket->ticket_number}}</td></div></tr> |
113 | - <tr><td><b>Priority:</b></td> <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?><td title="{{$priority->priority_desc}}">{{$priority->priority_desc}}</td></tr> |
|
114 | - <tr><td><b>Department:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id', '=', $ticket->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr> |
|
113 | + <tr><td><b>Priority:</b></td> <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?><td title="{{$priority->priority_desc}}">{{$priority->priority_desc}}</td></tr> |
|
114 | + <tr><td><b>Department:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id', '=', $ticket->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr> |
|
115 | 115 | <tr><td><b>Email:</b></td><td>{{$user->email}}</td></tr> |
116 | 116 | </table> |
117 | 117 | </div> |
118 | 118 | <div class="col-md-6"> |
119 | 119 | <?php |
120 | - $user_phone = App\User::where('mobile','=',$thread->user_id)->first(); |
|
120 | + $user_phone = App\User::where('mobile', '=', $thread->user_id)->first(); |
|
121 | 121 | |
122 | 122 | $TicketData = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $thread->ticket_id)->max('id'); |
123 | 123 | $TicketDatarow = App\Model\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first(); |
124 | 124 | $LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first(); |
125 | - if($LastResponse->role == "user") { |
|
125 | + if ($LastResponse->role == "user") { |
|
126 | 126 | $rep = "#F39C12"; |
127 | 127 | $username = $LastResponse->user_name; |
128 | - } else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name; |
|
129 | - if($LastResponse->first_name==null || $LastResponse->last_name==null) { |
|
128 | + } else { $rep = "#000"; $username = $LastResponse->first_name." ".$LastResponse->last_name; |
|
129 | + if ($LastResponse->first_name == null || $LastResponse->last_name == null) { |
|
130 | 130 | $username = $LastResponse->user_name; |
131 | 131 | }} |
132 | - if($ticket->source > 0) |
|
132 | + if ($ticket->source > 0) |
|
133 | 133 | { |
134 | - $ticket_source = App\Model\Ticket\Ticket_source::where('id','=',$ticket->source)->first(); |
|
134 | + $ticket_source = App\Model\Ticket\Ticket_source::where('id', '=', $ticket->source)->first(); |
|
135 | 135 | $ticket_source = $ticket_source->value; |
136 | 136 | } |
137 | 137 | else |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | ?> |
141 | 141 | <table class="table table-hover"> |
142 | 142 | @if($user_phone != null)<tr><td><b>Phone:</b></td> <td>{{$user_phone->mobile}}</td></tr>@endif |
143 | - <tr><td><b>Status:</b></td> <div><?php $status = App\Model\Ticket\Ticket_Status::where('id', '=', $ticket->status)->first();?><td title="{{$status->properties}}">{{$status->name}}</td></div></tr> |
|
144 | - <tr><td><b>Help Topic:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id', '=', $ticket->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr> |
|
143 | + <tr><td><b>Status:</b></td> <div><?php $status = App\Model\Ticket\Ticket_Status::where('id', '=', $ticket->status)->first(); ?><td title="{{$status->properties}}">{{$status->name}}</td></div></tr> |
|
144 | + <tr><td><b>Help Topic:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id', '=', $ticket->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr> |
|
145 | 145 | <tr><td><b>Last Message:</b></td> <td>{{$username}}</td></tr> |
146 | 146 | <tr><td><b>Source:</b></td> <td>{{$ticket_source}}</td></tr> |
147 | 147 | </table> |
@@ -372,21 +372,21 @@ discard block |
||
372 | 372 | </span> <?php |
373 | 373 | $data = $ConvDate[0]; |
374 | 374 | } |
375 | - $role = App\User::where('id','=',$conversation->user_id)->first(); |
|
375 | + $role = App\User::where('id', '=', $conversation->user_id)->first(); |
|
376 | 376 | ?> |
377 | 377 | </li> |
378 | 378 | <li> |
379 | - <?php if($conversation->is_internal) { ?> |
|
379 | + <?php if ($conversation->is_internal) { ?> |
|
380 | 380 | <i class="fa fa-tag bg-purple" title="Posted by System"></i> |
381 | - <?php }else{ if ($role->role == 'agent' || $role->role == 'admin') { ?> |
|
381 | + <?php } else { if ($role->role == 'agent' || $role->role == 'admin') { ?> |
|
382 | 382 | <i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i> |
383 | 383 | <?php } elseif ($role->role == 'user') { ?> |
384 | 384 | <i class="fa fa-user bg-aqua" title="Posted by Customer"></i> |
385 | 385 | <?php } else { ?> |
386 | 386 | <i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i> |
387 | 387 | <?php } } |
388 | - $attachment = App\Model\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first(); |
|
389 | - if($attachment == null ) { |
|
388 | + $attachment = App\Model\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first(); |
|
389 | + if ($attachment == null) { |
|
390 | 390 | $body = $conversation->body; |
391 | 391 | } |
392 | 392 | else { |
@@ -396,18 +396,18 @@ discard block |
||
396 | 396 | // echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> "; |
397 | 397 | $body = $conversation->body; |
398 | 398 | |
399 | - $attachments = App\Model\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get(); |
|
399 | + $attachments = App\Model\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get(); |
|
400 | 400 | |
401 | 401 | // $i = 0; |
402 | 402 | |
403 | - foreach($attachments as $attachment) |
|
403 | + foreach ($attachments as $attachment) |
|
404 | 404 | { |
405 | 405 | |
406 | 406 | // $i++; |
407 | - if($attachment->type == 'pdf') |
|
407 | + if ($attachment->type == 'pdf') |
|
408 | 408 | { |
409 | 409 | // echo "hello"; |
410 | - }elseif($attachment->type == 'docx') |
|
410 | + }elseif ($attachment->type == 'docx') |
|
411 | 411 | { |
412 | 412 | // echo "hello"; |
413 | 413 | } |
@@ -418,26 +418,26 @@ discard block |
||
418 | 418 | imagejpeg($image, null, 80); |
419 | 419 | $data = ob_get_contents(); |
420 | 420 | ob_end_clean(); |
421 | - $var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />'; |
|
421 | + $var = '<img src="data:image/jpg;base64,'.base64_encode($data).'" />'; |
|
422 | 422 | // echo $var; |
423 | 423 | // echo $attachment->name; |
424 | 424 | // $body = explode($attachment->name, $body); |
425 | - $body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body); |
|
425 | + $body = str_replace($attachment->name, "data:image/jpg;base64,".base64_encode($data), $body); |
|
426 | 426 | |
427 | 427 | $string = $body; |
428 | 428 | $start = "<head>"; |
429 | 429 | $end = "</head>"; |
430 | - if(strpos($string,$start) == false || strpos($string,$start) == false) |
|
430 | + if (strpos($string, $start) == false || strpos($string, $start) == false) |
|
431 | 431 | { |
432 | 432 | } |
433 | 433 | else |
434 | 434 | { |
435 | - $ini = strpos($string,$start); |
|
435 | + $ini = strpos($string, $start); |
|
436 | 436 | $ini += strlen($start); |
437 | - $len = strpos($string,$end,$ini) - $ini; |
|
438 | - $parsed = substr($string,$ini,$len); |
|
437 | + $len = strpos($string, $end, $ini) - $ini; |
|
438 | + $parsed = substr($string, $ini, $len); |
|
439 | 439 | $body2 = $parsed; |
440 | - $body = str_replace($body2 ," " ,$body); |
|
440 | + $body = str_replace($body2, " ", $body); |
|
441 | 441 | } |
442 | 442 | } |
443 | 443 | } |
@@ -452,24 +452,24 @@ discard block |
||
452 | 452 | $string = $body; |
453 | 453 | $start = "<head>"; |
454 | 454 | $end = "</head>"; |
455 | - if(strpos($string,$start) == false || strpos($string,$start) == false) |
|
455 | + if (strpos($string, $start) == false || strpos($string, $start) == false) |
|
456 | 456 | { |
457 | 457 | } |
458 | 458 | else |
459 | 459 | { |
460 | - $ini = strpos($string,$start); |
|
460 | + $ini = strpos($string, $start); |
|
461 | 461 | $ini += strlen($start); |
462 | - $len = strpos($string,$end,$ini) - $ini; |
|
463 | - $parsed = substr($string,$ini,$len); |
|
462 | + $len = strpos($string, $end, $ini) - $ini; |
|
463 | + $parsed = substr($string, $ini, $len); |
|
464 | 464 | $body2 = $parsed; |
465 | - $body = str_replace($body2 ," " ,$body); |
|
465 | + $body = str_replace($body2, " ", $body); |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | ?> |
469 | 469 | <div class="timeline-item"> |
470 | 470 | <span id="date" class="time" style="color:#fff;"><i class="fa fa-clock-o"> </i> {{date_format($conversation->created_at, 'd/m/Y H:i:s')}}</span> |
471 | 471 | <h3 class="timeline-header" style="background-color:<?php |
472 | - if($conversation->is_internal) |
|
472 | + if ($conversation->is_internal) |
|
473 | 473 | { |
474 | 474 | $color = '#046380'; |
475 | 475 | echo $color; |
@@ -492,49 +492,49 @@ discard block |
||
492 | 492 | } |
493 | 493 | ?>; |
494 | 494 | "> |
495 | - <a href="#" style="color:#fff;"><?php if($role->role == "user") {echo $role->user_name; } else { echo $role->first_name . " " . $role->last_name; } ?> </a></h3> |
|
495 | + <a href="#" style="color:#fff;"><?php if ($role->role == "user") {echo $role->user_name; } else { echo $role->first_name." ".$role->last_name; } ?> </a></h3> |
|
496 | 496 | <div class="timeline-body"> |
497 | 497 | {!! $body !!} |
498 | 498 | |
499 | 499 | </div> |
500 | 500 | <div class="timeline-footer" style="margin-bottom:-5px"> |
501 | 501 | @if(!$conversation->is_internal) |
502 | - <?php Event::fire(new App\Events\Timeline($conversation,$role,$user)); ?> |
|
502 | + <?php Event::fire(new App\Events\Timeline($conversation, $role, $user)); ?> |
|
503 | 503 | @endif |
504 | 504 | <?php |
505 | - $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get(); |
|
505 | + $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get(); |
|
506 | 506 | $i = 0; |
507 | - foreach($attachments as $attachment) { |
|
508 | - if($attachment->poster == 'ATTACHMENT') { |
|
507 | + foreach ($attachments as $attachment) { |
|
508 | + if ($attachment->poster == 'ATTACHMENT') { |
|
509 | 509 | $i++; |
510 | 510 | } |
511 | 511 | } |
512 | - if($i>0) |
|
512 | + if ($i > 0) |
|
513 | 513 | { |
514 | 514 | echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>".$i." </b> Attachments</h4>"; |
515 | 515 | } |
516 | 516 | ?> |
517 | 517 | <ul class='mailbox-attachments clearfix'> |
518 | 518 | <?php |
519 | - foreach($attachments as $attachment) |
|
519 | + foreach ($attachments as $attachment) |
|
520 | 520 | { |
521 | 521 | |
522 | 522 | $size = $attachment->size; |
523 | - $units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); |
|
523 | + $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); |
|
524 | 524 | $power = $size > 0 ? floor(log($size, 1024)) : 0; |
525 | - $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power]; |
|
525 | + $value = number_format($size / pow(1024, $power), 2, '.', ',').' '.$units[$power]; |
|
526 | 526 | |
527 | 527 | |
528 | - if($attachment->poster == 'ATTACHMENT') |
|
528 | + if ($attachment->poster == 'ATTACHMENT') |
|
529 | 529 | { |
530 | - 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') |
|
530 | + 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') |
|
531 | 531 | { |
532 | 532 | $image = @imagecreatefromstring($attachment->file); |
533 | 533 | ob_start(); |
534 | 534 | imagejpeg($image, null, 80); |
535 | 535 | $data = ob_get_contents(); |
536 | 536 | ob_end_clean(); |
537 | - $var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>'; |
|
537 | + $var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,'.base64_encode($data).'"/></a>'; |
|
538 | 538 | |
539 | 539 | |
540 | 540 | echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">'.$var.'</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></div></li>'; |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | <i class="fa fa-clock-o bg-gray"></i> |
559 | 559 | </li> |
560 | 560 | <ul class="pull-right"> |
561 | -<?php echo $conversations->setPath(url('/thread/' . $ticket->id))->render();?> |
|
561 | +<?php echo $conversations->setPath(url('/thread/'.$ticket->id))->render(); ?> |
|
562 | 562 | </ul> |
563 | 563 | </ul> |
564 | 564 | </div><!-- /.col --> |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | <div class="modal-body" > |
643 | 643 | <div class="form-group has-feedback"> |
644 | 644 | <!-- <input type="text" class="form-control" id="search" name="search" placeholder="Search Users"\> --> |
645 | -<?php $users = App\User::where('role', '=', 'user')->get();?> |
|
645 | +<?php $users = App\User::where('role', '=', 'user')->get(); ?> |
|
646 | 646 | Add another Owner |
647 | 647 | <select name="SelectOwner" class="form-control"> |
648 | 648 | @foreach($users as $user) |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | <div class="row"> |
657 | 657 | <div class="col-md-2"><spam class="glyphicon glyphicon-user fa-5x"></spam></div> |
658 | 658 | <div class="col-md-10"> |
659 | -<?php $user = App\User::where('id', '=', $ticket->user_id)->first();?> |
|
659 | +<?php $user = App\User::where('id', '=', $ticket->user_id)->first(); ?> |
|
660 | 660 | |
661 | 661 | <b>User Details</b><br/> |
662 | 662 | {!! $user->user_name !!}<br/>{!! $user->email !!}<br/> |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | <p>Whom do you want to assign ticket?</p> |
690 | 690 | |
691 | 691 | <select id="asssign" class="form-control" name="user"> |
692 | -<?php $assign = App\User::where('role', '=', 'agent')->get();?> |
|
692 | +<?php $assign = App\User::where('role', '=', 'agent')->get(); ?> |
|
693 | 693 | @foreach($assign as $user) |
694 | 694 | <option value="{{$user->email}}">{{$user->user_name}}</option> |
695 | 695 | @endforeach |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | } |
297 | 297 | } |
298 | 298 | if ($i > 0) { |
299 | - echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>" . $i . " </b> Attachments</h4>"; |
|
299 | + echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>".$i." </b> Attachments</h4>"; |
|
300 | 300 | } |
301 | 301 | ?> |
302 | 302 | <ul class='mailbox-attachments clearfix'> |
@@ -305,17 +305,17 @@ discard block |
||
305 | 305 | $size = $attachment->size; |
306 | 306 | $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); |
307 | 307 | $power = $size > 0 ? floor(log($size, 1024)) : 0; |
308 | - $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power]; |
|
308 | + $value = number_format($size / pow(1024, $power), 2, '.', ',').' '.$units[$power]; |
|
309 | 309 | if ($attachment->poster == 'ATTACHMENT') { |
310 | 310 | if (mime($attachment->type) == true) { |
311 | - $var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . $attachment->file . '"/></a>'; |
|
311 | + $var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,'.$attachment->file.'"/></a>'; |
|
312 | 312 | |
313 | - echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>'; |
|
313 | + echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">'.$var.'</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></div></li>'; |
|
314 | 314 | } else { |
315 | 315 | //$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:'.$attachment->type.';base64,' . base64_encode($data) . '"/></a>'; |
316 | - $var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff; font-size:18px;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>'; |
|
316 | + $var = '<a style="max-width:200px;height:133px;color:#666;" href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff; font-size:18px;">'.strtoupper($attachment->type).'</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">'.$attachment->name.'</b><br/><p>'.$value.'</p></span></div></a>'; |
|
317 | 317 | |
318 | - echo '<li style="background-color:#f4f4f4;">' . $var . '</li>'; |
|
318 | + echo '<li style="background-color:#f4f4f4;">'.$var.'</li>'; |
|
319 | 319 | } |
320 | 320 | } |
321 | 321 | } |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | <?php } |
334 | 334 | ?> |
335 | 335 | <div class="pull-right" style="margin-top:-30px;margin-bottom:-30px"> |
336 | - <?php echo $conversations->setPath(url('check_ticket/{' . $id . '}'))->render(); ?> |
|
336 | + <?php echo $conversations->setPath(url('check_ticket/{'.$id.'}'))->render(); ?> |
|
337 | 337 | </div> |
338 | 338 | <br/><br/> |
339 | 339 | @if(Session::has('success1')) |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $string = $stringCut.'....'; |
79 | 79 | } |
80 | 80 | $TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id) |
81 | - ->where('user_id', '!=' , null) |
|
81 | + ->where('user_id', '!=', null) |
|
82 | 82 | ->max('id'); |
83 | 83 | $TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first(); |
84 | 84 | $LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first(); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $username = $LastResponse->user_name; |
88 | 88 | } else { |
89 | 89 | $rep = "#000"; |
90 | - $username = $LastResponse->first_name . " " . $LastResponse->last_name; |
|
90 | + $username = $LastResponse->first_name." ".$LastResponse->last_name; |
|
91 | 91 | if ($LastResponse->first_name == null || $LastResponse->last_name == null) { |
92 | 92 | $username = $LastResponse->user_name; |
93 | 93 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $string = strip_tags($title->title); |
165 | 165 | if (strlen($string) > 40) { |
166 | 166 | $stringCut = substr($string, 0, 40); |
167 | - $string = substr($stringCut, 0, strrpos($stringCut, ' ')) . ' ...'; |
|
167 | + $string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...'; |
|
168 | 168 | } |
169 | 169 | $TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id'); |
170 | 170 | $TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first(); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $username = $LastResponse->user_name; |
175 | 175 | } else { |
176 | 176 | $rep = "#000"; |
177 | - $username = $LastResponse->first_name . " " . $LastResponse->last_name; |
|
177 | + $username = $LastResponse->first_name." ".$LastResponse->last_name; |
|
178 | 178 | if ($LastResponse->first_name == null || $LastResponse->last_name == null) { |
179 | 179 | $username = $LastResponse->user_name; |
180 | 180 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | @extends('themes.default1.client.layout.client') |
2 | -<?php $user = App\User::where('id','=',$tickets->user_id)->first();?> |
|
2 | +<?php $user = App\User::where('id', '=', $tickets->user_id)->first(); ?> |
|
3 | 3 | |
4 | 4 | @section('nav1') |
5 | 5 | class="active" |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | <section class="content" id="refresh"> |
77 | 77 | <div class="col-md-12"> |
78 | 78 | <?php |
79 | - $priority = App\Model\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first(); |
|
79 | + $priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); |
|
80 | 80 | ?> |
81 | 81 | <div class="callout callout-{!! $priority->priority_color !!}"> |
82 | 82 | <div class="row"> |
83 | 83 | <div class="col-md-3"> |
84 | 84 | <?php |
85 | 85 | $sla = $tickets->sla; |
86 | - $SlaPlan = App\Model\Manage\Sla_plan::where('id','=',1)->first();?> |
|
86 | + $SlaPlan = App\Model\Manage\Sla_plan::where('id', '=', 1)->first(); ?> |
|
87 | 87 | <b>SLA Plan: {{$SlaPlan->grace_period}} </b> |
88 | 88 | </div> |
89 | 89 | <div class="col-md-3"> |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | ?> |
100 | 100 | </div> |
101 | 101 | <div class="col-md-3"> |
102 | - <?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->get();?> |
|
102 | + <?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?> |
|
103 | 103 | @foreach($response as $last) |
104 | - <?php $ResponseDate = $last->created_at; ?> |
|
104 | + <?php $ResponseDate = $last->created_at; ?> |
|
105 | 105 | @endforeach |
106 | 106 | <b>Last Response: </b> {{date_format($ResponseDate, 'd/m/Y H:i:s')}} |
107 | 107 | </div> |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | <div class="col-md-6"> |
112 | 112 | <table class="table table-hover"> |
113 | 113 | <!-- <tr><th></th><th></th></tr> --> |
114 | - <tr><td><b>Status:</b></td> <?php $status = App\Model\Ticket\Ticket_Status::where('id','=',$tickets->status)->first();?><td title="{{$status->properties}}">{{$status->state}}</td></tr> |
|
115 | - <tr><td><b>Priority:</b></td> <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();?><td title="{{$priority->priority_desc}}">{{$priority->priority}}</td></tr> |
|
116 | - <tr><td><b>Department:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->department}}</td></tr> |
|
114 | + <tr><td><b>Status:</b></td> <?php $status = App\Model\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?><td title="{{$status->properties}}">{{$status->state}}</td></tr> |
|
115 | + <tr><td><b>Priority:</b></td> <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?><td title="{{$priority->priority_desc}}">{{$priority->priority}}</td></tr> |
|
116 | + <tr><td><b>Department:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->department}}</td></tr> |
|
117 | 117 | |
118 | 118 | </table> |
119 | 119 | <!-- </div> --> |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | <!-- <div class="callout callout-success"> --> |
123 | 123 | <table class="table table-hover"> |
124 | 124 | <!-- <tr><th></th><th></th></tr> --> |
125 | - <tr><td><b>Help Topic:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr> |
|
125 | + <tr><td><b>Help Topic:</b></td> <?php $help_topic = App\Model\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr> |
|
126 | 126 | <tr><td><b>Last Message:</b></td> <td>{{$last->poster}}</td></tr> |
127 | 127 | </table> |
128 | 128 | </div> |
@@ -305,18 +305,18 @@ discard block |
||
305 | 305 | <!-- The time line --> |
306 | 306 | <ul class="timeline"> |
307 | 307 | <!-- timeline time label --> |
308 | - <?php $conversations = App\Model\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->paginate(2); |
|
308 | + <?php $conversations = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->paginate(2); |
|
309 | 309 | foreach ($conversations as $conversation) { |
310 | 310 | ?> |
311 | 311 | <li class="time-label"> |
312 | 312 | <?php |
313 | 313 | $ConvDate1 = $conversation->created_at; |
314 | - $ConvDate = explode(' ',$ConvDate1); |
|
314 | + $ConvDate = explode(' ', $ConvDate1); |
|
315 | 315 | |
316 | 316 | $date = $ConvDate[0]; |
317 | 317 | $time = $ConvDate[1]; |
318 | 318 | $time = substr($time, 0, -3); |
319 | - if(isset($data) && $date==$data){ |
|
319 | + if (isset($data) && $date == $data) { |
|
320 | 320 | } else { |
321 | 321 | ?> <span class="bg-green"> |
322 | 322 | {{date_format($conversation->created_at, 'd/m/Y')}} |
@@ -326,9 +326,9 @@ discard block |
||
326 | 326 | ?> |
327 | 327 | </li> |
328 | 328 | <li> |
329 | - <?php if($conversation->staff_id > 0) { ?> |
|
329 | + <?php if ($conversation->staff_id > 0) { ?> |
|
330 | 330 | <i class="fa fa-group bg-yellow" title="Posted by Support Team"></i> |
331 | - <?php } elseif($conversation->user_id > 0) { ?> |
|
331 | + <?php } elseif ($conversation->user_id > 0) { ?> |
|
332 | 332 | <i class="fa fa-user bg-aqua" title="Posted by Customer"></i> |
333 | 333 | <?php } else { ?> |
334 | 334 | <i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i> |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | <i class="fa fa-clock-o bg-gray"></i> |
348 | 348 | </li> |
349 | 349 | <ul class="pull-right"> |
350 | - <?php echo $conversations->setPath( url('/thread/'.'1'))->render(); ?> |
|
350 | + <?php echo $conversations->setPath(url('/thread/'.'1'))->render(); ?> |
|
351 | 351 | </ul> |
352 | 352 | </ul> |
353 | 353 | </div><!-- /.col --> |