Jump to content

Recommended Posts

Posted

if(!Auth::LoggedIn())
 {
  $this->set('message', 'You must be logged in to access this feature!');
  $this->render('core_error.tpl');
  return;
 }

Use the above code to allow only users logged

if(Auth::LoggedIn())
 {
  $this->set('message', 'You be logged');
  $this->render('core_succes.tpl');
  return;
 }

And this code to allow users not logged

  • 10 months later...
Posted

The function is working, however is showing the following error: Fatal error: Call to undefined method TemplateSet::render() in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\dov\lib\skins\EXC\layout.php on line 5

This is the code:

<?php

if(!Auth::LoggedIn())

{

$this->set('message', 'You must be logged in to access this feature!');

$this->render('core_error.tpl');

return;

}

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

<meta name="description" content="">

<meta name="author" content="Mosaddek">

<meta name="keyword" content="slick, flat, dashboard, bootstrap, admin, template, theme, responsive, fluid, retina">

<link rel="shortcut icon" href="javascript:;" type="image/png">

<title><?php echo $page_title; ?></title>

<?php echo $page_htmlhead; ?>

<link href="<?php echo SITE_URL?>/lib/skins/EXC/css/slidebars.css" rel="stylesheet">

<link href="<?php echo SITE_URL?>/lib/skins/EXC/js/switchery/switchery.min.css" rel="stylesheet" type="text/css" media="screen" />

<link href="<?php echo SITE_URL?>/lib/skins/EXC/css/style.css" rel="stylesheet">

<link href="<?php echo SITE_URL?>/lib/skins/EXC/css/style-responsive.css" rel="stylesheet">

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/html5shiv.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/respond.min.js"></script>

</head>

<?php echo $page_htmlreq; ?>

<body class="sticky-header">

<section>

<div class="sidebar-left">

<div class="logo dark-logo-bg visible-xs-* visible-sm-*">

<a href="<?php echo SITE_URL?>/lib/skins/EXC/index.html">

<img src="<?php echo SITE_URL?>/lib/skins/EXC/img/logo-icon.png" alt="">

<span class="brand-name">SlickLab</span>

</a>

</div>

<div class="sidebar-left-info">

<div class=" search-field"> </div>

<ul class="nav nav-pills nav-stacked side-navigation">

<li>

<h3 class="navigation-title">Navigation</h3>

</li>

<li><a href="<?php echo url('/profile'); ?>"><i class="fa fa-home"></i> <span>Home</span></a></li>

<li class="menu-list">

<a href="<?php echo SITE_URL?>/lib/skins/EXC/"><i class="fa fa-laptop"></i> <span>Layouts</span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/boxed-layout.html"> Boxed Page</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/collapsed-menu.html"> Sidebar Collapsed</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/blank-page.html"> Blank page</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/different-theme-layouts.html"> Different Theme Layouts</a></li>

</ul>

</li>

<li class="menu-list"><a href="<?php echo SITE_URL?>/lib/skins/EXC/"><i class="fa fa-book"></i> <span>UI Elements</span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/general.html"> BS Elements</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/buttons.html"> Buttons</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/toastr.html"> Toaster Notification</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/widgets.html"> Widgets</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/ion-slider.html"> Ion Slider</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/tree.html"> Tree View</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/nestable.html"> Nestable</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/fontawesome.html"> Fontawesome</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/line-icon.html"> Line Icon</a></li>

</ul>

</li>

<li>

<h3 class="navigation-title">Components</h3>

</li>

<li class="menu-list nav-active"><a href="<?php echo SITE_URL?>/lib/skins/EXC/"><i class="fa fa-cogs"></i> <span>Components <span class="badge noti-arrow bg-success pull-right">3</span> </span></a>

<ul class="child-list">

<li class="active"><a href="<?php echo SITE_URL?>/lib/skins/EXC/grid.html"> Grids</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/calendar.html"> Calendar</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/timeline.html"> Timeline </a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/gallery.html"> Gallery </a></li>

</ul>

</li>

<li class="menu-list"><a href="javascript:;"><i class="fa fa-th-list"></i> <span>Data Tables</span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/table-static.html"> Basic Table</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/table-dynamic.html"> Advanced Table</a></li>

