Completed
Push — master ( bcb82e...80085e )
by vijay
07:39
created
views/themes/default1/client/helpdesk/guest-user/mytickets.blade.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                 <?php
36 36
 $counted = count(App\Model\Ticket\Tickets::where('status', '=', 1)->get());
37 37
 if ($counted < 20) {
38
-	echo $counted . "/" . $counted;
38
+	echo $counted."/".$counted;
39 39
 } else {
40
-	echo "20/" . $counted;
40
+	echo "20/".$counted;
41 41
 }
42 42
 ?>
43 43
             </div>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 </th>
69 69
                 </thead>
70 70
                 <tbody id="hello">
71
-                    <?php $tickets = App\Model\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20);?>
71
+                    <?php $tickets = App\Model\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20); ?>
72 72
 
73 73
                      @foreach ($tickets  as $ticket )
74 74
                     <tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
@@ -83,22 +83,22 @@  discard block
 block discarded – undo
83 83
                         $TicketData = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
84 84
                         $TicketDatarow = App\Model\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
85 85
                         $LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first(); 
86
-                        if($LastResponse->role == "user") {
86
+                        if ($LastResponse->role == "user") {
87 87
                             $rep = "#F39C12";
88 88
                             $username = $LastResponse->user_name;
89
-                            } else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name; 
90
-                            if($LastResponse->first_name==null || $LastResponse->last_name==null) {
89
+                            } else { $rep = "#000"; $username = $LastResponse->first_name." ".$LastResponse->last_name; 
90
+                            if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
91 91
                                 $username = $LastResponse->user_name;
92 92
                             }}   
93 93
                         $titles = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
94 94
                         $count = count($titles);
95
-                        foreach($titles as $title)
95
+                        foreach ($titles as $title)
96 96
                         {
97 97
                             $title = $title;
98 98
                         }   ?>
99 99
                         <td class="mailbox-name"><a href="{!! URL('myticket',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}}   </a> ({!! $count!!}) <i class="fa fa-comment"></i></td>
100 100
                         <td class="mailbox-Id">#{!! $ticket->ticket_number !!}</td>
101
-                        <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
101
+                        <?php $priority = App\Model\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
102 102
                         <td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
103 103
                         
104 104
                 <td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 </tbody>
110 110
             </table><!-- /.table -->
111 111
             <div class="pull-right">
112
-                <?php echo $tickets->setPath(url('/ticket'))->render();?>&nbsp;
112
+                <?php echo $tickets->setPath(url('/ticket'))->render(); ?>&nbsp;
113 113
             </div>
114 114
         </div><!-- /.mail-box-messages -->
115 115
     </div><!-- /.box-body -->
Please login to merge, or discard this patch.
views/themes/default1/client/helpdesk/guest-user/view_ticket.blade.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 @extends('themes.default1.client.layout.client')
2
-<?php $user = App\User::where('id', '=', $tickets->user_id)->first();?>
3
-<?php $assignedto = App\User::where('id', '=', $tickets->assigned_to)->first();?>
2
+<?php $user = App\User::where('id', '=', $tickets->user_id)->first(); ?>
3
+<?php $assignedto = App\User::where('id', '=', $tickets->assigned_to)->first(); ?>
4 4
 
5 5
 @section('sidebar')
6 6
 <li class="header">TICKET INFORMATION</li>
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 ?>
113 113
                             </div>
114 114
                             <div class="col-md-3">
115
-                                <?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get();?>
115
+                                <?php $response = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
116 116
                                 @foreach($response as $last)
117
-                                <?php $ResponseDate = $last->created_at;?>
117
+                                <?php $ResponseDate = $last->created_at; ?>
118 118
                                 @endforeach
119 119
                                 <b>Last Response: </b> {{ UTC::usertimezone($ResponseDate)}}
120 120
                             </div>
@@ -131,29 +131,29 @@  discard block
 block discarded – undo
131 131
                 <div id="hide2">
132 132
                 <div class="col-md-6">
133 133
                     <table class="table table-hover"id="refresh">
134
-                        <tr><td><b>Status:</b></td>       <div><?php $status = App\Model\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first();?><td title="{{$status->properties}}">{{$status->name}}</td></div></tr>
135
-                        <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_desc}}</td></tr>
136
-                        <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->topic}}</td></tr>
134
+                        <tr><td><b>Status:</b></td>       <div><?php $status = App\Model\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?><td title="{{$status->properties}}">{{$status->name}}</td></div></tr>
135
+                        <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_desc}}</td></tr>
136
+                        <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->topic}}</td></tr>
137 137
                         <tr><td><b>Email:</b></td>        <td>{{$user->email}}</td></tr>
138 138
                     </table>
139 139
                 </div>
140 140
                 <div class="col-md-6">
141 141
 <?php 
142
-    $user_phone = App\User::where('mobile','=',$thread->user_id)->first();
142
+    $user_phone = App\User::where('mobile', '=', $thread->user_id)->first();
143 143
 
144 144
     $TicketData = App\Model\Ticket\Ticket_Thread::where('ticket_id', '=', $thread->ticket_id)->max('id');
145 145
                         $TicketDatarow = App\Model\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
146 146
                         $LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first(); 
147
-                        if($LastResponse->role == "user") {
147
+                        if ($LastResponse->role == "user") {
148 148
                             $rep = "#F39C12";
149 149
                             $username = $LastResponse->user_name;
150
-                            } else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name; 
151
-                            if($LastResponse->first_name==null || $LastResponse->last_name==null) {
150
+                            } else { $rep = "#000"; $username = $LastResponse->first_name." ".$LastResponse->last_name; 
151
+                            if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
152 152
                                 $username = $LastResponse->user_name;
153 153
                             }}   
154
-                        if($tickets->source > 0)
154
+                        if ($tickets->source > 0)
155 155
                         {
156
-                            $ticket_source = App\Model\Ticket\Ticket_source::where('id','=',$tickets->source)->first();
156
+                            $ticket_source = App\Model\Ticket\Ticket_source::where('id', '=', $tickets->source)->first();
157 157
                             $ticket_source = $ticket_source->value;
158 158
                         }   
159 159
                         else
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                     <table class="table table-hover">
164 164
                         @if($user_phone != null)<tr><td><b>Phone:</b></td>          <td>{{$user_phone->mobile}}</td></tr>@endif
165 165
                         <tr><td><b>Source:</b></td>         <td>{{$ticket_source}}</td></tr>
166
-                        <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>
166
+                        <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>
167 167
                         <tr><td><b>Last Message:</b></td>   <td>{{$username}}</td></tr>
168 168
                     </table>
169 169
                 </div>
@@ -413,21 +413,21 @@  discard block
 block discarded – undo
413 413
                                     </span> <?php
414 414
 $data = $ConvDate[0];
415 415
 	}
416
-    $role = App\User::where('id','=',$conversation->user_id)->first();
416
+    $role = App\User::where('id', '=', $conversation->user_id)->first();
417 417
 	?>
418 418
                             </li>
419 419
                             <li>
420
-                                <?php if($conversation->is_internal) { ?>
420
+                                <?php if ($conversation->is_internal) { ?>
421 421
                                 <i class="fa fa-tag bg-purple" title="Posted by System"></i>
422
-                                    <?php }else{ if ($role->role == 'agent' || $role->role == 'admin') { ?>
422
+                                    <?php } else { if ($role->role == 'agent' || $role->role == 'admin') { ?>
423 423
                                     <i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
424 424
                                 <?php } elseif ($role->role == 'user') {  ?>
425 425
                                     <i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
426 426
                                 <?php } else { ?>
427 427
                                     <i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
428 428
     <?php } }
429
-    $attachment = App\Model\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
430
-    if($attachment == null ) {
429
+    $attachment = App\Model\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
430
+    if ($attachment == null) {
431 431
         $body = $conversation->body;
432 432
     }
433 433
     else {
@@ -437,18 +437,18 @@  discard block
 block discarded – undo
437 437
         // echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
438 438
         $body = $conversation->body;
439 439
 
440
-        $attachments = App\Model\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
440
+        $attachments = App\Model\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
441 441
 
442 442
         // $i = 0;
443 443
 
444
-                    foreach($attachments as $attachment)
444
+                    foreach ($attachments as $attachment)
445 445
                     {
446 446
 
447 447
                         // $i++;
448
-                        if($attachment->type == 'pdf')
448
+                        if ($attachment->type == 'pdf')
449 449
                         {
450 450
                             // echo "hello";
451
-                        }elseif($attachment->type == 'docx')
451
+                        }elseif ($attachment->type == 'docx')
452 452
                         {
453 453
                             // echo "hello";
454 454
                         }
@@ -459,26 +459,26 @@  discard block
 block discarded – undo
459 459
                         imagejpeg($image, null, 80);
460 460
                         $data = ob_get_contents();
461 461
                         ob_end_clean();
462
-                        $var  =  '<img src="data:image/jpg;base64,' .  base64_encode($data)  . '" />';
462
+                        $var  = '<img src="data:image/jpg;base64,'.base64_encode($data).'" />';
463 463
                         // echo $var;
464 464
                         // echo $attachment->name;
465 465
                         // $body = explode($attachment->name, $body);
466
-                        $body = str_replace($attachment->name, "data:image/jpg;base64," .  base64_encode($data), $body);
466
+                        $body = str_replace($attachment->name, "data:image/jpg;base64,".base64_encode($data), $body);
467 467
 
468 468
                             $string = $body;                        
469 469
                             $start = "<head>";
470 470
                             $end = "</head>";
471
-                            if(strpos($string,$start) == false || strpos($string,$start) == false)
471
+                            if (strpos($string, $start) == false || strpos($string, $start) == false)
472 472
                             {
473 473
                             }
474 474
                             else
475 475
                             {
476
-                            $ini = strpos($string,$start);
476
+                            $ini = strpos($string, $start);
477 477
                             $ini += strlen($start);
478
-                            $len = strpos($string,$end,$ini) - $ini;
479
-                            $parsed = substr($string,$ini,$len);
478
+                            $len = strpos($string, $end, $ini) - $ini;
479
+                            $parsed = substr($string, $ini, $len);
480 480
                             $body2 = $parsed;
481
-                            $body = str_replace($body2 ," " ,$body);
481
+                            $body = str_replace($body2, " ", $body);
482 482
                             }
483 483
                         }
484 484
                     }
@@ -493,24 +493,24 @@  discard block
 block discarded – undo
493 493
                             $string = $body;                        
494 494
                             $start = "<head>";
495 495
                             $end = "</head>";                            
496
-                            if(strpos($string,$start) == false || strpos($string,$start) == false)
496
+                            if (strpos($string, $start) == false || strpos($string, $start) == false)
497 497
                             {
498 498
                             }
499 499
                             else
500 500
                             {
501
-                            $ini = strpos($string,$start);
501
+                            $ini = strpos($string, $start);
502 502
                             $ini += strlen($start);
503
-                            $len = strpos($string,$end,$ini) - $ini;
504
-                            $parsed = substr($string,$ini,$len);
503
+                            $len = strpos($string, $end, $ini) - $ini;
504
+                            $parsed = substr($string, $ini, $len);
505 505
                             $body2 = $parsed;
506
-                            $body = str_replace($body2 ," " ,$body);
506
+                            $body = str_replace($body2, " ", $body);
507 507
                             }
508 508
 
509 509
     ?>
510 510
                                 <div class="timeline-item">
511 511
                                     <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>
512 512
                                     <h3 class="timeline-header"  style="background-color:<?php 
513
-                                    if($conversation->is_internal)
513
+                                    if ($conversation->is_internal)
514 514
                                     {
515 515
                                         $color = '#046380'; 
516 516
                                         echo $color; 
@@ -533,39 +533,39 @@  discard block
 block discarded – undo
533 533
                                     }
534 534
                                         ?>;
535 535
                                         ">
536
-                                        <a href="#" style="color:#fff;"><?php if($role->role == "user") {echo $role->user_name; } else { echo $role->first_name . " " . $role->last_name; } ?> </a></h3>
536
+                                        <a href="#" style="color:#fff;"><?php if ($role->role == "user") {echo $role->user_name; } else { echo $role->first_name." ".$role->last_name; } ?> </a></h3>
537 537
                                     <div class="timeline-body">
538 538
                                           {!! $body !!}
539 539
 
540 540
                                     </div>
541 541
                                     <div class="timeline-footer" >
542 542
                                         <?php 
543
-                                        $attachments = App\Model\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
543
+                                        $attachments = App\Model\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
544 544
                                         $i = 0;
545
-                                        foreach($attachments as $attachment) {
546
-                                        if($attachment->poster == 'ATTACHMENT') {
545
+                                        foreach ($attachments as $attachment) {
546
+                                        if ($attachment->poster == 'ATTACHMENT') {
547 547
                                             $i++;
548 548
                                             } 
549 549
                                         }
550
-                                        if($i>0)
550
+                                        if ($i > 0)
551 551
                                         {
552 552
                                         echo "<hr style='height:1px;color:#2D3244;background-color:#2D3244;''><h4 class='box-title'><b>".$i." </b> Attachments</h4>";
553 553
                                         }
554 554
                                         ?>
555 555
                                         <ul class='mailbox-attachments clearfix'>
556 556
                                         <?php
557
-                                        foreach($attachments as $attachment)
557
+                                        foreach ($attachments as $attachment)
558 558
                                         {
559
-                                            if($attachment->poster == 'ATTACHMENT')
559
+                                            if ($attachment->poster == 'ATTACHMENT')
560 560
                                             {
561
-                                                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')
561
+                                                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')
562 562
                                                 {
563 563
                                                 $image = imagecreatefromstring($attachment->file); 
564 564
                                                 ob_start();
565 565
                                                 imagejpeg($image, null, 80);
566 566
                                                 $data = ob_get_contents();
567 567
                                                 ob_end_clean();
568
-                                                $var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img src="data:image/jpg;base64,' . base64_encode($data)  . '"/></a>';
568
+                                                $var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img src="data:image/jpg;base64,'.base64_encode($data).'"/></a>';
569 569
                                                 echo '<li><span class="mailbox-attachment-icon has-img">'.$var.'</span></li>';
570 570
                                                 }
571 571
                                                 else
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
                             <i class="fa fa-clock-o bg-gray"></i>
588 588
                         </li>
589 589
                         <ul class="pull-right">
590
-<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render();?>
590
+<?php echo $conversations->setPath(url('/thread/'.$tickets->id))->render(); ?>
591 591
                         </ul>
592 592
                     </ul>
593 593
                 </div><!-- /.col -->
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
                 <div class="modal-body" >
672 672
                     <div class="form-group has-feedback">
673 673
                         <!-- <input type="text" class="form-control" id="search" name="search" placeholder="Search Users"\> -->
674
-<?php $users = App\User::where('role', '=', 'user')->get();?>
674
+<?php $users = App\User::where('role', '=', 'user')->get(); ?>
675 675
                         Add another Owner
676 676
                         <select name="SelectOwner" class="form-control">
677 677
                             @foreach($users as $user)
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
                     <div class="row">
686 686
                         <div class="col-md-2"><spam class="glyphicon glyphicon-user fa-5x"></spam></div>
687 687
                         <div class="col-md-10">
688
-<?php $user = App\User::where('id', '=', $tickets->user_id)->first();?>
688
+<?php $user = App\User::where('id', '=', $tickets->user_id)->first(); ?>
689 689
 
690 690
                             <b>User Details</b><br/>
691 691
                             {!! $user->user_name !!}<br/>{!! $user->email !!}<br/>
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
                     <p>Whome do you want to assign ticket?</p>
719 719
 
720 720
                     <select id="asssign" class="form-control" name="user">
721
-<?php $assign = App\User::where('role', '=', 'agent')->get();?>
721
+<?php $assign = App\User::where('role', '=', 'agent')->get(); ?>
722 722
                         @foreach($assign as $user)
723 723
                         <option  value="{{$user->email}}">{{$user->user_name}}</option>
724 724
                         @endforeach
Please login to merge, or discard this patch.
resources/views/themes/default1/client/helpdesk/profile.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,8 +230,8 @@
 block discarded – undo
230 230
 @if($verify == 1 || $verify == '1')
231 231
     <script type="text/javascript">
232 232
     $('#client-profile').on('submit', function(e){
233
-        var old_mobile = "<?php echo $user->mobile;?>";
234
-        var email = "<?php echo $user->email;?>";
233
+        var old_mobile = "<?php echo $user->mobile; ?>";
234
+        var email = "<?php echo $user->email; ?>";
235 235
         var full_name = "<?php echo $user->first_name; ?>";
236 236
         var mobile = document.getElementById('mobile').value;
237 237
         var code = document.getElementById('code').value;
Please login to merge, or discard this patch.
resources/views/themes/default1/client/helpdesk/form.blade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
             </div>
165 165
             <!-- priority -->
166 166
              <?php 
167
-             $Priority = App\Model\helpdesk\Settings\CommonSettings::select('status')->where('option_name','=', 'user_priority')->first(); 
168
-             $user_Priority=$Priority->status;
167
+             $Priority = App\Model\helpdesk\Settings\CommonSettings::select('status')->where('option_name', '=', 'user_priority')->first(); 
168
+             $user_Priority = $Priority->status;
169 169
             ?>
170 170
              
171 171
              @if(Auth::user())
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                         <label>{!! Lang::get('lang.priority') !!}:</label>
181 181
                     </div>
182 182
                     <div class="col-md-12">
183
-                        <?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status','=',1)->get(); ?>
183
+                        <?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', '=', 1)->get(); ?>
184 184
                         {!! Form::select('priority', ['Priority'=>$Priority->lists('priority_desc','priority_id')->toArray()],null,['class' => 'form-control select']) !!}
185 185
                     </div>
186 186
                  </div>
Please login to merge, or discard this patch.
resources/views/themes/default1/client/helpdesk/ckeckticket2.blade.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 
17 17
 @section('content')               
18 18
 <?php  
19
-$tickets = App\Model\helpdesk\Ticket\Tickets::where('id','=',\Crypt::decrypt($id))->first(); 
20
-$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',\Crypt::decrypt($id))->first();
19
+$tickets = App\Model\helpdesk\Ticket\Tickets::where('id', '=', \Crypt::decrypt($id))->first(); 
20
+$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Crypt::decrypt($id))->first();
21 21
 //$user = App\User::where('id','=',$id1)->first();?>
22 22
 
23 23
                     <!-- Main content -->
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
    <tr>
56 56
         <th><div class="ticketratingtitle">Overall Satisfaction &nbsp;</div></th>&nbsp
57 57
     <td>
58
-    <input type="radio" class="star" id="star5" name="rating" value="1"<?php echo ($tickets->rating=='1')?'checked':'' ?> />
59
-    <input type="radio" class="star" id="star4" name="rating" value="2"<?php echo ($tickets->rating=='2')?'checked':'' ?> />
60
-    <input type="radio" class="star" id="star3" name="rating" value="3"<?php echo ($tickets->rating=='3')?'checked':'' ?>/>
61
-    <input type="radio" class="star" id="star2" name="rating" value="4"<?php echo ($tickets->rating=='4')?'checked':'' ?>/>
62
-    <input type="radio" class="star" id="star1" name="rating" value="5"<?php echo ($tickets->rating=='5')?'checked':'' ?> />
58
+    <input type="radio" class="star" id="star5" name="rating" value="1"<?php echo ($tickets->rating == '1') ? 'checked' : '' ?> />
59
+    <input type="radio" class="star" id="star4" name="rating" value="2"<?php echo ($tickets->rating == '2') ? 'checked' : '' ?> />
60
+    <input type="radio" class="star" id="star3" name="rating" value="3"<?php echo ($tickets->rating == '3') ? 'checked' : '' ?>/>
61
+    <input type="radio" class="star" id="star2" name="rating" value="4"<?php echo ($tickets->rating == '4') ? 'checked' : '' ?>/>
62
+    <input type="radio" class="star" id="star1" name="rating" value="5"<?php echo ($tickets->rating == '5') ? 'checked' : '' ?> />
63 63
     </td> 
64 64
 </tr>
65 65
                 </form>
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
                                 <section class="content"  id="refresh" style="margin-bottom:-10px;margin-top:-10px">
84 84
                                     <div class="col-md-12"> 
85 85
                                         <?php 
86
-                                        $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();
86
+                                        $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first();
87 87
                                         ?>
88 88
                                         <div class="callout callout-default ">
89 89
                                             <div class="row">
90 90
                                                 <div class="col-md-3"> 
91 91
                                                 <?php
92 92
                                                 $sla = $tickets->sla;
93
-                                                $SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',1)->first();?>
93
+                                                $SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', 1)->first(); ?>
94 94
                                                     <b>{!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} </b> 
95 95
                                                 </div>
96 96
                                                 <div class="col-md-3"> 
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
                                                     ?>
107 107
                                                 </div>
108 108
                                                 <div class="col-md-3">
109
-                                                <?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',$tickets->id)->where('is_internal','=',0)->get();?>
109
+                                                <?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->get(); ?>
110 110
                                                 @foreach($response as $last)
111
-                                                <?php $ResponseDate  = $last->created_at; ?>
111
+                                                <?php $ResponseDate = $last->created_at; ?>
112 112
                                                 @endforeach
113 113
                                                     <b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate)}} 
114 114
                                                 </div>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                                     <div class="col-md-6"> 
119 119
                                         <table class="table table-hover">
120 120
                                             <!-- <tr><th></th><th></th></tr> -->
121
-                                            <tr><td><b>{!! Lang::get('lang.status') !!}:</b></td>       <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id','=',$tickets->status)->first();?>
121
+                                            <tr><td><b>{!! Lang::get('lang.status') !!}:</b></td>       <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
122 122
 
123 123
                                             @if($status->id == 1)
124 124
                                                 <td title="{{$status->properties}}" style="color:orange">{{$status->name}}</td></tr>
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                                                 <td title="{{$status->properties}}" style="color:green">{{$status->name}}</td></tr>
129 129
                                             @endif
130 130
 
131
-                                            <tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td>     <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$tickets->priority_id)->first();?>
131
+                                            <tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td>     <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
132 132
 
133 133
                                             @if($priority->priority_id == 1)
134 134
                                                 <td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td>
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                                             </tr>
142 142
                                             <tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>   
143 143
                                         <?php 
144
-                                        $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();
144
+                                        $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first();
145 145
                                         $department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first();
146 146
                                         ?>
147 147
                                             <td title="{{ $department->name }}">{!! $department->name !!}</td></tr>
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                                         <!-- <div class="callout callout-success"> -->
153 153
                                         <table class="table table-hover">
154 154
                                             <!-- <tr><th></th><th></th></tr> -->
155
-                                            <tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td>     <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id','=',$tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
155
+                                            <tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td>     <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
156 156
                                             <tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td>   <td>{{ucwords($last->poster)}}</td></tr>
157 157
                                         </table>
158 158
                                     </div>
@@ -177,17 +177,17 @@  discard block
 block discarded – undo
177 177
     }
178 178
     $role = App\User::where('id', '=', $conversation->user_id)->first();
179 179
 
180
-    $attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
181
-    if ($attachment == null ) {
180
+    $attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
181
+    if ($attachment == null) {
182 182
         $body = $conversation->body;
183 183
     } else {
184 184
         $body = $conversation->body;
185
-        $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
186
-                    foreach($attachments as $attachment)
185
+        $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
186
+                    foreach ($attachments as $attachment)
187 187
                     {
188
-                        if($attachment->type == 'pdf') {
188
+                        if ($attachment->type == 'pdf') {
189 189
                             
190
-                        } elseif($attachment->type == 'docx') {
190
+                        } elseif ($attachment->type == 'docx') {
191 191
                             
192 192
                         } else {
193 193
                         $image = @imagecreatefromstring($attachment->file); 
@@ -195,23 +195,23 @@  discard block
 block discarded – undo
195 195
                         imagejpeg($image, null, 80);
196 196
                         $data = ob_get_contents();
197 197
                         ob_end_clean();
198
-                        $var  =  '<img src="data:image/jpg;base64,' .  base64_encode($data)  . '" />';
199
-                        $body = str_replace($attachment->name, "data:image/jpg;base64," .  base64_encode($data), $body);
198
+                        $var  = '<img src="data:image/jpg;base64,'.base64_encode($data).'" />';
199
+                        $body = str_replace($attachment->name, "data:image/jpg;base64,".base64_encode($data), $body);
200 200
 
201 201
                             $string = $body;                        
202 202
                             $start = "<head>";
203 203
                             $end = "</head>";
204
-                            if(strpos($string,$start) == false || strpos($string,$start) == false)
204
+                            if (strpos($string, $start) == false || strpos($string, $start) == false)
205 205
                             {
206 206
                             }
207 207
                             else
208 208
                             {
209
-                            $ini = strpos($string,$start);
209
+                            $ini = strpos($string, $start);
210 210
                             $ini += strlen($start);
211
-                            $len = strpos($string,$end,$ini) - $ini;
212
-                            $parsed = substr($string,$ini,$len);
211
+                            $len = strpos($string, $end, $ini) - $ini;
212
+                            $parsed = substr($string, $ini, $len);
213 213
                             $body2 = $parsed;
214
-                            $body = str_replace($body2 ," " ,$body);
214
+                            $body = str_replace($body2, " ", $body);
215 215
                             }
216 216
                         }
217 217
                     }
@@ -219,28 +219,28 @@  discard block
 block discarded – undo
219 219
                             $string = $body;                        
220 220
                             $start = "<head>";
221 221
                             $end = "</head>";                            
222
-                            if(strpos($string,$start) == false || strpos($string,$start) == false)
222
+                            if (strpos($string, $start) == false || strpos($string, $start) == false)
223 223
                             {
224 224
                             }
225 225
                             else
226 226
                             {
227
-                            $ini = strpos($string,$start);
227
+                            $ini = strpos($string, $start);
228 228
                             $ini += strlen($start);
229
-                            $len = strpos($string,$end,$ini) - $ini;
230
-                            $parsed = substr($string,$ini,$len);
229
+                            $len = strpos($string, $end, $ini) - $ini;
230
+                            $parsed = substr($string, $ini, $len);
231 231
                             $body2 = $parsed;
232
-                            $body = str_replace($body2 ," " ,$body);
232
+                            $body = str_replace($body2, " ", $body);
233 233
                             }
234 234
 ?>
235 235
                                 <ol class="comment-list" >
236 236
                                     <li class="comment">
237 237
                                         <article class="comment-body">
238
-                                            <footer class="comment-meta"<?php if($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?>  > 
238
+                                            <footer class="comment-meta"<?php if ($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?>  > 
239 239
                                                 <div class="comment-author">
240 240
                                                         @if($role->profile_pic)
241
-                                                            <img src="{{asset('uploads/profilepic')}}{{'/'}}{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <?php if($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
241
+                                                            <img src="{{asset('uploads/profilepic')}}{{'/'}}{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <?php if ($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
242 242
                                                         @else
243
-                                                            <img src="{{ Gravatar::src($role->email) }}" alt="" height="50" width="50" class="avatar" <?php if($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
243
+                                                            <img src="{{ Gravatar::src($role->email) }}" alt="" height="50" width="50" class="avatar" <?php if ($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> >
244 244
                                                         @endif
245 245
                                                     @if($role->role == "user")
246 246
                                                         <b class="fn"><a href="#" rel="external" class="url">{{$role->user_name}}</a></b>
@@ -251,11 +251,11 @@  discard block
 block discarded – undo
251 251
    <tr>
252 252
        <th>     <div class="ticketratingtitle">Reply rating &nbsp;</div></th>&nbsp
253 253
                 <td>            
254
-    <input type="radio" class="star" id="star5" name="rating2" value="1"<?php echo ($conversation->reply_rating=='1')?'checked':'' ?>  />
255
-    <input type="radio" class="star" id="star4" name="rating2" value="2"<?php echo ($conversation->reply_rating=='2')?'checked':'' ?>  />
256
-    <input type="radio" class="star" id="star3" name="rating2" value="3"<?php echo ($conversation->reply_rating=='3')?'checked':'' ?>  />
257
-    <input type="radio" class="star" id="star2" name="rating2" value="4"<?php echo ($conversation->reply_rating=='4')?'checked':'' ?>  />
258
-    <input type="radio" class="star" id="star1" name="rating2" value="5"<?php echo ($conversation->reply_rating=='5')?'checked':'' ?>  />
254
+    <input type="radio" class="star" id="star5" name="rating2" value="1"<?php echo ($conversation->reply_rating == '1') ? 'checked' : '' ?>  />
255
+    <input type="radio" class="star" id="star4" name="rating2" value="2"<?php echo ($conversation->reply_rating == '2') ? 'checked' : '' ?>  />
256
+    <input type="radio" class="star" id="star3" name="rating2" value="3"<?php echo ($conversation->reply_rating == '3') ? 'checked' : '' ?>  />
257
+    <input type="radio" class="star" id="star2" name="rating2" value="4"<?php echo ($conversation->reply_rating == '4') ? 'checked' : '' ?>  />
258
+    <input type="radio" class="star" id="star1" name="rating2" value="5"<?php echo ($conversation->reply_rating == '5') ? 'checked' : '' ?>  />
259 259
                 </td></tr></form></tbody></table></div>
260 260
                              
261 261
                                                     @endif
@@ -271,39 +271,39 @@  discard block
 block discarded – undo
271 271
                                             </div><!-- .comment-content -->
272 272
                                             <div class="timeline-footer" style="margin-bottom:-5px">
273 273
                                         <?php 
274
-                                        $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
274
+                                        $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
275 275
                                         $i = 0;
276
-                                        foreach($attachments as $attachment) {
277
-                                        if($attachment->poster == 'ATTACHMENT') {
276
+                                        foreach ($attachments as $attachment) {
277
+                                        if ($attachment->poster == 'ATTACHMENT') {
278 278
                                             $i++;
279 279
                                             } 
280 280
                                         }
281
-                                        if($i>0)
281
+                                        if ($i > 0)
282 282
                                         {
283 283
                                         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>";
284 284
                                         }
285 285
                                         ?>
286 286
                                         <ul class='mailbox-attachments clearfix'>
287 287
                                         <?php
288
-                                        foreach($attachments as $attachment)
288
+                                        foreach ($attachments as $attachment)
289 289
                                         {
290 290
 
291 291
     $size = $attachment->size;
292
-    $units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
292
+    $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
293 293
     $power = $size > 0 ? floor(log($size, 1024)) : 0;
294
-    $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
294
+    $value = number_format($size / pow(1024, $power), 2, '.', ',').' '.$units[$power];
295 295
 
296 296
                                             
297
-                                            if($attachment->poster == 'ATTACHMENT')
297
+                                            if ($attachment->poster == 'ATTACHMENT')
298 298
                                             {
299
-                                                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')
299
+                                                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')
300 300
                                                 {
301 301
                                                 $image = @imagecreatefromstring($attachment->file); 
302 302
                                                 ob_start();
303 303
                                                 imagejpeg($image, null, 80);
304 304
                                                 $data = ob_get_contents();
305 305
                                                 ob_end_clean();
306
-                                                $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>';
306
+                                                $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>';
307 307
 
308 308
 
309 309
                                                 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>';
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 <?php }
331 331
 ?>
332 332
                                         <div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
333
-<?php echo $conversations->setPath( url('check_ticket/{'.$id.'}'))->render(); ?>
333
+<?php echo $conversations->setPath(url('check_ticket/{'.$id.'}'))->render(); ?>
334 334
 </div>
335 335
 <br/><br/>
336 336
                     @if(Session::has('success1'))
Please login to merge, or discard this patch.
resources/views/themes/default1/client/helpdesk/unauth/showticket.blade.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
                 imagejpeg($image, null, 80);
202 202
                 $data = ob_get_contents();
203 203
                 ob_end_clean();
204
-                $var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
205
-                $body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
204
+                $var = '<img src="data:image/jpg;base64,'.base64_encode($data).'" />';
205
+                $body = str_replace($attachment->name, "data:image/jpg;base64,".base64_encode($data), $body);
206 206
 
207 207
                 $string = $body;
208 208
                 $start = "<head>";
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
                         }
296 296
                     }
297 297
                     if ($i > 0) {
298
-                        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>";
298
+                        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 299
                     }
300 300
                     ?>
301 301
                     <ul class='mailbox-attachments clearfix'>
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                             $size = $attachment->size;
305 305
                             $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
306 306
                             $power = $size > 0 ? floor(log($size, 1024)) : 0;
307
-                            $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
307
+                            $value = number_format($size / pow(1024, $power), 2, '.', ',').' '.$units[$power];
308 308
                             if ($attachment->poster == 'ATTACHMENT') {
309 309
                                 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') {
310 310
                                     $image = @imagecreatefromstring($attachment->file);
@@ -312,11 +312,11 @@  discard block
 block discarded – undo
312 312
                                     imagejpeg($image, null, 80);
313 313
                                     $data = ob_get_contents();
314 314
                                     ob_end_clean();
315
-                                    $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>';
316
-                                    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>';
315
+                                    $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>';
316
+                                    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>';
317 317
                                 } else {
318
-                                    $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;">' . 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>';
319
-                                    echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
318
+                                    $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;">'.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>';
319
+                                    echo '<li style="background-color:#f4f4f4;">'.$var.'</li>';
320 320
                                 }
321 321
                             }
322 322
                         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 <?php }
335 335
 ?>
336 336
 <div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
337
-    <?php echo $conversations->setPath(url('show-ticket/{' . $tickets->id . '}/' . $token))->render(); ?>
337
+    <?php echo $conversations->setPath(url('show-ticket/{'.$tickets->id.'}/'.$token))->render(); ?>
338 338
 </div>
339 339
 <br/><br/>
340 340
 @if(Session::has('success1'))
Please login to merge, or discard this patch.
resources/views/themes/default1/client/helpdesk/ckeckticketOld.blade.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
                 imagejpeg($image, null, 80);
194 194
                 $data = ob_get_contents();
195 195
                 ob_end_clean();
196
-                $var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
197
-                $body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
196
+                $var = '<img src="data:image/jpg;base64,'.base64_encode($data).'" />';
197
+                $body = str_replace($attachment->name, "data:image/jpg;base64,".base64_encode($data), $body);
198 198
 
199 199
                 $string = $body;
200 200
                 $start = "<head>";
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                         }
288 288
                     }
289 289
                     if ($i > 0) {
290
-                        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>";
290
+                        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>";
291 291
                     }
292 292
                     ?>
293 293
                     <ul class='mailbox-attachments clearfix'>
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                             $size = $attachment->size;
297 297
                             $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
298 298
                             $power = $size > 0 ? floor(log($size, 1024)) : 0;
299
-                            $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
299
+                            $value = number_format($size / pow(1024, $power), 2, '.', ',').' '.$units[$power];
300 300
                             if ($attachment->poster == 'ATTACHMENT') {
301 301
                                 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') {
302 302
                                     $image = @imagecreatefromstring($attachment->file);
@@ -304,11 +304,11 @@  discard block
 block discarded – undo
304 304
                                     imagejpeg($image, null, 80);
305 305
                                     $data = ob_get_contents();
306 306
                                     ob_end_clean();
307
-                                    $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>';
308
-                                    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>';
307
+                                    $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>';
308
+                                    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>';
309 309
                                 } else {
310
-                                    $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;">' . 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>';
311
-                                    echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
310
+                                    $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;">'.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>';
311
+                                    echo '<li style="background-color:#f4f4f4;">'.$var.'</li>';
312 312
                                 }
313 313
                             }
314 314
                         }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 <?php }
327 327
 ?>
328 328
 <div class="pull-right" style="margin-top:-30px;margin-bottom:-30px">
329
-    <?php echo $conversations->setPath(url('check_ticket/{' . $id . '}'))->render(); ?>
329
+    <?php echo $conversations->setPath(url('check_ticket/{'.$id.'}'))->render(); ?>
330 330
 </div>
331 331
 <br/><br/>
332 332
 @if(Session::has('success1'))
Please login to merge, or discard this patch.
resources/views/emails/notifications/agent.blade.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,22 +2,22 @@
 block discarded – undo
2 2
 
3 3
 $date = Date('d-m-Y');
4 4
 $format = 'Y-m-d';
5
-$day1  = Date($format,strtotime('-1 day'. $date));
5
+$day1 = Date($format, strtotime('-1 day'.$date));
6 6
 
7
-$user = App\User::where('id','=',$user_id)->first();
7
+$user = App\User::where('id', '=', $user_id)->first();
8 8
 
9
-$dept = App\Model\helpdesk\Agent\Department::where('id','=',$user->primary_dpt)->first();
9
+$dept = App\Model\helpdesk\Agent\Department::where('id', '=', $user->primary_dpt)->first();
10 10
 
11
-   $created  =  DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('created_at','LIKE','%'.$day1.'%')->count();
12
-   $closed  =  DB::table('tickets')->where('dept_id','=',$dept->id)->where('closed_at','LIKE','%'.$day1.'%')->count();
13
-   $inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->count();
14
-   $overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('isanswered', '=', 0)->where('status', '=', 1)->get();
11
+   $created  = DB::table('tickets')->select('created_at')->where('dept_id', '=', $dept->id)->where('created_at', 'LIKE', '%'.$day1.'%')->count();
12
+   $closed = DB::table('tickets')->where('dept_id', '=', $dept->id)->where('closed_at', 'LIKE', '%'.$day1.'%')->count();
13
+   $inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('status', '=', 1)->count();
14
+   $overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('isanswered', '=', 0)->where('status', '=', 1)->get();
15 15
    $i = 0;
16 16
    foreach ($overdues as $overdue) {
17
-      $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
17
+      $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $overdue->sla)->first();
18 18
       $ovdate = $overdue->created_at;
19 19
       $new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
20
-      if(date('Y-m-d H:i:s') > $new_date){
20
+      if (date('Y-m-d H:i:s') > $new_date) {
21 21
          $i++;
22 22
       }
23 23
    }
Please login to merge, or discard this patch.
resources/views/emails/notifications/admin.blade.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -2,21 +2,21 @@  discard block
 block discarded – undo
2 2
 
3 3
 $date = Date('d-m-Y');
4 4
 $format = 'Y-m-d';
5
-$day1  = Date($format,strtotime('-1 day'. $date));
5
+$day1  = Date($format, strtotime('-1 day'.$date));
6 6
 
7 7
 $depts = App\Model\helpdesk\Agent\Department::all();
8 8
 foreach ($depts as $dept) {
9 9
 	// echo $dept->name;
10
-	$created  =  DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('created_at','LIKE','%'.$day1.'%')->count();
11
-	$closed  =  DB::table('tickets')->where('dept_id','=',$dept->id)->where('closed_at','LIKE','%'.$day1.'%')->count();
12
-	$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->count();
13
-	$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('isanswered', '=', 0)->where('status', '=', 1)->get();
10
+	$created  = DB::table('tickets')->select('created_at')->where('dept_id', '=', $dept->id)->where('created_at', 'LIKE', '%'.$day1.'%')->count();
11
+	$closed = DB::table('tickets')->where('dept_id', '=', $dept->id)->where('closed_at', 'LIKE', '%'.$day1.'%')->count();
12
+	$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('status', '=', 1)->count();
13
+	$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('isanswered', '=', 0)->where('status', '=', 1)->get();
14 14
 	$i = 0;
15 15
 	foreach ($overdues as $overdue) {
16
-		$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
16
+		$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $overdue->sla)->first();
17 17
 		$ovdate = $overdue->created_at;
18 18
 		$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
19
-		if(date('Y-m-d H:i:s') > $new_date){
19
+		if (date('Y-m-d H:i:s') > $new_date) {
20 20
 			$i++;
21 21
 		}
22 22
 	}
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
 @foreach ($depts as $dept) 
74 74
    <?php 
75 75
     // echo $dept->name;
76
-    $created  =  DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('created_at','LIKE','%'.$day1.'%')->count();
77
-    $closed  =  DB::table('tickets')->where('dept_id','=',$dept->id)->where('closed_at','LIKE','%'.$day1.'%')->count();
78
-    $inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->count();
79
-    $overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('isanswered', '=', 0)->where('status', '=', 1)->get();
76
+    $created  = DB::table('tickets')->select('created_at')->where('dept_id', '=', $dept->id)->where('created_at', 'LIKE', '%'.$day1.'%')->count();
77
+    $closed = DB::table('tickets')->where('dept_id', '=', $dept->id)->where('closed_at', 'LIKE', '%'.$day1.'%')->count();
78
+    $inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('status', '=', 1)->count();
79
+    $overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id', '=', $dept->id)->where('isanswered', '=', 0)->where('status', '=', 1)->get();
80 80
     $i = 0;
81 81
     foreach ($overdues as $overdue) {
82
-       $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
82
+       $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $overdue->sla)->first();
83 83
        $ovdate = $overdue->created_at;
84 84
        $new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
85
-       if(date('Y-m-d H:i:s') > $new_date){
85
+       if (date('Y-m-d H:i:s') > $new_date) {
86 86
           $i++;
87 87
        }
88 88
     }
Please login to merge, or discard this patch.