-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·129 lines (105 loc) · 5.4 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
//ini_set('display_errors', 1);
session_start();
require_once("beans/Context.php");
Dispatcher::dispatch();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?= Context::getInstance()->configurationManager->getConfiguration()->websiteLang ?>" dir="ltr" lang="<?= Context::getInstance()->configurationManager->getConfiguration()->websiteLang ?>">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="author" content="<?= Context::getInstance()->configurationManager->getConfiguration()->websiteAuthor ?>">
<meta name="description" content="<?= Context::getInstance()->configurationManager->getConfiguration()->websiteDescription ?>">
<title><?= Context::getInstance()->configurationManager->getConfiguration()->websiteName ?></title>
<link rel="shortcut icon" href="img/favicons/tripode.ico">
<link rel="stylesheet" type="text/css" href="css/template.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/tripode.js"></script>
<!-- gallery -->
<link rel="stylesheet" type="text/css" href="css/gallery.css" />
<script type="text/javascript" src="js/slimbox2.js"></script>
<link rel="stylesheet" type="text/css" href="css/slimbox2.css" />
</head>
<body class="site">
<div class="body">
<div class="container">
<header class="header" role="banner">
<div class="clearfix">
<a class="brand pull-left" href="index.php">
<span class="site-title" title="<?= Context::getInstance()->configurationManager->getConfiguration()->name ?>"><?= Context::getInstance()->configurationManager->getConfiguration()->websiteName ?></span>
</a>
<?php Context::getInstance()->pageService->sectionEditable("websiteEdit") ?>
<div class="header-search pull-right"></div>
</div>
</header>
<nav class="navigation" role="navigation">
<ul class="nav menu nav-pills">
<li class="<?= Context::getInstance()->topMenuManager->isActive("home") ?>">
<a href="index.php"><?= Context::getInstance()->translator->translate("menu.home") ?></a>
</li>
<li class="<?= Context::getInstance()->topMenuManager->isActive("login") ?>">
<a href="index.php?action=login"><?= Context::getInstance()->translator->translate("menu.login") ?></a>
</li>
<?php if (Context::getInstance()->authenticationManager->isAdminUserLoggedIn()) { ?>
<li class="<?= Context::getInstance()->topMenuManager->isActive("logout") ?>">
<a href="index.php?action=logout"><?= Context::getInstance()->translator->translate("menu.logout") ?></a>
</li>
<?php } ?>
<li class="<?= Context::getInstance()->topMenuManager->isActive("contacts") ?>">
<a href="index.php?page=contacts"><?= Context::getInstance()->translator->translate("menu.contacts") ?></a>
</li>
</ul>
</nav>
<?php if (Context::getInstance()->topMenuManager->hasCurrentPage()) { ?>
<div class="moduletable">
<div class="custom">
<?php Context::getInstance()->pageService->sectionEditable("bannersEdit") ?>
<?php if (Context::getInstance()->bannerManager->hasBanner()) { ?>
<p><img src="img/banners/<?= Context::getInstance()->bannerManager->getBanner() ?>" alt="" width="100%"></p>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="row-fluid">
<main id="content" role="main" class="span9">
<?php if ( isset($_REQUEST['ERROR']) ) { ?>
<div class="alert alert-error"><?= Context::getInstance()->translator->translate($_REQUEST['ERROR']) ?></div>
<?php } ?>
<?php if ( isset($_REQUEST['MESSAGE']) ) { ?>
<div class="alert alert-success"><?= Context::getInstance()->translator->translate($_REQUEST['MESSAGE']) ?></div>
<?php } ?>
<?php include $_REQUEST['PAGE_FILE'] ?>
</main>
<div id="aside" class="span3">
<div class="well _menu">
<div>
<h3 class="page-header" style="float:left"><?= Context::getInstance()->translator->translate("gallery") ?></h3>
<?php Context::getInstance()->pageService->sectionEditable("galleryCategoriesEdit") ?>
</div>
<div class="clearfix"></div>
<ul class="nav menu">
<?php foreach (Context::getInstance()->galleryManager->getGalleryCategories() as $categoryItem) { ?>
<li><a href="index.php?page=gallery&category=<?= $categoryItem->getFilename() ?>"><?= $categoryItem->getName() ?></a></li>
<?php } ?>
</ul>
</div>
</div>
</div>
</div>
</div>
<?php if (isset($_REQUEST['OPEN_DEFAULT_POPUP'])) { ?>
<a id="openDefaultPopup" style="display:none" href="#popup-<?= $_REQUEST['OPEN_DEFAULT_POPUP'] ?>"></a>
<?php } ?>
<footer class="footer" role="contentinfo">
<div class="container">
<hr>
<p class="pull-left">© <?= Context::getInstance()->configurationManager->getConfiguration()->websiteName ?> 2014</p>
<div class="pull-right">
<p class="pull-left"><?= Context::getInstance()->translator->translate("index.poweredBy") ?> <a href="https://github.com/antonioalonzi/tripode">Tripode</a></p>
<p class="pull-right"><?php Context::getInstance()->pageService->sectionEditable("footerEdit") ?></p>
</div>
</div>
</footer>
</body>
</html>