</ul>

</li>

<li class="menu-list"><a href="<?php echo SITE_URL?>/lib/skins/EXC/"><i class="fa fa-tasks"></i> <span>Forms</span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/form-layout.html"> Form Layouts</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/advanced-components.html"> Advanced Components</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/form-wizard.html"> Form Wizards</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/form-validation.html"> Form Validation</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/form-editor.html"> Editors</a></li>

</ul>

</li>

<li class="menu-list"><a href="<?php echo SITE_URL?>/lib/skins/EXC/"><i class="fa fa-bar-chart-o"></i> <span>Charts </span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/flot-chart.html"> Flot Charts</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/morris-chart.html"> Morris Charts</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/chartjs.html"> Chartjs</a></li>

</ul>

</li>

<li>

<h3 class="navigation-title">Extra</h3>

</li>

<li class="menu-list"><a href="javascript:;"><i class="fa fa-envelope-o"></i> <span>Email <span class="label noti-arrow bg-danger pull-right">4 Unread</span> </span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/inbox.html"> Inbox</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/inbox-details.html"> View Mail</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/inbox-compose.html"> Compose Mail</a></li>

</ul>

</li>

<li class="menu-list"><a href="javascript:;"><i class="fa fa-map-marker"></i> <span>Maps</span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/google-map.html"> Google Map</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/vector-map.html"> Vector Map</a></li>

</ul>

</li>

<li class="menu-list"><a href="<?php echo SITE_URL?>/lib/skins/EXC/"><i class="fa fa-file-text"></i> <span>Extra Pages</span></a>

<ul class="child-list">

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/profile.html"> Profile</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/invoice.html"> Invoice</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/login.html"> Login </a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/registration.html"> Registration </a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/lock.html"> Lock Screen </a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/404.html"> 404 Error</a></li>

<li><a href="<?php echo SITE_URL?>/lib/skins/EXC/500.html"> 500 Error</a></li>

</ul>

</li>

</ul>

</div>

</div>

<div class="body-content" style="min-height: 1100px;">

<div class="header-section">

<div class="logo dark-logo-bg hidden-xs hidden-sm">

<a href="<?php echo SITE_URL?>/lib/skins/EXC/index.html">

<img src="<?php echo SITE_URL?>/lib/skins/EXC/img/logo-icon.png" alt="">

<span class="brand-name">SlickLab</span>

</a>

</div>

<div class="icon-logo dark-logo-bg hidden-xs hidden-sm">

<a href="<?php echo SITE_URL?>/lib/skins/EXC/index.html">

<img src="<?php echo SITE_URL?>/lib/skins/EXC/img/logo-icon.png" alt="">

</a>

</div>

<a class="toggle-btn"><i class="fa fa-outdent"></i></a>

<div id="navbar-collapse-1" class="navbar-collapse collapse yamm mega-menu">

<ul class="nav navbar-nav">

<li class="dropdown"><a href="javascript:;" data-toggle="dropdown" class="dropdown-toggle"> Português <b

class=" fa fa-angle-down"></b></a>

<ul role="menu" class="dropdown-menu language-switch">

<li>

<a tabindex="-1" href="javascript:;"><span> English </span><img src="<?php echo SITE_URL?>/lib/skins/EXC/img/flags/usa_flag.jpg" alt=""/></a>

</li>

<li>

<a tabindex="-1" href="javascript:;"><span> Espanhol </span> <img src="<?php echo SITE_URL?>/lib/skins/EXC/img/flags/spain_flag.jpg" alt=""/></a>

</li>

</ul>

</li>

</ul>

</div>

<div class="notification-wrap">

<div class="left-notification">

<ul class="notification-menu">

<li>

<a href="javascript:;" class="btn btn-default dropdown-toggle info-number" data-toggle="dropdown">

<i class="fa fa-bell-o"></i>

<span class="badge bg-warning">4</span>

</a>

<div class="dropdown-menu dropdown-title ">

<div class="title-row">

<h5 class="title yellow">

You have 4 New Notification

