histogram: Make histograms crash less
[ninja.git] / application / views / template.php
blobf7a0691c0af9b04210bc2f260c56f27c97fd74ad
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
3 $authorized = false;
4 if (Auth::instance()->logged_in()) {
5 $auth = op5auth::instance();
6 if ($auth->authorized_for('host_view_all')) {
7 $authorized = true;
11 if (!isset($keycommands_disabled) || $keycommands_disabled !== true) {
12 $keycommands_active = (int)(bool)config::get('keycommands.activated', '*');
13 } else {
14 $keycommands_active = 0;
17 ?><!DOCTYPE html>
18 <html>
19 <?php
20 require __DIR__.'/template_head.php';
22 <body>
24 <div class="container">
25 <?php
26 if (!empty($print_notifications)) {
27 ?> <div class="print-notification-bar"> <?php
28 foreach ($print_notifications as $print_notification) {
29 echo $print_notification;
31 ?> </div> <?php
34 if(!isset($hide_header)) {
35 require __DIR__.'/template_header.php';
36 } ?>
37 <div class="content" tabindex="0" id="content">
39 <?php
41 if (isset($content)) {
42 echo $content;
43 } else {
44 return url::redirect(Kohana::config('routes.logged_in_default'));
47 require __DIR__ . '/template_notifications.php';
51 </div>
53 <?php
55 if (isset($saved_searches) && !empty($saved_searches)) {
56 echo $saved_searches;
61 </div>
62 <?php
63 if(!isset($no_dojo)) {
64 echo html::script('application/media/js/dojo.js');
66 if (isset($context_menu))
67 echo $context_menu;
70 </body>
71 </html>