From b1aaa3b6ca8894ac0422fb3aeadded29c2b83972 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Thu, 11 Dec 2008 23:48:39 +0000 Subject: add new files --- functions/init/cpaths.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 functions/init/cpaths.php (limited to 'functions/init/cpaths.php') diff --git a/functions/init/cpaths.php b/functions/init/cpaths.php new file mode 100644 index 0000000..fafc0ec --- /dev/null +++ b/functions/init/cpaths.php @@ -0,0 +1,24 @@ +calendar_path == '') { + $calendar_path = BASE.'calendars'; +}else $calendar_path = $phpiCal_config->calendar_path; +$cpath = ''; #initialize cpath to prevent later undef warnings. +if(isset($_REQUEST['cpath'])&& $_REQUEST['cpath'] !=''){ + $cpath = str_replace('..','',$_REQUEST['cpath']); + $calendar_path .= "/$cpath"; +# $tmp_dir .= "/$cpath"; +}elseif(isset($phpiCal_config->default_cpath_check) && $phpiCal_config->default_cpath_check !='' ){ + $cpath = str_replace('..','',$default_cpath_check); + $calendar_path .= "/$cpath"; +# $tmp_dir .= "/$cpath"; +} +#these need cpath to be set +#set up specific template folder for a particular cpath +if (isset($user_template["$cpath"])){ + $template = $user_template["$cpath"]; +} +#set up specific webcals for a particular cpath +if (isset($phpiCal_config->more_webcals) && is_array($phpiCal_config->more_webcals[$cpath])){ + $list_webcals = array_merge($phpiCal_config->list_webcals, $phpiCal_config->more_webcals["$cpath"]); +} -- cgit v1.2.3