aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-11 21:54:52 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-11 21:54:52 +0000
commit9c705dc135dff435c0cb59dec4ebf3d0d1620d2c (patch)
treea75bce0639c690c95e6d338727d75d1b4c2ad107 /index.php
parent1c7998281489f86ca209237b8f45e067fa9a674d (diff)
downloadphpicalendar-9c705dc135dff435c0cb59dec4ebf3d0d1620d2c.tar.gz
phpicalendar-9c705dc135dff435c0cb59dec4ebf3d0d1620d2c.tar.bz2
phpicalendar-9c705dc135dff435c0cb59dec4ebf3d0d1620d2c.zip
update lots of files
Diffstat (limited to 'index.php')
-rw-r--r--index.php26
1 files changed, 10 insertions, 16 deletions
diff --git a/index.php b/index.php
index bac4eab..a865512 100644
--- a/index.php
+++ b/index.php
@@ -1,27 +1,21 @@
<?php
-
-if (!isset($ALL_CALENDARS_COMBINED)) $ALL_CALENDARS_COMBINED = 'all_calendars_combined971';
if (!defined('BASE')) define('BASE', './');
-include_once(BASE.'default_config.php');
-if (is_file(BASE.'config.inc.php')) include_once(BASE.'config.inc.php');
-if (isset($_COOKIE['phpicalendar'])) {
- $phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar']));
- $default_view = $phpicalendar['cookie_view'];
-}
-if ($printview_default == 'yes') {
- $printview = $default_view;
- $default_view = "print.php";
+include_once(BASE.'functions/init.inc.php');
+
+if ($phpiCal_config->printview_default == 'yes') {
+ $printview = $phpiCal_config->default_view;
+ $phpiCal_config->setProperty('default_view', "print.php");
} else {
$check = array ('day', 'week', 'month', 'year');
- if (in_array($default_view, $check)) {
- $default_view = $default_view . '.php';
+ if (in_array($phpiCal_config->default_view, $check)) {
+ $phpiCal_config->setProperty('default_view', $phpiCal_config->default_view . '.php');
} else {
- die;
+ die('illegal view');
}
}
if(isset($_GET['cpath'])){
- $default_view .= '?cpath='.$_GET['cpath'];
+ $phpiCal_config->default_view .= '?cpath='.$_GET['cpath'];
}
-header("Location: $default_view");
+header("Location: $phpiCal_config->default_view");
?>

© 2014-2024 Faster IT GmbH | imprint | privacy policy