<?php try { $admin_button = UserPermission::rideShareLogUserHas('admin.submissions') ? '<a href="/admin" class="btn btn-sm btn-danger" style="position: absolute;top: 64px;right: 12px;">Go To Admin Area</a>' : ''; } catch (\Exception $e) { $admin_button = ''; } ?> <!DOCTYPE html> <html ng-app="rideShareLogApp"> <head> <meta charset="utf8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="RideShareLog Rideshare Applicaiton"> <meta name="author" content="jsoro@ACME"> <link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon" /> <title>@yield('page_title')</title> </head> <body> @yield('page_styles') <script type="text/javascript"> @yield('script_data') </script> @yield('page_scripts') <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header">
if (Session::token() !== Input::get('_token')) { throw new Illuminate\Session\TokenMismatchException(); } }); /******************************************************************************************* * Custom Filters ******************************************************************************************/ Route::filter('rideShareLogSession', function () { if (!Session::has('user')) { // No access, return Error $baseCtrl = new \BaseController(); $errmsg = 'Session not active. Please close this window, refresh the RideShareLog access page on ACME Intranet, and try again.'; $e = new \Exception($errmsg); if (Request::ajax()) { return $baseCtrl->handleError($e); } return $baseCtrl->handleRideShareLogError($e, 'Failed application filter: ' . $errmsg); } }); Route::filter('rideShareLogAdmin', function () { if (!UserPermission::rideShareLogUserHas('admin.submissions')) { // No access, return Error $baseCtrl = new \BaseController(); $errmsg = 'You do not have access to the Admin Section. If you should have access to this section, please contact Administration.'; $e = new \Exception($errmsg); if (Request::ajax()) { return $baseCtrl->handleError($e); } return $baseCtrl->handleRideShareLogError($e, 'Failed application filter: ' . $errmsg); } });