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-ca02368028f8main
parent
2c23d9a7ae
commit
bc4d92f3c4
@ -0,0 +1,7 @@
|
|||||||
|
1. Create file
|
||||||
|
2. Create DB entry in table UserCVS (admin/userDefaultSetting.php9
|
||||||
|
3. update file DB/UserCVS.sql
|
||||||
|
4. Create DB entry in table Sprache (admin/sprache.php)
|
||||||
|
When you down't wont a menupount set the Text to ' '
|
||||||
|
5. update file DB/Sprache.sql
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
<?PHP
|
||||||
|
ini_set( "session.gc_maxlifetime", "65535");
|
||||||
|
|
||||||
|
include ("config.php");
|
||||||
|
include ("error_handler.php");
|
||||||
|
include ("config_db.php");
|
||||||
|
include ("funktion_lang.php");
|
||||||
|
include ("funktion_faq.php"); //für noAnswer() im menu
|
||||||
|
include ("funktion_menu.php");
|
||||||
|
include ("funktion_user.php");
|
||||||
|
|
||||||
|
if( !isset($_SESSION))
|
||||||
|
session_start();
|
||||||
|
include ("secure.php");
|
||||||
|
|
||||||
|
if( !isset($_SESSION['IP']))
|
||||||
|
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
if (IsSet($_SESSION['UID']) and ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR']))
|
||||||
|
{
|
||||||
|
session_destroy ();
|
||||||
|
header("Location: $url". substr($ENGEL_ROOT,1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
include ("UserCVS.php");
|
||||||
|
|
||||||
|
|
||||||
|
//UPdate LASTlogin
|
||||||
|
if( isset($_SESSION['UID']))
|
||||||
|
{
|
||||||
|
$SQLlastLogIn = "UPDATE `User` SET ".
|
||||||
|
"`lastLogIn` = '". gmdate("Y-m-j H:i:s", time()). "'".
|
||||||
|
" WHERE `UID` = '". $_SESSION['UID']. "' LIMIT 1;";
|
||||||
|
mysql_query ($SQLlastLogIn, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -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");
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
Loading…
Reference in New Issue