forked from Piwigo/PEM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (28 loc) · 814 Bytes
/
Copy pathindex.php
File metadata and controls
36 lines (28 loc) · 814 Bytes
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
<?php
/*
* This file is part of PEM package
*
* Copyright(c) Nicolas Roudaire https://www.nikrou.net/
* Licensed under the GPL version 2.0 license.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
define('INTERNAL', true);
$root_path = './';
require_once($root_path.'include/common.inc.php');
$tpl->set_filename('page', 'page.tpl');
$available_views = array('standard', 'compact');
if (isset($_GET['view'])) {
if (in_array($_GET['view'], $available_views)) {
$_SESSION['view'] = $_GET['view'];
}
}
$view = $available_views[0];
if (isset($_SESSION['view'])) {
$view = $_SESSION['view'];
}
$tpl->assign('view', $view);
require_once($root_path.'include/index_view_'.$view.'.inc.php');
$tpl->parse('page');
$tpl->p();