]>
git.datanom.net - webcal.git/blob - navigate/show_week.php
3 require_once 'config.inc.php';
4 require_once 'user_validate.php';
5 require_once 'helper.php';
9 if (! defined($_SESSION['__ROOT__']) && empty($_SESSION['__ROOT__'])) {
11 header('Location: ' . WEB_ROOT
. 'error.html');
15 if (isset($_SESSION['authenticate']) && $_SESSION['authenticate']->validUser()) {
16 $view_style = ($_SESSION['user_settings']->getViewStyle()) ?
17 $_SESSION['user_settings']->getViewStyle() : VIEW_STYLE
;
18 $week_start_sunday = ($_SESSION['user_settings']->getStartWeek() !== NULL) ?
19 $_SESSION['user_settings']->getStartWeek() : WEEK_START_SUNDAY
;
20 $start_hour = ($_SESSION['user_settings']->getStartHour() != NULL) ?
21 (int) $_SESSION['user_settings']->getStartHour() : START_HOUR
;
22 $end_hour = ($_SESSION['user_settings']->getEndHour() != NULL) ?
23 (int) $_SESSION['user_settings']->getEndHour() : END_HOUR
;
27 if ($pwd[strlen($pwd)-1] == '/')
28 $pwd = substr($pwd, 0, -1);
30 include TOP_FOLDER
.'/include/header.inc.php';
31 include TOP_FOLDER
.'/include/menu.inc.php';
32 include TOP_FOLDER
.'/templates/view.class.php';
33 $pageView = new PageView($pwd, $start_hour, $end_hour, $week_start_sunday);
34 $week = $pageView->createView(PageView
::WEEK
);
36 if (isset($_GET['year']) && isset($_GET['week'])) {
37 $calendar = $week->getView($_GET['year'], $_GET['week']);
40 $calendar = $week->getView();
42 print "<div id=\"ui\">$calendar</div>";
43 include TOP_FOLDER
.'/include/footer.inc.php';
This page took 0.06276 seconds and 6 git commands to generate.