</h5>

<a href="javascript:;" class="btn-warning btn-view-all">View all</a>

</div>

<div class="notification-list-scroll sidebar">

<div class="notification-list mail-list not-list">

<a href="javascript:;" class="single-mail">

<span class="icon bg-primary">

<i class="fa fa-envelope-o"></i>

</span>

<strong>New User Registration</strong>

<p>

<small>Just Now</small>

</p>

<span class="un-read tooltips" data-original-title="Mark as Read" data-toggle="tooltip" data-placement="left">

<i class="fa fa-circle"></i>

</span>

</a>

<a href="javascript:;" class="single-mail">

<span class="icon bg-success">

<i class="fa fa-comments-o"></i>

</span>

<strong> Private message Send</strong>

<p>

<small>30 Mins Ago</small>

</p>

<span class="un-read tooltips" data-original-title="Mark as Read" data-toggle="tooltip" data-placement="left">

<i class="fa fa-circle"></i>

</span>

</a>

<a href="javascript:;" class="single-mail">

<span class="icon bg-warning">

<i class="fa fa-warning"></i>

</span> Application Error

<p>

<small> 2 Days Ago</small>

</p>

<span class="read tooltips" data-original-title="Mark as Unread" data-toggle="tooltip" data-placement="left">

<i class="fa fa-circle-o"></i>

</span>

</a>

<a href="javascript:;" class="single-mail">

<span class="icon bg-dark">

<i class="fa fa-database"></i>

</span> Database Overloaded 24%

<p>

<small>1 Week Ago</small>

</p>

<span class="read tooltips" data-original-title="Mark as Unread" data-toggle="tooltip" data-placement="left">

<i class="fa fa-circle-o"></i>

</span>

</a>

<a href="javascript:;" class="single-mail">

<span class="icon bg-danger">

<i class="fa fa-warning"></i>

</span>

<strong>Server Failed Notification</strong>

<p>

<small>10 Days Ago</small>

</p>

<span class="un-read tooltips" data-original-title="Mark as Read" data-toggle="tooltip" data-placement="left">

<i class="fa fa-circle"></i>

</span>

</a>

</div>

</div>

</div>

</li>

</ul>

</div>

<div class="right-notification">

<ul class="notification-menu">

<li>

<a href="javascript:;" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

<img src="<?php echo PilotData::getPilotAvatar($pilotid);?>" alt=""><?php echo $pilot->firstname . ' ' . $pilot->lastname; ?>

<span class=" fa fa-angle-down"></span>

</a>

<ul class="dropdown-menu dropdown-usermenu purple pull-right">

<li><a href="<?php echo url('/profile'); ?>"> Perfil</a></li>

<li>

<a href="<?php echo url('/profile/editprofile'); ?>">

<span> Configuração</span>

</a>

</li>

<li>

<a href="<?php echo url('/profile/changepassword'); ?>">

<span> Mudar Senha</span>

</a>

</li>

<li>

<a href="#">

<span class="label bg-info pull-right"> New</span> Regulamento</a>

</li>

<li><a href="<?php echo url('/logout'); ?>"><i class="fa fa-sign-out pull-right"></i> Sair</a></li>

</ul>

</li>

</ul>

</div>

</div>

</div>

<div class="page-head">

<h3>

<?php echo $page_title; ?>

</h3>

</div>

<div class="wrapper">

<div class="row">

<div class="col-lg-12">

<section class="panel">

<div class="panel-body"><?php echo $page_content;?></div>

</section>

</div>

</div>

</div>

<footer>

2016 © <a href="http://www.phpvms.net" target="_blank">powered by phpVMS</a>

</footer>

</div>

</section>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/jquery-1.10.2.min.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/jquery-migrate.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/bootstrap.min.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/modernizr.min.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/jquery.nicescroll.js" type="text/javascript"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/slidebars.min.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/switchery/switchery.min.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/switchery/switchery-init.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/sparkline/jquery.sparkline.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/sparkline/sparkline-init.js"></script>

<script src="<?php echo SITE_URL?>/lib/skins/EXC/js/scripts.js"></script>

</body>

</html>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...