aboutsummaryrefslogtreecommitdiffstats
path: root/init.inc.php
blob: c541d7fc6af9f9be0cba781f3bf9971ba11046cb (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
45
46
47
48
49
50
51
52
53
54
55
<? 
// Retain some compatibility backwards like.
if(phpversion() >= "4.2.0") 

	{
		extract($HTTP_GET_VARS);	
		extract($HTTP_POST_VARS);
	}

include('./config.inc.php');

// define supported languages
switch ($language) {
	case "German":
		include("./languages/german.inc.php");
		break;
	case "Polish":
		include("./languages/polish.inc.php");
		break;
	case "French":
		include("./languages/french.inc.php");
		break;
	case "Dutch":
		include("./languages/dutch.inc.php");
		break;
	case "Danish":
		include("./languages/danish.inc.php");
		break;
	case "Italian":
		include("./languages/italian.inc.php");
		break;
	case "Japanese":
		include("./languages/japanese.inc.php");
		break;
	default:
		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"]));
	setcookie("cal",$cal_filename);
} elseif ($_COOKIE["cal"]) {
	$cal_filename = stripslashes(urldecode($_COOKIE["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";
}

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