public function handle($request, Closure $next) { if ($this->auth->guest()) { if ($request->ajax()) { return response('Unauthorized.', 401); } else { return redirect()->guest('auth/login'); } } if (checkMember()) { return redirect()->guest('/'); } $route = $request->route()->getPath(); if (!checkPermission($route)) { return redirect(URL::to('/admin/dashboard'))->withErrors('You has not permission to page'); } return $next($request); }
echo border('syellow', 'start', $rc_wordings[$roster_conf['roster_lang']]['Replacements']); // Make a table to hold the content echo '<table cellpadding="0" cellspacing="0" class="membersList">'; // Display the header of the table echo '<tr>'; echo '<th class="membersHeader">' . $rc_wordings[$roster_conf['roster_lang']]['Name'] . '</th>'; echo '<th class="membersHeader">' . $rc_wordings[$roster_conf['roster_lang']]['Guild'] . '</th>'; echo '<th class="membersHeader">' . $rc_wordings[$roster_conf['roster_lang']]['Level'] . '</th>'; echo '<th class="membersHeaderRight">' . $rc_wordings[$roster_conf['roster_lang']]['Note'] . '</th>'; echo '</tr>'; $total = 0; $rownum = 1; while ($row = $wowdb->fetch_array($result)) { $total += 1; echo '<td class="membersRow' . $rownum . '">' . getClassIcon($row['class']); echo checkMember($row['name']) . '</td>'; echo '<td class="membersRow' . $rownum . '">'; echo $row['guild'] . '</td>'; echo '<td style="text-align:center;" class="membersRow' . $rownum . '">'; echo $row['level'] . '</td>'; echo '<td style="text-align:center;" class="membersRowRight' . $rownum . '">'; echo getNoteIcon($row['note']) . '</td>'; // Close the Row echo '</tr>'; switch ($rownum) { case 1: $rownum = 2; break; default: $rownum = 1; }
$authorized = checkPage($askedPage); if ($authorized) { $pageTitle = getPageTitle($askedPage); } else { $pageTitle = "Error"; } $members = checkMember($askedPage); generateHTMLHeader($pageTitle, "css/perso.css"); ?> </head> <body> <nav class="navbar navbar-default navbar-fixed-top"> <?php generateMenu(); $members = checkMember($askedPage); ?> </nav> <div id="content"> <?php if ($authorized && $members) { require "content/content-{$askedPage}.php"; } else { echo <<<FIN <div class="row jumbotron container"> <h1 style="text-align:center">ERROR</h1> <p class="text-center">Sorry, this page is only for members ! </p> </div> FIN; }
<a href="{{ URL::to('/') }}">Home</a> </li> </ul> </div> <!-- END TOP BAR LEFT PART --> <!-- BEGIN TOP BAR MENU --> <div class="col-md-6 col-sm-6 additional-nav"> <ul class="list-unstyled list-inline pull-right"> @if( Auth::guest() ) <li><i class="fa fa-user"></i>Welcome Guest</li> <li><a href="{{ URL::to('auth/login') }}">Log In</a></li> <li><a href="{{ URL::to('auth/register') }}">Sign Up</a></li> @else <li><i class="fa fa-user"></i>Welcome {{ Auth::user()->name }}</li> <?php if (checkMember()) { ?> <li><a href="{{ URL::to('account') }}">Account</a></li> <li><a href="{{ URL::to('account/history') }}">History</a></li> <?php } else { ?> <li><a href="{{ URL::to('admin/dashboard') }}">Dashboard</a></li> <?php } ?> <li><a href="{{ URL::to('auth/logout') }}">Logout</a></li> @endif