summaryrefslogtreecommitdiff
path: root/www-ssl/nonpublic/myschichtplan_ical.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-06-11 17:09:30 +0200
committerPhilip Häusler <msquare@notrademark.de>2011-06-11 17:09:30 +0200
commit3a31cebd1d39a6bcec2c22cbced60ca9d6177a42 (patch)
tree3cce86da26c408841e69bdee4e2ba012e0c72e47 /www-ssl/nonpublic/myschichtplan_ical.php
parentebecae2ccc37c8930245a562852c035d5ce8d5a1 (diff)
parent80a1a65aefcd2f33951dc60c72d29df1ad19b187 (diff)
merge special_includes_camp
Diffstat (limited to 'www-ssl/nonpublic/myschichtplan_ical.php')
-rw-r--r--[-rwxr-xr-x]www-ssl/nonpublic/myschichtplan_ical.php43
1 files changed, 21 insertions, 22 deletions
diff --git a/www-ssl/nonpublic/myschichtplan_ical.php b/www-ssl/nonpublic/myschichtplan_ical.php
index 5d572520..ff74fef0 100755..100644
--- a/www-ssl/nonpublic/myschichtplan_ical.php
+++ b/www-ssl/nonpublic/myschichtplan_ical.php
@@ -1,52 +1,51 @@
<?php
-include ("../../includes/header_start.php");
+require_once ('../bootstrap.php');
-include ("../../includes/funktion_schichtplan_array.php");
+include ("includes/header_start.php");
-$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` ".
- "INNER JOIN `ShiftEntry` ".
- "ON `Shifts`.`SID`=`ShiftEntry`.`SID` ".
- "WHERE `ShiftEntry`.`UID`='". $_SESSION['UID']. "' ".
- "ORDER BY `DateS`";
-$erg = mysql_query($SQL, $con);
+include ("includes/funktion_schichtplan_aray.php");
+$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` " .
+"INNER JOIN `ShiftEntry` " .
+"ON `Shifts`.`SID`=`ShiftEntry`.`SID` " .
+"WHERE `ShiftEntry`.`UID`='" . $_SESSION['UID'] . "' " .
+"ORDER BY `DateS`";
+$erg = mysql_query($SQL, $con);
//HEADER
header("Content-Type: text/x-vCalendar");
-header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"" );
+header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"");
//DATA
echo "BEGIN:VCALENDAR\n";
echo "PRODID:-//Engelsystem//DE-EN\n";
echo "VERSION:2.0\n";
-echo "PRODID:". md5('icalschichtplan:'.$_SESSION['UID']). "\n";
+echo "PRODID:" . md5('icalschichtplan:' . $_SESSION['UID']) . "\n";
echo "METHOD:PUBLISH\n";
echo "CALSCALE:GREGORIAN\n";
echo "METHOD:PUBLISH\n";
-echo "X-WR-CALNAME;VALUE=TEXT:". "Himmel - Schichtplan\n";
+echo "X-WR-CALNAME;VALUE=TEXT:" . "Himmel - Schichtplan\n";
-for( $i=0; $i<mysql_num_rows( $erg ); $i++ )
-{
+for ($i = 0; $i < mysql_num_rows($erg); $i++) {
echo "BEGIN:VEVENT\n";
- echo "UID:". md5(mysql_result( $erg, $i, "Man" ). mysql_result( $erg, $i, "DateS" ))."\n";
+ echo "UID:" . md5(mysql_result($erg, $i, "Man") . mysql_result($erg, $i, "DateS")) . "\n";
echo "METHOD:PUBLISH\n";
- echo "DTSTART;TZID=Europe/Berlin:". date( 'Ymd\THis', strtotime( mysql_result( $erg, $i, "DateS" ) ) ). "\n";
- echo "DTEND;TZID=Europe/Berlin:". date( 'Ymd\THis', strtotime( mysql_result( $erg, $i, "DateE" ) ) ). "\n";
- echo "SUMMARY:". str_replace( ',', '\\,',mysql_result( $erg, $i, "Man" ) ). "\n";
+ echo "DTSTART;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateS"))) . "\n";
+ echo "DTEND;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateE"))) . "\n";
+ echo "SUMMARY:" . str_replace(',', '\\,', mysql_result($erg, $i, "Man")) . "\n";
echo "CLASS:PUBLIC\n";
echo "STATUS:CONFIRMED\n";
- echo "URL:". $url. $ENGEL_ROOT. "nonpublic/myschichtplan.php\n";
- echo "LOCATION:". $RoomID[mysql_result( $erg, $i, "RID" )]. "\n";
+ echo "URL:" . $url . $ENGEL_ROOT . "nonpublic/myschichtplan.php\n";
+ echo "LOCATION:" . $RoomID[mysql_result($erg, $i, "RID")] . "\n";
echo "BEGIN:VALARM\n";
echo "TRIGGER;VALUE=DURATION:-PT5M\n";
- echo "DESCRIPTION:". str_replace( ',', '\\,',mysql_result( $erg, $i, "Man" ) ). "\n";
+ echo "DESCRIPTION:" . str_replace(',', '\\,', mysql_result($erg, $i, "Man")) . "\n";
echo "ACTION:DISPLAY\n";
echo "END:VALARM\n";
echo "END:VEVENT\n";
}
echo "END:VCALENDAR\n";
-include( "../../includes/funktion_counter.php");
-
+include ("includes/funktion_counter.php");
?>