Exemple #1
0
 /**
  * Require administrator login
  * @Developer brandon
  * @Date Oct 11, 2010
  */
 public function __construct()
 {
     parent::__construct();
     $this->template = View::factory('layouts/admin');
     meta::set_title(store::name() . ' | Admin | ' . ucwords(Router::$controller));
     // Set the route for updating and creating files
     Kohana::config_set('routes.base_crud_route', 'admin/');
     // Require an admin login if we are in production.
     if (IN_PRODUCTION) {
         customer::require_admin_login();
     }
     ORM::factory('audit_trail')->create(array('user_id' => customer::current(), 'store_id' => store::get(), 'controller' => Router::$controller, 'method' => Router::$method, 'object_id' => $this->input->post('id')));
 }
Exemple #2
0
</head>
<body id="<?php 
echo theme::body_id();
?>
" class="<?php 
echo theme::body_class();
?>
">
	<div id="wrapper">
		<?php 
echo theme::render_header();
?>
		<div id="header">
			<div id="logo" class="left">
				<h1><?php 
echo html::anchor(url::site(), store::name());
?>
</h1>
			</div>
			<div id="navigation" class="right">
				<ul>
					<?php 
foreach (links::get('main') as $link) {
    ?>
						<li><?php 
    echo $link->display();
    ?>
</li>
					<?php 
}
?>
Exemple #3
0
echo html::script('public/js/jquery');
echo html::script('public/js/admin');
?>
</head>
<body id="<?php 
echo Router::$controller;
?>
" class="<?php 
echo Router::$method;
?>
">
	<div class="container">
		<div id="header">
			<div id="logo" class="left">
				<h1><?php 
echo html::anchor('admin', store::name());
?>
</h1>
			</div>
			<ul id="sub-navigation" class="right">
				<li><?php 
echo html::anchor('admin/account', 'Account');
?>
</li>
				<li><?php 
echo html::anchor('admin/support', 'Support');
?>
</li>
				<li><?php 
echo html::anchor('customers/logout', 'Logout');
?>