reports: Don't validate report names in javascript
[ninja.git] / application / views / template.php
blobf7996368fb4baa8e80eada38181cff9267ba5201
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 if (isset($this) && isset($this->template->js_header))
18 $this->template->js_header->js = array_unique($this->xtra_js);
21 <!DOCTYPE html>
22 <html>
24 <?php
25 require __DIR__.'/template_head.php';
28 <body>
30 <div class="container">
31 <?php
32 if (!empty($print_notifications)) {
33 ?> <div class="print-notification-bar"> <?php
34 foreach ($print_notifications as $print_notification) {
35 echo $print_notification;
37 ?> </div> <?php
40 if(!isset($hide_header)) {
41 require __DIR__.'/template_header.php';
42 } ?>
43 <div class="content" tabindex="0" id="content">
45 <?php
47 if (isset($content)) {
48 echo $content;
49 } else {
50 return url::redirect(Kohana::config('routes.logged_in_default'));
53 require __DIR__ . '/template_notifications.php';
57 </div>
59 <?php
61 if (isset($saved_searches) && !empty($saved_searches)) {
62 echo $saved_searches;
67 </div>
68 <?php
69 if(!isset($no_dojo)) {
70 echo html::script('application/media/js/dojo.js');
72 if (isset($context_menu))
73 echo $context_menu;
76 </body>
77 </html>