aboutsummaryrefslogtreecommitdiffstats
path: root/init.inc.php
blob: 5a5bb961cbcfb8384225064ca5a849c6c4d0d13a (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
<? 
// Retain some compatibility backwards like.
if(phpversion() >= "4.2.0") 

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

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

// define supported languages
if ($language == "German") { 	
	include "languages/german.inc.php";
} elseif ($language == "Polish") {
	include "languages/polish.inc.php";
} elseif ($language == "French") {
	include "languages/french.inc.php";
} else {
	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