summaryrefslogtreecommitdiff
path: root/www-ssl/nonpublic
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2008-12-22 19:55:00 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2008-12-22 19:55:00 +0000
commitbc4d92f3c4c5f63fbf00a0ed6b52dd21929d9beb (patch)
tree50b001d876b351fcd760bb0326957a6ba3c791db /www-ssl/nonpublic
parent2c23d9a7ae69f387e936e5113361c8e689cf21a3 (diff)
implement ical export, bugfix schichtplan_beamer.php was not shown, add doku
git-svn-id: svn://svn.cccv.de/engel-system@323 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl/nonpublic')
-rwxr-xr-xwww-ssl/nonpublic/myschichtplan.php5
-rwxr-xr-xwww-ssl/nonpublic/myschichtplan_ical.php52
-rwxr-xr-xwww-ssl/nonpublic/schichtplan_beamer.php5
3 files changed, 58 insertions, 4 deletions
diff --git a/www-ssl/nonpublic/myschichtplan.php b/www-ssl/nonpublic/myschichtplan.php
index 89791343..5c7b304e 100755
--- a/www-ssl/nonpublic/myschichtplan.php
+++ b/www-ssl/nonpublic/myschichtplan.php
@@ -110,6 +110,11 @@ If( !IsSet($_GET["action"]) )
}
echo "</table>\n\n";
+if( $_SESSION['CVS'][ "nonpublic/myschichtplan_ical.php" ] == "Y" )
+{
+ echo "<br><a href=\"./myschichtplan_ical.php\">". Get_Text("pub_myschichtplan_ical"). "</a>\n";
+}
+
}
else
{
diff --git a/www-ssl/nonpublic/myschichtplan_ical.php b/www-ssl/nonpublic/myschichtplan_ical.php
new file mode 100755
index 00000000..dfe06f07
--- /dev/null
+++ b/www-ssl/nonpublic/myschichtplan_ical.php
@@ -0,0 +1,52 @@
+<?php
+include ("../../includes/header_start.php");
+
+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\"" );
+
+//DATA
+echo "BEGIN:VCALENDAR\n";
+echo "PRODID:-//Engelsystem//DE-EN\n";
+echo "VERSION:2.0\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";
+
+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 "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 "CLASS:PUBLIC\n";
+ echo "STATUS:CONFIRMED\n";
+ echo "URL:". $url. substr($ENGEL_ROOT,1). "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 "ACTION:DISPLAY\n";
+ echo "END:VALARM\n";
+ echo "END:VEVENT\n";
+}
+echo "END:VCALENDAR\n";
+
+include( "../../includes/funktion_counter.php");
+
+?>
+
diff --git a/www-ssl/nonpublic/schichtplan_beamer.php b/www-ssl/nonpublic/schichtplan_beamer.php
index 66795a82..25979db2 100755
--- a/www-ssl/nonpublic/schichtplan_beamer.php
+++ b/www-ssl/nonpublic/schichtplan_beamer.php
@@ -1,9 +1,6 @@
<?php
-include ("../../includes/config.php");
-include ("../../includes/config_db.php");
-include ("../../includes/funktion_lang.php");
+include ("../../includes/header_start.php");
-include ("../../includes/funktion_user.php");
include ("../../includes/funktionen.php");
include ("../../includes/funktion_schichtplan_beamer.php");