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
This commit is contained in:
parent
2c23d9a7ae
commit
bc4d92f3c4
|
@ -528,6 +528,8 @@ INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/schichtpl
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/schichtplan_add.php', 'EN', ' ');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/schichtplan_add.php', 'EN', ' ');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/myschichtplan.php', 'DE', 'Mein Schichtplan');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/myschichtplan.php', 'DE', 'Mein Schichtplan');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/myschichtplan.php', 'EN', 'My Shifts');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/myschichtplan.php', 'EN', 'My Shifts');
|
||||||
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/myschichtplan_ical.php', 'DE', ' ');
|
||||||
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/myschichtplan_ical.php', 'EN', ' ');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/einstellungen.php', 'DE', 'Einstellungen');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/einstellungen.php', 'DE', 'Einstellungen');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/einstellungen.php', 'EN', 'Options');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/einstellungen.php', 'EN', 'Options');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/wecken.php', 'DE', 'Wecken');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('nonpublic/wecken.php', 'DE', 'Wecken');
|
||||||
|
@ -600,3 +602,5 @@ INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/sprache.php',
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/sprache.php', 'EN', 'Language');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/sprache.php', 'EN', 'Language');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/faq.php', 'DE', 'FAQ');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/faq.php', 'DE', 'FAQ');
|
||||||
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/faq.php', 'EN', 'FAQ');
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/faq.php', 'EN', 'FAQ');
|
||||||
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('pub_myschichtplan_ical', 'DE', 'export my Shifts as iCal file');
|
||||||
|
INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('pub_myschichtplan_ical', 'EN', 'iCal File exportieren');
|
||||||
|
|
|
@ -28,6 +28,8 @@ CREATE TABLE `UserCVS` (
|
||||||
`nonpublic/newsAddMeting` char(1) NOT NULL default 'N',
|
`nonpublic/newsAddMeting` char(1) NOT NULL default 'N',
|
||||||
`nonpublic/news_comments.php` char(1) NOT NULL default 'Y',
|
`nonpublic/news_comments.php` char(1) NOT NULL default 'Y',
|
||||||
`nonpublic/myschichtplan.php` char(1) NOT NULL default 'Y',
|
`nonpublic/myschichtplan.php` char(1) NOT NULL default 'Y',
|
||||||
|
`nonpublic/myschichtplan_ical.php` char(1) NOT NULL default 'Y',
|
||||||
|
`nonpublic/schichtplan_beamer.php` char(1) NOT NULL default 'Y',
|
||||||
`nonpublic/engelbesprechung.php` char(1) NOT NULL default 'Y',
|
`nonpublic/engelbesprechung.php` char(1) NOT NULL default 'Y',
|
||||||
`nonpublic/schichtplan.php` char(1) NOT NULL default 'Y',
|
`nonpublic/schichtplan.php` char(1) NOT NULL default 'Y',
|
||||||
`nonpublic/schichtplan_add.php` char(1) NOT NULL default 'Y',
|
`nonpublic/schichtplan_add.php` char(1) NOT NULL default 'Y',
|
||||||
|
@ -67,9 +69,9 @@ CREATE TABLE `UserCVS` (
|
||||||
-- Daten für Tabelle `UserCVS`
|
-- Daten für Tabelle `UserCVS`
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `UserCVS` (`UID`, `index.php`, `logout.php`, `faq.php`, `lageplan.php`, `makeuser.php`, `nonpublic/index.php`, `nonpublic/news.php`, `nonpublic/newsAddMeting`, `nonpublic/news_comments.php`, `nonpublic/myschichtplan.php`, `nonpublic/engelbesprechung.php`, `nonpublic/schichtplan.php`, `nonpublic/schichtplan_add.php`, `nonpublic/wecken.php`, `nonpublic/waeckliste.php`, `nonpublic/messages.php`, `nonpublic/faq.php`, `nonpublic/einstellungen.php`, `admin/index.php`, `admin/room.php`, `admin/EngelType.php`, `admin/schichtplan.php`, `admin/shiftadd.php`, `admin/schichtplan_druck.php`, `admin/user.php`, `admin/user2.php`, `admin/userDefaultSetting.php`, `admin/UserPicture.php`, `admin/aktiv.php`, `admin/tshirt.php`, `admin/news.php`, `admin/faq.php`, `admin/free.php`, `admin/sprache.php`, `admin/dect.php`, `admin/dect_call.php`, `admin/dbUpdateFromXLS.php`, `admin/Recentchanges.php`, `admin/debug.php`, `Herald`, `Info`, `Conference`) VALUES
|
INSERT INTO `UserCVS` (`UID`, `index.php`, `logout.php`, `faq.php`, `lageplan.php`, `makeuser.php`, `nonpublic/index.php`, `nonpublic/news.php`, `nonpublic/newsAddMeting`, `nonpublic/news_comments.php`, `nonpublic/myschichtplan.php`, `nonpublic/myschichtplan_ical.php`, `nonpublic/engelbesprechung.php`, `nonpublic/schichtplan.php`, `nonpublic/schichtplan_add.php`, `nonpublic/wecken.php`, `nonpublic/waeckliste.php`, `nonpublic/messages.php`, `nonpublic/faq.php`, `nonpublic/einstellungen.php`, `admin/index.php`, `admin/room.php`, `admin/EngelType.php`, `admin/schichtplan.php`, `admin/shiftadd.php`, `admin/schichtplan_druck.php`, `admin/user.php`, `admin/user2.php`, `admin/userDefaultSetting.php`, `admin/UserPicture.php`, `admin/aktiv.php`, `admin/tshirt.php`, `admin/news.php`, `admin/faq.php`, `admin/free.php`, `admin/sprache.php`, `admin/dect.php`, `admin/dect_call.php`, `admin/dbUpdateFromXLS.php`, `admin/Recentchanges.php`, `admin/debug.php`, `Herald`, `Info`, `Conference`) VALUES
|
||||||
|
|
||||||
(-1, 'Y', 'N', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N'),
|
(-1, 'Y', 'N', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N ', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N'),
|
||||||
-- 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
|
-- 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
|
||||||
(1, 'N', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N');
|
(1, 'N', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N');
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,39 +1,5 @@
|
||||||
<?PHP
|
<?PHP
|
||||||
ini_set( "session.gc_maxlifetime", "65535");
|
include ("header_start.php");
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
|
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -110,6 +110,11 @@ If( !IsSet($_GET["action"]) )
|
||||||
}
|
}
|
||||||
echo "</table>\n\n";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -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");
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
include ("../../includes/config.php");
|
include ("../../includes/header_start.php");
|
||||||
include ("../../includes/config_db.php");
|
|
||||||
include ("../../includes/funktion_lang.php");
|
|
||||||
|
|
||||||
include ("../../includes/funktion_user.php");
|
|
||||||
include ("../../includes/funktionen.php");
|
include ("../../includes/funktionen.php");
|
||||||
include ("../../includes/funktion_schichtplan_beamer.php");
|
include ("../../includes/funktion_schichtplan_beamer.php");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue