From a3fbf1acd4868728fb3d86a7a46ddf3fa9491fd1 Mon Sep 17 00:00:00 2001 From: Sujit Prasad Date: Fri, 17 Jun 2016 20:28:31 +0530 Subject: [PATCH] update v1.0.7.5 --- .env | 8 +- .../Updatedatabase.sql | 22 +- app/Exceptions/Handler.php | 68 +- .../Admin/helpdesk/AgentController.php | 2 +- .../Admin/helpdesk/DepartmentController.php | 3 +- .../Admin/helpdesk/EmailsController.php | 86 +- .../helpdesk/ErrorAndDebuggingController.php | 121 +-- .../Admin/helpdesk/HelptopicController.php | 2 +- .../Admin/helpdesk/SettingsController.php | 19 +- .../Admin/helpdesk/SlaController.php | 4 +- .../Admin/helpdesk/TemplateController.php | 95 +- .../Admin/helpdesk/WorkflowController.php | 4 +- .../Agent/helpdesk/MailController.php | 58 +- .../Agent/helpdesk/TicketController.php | 6 +- .../Agent/helpdesk/UserController.php | 1 - .../Agent/kb/ArticleController.php | 55 +- .../Agent/kb/CategoryController.php | 50 +- .../Controllers/Agent/kb/PageController.php | 37 +- app/Http/Controllers/Auth/AuthController.php | 6 +- .../Controllers/Auth/PasswordController.php | 17 +- .../helpdesk/ClientTicketController.php | 2 +- .../Client/helpdesk/FormController.php | 50 +- .../Client/helpdesk/UnAuthController.php | 3 + .../Client/helpdesk/WelcomepageController.php | 16 +- .../Controllers/Client/kb/UserController.php | 3 + app/Http/Controllers/Common/ApiSettings.php | 12 +- .../Common/NotificationController.php | 27 +- .../Controllers/Common/PhpMailController.php | 85 +- .../Controllers/Common/SettingsController.php | 226 ++-- .../Controllers/Common/TemplateController.php | 72 +- .../Installer/helpdesk/InstallController.php | 93 +- .../Controllers/Update/UpgradeController.php | 12 +- app/Http/Kernel.php | 2 +- app/Http/Middleware/CheckBoard.php | 23 +- app/Http/Middleware/CheckUpdate.php | 5 +- .../Requests/helpdesk/TemplateRequest.php | 2 +- app/Http/Requests/helpdesk/TemplateUdate.php | 2 +- .../helpdesk/WorkflowCloseRequest.php | 2 +- app/Http/routes.php | 448 +++++++- app/Model/Common/Template.php | 2 +- app/Model/helpdesk/Ticket/Ticket_Thread.php | 11 +- code_of_conduct.md | 4 +- config/app.php | 100 +- config/bugsnag.php | 138 +-- config/database.php | 2 +- database/seeds/DatabaseSeeder.php | 22 +- public/downloads/en.zip | Bin 11795 -> 18629 bytes public/lb-faveo/js/know.js | 2 +- public/uploads/en.zip | Bin 9494 -> 0 bytes public/uploads/it.zip | Bin 12021 -> 0 bytes resources/lang/de/lang.php | 76 +- resources/lang/de/pagination.php | 2 +- resources/lang/de/passwords.php | 4 +- resources/lang/de/validation.php | 2 +- resources/lang/en/en.zip | Bin 0 -> 18629 bytes resources/lang/en/lang.php | 194 ++-- resources/lang/en/lang2.php | 921 ---------------- resources/lang/it/passwords.php | 2 +- resources/lang/ru/lang.php | 994 +++++++++--------- resources/lang/ru/pagination.php | 24 +- resources/lang/ru/passwords.php | 30 +- resources/lang/ru/table.php | 40 +- resources/lang/ru/validation.php | 192 ++-- resources/views/notifications-all.blade.php | 7 +- .../helpdesk/agent/agents/create.blade.php | 2 +- .../helpdesk/agent/agents/edit.blade.php | 6 +- .../helpdesk/agent/agents/index.blade.php | 2 +- .../agent/departments/create.blade.php | 3 +- .../helpdesk/agent/departments/edit.blade.php | 1 + .../agent/departments/index.blade.php | 2 +- .../helpdesk/agent/groups/create.blade.php | 2 +- .../helpdesk/agent/groups/edit.blade.php | 1 + .../helpdesk/agent/groups/index.blade.php | 2 +- .../helpdesk/agent/teams/create.blade.php | 2 +- .../admin/helpdesk/agent/teams/edit.blade.php | 3 +- .../helpdesk/agent/teams/index.blade.php | 2 +- .../helpdesk/emails/emails/index.blade.php | 2 +- .../emails/template/formDiagno.blade.php | 3 +- .../admin/helpdesk/language/index.blade.php | 4 +- .../helpdesk/manage/form/index.blade.php | 2 +- .../helpdesk/manage/helptopic/index.blade.php | 2 +- .../admin/helpdesk/manage/sla/index.blade.php | 2 +- .../helpdesk/manage/workflow/index.blade.php | 1 + .../default1/admin/helpdesk/setting.blade.php | 2 +- .../admin/helpdesk/settings/alert.blade.php | 3 +- .../helpdesk/settings/checkupdate.blade.php | 8 +- .../settings/close-workflow/index.blade.php | 6 +- .../admin/helpdesk/settings/company.blade.php | 4 +- .../admin/helpdesk/settings/crone.blade.php | 27 +- .../admin/helpdesk/settings/email.blade.php | 1 + .../error-and-logs/error-debug.blade.php | 4 +- .../admin/helpdesk/settings/plugins.blade.php | 3 +- .../admin/helpdesk/settings/ratings.blade.php | 2 +- .../helpdesk/settings/responder.blade.php | 4 +- .../settings/security/index.blade.php | 2 +- .../admin/helpdesk/settings/status.blade.php | 2 +- .../admin/helpdesk/settings/system.blade.php | 95 +- .../admin/helpdesk/settings/ticket.blade.php | 4 +- .../admin/helpdesk/theme/social.blade.php | 6 +- .../admin/helpdesk/theme/widgets.blade.php | 6 +- .../default1/admin/layout/admin.blade.php | 13 +- .../agent/helpdesk/canned/create.blade.php | 4 + .../agent/helpdesk/canned/edit.blade.php | 3 + .../agent/helpdesk/canned/index.blade.php | 4 + .../helpdesk/dashboard/dashboard.blade.php | 55 +- .../helpdesk/dept-ticket/closed.blade.php | 6 +- .../helpdesk/dept-ticket/inprogress.blade.php | 8 +- .../agent/helpdesk/dept-ticket/open.blade.php | 6 +- .../helpdesk/organization/index.blade.php | 5 +- .../helpdesk/organization/show.blade.php | 36 +- .../agent/helpdesk/ticket/answered.blade.php | 6 +- .../agent/helpdesk/ticket/assigned.blade.php | 6 +- .../agent/helpdesk/ticket/closed.blade.php | 34 +- .../agent/helpdesk/ticket/inbox.blade.php | 3 + .../agent/helpdesk/ticket/myticket.blade.php | 4 +- .../agent/helpdesk/ticket/new.blade.php | 4 + .../agent/helpdesk/ticket/open.blade.php | 4 + .../agent/helpdesk/ticket/overdue.blade.php | 3 +- .../agent/helpdesk/ticket/timeline.blade.php | 4 +- .../agent/helpdesk/ticket/trash.blade.php | 4 +- .../helpdesk/ticket/unassigned.blade.php | 4 +- .../agent/helpdesk/user/create.blade.php | 2 +- .../agent/helpdesk/user/edit.blade.php | 2 +- .../agent/helpdesk/user/index.blade.php | 1 + .../helpdesk/user/profile-edit.blade.php | 4 + .../agent/helpdesk/user/profile.blade.php | 4 + .../agent/helpdesk/user/show.blade.php | 35 +- .../agent/kb/article/create.blade.php | 4 + .../agent/kb/article/create1.blade.php | 187 ---- .../default1/agent/kb/article/edit.blade.php | 4 + .../default1/agent/kb/article/edit1.blade.php | 178 ---- .../default1/agent/kb/article/index.blade.php | 6 +- .../agent/kb/article/layout.blade.php | 235 ----- .../agent/kb/article/sample.blade.php | 133 --- .../default1/agent/kb/article/test.blade.php | 60 -- .../agent/kb/category/create.blade.php | 4 + .../default1/agent/kb/category/edit.blade.php | 4 + .../agent/kb/category/index.blade.php | 6 +- .../default1/agent/kb/pages/create.blade.php | 4 + .../default1/agent/kb/pages/edit.blade.php | 4 + .../default1/agent/kb/pages/index.blade.php | 4 + .../agent/kb/settings/comment.blade.php | 6 +- .../agent/kb/settings/settings.blade.php | 3 +- .../default1/client/layout/client.blade.php | 8 +- .../default1/common/api/settings.blade.php | 211 +++- .../default1/common/template/edit.blade.php | 37 +- .../common/template/list-templates.blade.php | 7 +- .../themes/default1/update/database.blade.php | 36 +- .../themes/default1/update/file.blade.php | 36 +- .../themes/default1/update/update.blade.php | 30 +- 150 files changed, 2515 insertions(+), 3697 deletions(-) delete mode 100644 public/uploads/en.zip delete mode 100644 public/uploads/it.zip create mode 100644 resources/lang/en/en.zip delete mode 100644 resources/lang/en/lang2.php delete mode 100644 resources/views/themes/default1/agent/kb/article/create1.blade.php delete mode 100644 resources/views/themes/default1/agent/kb/article/edit1.blade.php delete mode 100644 resources/views/themes/default1/agent/kb/article/layout.blade.php delete mode 100644 resources/views/themes/default1/agent/kb/article/sample.blade.php delete mode 100644 resources/views/themes/default1/agent/kb/article/test.blade.php diff --git a/.env b/.env index 6d3c95960..c1bf337d8 100644 --- a/.env +++ b/.env @@ -1,11 +1,11 @@ APP_ENV=local APP_DEBUG=false -APP_KEY=SomeRandomString +APP_KEY=base64:FBOLR201bGN3ooTZb+2i/ljncVY9QBvF2SUsJMMRFlU= DB_TYPE=mysql DB_HOST=localhost DB_PORT= -DB_DATABASE= -DB_USERNAME= +DB_DATABASE=v1.0.7.5 +DB_USERNAME=root DB_PASSWORD= MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io @@ -14,4 +14,4 @@ MAIL_USERNAME=null MAIL_PASSWORD=null CACHE_DRIVER=file SESSION_DRIVER=file -QUEUE_DRIVER=sync \ No newline at end of file +QUEUE_DRIVER=sync diff --git a/DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql b/DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql index d23f986fd..e642c0814 100644 --- a/DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql +++ b/DB/update from 1.0.7.4 to 1.0.7.5/Updatedatabase.sql @@ -503,17 +503,17 @@ CREATE TABLE IF NOT EXISTS `templates` ( -- INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`, `description`, `created_at`, `updated_at`, `set_id`) VALUES -(1, 'This template is for sending notice to agent when ticket is assigned to them', '', 1, '', '
Hello {!!$ticket_agent_name!!},

Ticket No: {!!$ticket_number!!}
Has been assigned to you by {!!$ticket_assigner!!} 

Thank You
Kind Regards,
{!!$system_from!!}
', '', NULL, NULL, 1), -(2, 'This template is for sending notice to client with ticket link to check ticket without logging in to system', '', 2, '', '
Hello {!!$user!!},

Click the link below to view your Requested ticket
{!!$ticket_link_with_number!!}

Kind Regards,
{!!$system_from!!}
', '', NULL, NULL, 1), -(3, 'This template is for sending notice to client when ticket status is changed to close', '', 3, '', '
Hello,

This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to ''Closed'' as the issue appears to be resolved.

Thank you
Kind regards,
{!!$system_from!!}

', '', NULL, NULL, 1), -(4, 'This template is for sending notice to client on successful ticket creation', '', 4, '', '
Hello {!!$user!!}

Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.

Ticket ID: {!!$ticket_number!!} 
{!!$department_sign!!}
You can check the status of or update this ticket online at: {!!$system_link!!}
', '', NULL, NULL, 1), -(5, 'This template is for sending notice to agent on new ticket creation', '', 5, '', '
Hello {!!$ticket_agent_name!!},       

New ticket {!!$ticket_number!!} created 
From
Name :- {!!$ticket_client_name!!}    
E-mail :- {!!$ticket_client_email!!}   

{!!$content!!}     

Kind Regards,
{!!$system_from!!}

', '', NULL, '2016-05-17 05:38:37', 1), -(6, 'This template is for sending notice to client on new ticket created by agent in name of client', '', 6, '', '
{!!$content!!}

{!!$agent_sign!!}

You can check the status of or update this ticket online at: {!!$system_link!!}
', '', NULL, NULL, 1), -(7, 'This template is for sending notice to client on new registration during new ticket creation for un registered clients', '', 7, '', '

Hello {!!$user!!} , 

This email is confirmation that you are now registered at our helpdesk.

Registered Email: {!!$email_address!!}

Password: {!!$user_password!!}

You can visit the helpdesk to browse articles and contact us at any time: {!!$system_link!!}

Thank You.

Kind Regards,

{!!$system_from!!} 

', '', NULL, NULL, 1), -(8, 'This template is for sending notice to any user about reset password option', '', 8, '', 'Hello {!!$user!!}

You asked to reset your password. To do so, please click this link:

{!!$password_reset_link!!}


This will let you change your password to something new. If you didn''t ask for this, don''t worry, we''ll keep your password safe.

Thank You.

Kind Regards,

{!!$system_from!!}', '', NULL, NULL, 1), -(9, 'This template is for sending notice to client when a reply made to his/her ticket', '', 9, '', '

{!!$content!!}   

{!!$agent_sign!!} 

Ticket Details

Ticket ID: {!!$ticket_number!!}     




', '', NULL, NULL, 1), -(10, 'This template is for sending notice to agent when ticket reply is made by client on a ticket', '', 10, '', '
Hello {!!$ticket_agent_name!!},
A reply been made to ticket {!!$ticket_number!!}
From
Name: {!!$ticket_client_name!!}
E-mail: {!!$ticket_client_email!!}
{!!$content!!}
Kind Regards,
{!!$system_from!!}
', '', NULL, NULL, 1), -(11, 'This template is for sending notice to client about registration confirmation link', '', 11, '', '

Hello {!!$user!!} , 

This email is confirmation that you are now registered at our helpdesk.

Registered Email: {!!$email_address!!}

Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}

Thank You.

Kind Regards,

{!!$system_from!!} 

', '', NULL, NULL, 1); +(1, 'This template is for sending notice to agent when ticket is assigned to them', '0', 1, '', '
Hello {!!$ticket_agent_name!!},

Ticket No: {!!$ticket_number!!}
Has been assigned to you by {!!$ticket_assigner!!} 

Thank You
Kind Regards,
{!!$system_from!!}
', '', NULL, NULL, 1), +(2, 'This template is for sending notice to client with ticket link to check ticket without logging in to system', '1', 2, 'Check your Ticket', '
Hello {!!$user!!},

Click the link below to view your Requested ticket
{!!$ticket_link_with_number!!}

Kind Regards,
{!!$system_from!!}
', '', NULL, NULL, 1), +(3, 'This template is for sending notice to client when ticket status is changed to close', '0', 3, '', '
Hello,

This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to ''Closed'' as the issue appears to be resolved.

Thank you
Kind regards,
{!!$system_from!!}

', '', NULL, NULL, 1), +(4, 'This template is for sending notice to client on successful ticket creation', '0', 4, '', '
Hello {!!$user!!}

Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.

Ticket ID: {!!$ticket_number!!} 
{!!$department_sign!!}
You can check the status of or update this ticket online at: {!!$system_link!!}
', '', NULL, NULL, 1), +(5, 'This template is for sending notice to agent on new ticket creation', '0', 5, '', '
Hello {!!$ticket_agent_name!!},       

New ticket {!!$ticket_number!!} created 
From
Name :- {!!$ticket_client_name!!}    
E-mail :- {!!$ticket_client_email!!}   

{!!$content!!}     

Kind Regards,
{!!$system_from!!}

', '', NULL, '2016-05-17 05:38:37', 1), +(6, 'This template is for sending notice to client on new ticket created by agent in name of client', '0', 6, '', '
{!!$content!!}

{!!$agent_sign!!}

You can check the status of or update this ticket online at: {!!$system_link!!}
', '', NULL, NULL, 1), +(7, 'This template is for sending notice to client on new registration during new ticket creation for un registered clients', '1', 7, 'Registration Confirmation', '

Hello {!!$user!!} , 

This email is confirmation that you are now registered at our helpdesk.

Registered Email: {!!$email_address!!}

Password: {!!$user_password!!}

You can visit the helpdesk to browse articles and contact us at any time: {!!$system_link!!}

Thank You.

Kind Regards,

{!!$system_from!!} 

', '', NULL, NULL, 1), +(8, 'This template is for sending notice to any user about reset password option', '1', 8, 'Reset your Password', 'Hello {!!$user!!}

You asked to reset your password. To do so, please click this link:

{!!$password_reset_link!!}


This will let you change your password to something new. If you didn''t ask for this, don''t worry, we''ll keep your password safe.

Thank You.

Kind Regards,

{!!$system_from!!}', '', NULL, NULL, 1), +(9, 'This template is for sending notice to client when a reply made to his/her ticket', '0', 9, '', '

{!!$content!!}   

{!!$agent_sign!!} 

Ticket Details

Ticket ID: {!!$ticket_number!!}     




', '', NULL, NULL, 1), +(10, 'This template is for sending notice to agent when ticket reply is made by client on a ticket', '0', 10, '', '
Hello {!!$ticket_agent_name!!},
A reply been made to ticket {!!$ticket_number!!}
From
Name: {!!$ticket_client_name!!}
E-mail: {!!$ticket_client_email!!}
{!!$content!!}
Kind Regards,
{!!$system_from!!}
', '', NULL, NULL, 1), +(11, 'This template is for sending notice to client about registration confirmation link', '1', 11, 'Verify your email address', '

Hello {!!$user!!} , 

This email is confirmation that you are now registered at our helpdesk.

Registered Email: {!!$email_address!!}

Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}

Thank You.

Kind Regards,

{!!$system_from!!} 

', '', NULL, NULL, 1); -- -------------------------------------------------------- diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 197d2b548..0496485b6 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,19 +3,20 @@ namespace App\Exceptions; // controller -use Bugsnag; -//use Illuminate\Validation\ValidationException; -use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler; use Exception; +//use Illuminate\Validation\ValidationException; +use Illuminate\Foundation\Validation\ValidationException; use Illuminate\Auth\Access\AuthorizationException; +use Illuminate\Database\Eloquent\ModelNotFoundException; // use Symfony\Component\HttpKernel\Exception\HttpException; // use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; -use Illuminate\Database\Eloquent\ModelNotFoundException; -use Illuminate\Foundation\Validation\ValidationException; +use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler; +use Bugsnag; +use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -class Handler extends ExceptionHandler -{ +class Handler extends ExceptionHandler { + /** * A list of the exception types that should not be reported. * @@ -52,8 +53,7 @@ class Handler extends ExceptionHandler * * @return void */ - public function report(Exception $e) - { + public function report(Exception $e) { $debug = \Config::get('app.bugsnag_reporting'); $debug = ($debug) ? 'true' : 'false'; if ($debug == 'false') { @@ -61,7 +61,6 @@ class Handler extends ExceptionHandler return false; }); } - return parent::report($e); } @@ -89,7 +88,7 @@ class Handler extends ExceptionHandler // if (\Config::get('database.install') == 1) { // // checking if the error log send to Ladybirdweb is enabled or not // if (\Config::get('app.ErrorLog') == '1') { -// +// // } // } // return response()->view('errors.500', []); @@ -129,79 +128,66 @@ class Handler extends ExceptionHandler /** * Render an exception into an HTTP response. - * - * @param type $request + * @param type $request * @param Exception $e - * * @return type mixed */ - public function render($request, Exception $e) - { + public function render($request, Exception $e) { + switch ($e) { - case $e instanceof \Illuminate\Http\Exception\HttpResponseException: + case $e instanceof \Illuminate\Http\Exception\HttpResponseException : return parent::render($request, $e); - case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException: + case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException : return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]); - case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException: + case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException : return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]); - default: + default : return $this->common($request, $e); } } /** - * Function to render 500 error page. - * + * Function to render 500 error page * @param type $request * @param type $e - * * @return type mixed */ - public function render500($request, $e) - { + public function render500($request, $e) { if (config('app.debug') == true) { return parent::render($request, $e); } - return redirect()->route('error500', []); } /** - * Function to render 404 error page. - * + * Function to render 404 error page * @param type $request * @param type $e - * * @return type mixed */ - public function render404($request, $e) - { + public function render404($request, $e) { if (config('app.debug') == true) { return parent::render($request, $e); } - return redirect()->route('error404', []); } /** - * Common finction to render both types of codes. - * + * Common finction to render both types of codes * @param type $request * @param type $e - * * @return type mixed */ - public function common($request, $e) - { + public function common($request, $e) { switch ($e) { - case $e instanceof HttpException: + case $e instanceof HttpException : return $this->render404($request, $e); - case $e instanceof NotFoundHttpException: + case $e instanceof NotFoundHttpException : return $this->render404($request, $e); - default: + default : return $this->render500($request, $e); } - return parent::render($request, $e); } + } diff --git a/app/Http/Controllers/Admin/helpdesk/AgentController.php b/app/Http/Controllers/Admin/helpdesk/AgentController.php index 71de27ccd..f0574bc21 100644 --- a/app/Http/Controllers/Admin/helpdesk/AgentController.php +++ b/app/Http/Controllers/Admin/helpdesk/AgentController.php @@ -141,7 +141,7 @@ class AgentController extends Controller $email = $user->email; try { // send mail on registration - $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $email], $message = ['subject' => 'Password', 'scenario' => 'registration-notification'], $template_variables = ['user' => $name, 'email_address' => $email, 'user_password' => $password]); + $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $email], $message = ['subject' => null, 'scenario' => 'registration-notification'], $template_variables = ['user' => $name, 'email_address' => $email, 'user_password' => $password]); } catch (Exception $e) { // returns if try fails return redirect('agents')->with('warning', Lang::get('lang.agent_send_mail_error_on_agent_creation')); diff --git a/app/Http/Controllers/Admin/helpdesk/DepartmentController.php b/app/Http/Controllers/Admin/helpdesk/DepartmentController.php index 07aba16d5..95dadf0a4 100644 --- a/app/Http/Controllers/Admin/helpdesk/DepartmentController.php +++ b/app/Http/Controllers/Admin/helpdesk/DepartmentController.php @@ -143,7 +143,7 @@ class DepartmentController extends Controller public function edit($id, User $user, Group_assign_department $group_assign_department, Template $template, Teams $team, Department $department, Sla_plan $sla, Emails $email, Groups $group) { try { - $sys_department = \DB::table('settings_system') + $sys_department = \DB::table('settings_system') ->select('department') ->where('id', '=', 1) ->first(); @@ -175,6 +175,7 @@ class DepartmentController extends Controller { // dd($id); try { + $table = $group_assign_department->where('department_id', $id); $table->delete(); $requests = $request->input('group_id'); diff --git a/app/Http/Controllers/Admin/helpdesk/EmailsController.php b/app/Http/Controllers/Admin/helpdesk/EmailsController.php index fdec69f00..e4b767aef 100644 --- a/app/Http/Controllers/Admin/helpdesk/EmailsController.php +++ b/app/Http/Controllers/Admin/helpdesk/EmailsController.php @@ -28,15 +28,14 @@ use Lang; * * @author Ladybird */ -class EmailsController extends Controller -{ +class EmailsController extends Controller { + /** * Defining constructor variables. * * @return type */ - public function __construct() - { + public function __construct() { $this->middleware('auth'); $this->middleware('roles'); } @@ -48,8 +47,7 @@ class EmailsController extends Controller * * @return type view */ - public function index(Emails $email) - { + public function index(Emails $email) { try { // fetch all the emails from emails table $emails = $email->get(); @@ -70,8 +68,7 @@ class EmailsController extends Controller * * @return type Response */ - public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) - { + public function create(Department $department, Help_topic $help, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) { try { // fetch all the departments from the department table $departments = $department->get(); @@ -96,17 +93,16 @@ class EmailsController extends Controller * * @return int */ - public function validatingEmailSettings(Request $request) - { + public function validatingEmailSettings(Request $request) { $validator = \Validator::make( [ 'email_address' => $request->input('email_address'), - 'email_name' => $request->input('email_name'), - 'password' => $request->input('password'), + 'email_name' => $request->input('email_name'), + 'password' => $request->input('password'), ], [ 'email_address' => 'required|email|unique:emails', - 'email_name' => 'required', - 'password' => 'required', + 'email_name' => 'required', + 'password' => 'required', ] ); if ($validator->fails()) { @@ -177,8 +173,7 @@ class EmailsController extends Controller * * @return type Redirect */ - public function store($request, $imap_check) - { + public function store($request, $imap_check) { $email = new Emails(); try { // saving all the fields to the database @@ -260,8 +255,7 @@ class EmailsController extends Controller * * @return type Response */ - public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) - { + public function edit($id, Department $department, Help_topic $help, Emails $email, Ticket_Priority $ticket_priority, MailboxProtocol $mailbox_protocol) { try { $sys_email = \DB::table('settings_email')->select('sys_email')->where('id', '=', 1)->first(); // dd($sys_email); @@ -292,17 +286,16 @@ class EmailsController extends Controller * * @return int */ - public function validatingEmailSettingsUpdate($id, Request $request) - { + public function validatingEmailSettingsUpdate($id, Request $request) { $validator = \Validator::make( [ 'email_address' => $request->input('email_address'), - 'email_name' => $request->input('email_name'), - 'password' => $request->input('password'), + 'email_name' => $request->input('email_name'), + 'password' => $request->input('password'), ], [ 'email_address' => 'email', - 'email_name' => 'required', - 'password' => 'required', + 'email_name' => 'required', + 'password' => 'required', ] ); if ($validator->fails()) { @@ -375,8 +368,7 @@ class EmailsController extends Controller * * @return type Response */ - public function update($id, $request, $imap_check) - { + public function update($id, $request, $imap_check) { try { // fetch the selected emails $emails = Emails::whereId($id)->first(); @@ -426,12 +418,12 @@ class EmailsController extends Controller // $emails->password = Crypt::encrypt($request->input('password')); $emails->save(); //dd($request->sys_email); - if ($request->sys_email == 'on') { + if($request->sys_email == 'on') { $system = \DB::table('settings_email') ->where('id', '=', 1) ->update(['sys_email' => $id]); } elseif ($request->input('count') <= 1 && $request->sys_email == null) { - $system = \DB::table('settings_email') + $system = \DB::table('settings_email') ->where('id', '=', 1) ->update(['sys_email' => null]); } @@ -453,8 +445,7 @@ class EmailsController extends Controller * * @return type Redirect */ - public function destroy($id, Emails $email) - { + public function destroy($id, Emails $email) { // fetching the details on the basis of the $id passed to the function $default_system_email = Email::where('id', '=', '1')->first(); if ($default_system_email->sys_email) { @@ -485,26 +476,25 @@ class EmailsController extends Controller * * @return type int */ - public function getImapStream($request, $validate) - { + public function getImapStream($request, $validate) { $fetching_status = $request->input('fetching_status'); $username = $request->input('email_address'); $password = $request->input('password'); $protocol_id = $request->input('mailbox_protocol'); - $fetching_protocol = '/'.$request->input('fetching_protocol'); - $fetching_encryption = '/'.$request->input('fetching_encryption'); + $fetching_protocol = '/' . $request->input('fetching_protocol'); + $fetching_encryption = '/' . $request->input('fetching_encryption'); if ($fetching_encryption == '/none') { $fetching_encryption2 = '/novalidate-cert'; $mailbox_protocol = $fetching_encryption2; $host = $request->input('fetching_host'); $port = $request->input('fetching_port'); - $mailbox = '{'.$host.':'.$port.$mailbox_protocol.'}INBOX'; + $mailbox = '{' . $host . ':' . $port . $mailbox_protocol . '}INBOX'; } else { - $mailbox_protocol = $fetching_protocol.$fetching_encryption; + $mailbox_protocol = $fetching_protocol . $fetching_encryption; $host = $request->input('fetching_host'); $port = $request->input('fetching_port'); - $mailbox = '{'.$host.':'.$port.$mailbox_protocol.$validate.'}INBOX'; - $mailbox_protocol = $fetching_encryption.$validate; + $mailbox = '{' . $host . ':' . $port . $mailbox_protocol . $validate . '}INBOX'; + $mailbox_protocol = $fetching_encryption . $validate; } try { $imap_stream = imap_open($mailbox, $username, $password); @@ -528,8 +518,7 @@ class EmailsController extends Controller * * @return type int */ - public function checkImapStream($imap_stream) - { + public function checkImapStream($imap_stream) { $check_imap_stream = imap_check($imap_stream); if ($check_imap_stream) { $imap_stream = 1; @@ -547,8 +536,7 @@ class EmailsController extends Controller * * @return int */ - public function getSmtp($request) - { + public function getSmtp($request) { $sending_status = $request->input('sending_status'); // cheking for the sending protocol if ($request->input('sending_protocol') == 'smtp') { @@ -564,8 +552,8 @@ class EmailsController extends Controller $mail->SMTPAuth = true; // Enable SMTP authentication $mail->SMTPOptions = [ 'ssl' => [ - 'verify_peer' => false, - 'verify_peer_name' => false, + 'verify_peer' => false, + 'verify_peer_name' => false, 'allow_self_signed' => true, ], ]; @@ -597,8 +585,7 @@ class EmailsController extends Controller * * @return type string or null */ - public function departmentValue($dept) - { + public function departmentValue($dept) { if ($dept) { $email_department = $dept; } else { @@ -615,8 +602,7 @@ class EmailsController extends Controller * * @return type string or null */ - public function priorityValue($priority) - { + public function priorityValue($priority) { if ($priority) { $email_priority = $priority; } else { @@ -633,8 +619,7 @@ class EmailsController extends Controller * * @return type string or null */ - public function helpTopicValue($help_topic) - { + public function helpTopicValue($help_topic) { if ($help_topic) { $email_help_topic = $help_topic; } else { @@ -643,4 +628,5 @@ class EmailsController extends Controller return $email_help_topic; } + } diff --git a/app/Http/Controllers/Admin/helpdesk/ErrorAndDebuggingController.php b/app/Http/Controllers/Admin/helpdesk/ErrorAndDebuggingController.php index 1900369be..d826cf07c 100644 --- a/app/Http/Controllers/Admin/helpdesk/ErrorAndDebuggingController.php +++ b/app/Http/Controllers/Admin/helpdesk/ErrorAndDebuggingController.php @@ -3,21 +3,22 @@ namespace App\Http\Controllers\Admin\helpdesk; // controller +use App\Http\Controllers\Common\PhpMailController; use App\Http\Controllers\Controller; // request use Exception; -use File; use Lang; +use File; /** - * ErrorAndDebuggingController. + * ErrorAndDebuggingController * * @author Ladybird */ class ErrorAndDebuggingController extends Controller { - /** + /** * Create a new controller instance. * * @return void @@ -30,76 +31,68 @@ class ErrorAndDebuggingController extends Controller } /** - * function to show error and debugging setting page. - * + * function to show error and debugging setting page * @param void - * - * @return response + * @return response */ - public function showSettings() - { - $debug = \Config::get('app.debug'); - $bugsnag = \Config::get('app.bugsnag_reporting'); + public function showSettings() + { + $debug = \Config::get('app.debug'); + $bugsnag = \Config::get('app.bugsnag_reporting'); + return view('themes.default1.admin.helpdesk.settings.error-and-logs.error-debug')->with(['debug'=> $debug, 'bugsnag' => $bugsnag]); + } - return view('themes.default1.admin.helpdesk.settings.error-and-logs.error-debug')->with(['debug' => $debug, 'bugsnag' => $bugsnag]); - } - - /** - * funtion to update error and debugging settings. - * - * @param void - * - * @return - */ - public function postSettings() - { - try { - $debug = \Config::get('app.debug'); - $debug = ($debug) ? 'true' : 'false'; - $bugsnag_debug = \Config::get('app.bugsnag_reporting'); - $bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false'; - if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) { - // dd($request->input()); - $debug_new = base_path() - .DIRECTORY_SEPARATOR. - 'config' - .DIRECTORY_SEPARATOR. - 'app.php'; - $datacontent = File::get($debug_new); - $datacontent = str_replace("'debug' => ".$debug, - "'debug' => ".\Input::get('debug'), - $datacontent); - File::put($debug_new, $datacontent); - - // dd($request->input()); - $bugsnag_debug_new = base_path() - .DIRECTORY_SEPARATOR. - 'config' - .DIRECTORY_SEPARATOR. - 'app.php'; - $datacontent2 = File::get($bugsnag_debug_new); - $datacontent2 = str_replace("'bugsnag_reporting' => ".$bugsnag_debug, - "'bugsnag_reporting' => ".\Input::get('bugsnag'), - $datacontent2); - File::put($bugsnag_debug_new, $datacontent2); - - return redirect()->back()->with('success', - Lang::get('lang.error-debug-settings-saved-message')); - } else { - return redirect()->back()->with('fails', - Lang::get('lang.error-debug-settings-error-message')); - } + /** + * funtion to update error and debugging settings + * @param void + * @return + */ + public function postSettings() + { + try{ + $debug = \Config::get('app.debug'); + $debug = ($debug) ? 'true' : 'false'; + $bugsnag_debug = \Config::get('app.bugsnag_reporting'); + $bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false'; + if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) { + // dd($request->input()); + $debug_new = base_path() + .DIRECTORY_SEPARATOR. + 'config' + .DIRECTORY_SEPARATOR. + 'app.php'; + $datacontent = File::get($debug_new); + $datacontent = str_replace("'debug' => ".$debug, + "'debug' => ".\Input::get('debug'), + $datacontent); + File::put($debug_new, $datacontent); + + // dd($request->input()); + $bugsnag_debug_new = base_path() + .DIRECTORY_SEPARATOR. + 'config' + .DIRECTORY_SEPARATOR. + 'app.php'; + $datacontent2 = File::get($bugsnag_debug_new); + $datacontent2 = str_replace("'bugsnag_reporting' => ".$bugsnag_debug, + "'bugsnag_reporting' => ".\Input::get('bugsnag'), + $datacontent2); + File::put($bugsnag_debug_new, $datacontent2); + return redirect()->back()->with('success', + Lang::get('lang.error-debug-settings-saved-message')); + } else { + return redirect()->back()->with('fails', + Lang::get('lang.error-debug-settings-error-message')); + } } catch (Exception $e) { /* redirect to Index page with Fails Message */ return redirect()->back()->with('fails', $e->getMessage()); - } - } + } + } /** - * function to show error log table page. - * + * function to show error log table page * @param void - * * @return response view */ public function showErrorLogs() diff --git a/app/Http/Controllers/Admin/helpdesk/HelptopicController.php b/app/Http/Controllers/Admin/helpdesk/HelptopicController.php index 4d48ddf8e..f96afb703 100644 --- a/app/Http/Controllers/Admin/helpdesk/HelptopicController.php +++ b/app/Http/Controllers/Admin/helpdesk/HelptopicController.php @@ -152,7 +152,7 @@ class HelptopicController extends Controller $sys_help_topic = \DB::table('settings_ticket') ->select('help_topic') ->where('id', '=', 1)->first(); - + return view('themes.default1.admin.helpdesk.manage.helptopic.edit', compact('priority', 'departments', 'topics', 'forms', 'agents', 'slas', 'sys_help_topic')); } catch (Exception $e) { return redirect('helptopic')->with('fails', '
  • '.$e->getMessage().'
  • '); diff --git a/app/Http/Controllers/Admin/helpdesk/SettingsController.php b/app/Http/Controllers/Admin/helpdesk/SettingsController.php index c7d601b94..a3bb4b332 100644 --- a/app/Http/Controllers/Admin/helpdesk/SettingsController.php +++ b/app/Http/Controllers/Admin/helpdesk/SettingsController.php @@ -29,6 +29,7 @@ use App\Model\helpdesk\Utility\Date_format; use App\Model\helpdesk\Utility\Date_time_format; use App\Model\helpdesk\Utility\Time_format; use App\Model\helpdesk\Utility\Timezones; +use App\Model\helpdesk\Workflow\WorkflowClose; use DateTime; // classes use DB; @@ -182,7 +183,7 @@ class SettingsController extends Controller /* Check whether function success or not */ $systems->fill($request->input())->save(); /* redirect to Index page with Success Message */ - + // dd($datacontent); //\Config::set('app.debug', $request->input('debug')); return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully')); @@ -320,7 +321,7 @@ class SettingsController extends Controller * * @return type Response */ - public function getSchedular(Email $email, Template $template, Emails $email1) + public function getSchedular(Email $email, Template $template, Emails $email1, WorkflowClose $workflow) { // try { /* fetch the values of email from Email table */ @@ -330,7 +331,9 @@ class SettingsController extends Controller /* Fetch the values from Emails table */ $emails1 = $email1->get(); - return view('themes.default1.admin.helpdesk.settings.crone', compact('emails', 'templates', 'emails1')); + $workflow = $workflow->whereId('1')->first(); + + return view('themes.default1.admin.helpdesk.settings.crone', compact('emails', 'templates', 'emails1', 'workflow')); // } catch { // } } @@ -343,7 +346,7 @@ class SettingsController extends Controller * * @return type Response */ - public function postSchedular(Email $email, Template $template, Emails $email1, Request $request) + public function postSchedular(Email $email, Template $template, Emails $email1, Request $request, WorkflowClose $workflow) { // dd($request); try { @@ -360,6 +363,14 @@ class SettingsController extends Controller $emails->notification_cron = 0; } $emails->save(); + //workflow + $work = $workflow->whereId('1')->first(); + if ($request->condition == 'on') { + $work->condition = 1; + } else { + $work->condition = 0; + } + $work->save(); /* redirect to Index page with Success Message */ return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success')); } catch (Exception $e) { diff --git a/app/Http/Controllers/Admin/helpdesk/SlaController.php b/app/Http/Controllers/Admin/helpdesk/SlaController.php index 65e3fe7c8..8ddab22da 100644 --- a/app/Http/Controllers/Admin/helpdesk/SlaController.php +++ b/app/Http/Controllers/Admin/helpdesk/SlaController.php @@ -104,8 +104,7 @@ class SlaController extends Controller $slas = Sla_plan::whereId($id)->first(); $slas->get(); $sla = \DB::table('settings_ticket')->select('sla')->where('id', '=', 1)->first(); - - return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas', 'sla')); + return view('themes.default1.admin.helpdesk.manage.sla.edit', compact('slas','sla')); } catch (Exception $e) { return redirect()->back()->with('fails', $e->getMessage()); } @@ -138,7 +137,6 @@ class SlaController extends Controller ->where('id', '=', 1) ->update(['sla' => $id]); } - return redirect('sla')->with('success', Lang::get('lang.sla_plan_updated_successfully')); } catch (Exception $e) { /* redirect to Index page with Fails Message */ diff --git a/app/Http/Controllers/Admin/helpdesk/TemplateController.php b/app/Http/Controllers/Admin/helpdesk/TemplateController.php index 6cb0f522e..6b7600cd1 100644 --- a/app/Http/Controllers/Admin/helpdesk/TemplateController.php +++ b/app/Http/Controllers/Admin/helpdesk/TemplateController.php @@ -24,15 +24,14 @@ use Lang; * * @author Ladybird */ -class TemplateController extends Controller -{ +class TemplateController extends Controller { + /** * Create a new controller instance. * * @return type void */ - public function __construct(PhpMailController $PhpMailController) - { + public function __construct(PhpMailController $PhpMailController) { $this->PhpMailController = $PhpMailController; $this->middleware('auth'); $this->middleware('roles'); @@ -45,8 +44,7 @@ class TemplateController extends Controller * * @return type Response */ - public function index(Template $template) - { + public function index(Template $template) { try { $templates = $template->get(); @@ -64,8 +62,7 @@ class TemplateController extends Controller * * @return type Response */ - public function create(Languages $language, Template $template) - { + public function create(Languages $language, Template $template) { try { $templates = $template->get(); $languages = $language->get(); @@ -84,8 +81,7 @@ class TemplateController extends Controller * * @return type Response */ - public function store(Template $template, TemplateRequest $request) - { + public function store(Template $template, TemplateRequest $request) { try { /* Check whether function success or not */ if ($template->fill($request->input())->save() == true) { @@ -108,8 +104,7 @@ class TemplateController extends Controller * * @return Response */ - public function show($id) - { + public function show($id) { // } @@ -122,41 +117,37 @@ class TemplateController extends Controller * * @return type Response */ - public function listdirectories() - { - $path = \Config::get('view.paths')[0].'/emails/'; + public function listdirectories() { + $path = \Config::get('view.paths')[0] . '/emails/'; $directories = scandir($path); $directory = str_replace('/', '-', $path); return view('themes.default1.admin.helpdesk.emails.template.listdirectories', compact('directories', 'directory')); } - public function listtemplates($template, $path) - { + public function listtemplates($template, $path) { $paths = str_replace('-', '/', $path); - $directory2 = $paths.$template; + $directory2 = $paths . $template; $templates = scandir($directory2); - $directory = str_replace('/', '-', $directory2.'/'); + $directory = str_replace('/', '-', $directory2 . '/'); return view('themes.default1.admin.helpdesk.emails.template.listtemplates', compact('templates', 'directory')); } - public function readtemplate($template, $path) - { + public function readtemplate($template, $path) { $directory = str_replace('-', '/', $path); - $handle = fopen($directory.$template, 'r'); - $contents = fread($handle, filesize($directory.$template)); + $handle = fopen($directory . $template, 'r'); + $contents = fread($handle, filesize($directory . $template)); fclose($handle); return view('themes.default1.admin.helpdesk.emails.template.readtemplates', compact('contents', 'template', 'path')); } - public function createtemplate() - { + public function createtemplate() { $directory = '../resources/views/emails/'; $fname = Input::get('folder_name'); - $filename = $directory.$fname; + $filename = $directory . $fname; // images folder creation using php // $mydir = dirname( __FILE__ )."/html/images"; @@ -168,7 +159,7 @@ class TemplateController extends Controller if (!file_exists($filename)) { mkdir($filename, 0777); } - $files = array_filter(scandir($directory.'default')); + $files = array_filter(scandir($directory . 'default')); foreach ($files as $file) { if ($file === '.' or $file === '..') { @@ -176,29 +167,27 @@ class TemplateController extends Controller } if (!is_dir($file)) { // $file_to_go = str_replace("code/resources/views/emails/",'code/resources/views/emails/'.$fname,$file); - $destination = $directory.$fname.'/'; + $destination = $directory . $fname . '/'; - copy($directory.'default/'.$file, $destination.$file); + copy($directory . 'default/' . $file, $destination . $file); } } return \Redirect::back()->with('success', 'Successfully copied'); } - public function writetemplate($template, $path) - { + public function writetemplate($template, $path) { $directory = str_replace('-', '/', $path); $b = Input::get('templatedata'); - file_put_contents($directory.$template, print_r($b, true)); + file_put_contents($directory . $template, print_r($b, true)); return \Redirect::back()->with('success', 'Successfully updated'); } - public function deletetemplate($template, $path) - { + public function deletetemplate($template, $path) { $directory = str_replace('-', '/', $path); - $dir = $directory.$template; + $dir = $directory . $template; $status = \DB::table('settings_email')->first(); if ($template == 'default' or $template == $status->template) { return \Redirect::back()->with('fails', 'You cannot delete a default or active directory!'); @@ -207,7 +196,7 @@ class TemplateController extends Controller $objects = scandir($dir); foreach ($objects as $object) { if ($object != '.' && $object != '..') { - unlink($dir.'/'.$object); + unlink($dir . '/' . $object); } } rmdir($dir); @@ -218,15 +207,13 @@ class TemplateController extends Controller return \Redirect::back()->with('success', 'Successfully Deleted'); } - public function activateset($setname) - { + public function activateset($setname) { \DB::table('settings_email')->update(['template' => $setname]); return \Redirect::back()->with('success', 'You have Successfully Activated this Set'); } - public function edit($id, Template $template, Languages $language) - { + public function edit($id, Template $template, Languages $language) { try { $templates = $template->whereId($id)->first(); $languages = $language->get(); @@ -246,8 +233,7 @@ class TemplateController extends Controller * * @return type Response */ - public function update($id, Template $template, TemplateUdate $request) - { + public function update($id, Template $template, TemplateUdate $request) { try { //TODO validation $templates = $template->whereId($id)->first(); @@ -273,8 +259,7 @@ class TemplateController extends Controller * * @return type Response */ - public function destroy($id, Template $template) - { + public function destroy($id, Template $template) { try { $templates = $template->whereId($id)->first(); /* Check whether function success or not */ @@ -298,8 +283,7 @@ class TemplateController extends Controller * * @return type Response */ - public function formDiagno(Emails $email) - { + public function formDiagno(Emails $email) { try { $emails = $email->get(); @@ -316,8 +300,7 @@ class TemplateController extends Controller * * @return type */ - public function postDiagno(DiagnosRequest $request) - { + public function postDiagno(DiagnosRequest $request) { try { $email_details = Emails::where('id', '=', $request->from)->first(); if ($email_details->sending_protocol == 'mail') { @@ -325,12 +308,12 @@ class TemplateController extends Controller $mail->IsSendmail(); // telling the class to use SendMail transport $mail->SetFrom($email_details->email_address, $email_details->email_name); // sender details $address = $request->to; // receiver email - $mail->AddAddress($address); + $mail->AddAddress($address); $mail->Subject = $request->subject; // subject of the email $body = $request->message; // body of the email - $mail->MsgHTML($body); - if (!$mail->Send()) { - $return = Lang::get('lang.mailer_error').': '.$mail->ErrorInfo; + $mail->MsgHTML($body); + if (!$mail->Send()) { + $return = Lang::get('lang.mailer_error') . ': ' . $mail->ErrorInfo; } else { $return = Lang::get('lang.message_has_been_sent'); } @@ -340,8 +323,8 @@ class TemplateController extends Controller if ($email_details->smtp_validate == '1') { $mail->SMTPOptions = [ 'ssl' => [ - 'verify_peer' => false, - 'verify_peer_name' => false, + 'verify_peer' => false, + 'verify_peer_name' => false, 'allow_self_signed' => true, ], ]; @@ -358,15 +341,15 @@ class TemplateController extends Controller $mail->Subject = $request->subject; $mail->Body = utf8_decode($request->message); if (!$mail->send()) { - $return = Lang::get('lang.mailer_error').': '.$mail->ErrorInfo; + $return = Lang::get('lang.mailer_error') . ': ' . $mail->ErrorInfo; } else { $return = Lang::get('lang.message_has_been_sent'); } } - return redirect()->back()->with('success', $return); } catch (Exception $e) { return redirect()->back()->with('fails', $e->getMessage()); } } + } diff --git a/app/Http/Controllers/Admin/helpdesk/WorkflowController.php b/app/Http/Controllers/Admin/helpdesk/WorkflowController.php index d5f50efb2..7e1b576a7 100644 --- a/app/Http/Controllers/Admin/helpdesk/WorkflowController.php +++ b/app/Http/Controllers/Admin/helpdesk/WorkflowController.php @@ -144,7 +144,7 @@ class WorkflowController extends Controller */ public function create(Emails $emails) { - $email_data = ''; + $email_data = ""; foreach ($emails->lists('email_address', 'id') as $key => $email) { $email_data["E-$key"] = $email; } @@ -167,7 +167,7 @@ class WorkflowController extends Controller { try { // store a new workflow credentials in to the system - $workflow_name = new WorkflowName(); + $workflow_name = new WorkflowName; $workflow_name->name = $request->name; $workflow_name->status = $request->status; $workflow_name->order = $request->execution_order; diff --git a/app/Http/Controllers/Agent/helpdesk/MailController.php b/app/Http/Controllers/Agent/helpdesk/MailController.php index deb04c4a4..1095246ac 100644 --- a/app/Http/Controllers/Agent/helpdesk/MailController.php +++ b/app/Http/Controllers/Agent/helpdesk/MailController.php @@ -27,16 +27,15 @@ use PhpImap\Mailbox as ImapMailbox; * * @author Ladybird */ -class MailController extends Controller -{ +class MailController extends Controller { + /** * constructor * Create a new controller instance. * * @param type TicketController $TicketController */ - public function __construct(TicketWorkflowController $TicketWorkflowController) - { + public function __construct(TicketWorkflowController $TicketWorkflowController) { $this->middleware('board'); $this->TicketWorkflowController = $TicketWorkflowController; } @@ -46,8 +45,7 @@ class MailController extends Controller * * @return type */ - public function readmails(Emails $emails, Email $settings_email, System $system, Ticket $ticket) - { + public function readmails(Emails $emails, Email $settings_email, System $system, Ticket $ticket) { // $path_url = $system->first()->url; if ($settings_email->first()->email_fetching == 1) { if ($settings_email->first()->all_emails == 1) { @@ -82,7 +80,7 @@ class MailController extends Controller $protocol = $fetching_encryption2; } else { if ($e_mail->fetching_protocol) { - $fetching_protocol = '/'.$e_mail->fetching_protocol; + $fetching_protocol = '/' . $e_mail->fetching_protocol; } else { $fetching_protocol = ''; } @@ -91,13 +89,13 @@ class MailController extends Controller } else { $fetching_encryption = ''; } - $protocol = $fetching_protocol.$fetching_encryption; + $protocol = $fetching_protocol . $fetching_encryption; } - $imap_config = '{'.$host.':'.$port.$protocol.'}INBOX'; + $imap_config = '{' . $host . ':' . $port . $protocol . '}INBOX'; $password = Crypt::decrypt($e_mail->password); $mailbox = new ImapMailbox($imap_config, $e_mail->email_address, $password, __DIR__); $mails = []; - $mailsIds = $mailbox->searchMailBox('SINCE '.date('d-M-Y', strtotime('-1 day'))); + $mailsIds = $mailbox->searchMailBox('SINCE ' . date('d-M-Y', strtotime('-1 day'))); if (!$mailsIds) { die('Mailbox is empty'); } @@ -137,7 +135,7 @@ class MailController extends Controller $date = $mail->date; $datetime = $overview[0]->date; $date_time = explode(' ', $datetime); - $date = $date_time[1].'-'.$date_time[2].'-'.$date_time[3].' '.$date_time[4]; + $date = $date_time[1] . '-' . $date_time[2] . '-' . $date_time[3] . ' ' . $date_time[4]; $date = date('Y-m-d H:i:s', strtotime($date)); if (isset($mail->subject)) { $subject = $mail->subject; @@ -172,7 +170,7 @@ class MailController extends Controller // var_dump($attachment->filePath); // dd($filepath); // $path = $dir_img_path[0]."/code/public/".$filepath[1]; - $path = public_path().$filepath[1]; + $path = public_path() . $filepath[1]; // dd($path); $filesize = filesize($path); $file_data = file_get_contents($path); @@ -181,7 +179,7 @@ class MailController extends Controller $string = str_replace('-', '', $attachment->name); $filename = explode('src', $attachment->filePath); $filename = str_replace('\\', '', $filename); - $body = str_replace('cid:'.$imageid, $filepath[1], $body); + $body = str_replace('cid:' . $imageid, $filepath[1], $body); $pos = strpos($body, $filepath[1]); if ($pos == false) { if ($settings_email->first()->attachment == 1) { @@ -226,8 +224,7 @@ class MailController extends Controller * * @return type string */ - public function separate_reply($body) - { + public function separate_reply($body) { $body2 = explode('---Reply above this line---', $body); $body3 = $body2[0]; @@ -241,8 +238,7 @@ class MailController extends Controller * * @return type string */ - public function decode_imap_text($str) - { + public function decode_imap_text($str) { $result = ''; $decode_header = imap_mime_header_decode($str); foreach ($decode_header as $obj) { @@ -257,8 +253,7 @@ class MailController extends Controller * * @return type */ - public function fetch_attachments() - { + public function fetch_attachments() { $uploads = Upload::all(); foreach ($uploads as $attachment) { $image = @imagecreatefromstring($attachment->file); @@ -266,8 +261,8 @@ class MailController extends Controller imagejpeg($image, null, 80); $data = ob_get_contents(); ob_end_clean(); - $var = ''; - echo '
    '.$var.''; + $var = ''; + echo '
    ' . $var . ''; } } @@ -278,19 +273,17 @@ class MailController extends Controller * * @return type file */ - public function get_data($id) - { + public function get_data($id) { $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('id', '=', $id)->get(); foreach ($attachments as $attachment) { - header('Content-type: application/'.$attachment->type.''); - header('Content-Disposition: inline; filename='.$attachment->name.''); + header('Content-type: application/' . $attachment->type . ''); + header('Content-Disposition: inline; filename=' . $attachment->name . ''); header('Content-Transfer-Encoding: binary'); echo $attachment->file; } } - public static function trimTableTag($html) - { + public static function trimTableTag($html) { if (strpos('', $html) != false) { $first_pos = strpos($html, ''); - return $final_str; } - return $html; } - public static function trim3D($html) - { + public static function trim3D($html) { $body = str_replace('=3D', '', $html); - return $body; } - public static function trimInjections($html, $tags = ['', '', '']) - { + public static function trimInjections($html, $tags = ['', '', '']) { $replace = []; foreach ($tags as $key => $tag) { $replace[$key] = htmlspecialchars($tag); } $body = str_replace($tags, $replace, $html); - return $body; } + } diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php index 4452aed40..4bd3e1c68 100644 --- a/app/Http/Controllers/Agent/helpdesk/TicketController.php +++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php @@ -16,8 +16,6 @@ use App\Model\helpdesk\Email\Emails; use App\Model\helpdesk\Form\Fields; use App\Model\helpdesk\Manage\Help_topic; use App\Model\helpdesk\Manage\Sla_plan; -use App\Model\helpdesk\Notification\Notification; -use App\Model\helpdesk\Notification\UserNotification; use App\Model\helpdesk\Settings\Alert; use App\Model\helpdesk\Settings\Company; use App\Model\helpdesk\Settings\Email; @@ -33,6 +31,8 @@ use App\Model\helpdesk\Ticket\Tickets; use App\Model\helpdesk\Utility\CountryCode; use App\Model\helpdesk\Utility\Date_time_format; use App\Model\helpdesk\Utility\Timezones; +use App\Model\helpdesk\Notification\Notification; +use App\Model\helpdesk\Notification\UserNotification; use App\User; use Auth; use DB; @@ -621,7 +621,7 @@ class TicketController extends Controller \Event::fire(new \App\Events\ReadMailEvent($user_id, $password)); try { if ($auto_response == 0) { - $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $username, 'email' => $emailadd], $message = ['subject' => 'Welcome to '.$company.' helpdesk', 'scenario' => 'registration-notification'], $template_variables = ['user' => $username, 'email_address' => $emailadd, 'user_password' => $password]); + $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $username, 'email' => $emailadd], $message = ['subject' => null, 'scenario' => 'registration-notification'], $template_variables = ['user' => $username, 'email_address' => $emailadd, 'user_password' => $password]); } } catch (\Exception $e) { } diff --git a/app/Http/Controllers/Agent/helpdesk/UserController.php b/app/Http/Controllers/Agent/helpdesk/UserController.php index 8beebfb11..46e9b5d18 100644 --- a/app/Http/Controllers/Agent/helpdesk/UserController.php +++ b/app/Http/Controllers/Agent/helpdesk/UserController.php @@ -91,7 +91,6 @@ class UserController extends Controller } else { $stringCut = $model->user_name; } - return $stringCut; }) /* column email */ diff --git a/app/Http/Controllers/Agent/kb/ArticleController.php b/app/Http/Controllers/Agent/kb/ArticleController.php index 12155b093..c890f8899 100644 --- a/app/Http/Controllers/Agent/kb/ArticleController.php +++ b/app/Http/Controllers/Agent/kb/ArticleController.php @@ -29,8 +29,8 @@ use Redirect; * * @author Ladybird */ -class ArticleController extends Controller -{ +class ArticleController extends Controller { + /** * Create a new controller instance. * constructor to check @@ -40,8 +40,7 @@ class ArticleController extends Controller * * @return void */ - public function __construct() - { + public function __construct() { // checking authentication $this->middleware('auth'); // checking roles @@ -49,8 +48,7 @@ class ArticleController extends Controller SettingsController::language(); } - public function test() - { + public function test() { //$table = $this->setDatatable(); return view('themes.default1.agent.kb.article.test'); } @@ -60,8 +58,7 @@ class ArticleController extends Controller * * @return type void */ - public function getData() - { + public function getData() { $article = new Article(); // returns chumper datatable return Datatable::query($article) @@ -71,6 +68,7 @@ class ArticleController extends Controller ->orderColumns('name', 'description') /* add column name */ ->addColumn('name', function ($model) { + $string = strip_tags($model->name); if (strlen($string) > 40) { // truncate string @@ -78,8 +76,7 @@ class ArticleController extends Controller } else { $stringCut = $model->name; } - - return $stringCut.'...'; + return $stringCut . '...'; }) /* add column Created */ ->addColumn('publish_time', function ($model) { @@ -90,8 +87,8 @@ class ArticleController extends Controller /* add column action */ ->addColumn('Actions', function ($model) { /* here are all the action buttons and modal popup to delete articles with confirmations */ - return ' id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').' slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').' -
    - - - - - - - - - - - @foreach($songs as $song) - - - - - - - @endforeach - - - - - - - - - -
    IDTitleSlugAction
    {!! $song->id !!}{!! $song->title !!}{!! $song->slug !!}{!! link_to_route('songs.show','Show',[$song->slug],['id'=>'show','class'=>'btn btn-primary btn-sm']) !!} - - - - - - -
    IDTitleSlugAction
    - - - - - - - - - -@stop -@section('footer') - - - - -@stop \ No newline at end of file diff --git a/resources/views/themes/default1/agent/kb/article/test.blade.php b/resources/views/themes/default1/agent/kb/article/test.blade.php deleted file mode 100644 index 513495adc..000000000 --- a/resources/views/themes/default1/agent/kb/article/test.blade.php +++ /dev/null @@ -1,60 +0,0 @@ -@extends('themes.default1.article.layout') -@section('content') - - - - - - - - - -
    -
    -

    Articles

    - -
    - - - - @if(Session::has('success')) -
    - - - {{Session::get('success')}} -
    - @endif - - @if(Session::has('fails')) -
    - - - {{Session::get('fails')}} -
    - @endif - - - - - - - - - - - - - - - - - - -
    NameDescriptionAction
    -
    -
    - - - - -@stop \ No newline at end of file diff --git a/resources/views/themes/default1/agent/kb/category/create.blade.php b/resources/views/themes/default1/agent/kb/category/create.blade.php index 3cdd5f7b3..5222fddbc 100644 --- a/resources/views/themes/default1/agent/kb/category/create.blade.php +++ b/resources/views/themes/default1/agent/kb/category/create.blade.php @@ -9,6 +9,10 @@ active class="active" @stop +@section('PageHeader') +

    {{Lang::get('lang.category')}}

    +@stop + @section('content') {!! Form::open(array('action' => 'Agent\kb\CategoryController@store' , 'method' => 'post') )!!}
    diff --git a/resources/views/themes/default1/agent/kb/category/edit.blade.php b/resources/views/themes/default1/agent/kb/category/edit.blade.php index d38bf4d71..c09efdfe4 100644 --- a/resources/views/themes/default1/agent/kb/category/edit.blade.php +++ b/resources/views/themes/default1/agent/kb/category/edit.blade.php @@ -6,6 +6,10 @@ active @stop +@section('PageHeader') +

    {{Lang::get('lang.category')}}

    +@stop + @section('content') {!! Form::model($category,['url' => 'category/'.$category->id , 'method' => 'PATCH'] )!!}
    diff --git a/resources/views/themes/default1/agent/kb/category/index.blade.php b/resources/views/themes/default1/agent/kb/category/index.blade.php index 8e48051b6..210a4c01e 100644 --- a/resources/views/themes/default1/agent/kb/category/index.blade.php +++ b/resources/views/themes/default1/agent/kb/category/index.blade.php @@ -6,6 +6,10 @@ active @stop +@section('PageHeader') +

    {{Lang::get('lang.category')}}

    +@stop + @section('all-category') class="active" @stop @@ -13,7 +17,7 @@ class="active" @section('content')
    -

    {{Lang::get('lang.category')}}

    +

    {{Lang::get('lang.allcategory')}}

    diff --git a/resources/views/themes/default1/agent/kb/pages/create.blade.php b/resources/views/themes/default1/agent/kb/pages/create.blade.php index 3998ef55c..080e32c7a 100644 --- a/resources/views/themes/default1/agent/kb/pages/create.blade.php +++ b/resources/views/themes/default1/agent/kb/pages/create.blade.php @@ -10,6 +10,10 @@ active class="active" @stop +@section('PageHeader') +

    {{Lang::get('lang.pages')}}

    +@stop + @section('content') {!! Form::open(array('action' => 'Agent\kb\PageController@store' , 'method' => 'post') )!!}
    diff --git a/resources/views/themes/default1/agent/kb/pages/edit.blade.php b/resources/views/themes/default1/agent/kb/pages/edit.blade.php index 5a214d6e0..38787b91c 100644 --- a/resources/views/themes/default1/agent/kb/pages/edit.blade.php +++ b/resources/views/themes/default1/agent/kb/pages/edit.blade.php @@ -8,6 +8,10 @@ active class="active" @stop +@section('PageHeader') +

    {{Lang::get('lang.pages')}}

    +@stop + @section('content') {!! Form::model($page,['url' => 'page/'.$page->slug, 'method' => 'PATCH','files'=>true]) !!}
    diff --git a/resources/views/themes/default1/agent/kb/pages/index.blade.php b/resources/views/themes/default1/agent/kb/pages/index.blade.php index f217dc30c..07d1f9170 100644 --- a/resources/views/themes/default1/agent/kb/pages/index.blade.php +++ b/resources/views/themes/default1/agent/kb/pages/index.blade.php @@ -10,6 +10,10 @@ active class="active" @stop +@section('PageHeader') +

    {{Lang::get('lang.pages')}}

    +@stop + @section('content')
    diff --git a/resources/views/themes/default1/agent/kb/settings/comment.blade.php b/resources/views/themes/default1/agent/kb/settings/comment.blade.php index 7eaa8a2af..53c30ef49 100644 --- a/resources/views/themes/default1/agent/kb/settings/comment.blade.php +++ b/resources/views/themes/default1/agent/kb/settings/comment.blade.php @@ -1,7 +1,9 @@ @extends('themes.default1.agent.layout.agent') @extends('themes.default1.agent.layout.sidebar') - +@section('PageHeader') +

    {!! Lang::get('lang.comments') !!}

    +@stop @section('comment') class="active" @stop @@ -9,7 +11,7 @@ class="active" @section('content')
    -

    {{Lang::get('lang.comments')}}

    +

    {{Lang::get('lang.comments-list')}}

    diff --git a/resources/views/themes/default1/agent/kb/settings/settings.blade.php b/resources/views/themes/default1/agent/kb/settings/settings.blade.php index eca02dd35..ffb8ab96d 100644 --- a/resources/views/themes/default1/agent/kb/settings/settings.blade.php +++ b/resources/views/themes/default1/agent/kb/settings/settings.blade.php @@ -5,12 +5,13 @@ class="active" @stop + @section('content') {!! Form::model($settings,['url' => 'postsettings/'.$settings->id, 'method' => 'PATCH','files'=>true]) !!}
    -

    {{Lang::get('lang.settings')}}

    +

    {{Lang::get('lang.kb-settings')}}

    {!! Form::close() !!} -
    +
    @@ -184,7 +184,7 @@
    -
    +
    @if(Session::has('success'))
    @@ -226,7 +226,7 @@
    -
    +
    first(); @@ -257,7 +257,7 @@

    {!!$footer2->title!!}

    -

    {!! $footer2->value !!}

    +

    {!! $footer2->value !!}

    diff --git a/resources/views/themes/default1/common/api/settings.blade.php b/resources/views/themes/default1/common/api/settings.blade.php index a64cdf5ac..575d48e39 100644 --- a/resources/views/themes/default1/common/api/settings.blade.php +++ b/resources/views/themes/default1/common/api/settings.blade.php @@ -1,52 +1,177 @@ @extends('themes.default1.admin.layout.admin') + +@section('API') +active +@stop + +@section('settings-bar') +active +@stop + +@section('plugin') +class="active" +@stop + +@section('HeadInclude') +@stop + +@section('PageHeader') +

    {{ Lang::get('lang.api')}}

    +@stop + + +@section('breadcrumbs') + +@stop + + @section('content') -
    -
    -
    - @if (count($errors) > 0) -
    - Whoops! There were some problems with your input.

    -
      - @foreach ($errors->all() as $error) -
    • {{ $error }}
    • - @endforeach -
    +
    +{!! Form::open(['url'=>'api','method'=>'post','files'=>true]) !!} +
    +

    {{Lang::get('lang.api_settings')}}

    + +
    +
    +
    +
    + @if (count($errors) > 0) +
    + Whoops! There were some problems with your input.

    +
      + @foreach ($errors->all() as $error) +
    • {{ $error }}
    • + @endforeach +
    +
    + @endif + @if(Session::has('success')) +
    + + {{Session::get('success')}} +
    + @endif + + @if(Session::has('fails')) +
    + + {{Session::get('fails')}} +
    + @endif +

    {!! Lang::get('lang.api_configurations') !!}

    + +
    +
    +
    + {!! Form::label('api',Lang::get('lang.api')) !!} + {!! $errors->first('api_enable', ':message') !!} +
    +
    + api_enable ==1) checked @endif> {{Lang::get('lang.enable')}} + +
    +
    + api_enable == 0) checked @endif> {{Lang::get('lang.disable')}} + +
    +
    +
    - @endif - @if(Session::has('success')) -
    - - {{Session::get('success')}} +
    +
    + {!! Form::label('api_key_mandatory',Lang::get('lang.api_key_mandatory')) !!} + {!! $errors->first('api_key_mandatory', ':message') !!} +
    +
    + api_key_mandatory == 1) checked @endif> {{Lang::get('lang.enable')}} + +
    +
    + api_key_mandatory == 0) checked @endif> {{Lang::get('lang.enable')}} + +
    +
    +
    - @endif - - @if(Session::has('fails')) -
    - - {{Session::get('fails')}} + +
    +
    + {!! Form::label('api_key',Lang::get('lang.api_key')) !!} + {!! $errors->first('api_key', ':message') !!} + {!! Form::text('api_key',$systems->api_key,['class' => 'form-control']) !!} +
    - @endif -
    - {!! Form::open(['url'=>'api','method'=>'post','files'=>true]) !!} - - - - - - - - - - {!! Form::close() !!} -

    {{Lang::get('lang.webhooks')}}

    {!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary pull-right'])!!}
    {!! Form::label('ticket_detail',Lang::get('lang.ticket_detail'),['class'=>'required']) !!} -
    - {!! Form::text('ticket_detail',$ticket_detail,['class' => 'form-control','placeholder'=>'http://www.example.com']) !!} -

    {{Lang::get('lang.enter_url_to_send_ticket_details')}}

    -
    -
    + +
    -
    + + + {!! Form::close() !!}
    -@stop \ No newline at end of file + + + + +@stop diff --git a/resources/views/themes/default1/common/template/edit.blade.php b/resources/views/themes/default1/common/template/edit.blade.php index 9a21a4567..601d4799f 100644 --- a/resources/views/themes/default1/common/template/edit.blade.php +++ b/resources/views/themes/default1/common/template/edit.blade.php @@ -5,9 +5,10 @@ @stop @section('content') +{!! Form::model($template,['url'=>'templates/'.$template->id,'method'=>'patch']) !!}
    - {!! Form::model($template,['url'=>'templates/'.$template->id,'method'=>'patch']) !!} +

    {{Lang::get('lang.edit_template')}}

    @@ -41,10 +42,9 @@
    @endif
    -
    +
    - {!! Form::label('name',Lang::get('lang.name'),['class'=>'required']) !!}* - {!! Form::text('name',null,['class' => 'form-control']) !!} +

    {!! $template->name !!}

    @@ -52,12 +52,18 @@ {!! Form::select('type',[''=>'Select','Type'=>$type],null,['class' => 'form-control']) !!}
    - +
    +
    + {!! Form::hidden('variable','0') !!} + {!! Form::checkbox('variable','1') !!} + {!! Form::label('subject',Lang::get('lang.use_subject')) !!} +
    +
    {!! Form::label('message',Lang::get('lang.content'),['class'=>'required']) !!}* @@ -72,4 +78,17 @@
    {!! Form::close() !!} + + @stop \ No newline at end of file diff --git a/resources/views/themes/default1/common/template/list-templates.blade.php b/resources/views/themes/default1/common/template/list-templates.blade.php index 9944bb183..96699ff65 100644 --- a/resources/views/themes/default1/common/template/list-templates.blade.php +++ b/resources/views/themes/default1/common/template/list-templates.blade.php @@ -28,16 +28,17 @@ - - + + @foreach($templates as $template) + type)->first(); ?> + - diff --git a/resources/views/themes/default1/update/database.blade.php b/resources/views/themes/default1/update/database.blade.php index 425e7e74f..f41bc9355 100644 --- a/resources/views/themes/default1/update/database.blade.php +++ b/resources/views/themes/default1/update/database.blade.php @@ -2,14 +2,30 @@ @section('body') -
    -
    -

    Database Update Required

    -

    {{ucfirst(Config::get('app.name'))}} has been updated! Before we send you on your own way, - we have to update your database to the newest version.

    -

    The update process may take a little while, so please be patient.

    -

    Update {{ucfirst(Config::get('app.name'))}} Database

    -
    -
    - +
    +
    + + @if(Session::has('success')) +
    + + + {{Session::get('success')}} +
    + @endif + + @if(Session::has('fails')) +
    + + {!! Lang::get('lang.alert') !!} ! + {{Session::get('fails')}} +
    + @endif +

    Database Update Required

    +

    {{ucfirst(Config::get('app.name'))}} has been updated! Before we send you on your own way, + we have to update your database to the newest version.

    +

    The update process may take a little while, so please be patient.

    +

    Update {{ucfirst(Config::get('app.name'))}} Database

    +
    +
    + @stop \ No newline at end of file diff --git a/resources/views/themes/default1/update/file.blade.php b/resources/views/themes/default1/update/file.blade.php index 6cda7753b..bcb1f701c 100644 --- a/resources/views/themes/default1/update/file.blade.php +++ b/resources/views/themes/default1/update/file.blade.php @@ -2,14 +2,30 @@ @section('body') -
    -
    -

    File Update Required

    -

    {{ucfirst(Config::get('app.name'))}} has been updated! Before we send you on your own way, - we have to update your files to the newest version.

    -

    The update process may take a little while, so please be patient.

    -

    Update {{ucfirst(Config::get('app.name'))}} Files

    -
    -
    - +
    +
    + + @if(Session::has('success')) +
    + + + {{Session::get('success')}} +
    + @endif + + @if(Session::has('fails')) +
    + + {!! Lang::get('lang.alert') !!} ! + {{Session::get('fails')}} +
    + @endif +

    File Update Required

    +

    {{ucfirst(Config::get('app.name'))}} has been updated! Before we send you on your own way, + we have to update your files to the newest version.

    +

    The update process may take a little while, so please be patient.

    +

    Update {{ucfirst(Config::get('app.name'))}} Files

    +
    +
    + @stop \ No newline at end of file diff --git a/resources/views/themes/default1/update/update.blade.php b/resources/views/themes/default1/update/update.blade.php index 6b55d5596..0ecf6f378 100644 --- a/resources/views/themes/default1/update/update.blade.php +++ b/resources/views/themes/default1/update/update.blade.php @@ -4,6 +4,22 @@
    + + @if(Session::has('success')) +
    + + + {{Session::get('success')}} +
    + @endif + + @if(Session::has('fails')) +
    + + {!! Lang::get('lang.alert') !!} ! + {{Session::get('fails')}} +
    + @endif

    CURRENT VERSION: {{$current_version}}

    Reading Current Releases List

    @@ -45,7 +61,7 @@
    -
    +
    doUpdate(); ?>
    @@ -67,11 +83,11 @@
    - + @stop \ No newline at end of file
    {!! Lang::get('lang.template_name') !!}{!! Lang::get('lang.subject') !!}{!! Lang::get('lang.type') !!}{!! Lang::get('lang.description') !!} {!! Lang::get('lang.action') !!}
    {!! $type->name !!} {!! $template->name !!}{!! $template->subject !!} {!! link_to_route('templates.edit', Lang::get('lang.edit_templates'),[$template->id],['class'=>'btn btn-success btn-sm']) !!}