diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-11 23:48:39 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-11 23:48:39 +0000 |
commit | b1aaa3b6ca8894ac0422fb3aeadded29c2b83972 (patch) | |
tree | 7689417eb311569ffe966c5f60aeb7a8e9ff2035 /functions/init/cpaths.php | |
parent | b8fa9f6a3a0d0bad52babec3573899ba37873477 (diff) | |
download | phpicalendar-b1aaa3b6ca8894ac0422fb3aeadded29c2b83972.tar.gz phpicalendar-b1aaa3b6ca8894ac0422fb3aeadded29c2b83972.tar.bz2 phpicalendar-b1aaa3b6ca8894ac0422fb3aeadded29c2b83972.zip |
add new files
Diffstat (limited to 'functions/init/cpaths.php')
-rw-r--r-- | functions/init/cpaths.php | 24 |
1 files changed, 24 insertions, 0 deletions
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 @@ +<?php +#cpath modifies the calendar path based on the url or cookie values. This allows you to run multiple calendar subsets from a single phpicalendar installation. Operations on cpath are largely hidden from the end user. +if ($phpiCal_config->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"]); +} |