blob: a4bfc356a1ba3e959146aacfe6e7f2214d624b2e (
plain) (
blame)
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
37
38
39
40
41
42
43
44
|
<?php
// Retain some compatibility backwards like.
if(phpversion() >= "4.2.0")
{
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
}
include('./config.inc.php');
// subscribe link prefix, doesn't need to be user configureable
$fullpath = 'webcal://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$calendar_path.'/';
// language support
$language = strtolower($language);
$lang_file = "./languages/$language.inc.php";
if (file_exists($lang_file)) {
include($lang_file);
} else {
// Not sure if we should print this warning or not. It would inform the user
// why the language isn't working.
print "File \"$lang_file\" does not exist, defaulting to English<br><br>";
include("./languages/english.inc.php");
}
// $cal_displayname is $cal_filename with occurrences of "32" replaced with " "
// $cal_filename should always be the filename of the calendar without .ics
if (isset($_GET["cal"])) {
$cal_filename = stripslashes(urldecode($_GET["cal"]));
} else {
$cal_filename = $default_cal;
}
$cal_displayname = str_replace("32", " ", $cal_filename);
$cal = urlencode($cal_filename);
if (!isset($filename)) {
$filename = $calendar_path."/".$cal_filename.".ics";
}
?>
|