summaryrefslogtreecommitdiff
path: root/nonpublic
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2005-09-10 17:25:43 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2005-09-10 17:25:43 +0000
commit310c2ce98fc8c0e94559c9ed8587101d92f6e853 (patch)
tree7093065a133e434fb7e551803e8700661d04c5bb /nonpublic
add total system
git-svn-id: svn://svn.cccv.de/engel-system@1 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'nonpublic')
-rwxr-xr-xnonpublic/einstellungen.php238
-rwxr-xr-xnonpublic/engelbesprechung.php29
-rwxr-xr-xnonpublic/faq.php71
l---------nonpublic/inc1
-rwxr-xr-xnonpublic/index.php107
-rwxr-xr-xnonpublic/menu.php33
-rwxr-xr-xnonpublic/myschichtplan.php149
-rwxr-xr-xnonpublic/news.php11
-rwxr-xr-xnonpublic/news_comments.php87
-rwxr-xr-xnonpublic/news_output.php114
-rwxr-xr-xnonpublic/news_output.php.old90
-rwxr-xr-xnonpublic/passwort.php58
l---------nonpublic/pic1
-rwxr-xr-xnonpublic/schichtplan.1.php19
-rwxr-xr-xnonpublic/schichtplan.2.php12
-rwxr-xr-xnonpublic/schichtplan.php122
-rwxr-xr-xnonpublic/schichtplan_add.php96
-rwxr-xr-xnonpublic/schichtplan_beamer.php56
-rwxr-xr-xnonpublic/schichtplanneu.1.php17
-rwxr-xr-xnonpublic/schichtplanneu.php106
-rwxr-xr-xnonpublic/waeckliste.php56
-rwxr-xr-xnonpublic/wecken.php77
22 files changed, 1550 insertions, 0 deletions
diff --git a/nonpublic/einstellungen.php b/nonpublic/einstellungen.php
new file mode 100755
index 00000000..36fa76a7
--- /dev/null
+++ b/nonpublic/einstellungen.php
@@ -0,0 +1,238 @@
+<?
+$title = "Himmel";
+$header = "Deine pers&ouml;nlichen Einstellungen";
+include ("./inc/header.php");
+include ("./inc/crypt.php");
+
+if (!IsSet($action)) {
+
+echo Get_Text(1).$_SESSION['Nick'].",<br>\n\n";
+
+Print_Text(13);
+
+?>
+<hr width=\"100%\">
+<? Print_Text("pub_einstellungen_Text_UserData");?>
+<form action="./einstellungen.php" method="post">
+ <input type="hidden" name="action" value="setUserData">
+ <table>
+ <tr> <td><? Print_Text("pub_einstellungen_Nick"); ?></td>
+ <td><input type="text" name="eNick" size="23" value="<? echo $_SESSION["Nick"]; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_Name"); ?></td>
+ <td><input type="text" name="eName" size="23" value="<? echo $_SESSION['Name']; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_Vorname"); ?></td>
+ <td><input type="text" name="eVorname" size="23" value="<? echo $_SESSION['Vorname']; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_Alter"); ?></td>
+ <td><input type="text" name="eAlter" size="3" value="<? echo $_SESSION['Alter']; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_Telefon"); ?></td>
+ <td><input type="text" name="eTelefon" size="40" value="<? echo $_SESSION['Telefon']; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_Handy"); ?></td>
+ <td><input type="text" name="eHandy" size="40" value="<? echo $_SESSION['Handy']; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_DECT"); ?></td>
+ <td><input type="text" name="eDECT" size="4" value="<? echo $_SESSION['DECT']; ?>"></td></tr>
+ <tr> <td><? Print_Text("pub_einstellungen_email"); ?></td>
+ <td><input type="text" name="eemail" size="40" value="<? echo $_SESSION['email']; ?>"></td></tr>
+ </table>
+ <input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
+<br>
+
+
+<hr width=\"100%\">
+<? Print_Text(14);?>
+<form action="./einstellungen.php" method="post">
+ <input type="hidden" name="action" value="set">
+ <table>
+ <tr><td><?PHP Print_Text(15); ?></td><td><input type="password" name="old" size="20"></td></tr>
+ <tr><td><?PHP Print_Text(16); ?></td><td><input type="password" name="new1" size="20"></td></tr>
+ <tr><td><?PHP Print_Text(17); ?></td><td><input type="password" name="new2" size="20"></td></tr>
+ </table>
+ <input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
+<br>
+
+
+<hr width="100%">
+<br>
+<?PHP Print_Text(18); ?>
+<form action="./einstellungen.php" method="post">
+ <input type="hidden" name="action" value="colour">
+ <table>
+ <tr><td><?PHP Print_Text(19); ?></td>
+ <td>
+ <select name="colourid">
+ <option <?php if($_SESSION['color'] == 1) { echo "selected"; } ?> value="1">Standard-Style</option>
+ <option <?php if($_SESSION['color'] == 2) { echo "selected"; } ?> value="2">Rot/Gelber Style</option>
+ <option <?php if($_SESSION['color'] == 3) { echo "selected"; } ?> value="3">Club-Mate Style</option>
+ <option <?php if($_SESSION['color'] == 5) { echo "selected"; } ?> value="5">Debian Style</option>
+ <option <?php if($_SESSION['color'] == 6) { echo "selected"; } ?> value="6">c-base Style</option>
+ <option <?php if($_SESSION['color'] == 7) { echo "selected"; } ?> value="7">Blau/Gelber Style </option>
+ <option <?php if($_SESSION['color'] == 8) { echo "selected"; } ?> value="8">Pastel Style</option>
+ <option <?php if($_SESSION['color'] == 4) { echo "selected"; } ?> value="4">Test Style</option>
+ <option <?php if($_SESSION['color'] == 9) { echo "selected"; } ?> value="9">Test Style 21c3 </option>
+ </select>
+ </td></tr>
+ </table>
+ <input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
+<br>
+<hr width="100%">
+<br>
+<?PHP Print_Text(20); ?>
+<form action="./einstellungen.php" method="post">
+ <input type="hidden" name="action" value="sprache">
+ <table>
+ <tr><td><?PHP Print_Text(21); ?></td>
+ <td>
+ <select name="language">
+ <option value="DE" <?php if($_SESSION['Sprache'] == 'DE') { echo "selected"; } ?>>Deutsch</option>
+ <option value="EN" <?php if($_SESSION['Sprache'] == 'EN') { echo "selected"; } ?>>English</option>
+ <option value="NL" <?php if($_SESSION['Sprache'] == 'NL') { echo "selected"; } ?>>Dutch</option>
+ </select>
+ </td></tr>
+ </table>
+ <input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
+<br>
+<hr width="100%">
+<br>
+<?PHP Print_Text(22); ?>
+<form action="./einstellungen.php" method="post">
+ <input type="hidden" name="action" value="avatar">
+ <table>
+ <tr>
+ <td><?PHP Print_Text(23); ?><br></td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+<?
+
+// Anzahl der installierten Avatars
+
+//$ANZ_AVATAR= shell_exec("ls ".$_SERVER["DOCUMENT_ROOT"].$ENGEL_ROOT."inc/avatar/ | wc -l");
+$ANZ_AVATAR= shell_exec("ls inc/avatar/ | wc -l");
+
+ ?>
+
+ <select name="eAvatar" onChange="document.avatar.src = './inc/avatar/avatar' + this.value + '.gif'"
+ onKeyup= "document.avatar.src = './inc/avatar/avatar' + this.value + '.gif'">
+ <option value="0" name="eAvatar" <?php if ($_SESSION['Avatar'] == $i) { echo " selected"; } ?>> <?PHP Print_Text(24); ?> </option>
+ <?php
+ for ($i=1; $i <= $ANZ_AVATAR; $i++ ){
+ echo "\t\t\t\t<option value=\"$i\"";
+ if ($_SESSION['Avatar'] == $i) { echo " selected"; }
+ echo ">avatar$i</option>\n";
+ }
+ echo "\n";
+ ?>
+ </select>&nbsp;&nbsp;
+ <img src="./inc/avatar/avatar<?php echo $_SESSION['Avatar']; ?>.gif" name="avatar" border="0" alt="" align="top">
+ </td></tr>
+ </table>
+ <input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
+
+
+<?
+
+} else {
+
+switch ($action) {
+
+case 'set':
+ if ($new1==$new2){
+ Print_Text(25);
+ $sql = "select * from User where UID=".$_SESSION['UID'];
+ $Erg = mysql_query($sql, $con);
+ if (PassCrypt($old)==mysql_result($Erg, $i, "Passwort")) {
+ Print_Text(26);
+ Print_Text(27);
+ $usql = "update User set Passwort='".PassCrypt($new1)."' where UID=".$_SESSION['UID']." limit 1";
+ $Erg = mysql_query($usql, $con);
+ if ($Erg==1) {
+ Print_Text(28);
+ } else {
+ Print_Text(29);
+ }
+ } else {
+ Print_Text(30);
+ }
+ } else {
+ Print_Text(31);
+ }
+ break;
+
+case 'colour':
+
+ $chsql="Update User set color= \"$colourid\" where UID = \"".$_SESSION['UID']."\" limit 1";
+ $Erg = mysql_query($chsql, $con);
+ $_SESSION['color']=$colourid;
+ if ($Erg==1) {
+ Print_Text(32);
+ } else {
+ Print_Text(29);
+ }
+
+ break;
+
+case 'sprache':
+
+ $chsql="Update User set Sprache = \"$language\" where UID = \"".$_SESSION['UID']."\" limit 1";
+ $Erg = mysql_query($chsql, $con);
+ $_SESSION['Sprache']=$language;
+ if ($Erg==1) {
+ Print_Text(33);
+ } else {
+ Print_Text(29);
+ }
+
+ break;
+
+
+case 'avatar':
+ $chsql="Update User set Avatar = \"$eAvatar\" where UID = \"".$_SESSION['UID']."\" limit 1";
+ $Erg = mysql_query($chsql, $con);
+ $_SESSION['Avatar']=$eAvatar;
+ if ($Erg==1) {
+ Print_Text(34);
+ } else {
+ Print_Text(29);
+ }
+ break;
+
+case 'setUserData':
+ $chsql= "UPDATE User SET ".
+ "`Nick`='$eNick', `Name`='$eName', `Vorname`='$eVorname', ".
+ "`Alter`='$eAlter', `Telefon`='$eTelefon', `Handy`='$eHandy', ".
+ "`DECT`='$eDECT', `email`='$eemail' ".
+ "WHERE UID='". $_SESSION['UID']. "' LIMIT 1;";
+ $Erg = mysql_query($chsql, $con);
+
+ if ($Erg==1)
+ {
+ $_SESSION['Nick'] = $eNick;
+ $_SESSION['Name'] = $eName;
+ $_SESSION['Vorname'] = $eVorname;
+ $_SESSION['Alter'] = $eAlter;
+ $_SESSION['Telefon'] = $eTelefon;
+ $_SESSION['Handy'] = $eHandy;
+ $_SESSION['DECT'] = $eDECT;
+ $_SESSION['email'] = $eemail;
+
+ Print_Text("pub_einstellungen_UserDateSaved");
+ }
+ else
+ {
+ Print_Text(29);
+ echo mysql_error( $con);
+ }
+ break;
+
+}
+}
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/engelbesprechung.php b/nonpublic/engelbesprechung.php
new file mode 100755
index 00000000..436a5271
--- /dev/null
+++ b/nonpublic/engelbesprechung.php
@@ -0,0 +1,29 @@
+<?php
+$title = "Himmel";
+$header = "Engelbesprechung";
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+?>
+
+<br>
+
+<?php
+
+$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$Zeilen = mysql_num_rows($Erg);
+
+for ($n = 0 ; $n < $Zeilen ; $n++) {
+ if (mysql_result($Erg, $n, "Treffen")=="1") {
+ echo "<p class='question'><u>".mysql_result($Erg, $n, "Betreff")."</u><br>".
+ "&nbsp; &nbsp;<font size=1>".mysql_result($Erg, $n, "Datum").", ";
+ echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font></p>\n";
+ echo "<p class='answetion'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
+ }
+}
+
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/faq.php b/nonpublic/faq.php
new file mode 100755
index 00000000..d8388f50
--- /dev/null
+++ b/nonpublic/faq.php
@@ -0,0 +1,71 @@
+<?php
+$title = "Himmel";
+$header = "FAQ / Fragen an die Erzengel";
+include ("./inc/header.php");
+
+
+// Erstaufruf, oder Frage bereits abgeschickt?
+if (!IsSet($eUID)) {
+
+Print_Text(35);
+?>
+<br><br>
+<form action="./faq.php" method="POST">
+ <input type="hidden" name="eUID" value="<? echo $_SESSION['UID'] ?>">
+ <textarea name="frage" cols="40" rows="10"><?PHP Print_Text(36); ?></textarea><br><br>
+ <input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
+<?
+
+} else {
+// Auswertung d. Formular-Daten:
+
+echo "<b>".Get_Text(37)."</b><br><br>\n".nl2br($frage)."<br><br>\n".Get_Text(38)."<br>\n";
+
+$SQL = "INSERT into Questions VALUES (\"\", \"".$_SESSION['UID']."\", \"$frage\", \"\", \"\")";
+$Erg = mysql_query($SQL, $con);
+
+}
+// Bisherige Anfragen:
+echo "<br>\n<b>".Get_Text(39)."</b><br>\n";
+echo "<hr width=\"99%\">\n";
+echo "<br><b>".Get_Text(40)."</b><br>\n";
+
+$SQL = "SELECT * from Questions where UID = ".$_SESSION['UID']." and AID=\"0\" ORDER BY 'QID' DESC";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$Zeilen = mysql_num_rows($Erg);
+
+if ($Zeilen==0){
+ Print_Text(41);
+
+} else {
+ for ($n = 0 ; $n < $Zeilen ; $n++) {
+ echo "<p class='question'>".nl2br(mysql_result($Erg, $n, "Question"))."<br>\n";
+// Es gibt ja noch keine Antwort:
+// echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer"))."</p>\n";
+ echo "\n<br>---<br>";
+ }
+}
+
+echo "<hr width=\"99%\">\n";
+echo "<br><b>".Get_Text(42)."</b><br>\n";
+$SQL = "SELECT * from Questions where UID = ".$_SESSION['UID']." and AID<>\"0\" ORDER BY 'QID' DESC";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$Zeilen = mysql_num_rows($Erg);
+
+if ($Zeilen==0){
+ Print_Text(41);
+} else {
+ for ($n = 0 ; $n < $Zeilen ; $n++) {
+ echo "<p class='question'>".nl2br(mysql_result($Erg, $n, "Question"))."<br>\n";
+ echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer"))."\n";
+ echo "\n<br>---<br>";
+ }
+}
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/inc b/nonpublic/inc
new file mode 120000
index 00000000..22dc542a
--- /dev/null
+++ b/nonpublic/inc
@@ -0,0 +1 @@
+../inc \ No newline at end of file
diff --git a/nonpublic/index.php b/nonpublic/index.php
new file mode 100755
index 00000000..1aaf237e
--- /dev/null
+++ b/nonpublic/index.php
@@ -0,0 +1,107 @@
+<?
+
+$title = "Index";
+$header = "Index";
+
+include ("./inc/db.php");
+include ("./inc/crypt.php");
+
+session_start(); // alte Session - falls vorhanden - wiederherstellen...
+
+if (!IsSet($_SESSION['UID'])) {
+
+ $sql = "select * from User where Nick = '$user'";
+
+ $userstring = mysql_query($sql, $con);
+
+ // anzahl zeilen
+ $user_anz = mysql_num_rows($userstring);
+
+
+ if ($user_anz == 1) { // Check, ob User angemeldet wird...
+ if (mysql_result($userstring, 0, "Passwort") == PassCrypt($password)) { // Passwort ok...
+ // Session wird eingeleitet und Session-Variablen gesetzt..
+ // session_start();
+ session_name("Himmel");
+ $_SESSION['UID'] = mysql_result($userstring, 0, "UID");
+ $_SESSION['Nick'] = mysql_result($userstring, 0, "Nick");
+ $_SESSION['Name'] = mysql_result($userstring, 0, "Name");
+ $_SESSION['Vorname'] = mysql_result($userstring, 0, "Vorname");
+ $_SESSION['Alter'] = mysql_result($userstring, 0, "Alter");
+ $_SESSION['Telefon'] = mysql_result($userstring, 0, "Telefon");
+ $_SESSION['Handy'] = mysql_result($userstring, 0, "Handy");
+ $_SESSION['DECT'] = mysql_result($userstring, 0, "DECT");
+ $_SESSION['email'] = mysql_result($userstring, 0, "email");
+ $_SESSION['Size'] = mysql_result($userstring, 0, "Size");
+ $_SESSION['Gekommen'] = mysql_result($userstring, 0, "Gekommen");
+ $_SESSION['Aktiv'] = mysql_result($userstring, 0, "Aktiv");
+ $_SESSION['Tshirt'] = mysql_result($userstring, 0, "Tshirt");
+ $_SESSION['color'] = mysql_result($userstring, 0, "color");
+ $_SESSION['Avatar'] = mysql_result($userstring, 0, "Avatar");
+ $_SESSION['Sprache'] = mysql_result($userstring, 0, "Sprache");
+ $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
+
+ // CVS import Data
+ $SQL = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID'];
+ $Erg_CVS = mysql_query($SQL, $con);
+ $_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
+
+ include ("./inc/header.php");
+
+ echo Get_Text(1).$_SESSION['Nick'];
+ echo nl2br(Get_Text(2));
+
+ include ("./news_output.php");
+
+ }
+ else
+ { // Passwort nicht ok...
+
+ include ("./inc/header.php");
+
+ echo Get_Text("pub_index_pass_no_ok");
+ die();
+ include ("./inc/login_eingabefeld.php");
+
+ } // Ende Passwort-Check
+
+ }
+ else
+ { // Anzahl der User in User-Tabelle <> 1 --> keine Anmeldung
+ include ("./inc/header.php");
+ if ($user_anz == 0)
+ {
+ echo Get_Text("pub_index_User_unset");
+ }
+ else
+ {
+ echo Get_Text("pub_index_User_more_as_one");
+ }
+
+ include ("./inc/login_eingabefeld.php");
+ } // Ende Check, ob User angemeldet wurde
+}
+else
+{ // User ist bereits angemeldet... normaler Inhalt...
+
+ include ("./inc/header.php");
+ echo Get_Text(1).$_SESSION['Nick'];
+ echo nl2br(Get_Text(2));
+
+ include ("./news_output.php");
+
+} // Ende Ueberpruefung, ob User bereits angemeldet...
+
+
+
+?>
+<!-- <br>
+<a href="nonpublic/list.php"> list.php </a> -->
+<?
+include ("./inc/footer.php");
+
+
+
+?>
+
+
diff --git a/nonpublic/menu.php b/nonpublic/menu.php
new file mode 100755
index 00000000..7dac48bb
--- /dev/null
+++ b/nonpublic/menu.php
@@ -0,0 +1,33 @@
+<?
+
+$Menu["Path"] = "nonpublic/";
+$Menu["Name"] = Get_Text("pub_menu_menuname");
+$Menu["Entry"][0]["File"] = "news.php";
+$Menu["Entry"][0]["Name"] = Get_Text("pub_menu_news");
+$Menu["Entry"][1]["File"] = "engelbesprechung.php";
+$Menu["Entry"][1]["Name"] = Get_Text("pub_menu_Engelbesprechung");
+$Menu["Entry"][2]["File"] = "schichtplan.php";
+$Menu["Entry"][2]["Name"] = Get_Text("pub_menu_Schichtplan");
+$Menu["Entry"][5]["File"] = "myschichtplan.php";
+$Menu["Entry"][5]["Name"] = Get_Text("pub_menu_mySchichtplan");
+$Menu["Entry"][9]["File"] = "schichtplan_beamer.php";
+$Menu["Entry"][9]["Name"] = Get_Text("pub_menu_SchichtplanBeamer");
+$Menu["Entry"][3]["File"] = "wecken.php";
+$Menu["Entry"][3]["Name"] = Get_Text("pub_menu_Wecken");
+$Menu["Entry"][4]["File"] = "waeckliste.php";
+$Menu["Entry"][4]["Name"] = Get_Text("pub_menu_Waeckerlist");
+$Menu["Entry"][6]["File"] = "faq.php";
+$Menu["Entry"][6]["Name"] = Get_Text("pub_menu_questionEngel");
+$Menu["Entry"][7]["File"] = "einstellungen.php";
+$Menu["Entry"][7]["Name"] = Get_Text("pub_menu_Einstellungen");
+$Menu["Entry"][8]["File"] = "../logout.php";
+$Menu["Entry"][8]["Name"] = Get_Text("pub_menu_Abmelden");
+
+
+if ($_SESSION['CVS']["MenueShowAdminSection"] == "Y") {
+ $MenuAdmin["Name"] = "Erzengel";
+ $MenuAdmin["Entry"][0]["File"] = "../admin/index.php";
+ $MenuAdmin["Entry"][0]["Name"] = "Erzengel-Men&uuml;";
+} // MenueShowAdminSection
+
+?>
diff --git a/nonpublic/myschichtplan.php b/nonpublic/myschichtplan.php
new file mode 100755
index 00000000..c9bfb703
--- /dev/null
+++ b/nonpublic/myschichtplan.php
@@ -0,0 +1,149 @@
+<?php
+$title = "Himmel";
+$header = "Mein Schichtplan";
+
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+include ("./inc/funktionen.php");
+include ("./inc/funktion_schichtplan.php");
+
+
+If( !IsSet($action) )
+{
+
+ echo Get_Text("Hello").$_SESSION['Nick'].", <br>\n";
+ echo Get_Text("pub_mywake_beschreibung1")."<br>\n";
+ echo Get_Text("pub_mywake_beschreibung2")."<br><br>\n";
+ echo Get_Text("pub_mywake_beschreibung3").($LETZTES_AUSTRAGEN).
+ Get_Text("pub_mywake_beschreibung4")."<br><br>\n";
+
+ $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);
+
+ ?>
+ <table border="0" class="border" cellpadding="2" cellspacing="1">
+ <tr>
+ <td class="contenttopic"><b><? echo Get_Text("pub_mywake_Datum");?></b></td>
+ <td class="contenttopic"><b><? echo Get_Text("pub_mywake_Uhrzeit");?></b></td>
+ <td class="contenttopic"><b><? echo Get_Text("pub_mywake_Len");?></b></td>
+ <td class="contenttopic"><b><? echo Get_Text("pub_mywake_Ort");?></b></td>
+ <td class="contenttopic"><b><? echo Get_Text("pub_mywake_Bemerkung");?></b></td>
+ <td class="contenttopic"><b><? echo Get_Text("pub_mywake_Austragen");?></b></td>
+ </tr>
+ <?
+
+ for( $i=0; $i<mysql_num_rows( $erg ); $i++ )
+ {
+ echo "<tr class=\"content\">";
+
+ echo "<td>". substr(mysql_result( $erg, $i, "DateS" ), 0, 10). "</td>\n";
+ echo "<td>". substr(mysql_result( $erg, $i, "DateS" ), 11). "</td>\n";
+ echo "<td>". mysql_result( $erg, $i, "Len" ). " h</td>\n";
+ echo "<td>". $RoomID[mysql_result( $erg, $i, "RID" )]. "<br>\n".
+ "(". TID2Type(mysql_result( $erg, $i, "TID" )).Get_Text("inc_schicht_engel"). ")".
+ "</td>\n";
+ echo "<td><pre style=\"font-family:Fixedsys,Courier; padding:12x;\">\n".
+ mysql_result( $erg, $i, "Comment" ).
+ "\n</pre>\n";
+ echo "<br><a href=\"./myschichtplan.php?action=edit&SID=\n".
+ mysql_result( $erg, $i, "SID" )."\"># vi #</a></td>\n";
+
+ // bis $LETZTES_AUSTRAGEN (aus dem config-file) soll es moeglich sein, seine Schichten
+ //// selber noch austragen zu koennen...
+ $schichtdate = mysql_result( $erg, $i, "DateS" );
+ ereg( "^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res );
+ $info["year"] = $res[1];
+ $info["month"] = $res[2];
+ $info["day"] = $res[3];
+ $info["hour"] = $res[4];
+ $info["min"] = $res[5];
+ $info["sec"] = $res[6];
+ $schichtdatum = (mktime($info["hour"],$info["min"],$info["sec"],$info["month"],$info["day"],$info["year"]));
+ $lastAustragen = $LETZTES_AUSTRAGEN*3600;
+ $nowdate = time();
+ // wenn Schichtbeginn > jetziges Datum + $LETZTES_AUSTRAGEN - Stunden soll ein Austragen
+ // noch möglich sein
+ if( $schichtdatum > ($lastAustragen + $nowdate) )
+ echo "<td> <a href=\"./myschichtplan.php?action=austragen&SID=".
+ mysql_result( $erg, $i, "SID" )."\">".
+ Get_Text("pub_mywake_austragen")."</a></td>\n";
+ else
+ echo "<td>". Get_Text("pub_mywake_austragen_n_c"). "</td>\n";
+
+ echo "</tr>\n";
+ }
+echo "</table>\n\n";
+
+}
+else
+{
+ If( $action == "austragen" )
+ {
+ echo Get_Text("pub_mywake_delate1")."<br>\n";
+
+ $sql = "SELECT * FROM `Shifts` WHERE ";
+ $sql.= "(SID = \"$SID\")";
+ $Erg = mysql_query($sql, $con);
+
+ $schichtdate = mysql_result( $Erg, 0, "DateS" );
+ ereg( "^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res );
+ $info["year"] = $res[1];
+ $info["month"] = $res[2];
+ $info["day"] = $res[3];
+ $info["hour"] = $res[4];
+ $info["min"] = $res[5];
+ $info["sec"] = $res[6];
+ $schichtdatum = (mktime($info["hour"],$info["min"],$info["sec"],$info["month"],$info["day"],$info["year"]));
+ $lastAustragen = $LETZTES_AUSTRAGEN*3600;
+ $nowdate = time();
+ // wenn Schichtbeginn > jetziges Datum + $LETZTES_AUSTRAGEN - Stunden soll ein Austragen
+ // noch möglich sein
+ if( $schichtdatum > ($lastAustragen + $nowdate) )
+ {
+ $sql2 = "UPDATE `ShiftEntry` ".
+ "SET `UID` = '0', `Comment` = NULL ".
+ "WHERE `SID` = '$SID' AND `UID` = '". $_SESSION['UID']. "' LIMIT 1;";
+ $Erg2 = mysql_query($sql2, $con);
+ if ($Erg2 == 1)
+ echo Get_Text("pub_mywake_add_ok"). "\n";
+ else
+ echo Get_Text("pub_mywake_add_ko"). "\n";
+ }
+ else
+ echo Get_Text("pub_mywake_after"). "\n";
+ }
+ elseif( $action == "edit" )
+ {
+ echo Get_Text("pub_myshift_Edit_Text1"). "\n";
+
+ $sql = "SELECT * FROM `ShiftEntry` WHERE ";
+ $sql.= "(SID=\"$SID\" AND UID=\"". $_SESSION['UID']. "\" )";
+ $Erg = mysql_query($sql, $con);
+
+ echo "<form action=\"./myschichtplan.php\" method=\"post\">\n";
+ echo "<textarea name='newtext' cols='50' rows='10'>". mysql_result( $Erg, 0, "Comment" ). "</textarea><br><br>\n";
+ echo "<input type=\"submit\" value=\"save\">\n";
+ echo "<input type=\"hidden\" name=\"SID\" value=\"$SID\">\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"editSave\">\n";
+ echo "</form>";
+ }
+ elseif( $action == "editSave" )
+ {
+ echo Get_Text("pub_myshift_EditSave_Text1"). "<br>\n";
+ $sql = "UPDATE `ShiftEntry` ".
+ "SET `Comment` = \"". $newtext. "\" ".
+ "WHERE `SID`='$SID' AND `UID`='". $_SESSION['UID']. "' LIMIT 1;";
+ $Erg = mysql_query($sql, $con);
+ if ($Erg == 1)
+ echo "\t ...". Get_Text("pub_myshift_EditSave_OK"). "\n";
+ else
+ echo "\t ...". Get_Text("pub_myshift_EditSave_KO"). "\n";
+ SetHeaderGo2Back();
+ }
+}
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/news.php b/nonpublic/news.php
new file mode 100755
index 00000000..107f5913
--- /dev/null
+++ b/nonpublic/news.php
@@ -0,0 +1,11 @@
+<?php
+$title = "Himmel";
+$header = "News";
+include ("./inc/header.php");
+
+
+echo "<a href=\"#Neu\">".Get_Text(3)."</a>";
+include ("news_output.php");
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/news_comments.php b/nonpublic/news_comments.php
new file mode 100755
index 00000000..d2c450ea
--- /dev/null
+++ b/nonpublic/news_comments.php
@@ -0,0 +1,87 @@
+<?php
+$title = "Kommentare zu den News";
+$header = "Kommentar";
+include ("./inc/header.php");
+include ("./inc/db.php");
+include ("./inc/funktion_user.php");
+
+
+if (IsSet($nid)) {
+
+
+if (IsSet($date) && IsSet($text)){
+
+ $ch_sql="INSERT INTO news_comments (Refid, Datum, Text, UID) VALUES ('$nid', '$date', '$text', '".$_SESSION[UID]."')";
+ $Erg = mysql_query($ch_sql, $con);
+ if ($Erg == 1) { echo "Eintrag wurde gespeichert<br><br>"; }
+}
+
+$SQL = "SELECT * FROM news_comments where Refid = $nid ORDER BY 'ID'";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$news_rows = mysql_num_rows($Erg);
+
+?>
+<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
+ <tr class="contenttopic">
+ <th width=100 align="left">Datum</th>
+ <th align="left">Nick</th>
+ </tr>
+ <tr class="contenttopic">
+ <th align="left" colspan=2>Kommentar</th>
+ </tr>
+
+<?
+for ($n = 0 ; $n < $news_rows ; $n++) {
+ echo "\t<tr class=\"content\">";
+ echo "\t\t<td width=100>";
+ echo mysql_result($Erg, $n, "Datum");
+ echo "\t\t</td>";
+ echo "\t\t<td>";
+ echo UID2Nick(mysql_result($Erg, $n, "UID"));
+ // avatar anzeigen?
+ echo DisplayAvatar (mysql_result($Erg, $n, "UID"));
+ echo "\t\t</td>";
+ echo "</tr>";
+ echo "\t<tr class=\"content\">";
+ echo "\t\t<td colspan=\"2\">";
+ echo nl2br(mysql_result($Erg, $n, "Text"))."\n";
+ echo "\t\t</td>";
+ echo "</tr>";
+}
+
+echo "</table>";
+
+?>
+
+<br>
+<hr>
+<h4>Neuer Kommentar:</h4>
+<a name="Neu">&nbsp;</a>
+
+<form action="./news_comments.php" method="post">
+<input type="hidden" name="date" value="<? echo date("Y-m-d H:i:s"); ?>">
+<input type="hidden" name="nid" value="<? echo $nid; ?>">
+<table>
+ <tr>
+ <td align="right" valign="top">Text:</td>
+ <td><textarea name="text" cols="50" rows="10"></textarea></td>
+ </tr>
+</table>
+<br>
+<input type="submit" value="sichern...">
+</form>
+
+<?
+
+
+} else {
+
+ echo "Fehlerhafter Aufruf!";
+
+
+
+}
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/news_output.php b/nonpublic/news_output.php
new file mode 100755
index 00000000..9648fc41
--- /dev/null
+++ b/nonpublic/news_output.php
@@ -0,0 +1,114 @@
+<?php
+include ("./inc/db.php");
+include ("./inc/funktion_user.php");
+
+
+if ( isset($text) && isset($betreff) && IsSet($date) ) {
+ if (!isset($treffen)) $treffen = 0;
+ //$escaped_text = htmlescape($text);
+ //$escaped_betreff = htmlescape($betreff);
+ $SQL = "INSERT INTO `News` (`Datum`, `Betreff`, `Text`, `UID`, `Treffen`) ";
+ $SQL.= "VALUES ('$date', '$betreff', '$text', '".$_SESSION['UID'];
+ $SQL.= "', '$treffen');";
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1) { Print_Text(4); }
+}
+
+
+if (!IsSet($news_begin)) {
+ $news_begin=0;
+}
+
+if (!IsSet($DISPLAY_NEWS)) {
+ $DISPLAY_NEWS = 5;
+}
+
+//if (($news_begin-$DISPLAY_NEWS) >= 0 ) {
+// echo "<br><br><a href=\"./news.php?news_begin=".($news_begin-$DISPLAY_NEWS)."\">Die vorherigen $DISPLAY_NEWS News anzeigen...</a><br>";
+//}
+
+$SQL = "SELECT * FROM `News` ORDER BY 'ID' DESC LIMIT $news_begin,$DISPLAY_NEWS";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$news_rows = mysql_num_rows($Erg);
+
+for ($n = 0 ; $n < $news_rows ; $n++) {
+
+ if (mysql_result($Erg, $n, "Treffen") == 0) {
+ echo "<p class='question'>";
+ } else {
+ echo "<p class='engeltreffen'>";
+ }
+ echo "<u>".mysql_result($Erg, $n, "Betreff")."</u><br>\n";
+
+
+ echo "&nbsp; &nbsp;<font size=1>".mysql_result($Erg, $n, "Datum").", ";
+ echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font>";
+ // avatar anzeigen?
+ echo DisplayAvatar (mysql_result($Erg, $n, "UID"));
+ echo "</p>\n";
+ echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
+ $RefID=mysql_result($Erg, $n, "ID");
+ $countSQL="SELECT COUNT(*) from news_comments where Refid = '$RefID'";
+ $countErg = mysql_query($countSQL, $con);
+ $countcom = mysql_result($countErg, 0, "COUNT(*)");
+ echo "<p class='comment' align='right'><a href=\"./news_comments.php?nid=$RefID\">$countcom comments</a></p>\n\n";
+
+
+}
+//echo "<a href=\"./news.php?news_begin=".($news_begin+$DISPLAY_NEWS)."\">Die n&auml;chsten $DISPLAY_NEWS News anzeigen...</a><br><br>\n";
+
+echo "<div align=\"center\">\n\n";
+$rowerg = mysql_query("select * from News", $con);
+$rows = mysql_num_rows($rowerg);
+$dis_rows = round (($rows / $DISPLAY_NEWS)+0.5);
+
+Print_Text(5);
+
+for ($i=1; $i <= $dis_rows; $i++) {
+ if (!((($i * $DISPLAY_NEWS) - $news_begin) == $DISPLAY_NEWS)) {
+ echo "<a href=\"./news.php?news_begin=".(($i*$DISPLAY_NEWS) - $DISPLAY_NEWS)."\">$i</a>&nbsp; ";
+ } else {
+ echo "$i&nbsp; ";
+ }
+}
+echo "</div>";
+
+?>
+
+<br>
+<hr>
+<h4><?PHP Print_Text(6); ?></h4>
+<a name="Neu">&nbsp;</a>
+
+<form action="<? echo $ENGEL_ROOT ?>nonpublic/news.php" method="post">
+<?
+// Datum mit uebergeben, um doppelte Eintraege zu verhindern
+// (Reload nach dem Eintragen!)
+?>
+<input type="hidden" name="date" value="<? echo date("Y-m-d H:i:s"); ?>">
+<table>
+ <tr>
+ <td align="right"><?PHP Print_Text(7); ?></td>
+ <td><input type="text" name="betreff" size="60"></td>
+ </tr>
+ <tr>
+ <td align="right"><?PHP Print_Text(8); ?></td>
+ <td><textarea name="text" cols="50" rows="10"></textarea></td>
+ </tr>
+
+<?
+if ($_SESSION['CVS']["nonpublic/newsAddMeting"] == "Y") {
+?>
+ <tr>
+ <td align="right"><?PHP Print_Text(9); ?></td>
+ <td><input type="checkbox" name="treffen" size="1" value="1"></td>
+ </tr>
+<?
+}
+?>
+</table>
+<br>
+<input type="submit" value="<?PHP Print_Text(10); ?>">
+</form>
diff --git a/nonpublic/news_output.php.old b/nonpublic/news_output.php.old
new file mode 100755
index 00000000..fbf97c62
--- /dev/null
+++ b/nonpublic/news_output.php.old
@@ -0,0 +1,90 @@
+<?php
+include ("./inc/db.php");
+include ("./inc/funktion_user.php");
+
+
+if ( isset($text) && isset($betreff) && IsSet($date) ) {
+ if (!isset($treffen)) $treffen = 0;
+ $escaped_text = htmlescape($text);
+ $escaped_betreff = htmlescape($betreff);
+ $SQL = "INSERT INTO `News` (`Datum`, `Betreff`, `Text`, `UID`, `Treffen`) ";
+ $SQL.= "VALUES ('$date', '$escaped_betreff', '$escaped_text', '".$_SESSION['UID'];
+ $SQL.= "', '$treffen');";
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1) { echo "Eintrag wurde gespeichert<br><br>"; }
+}
+
+
+if (!IsSet($news_begin)) {
+ $news_begin=0;
+}
+
+if (!IsSet($DISPLAY_NEWS)) {
+ $DISPLAY_NEWS = 5;
+}
+
+if (($news_begin-$DISPLAY_NEWS) >= 0 ) {
+ echo "<br><br><a href=\"./news.php?news_begin=".($news_begin-$DISPLAY_NEWS)."\">Die vorherigen $DISPLAY_NEWS News anzeigen...</a><br>";
+}
+
+$SQL = "SELECT * FROM `News` ORDER BY 'ID' DESC LIMIT $news_begin,$DISPLAY_NEWS";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$news_rows = mysql_num_rows($Erg);
+
+for ($n = 0 ; $n < $news_rows ; $n++) {
+ echo "<p class='question'><u>".mysql_result($Erg, $n, "Betreff")."</u><br>\n";
+ echo "&nbsp; &nbsp;<font size=1>".mysql_result($Erg, $n, "Datum").", ";
+ echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font>";
+ // avatar anzeigen?
+ echo DisplayAvatar (mysql_result($Erg, $n, "UID"));
+ echo "</p>\n";
+ echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
+ $RefID=mysql_result($Erg, $n, "ID");
+ $countSQL="SELECT COUNT(*) from news_comments where Refid = '$RefID'";
+ $countErg = mysql_query($countSQL, $con);
+ $countcom = mysql_result($countErg, 0, "COUNT(*)");
+ echo "<p class='comment' align='right'><a href=\"./news_comments.php?nid=$RefID\">$countcom comments</a></p>\n\n";
+
+
+}
+echo "<a href=\"./news.php?news_begin=".($news_begin+$DISPLAY_NEWS)."\">Die n&auml;chsten $DISPLAY_NEWS News anzeigen...</a>";
+
+?>
+
+<br>
+<hr>
+<h4>Neue News erstellen:</h4>
+<a name="Neu">&nbsp;</a>
+
+<form action="<? echo $ENGEL_ROOT ?>nonpublic/news.php" method="post">
+<?
+// Datum mit uebergeben, um doppelte Eintraege zu verhindern
+// (Reload nach dem Eintragen!)
+?>
+<input type="hidden" name="date" value="<? echo date("Y-m-d H:i:s"); ?>">
+<table>
+ <tr>
+ <td align="right">Betreff:</td>
+ <td><input type="text" name="betreff" size="60"></td>
+ </tr>
+ <tr>
+ <td align="right">Text:</td>
+ <td><textarea name="text" cols="50" rows="10"></textarea></td>
+ </tr>
+
+<?
+if ($_SESSION['Rechte']!= 0) {
+?>
+ <tr>
+ <td align="right">Treffen:</td>
+ <td><input type="checkbox" name="treffen" size="1" value="1"></td>
+ </tr>
+<?
+}
+?>
+</table>
+<br>
+<input type="submit" value="sichern...">
+</form>
diff --git a/nonpublic/passwort.php b/nonpublic/passwort.php
new file mode 100755
index 00000000..37860946
--- /dev/null
+++ b/nonpublic/passwort.php
@@ -0,0 +1,58 @@
+<?php
+$title = "Himmel";
+$header = "News";
+include ("./inc/header.php");
+
+if (!IsSet($action)) {
+
+?>
+
+Hier kannst du dein Kennwort f&uuml;r unsere Himmelsverwaltung &auml;ndern. <br><br>
+
+<form action="./passwort.php" method="post">
+ <input type="hidden" name="action" value="set">
+ <table>
+ <tr><td>Altes Passwort:</td><td><input type="password" name="old" size="20"></td></tr>
+ <tr><td>Neues Passwort:</td><td><input type="password" name="new1" size="20"></td></tr>
+ <tr><td>Passwortbest&auml;tigung:</td><td><input type="password" name="new2" size="20"></td></tr>
+ </table>
+ <input type="submit" value="Abschicken...">
+</form>
+<?
+
+} else {
+
+ if ($action == "set") {
+ if ($new1==$new2){
+ echo "Eingegebene Kennw&ouml;rter sind nicht gleich. -> ok.<br>";
+ echo "Check, ob altes Passwort ok ist.";
+ $sql = "select * from User where UID=".$_SESSION['UID'];
+ $Erg = mysql_query($sql, $con);
+ if (md5($old)==mysql_result($Erg, $i, "Passwort")) {
+ echo "-> ok.<br>";
+ echo "Setzen des neuen Kennwortes...: ";
+ $usql = "update User set Passwort='".md5($new1)."' where UID=".$_SESSION['UID'];
+ $Erg = mysql_query($usql, $con);
+ if ($Erg==1) {
+ echo "Neues Kennwort wurde gesetzt.";
+ } else {
+ echo "Ein Fehler ist trotzdem noch aufgetreten. Probiere es einfach nocheinmal :)";
+ }
+
+
+ } else {
+ echo "-> nicht ok.<br>";
+ echo "Altes Kennwort ist nicht ok. Bitte wiederholen.<br>";
+ }
+
+ } else {
+ echo "Kennw&ouml;rter sind nicht gleich. Bitte wiederholen.";
+ }
+
+ } else {
+ echo "Ung&uuml;ltiger Aufruf!\n";
+ }
+}
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/pic b/nonpublic/pic
new file mode 120000
index 00000000..a21de85f
--- /dev/null
+++ b/nonpublic/pic
@@ -0,0 +1 @@
+../pic \ No newline at end of file
diff --git a/nonpublic/schichtplan.1.php b/nonpublic/schichtplan.1.php
new file mode 100755
index 00000000..09671527
--- /dev/null
+++ b/nonpublic/schichtplan.1.php
@@ -0,0 +1,19 @@
+<h4>&nbsp;Tage </h4>
+
+<?
+
+$SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS`";
+$Erg = mysql_query($SQL, $con);
+
+for ($i = 0 ; $i < mysql_fetch_row($Erg) ; $i++)
+ if ($tmp != substr(mysql_result($Erg, $i , 0), 0,10)) {
+ $tmp = substr(mysql_result($Erg, $i , 0), 0,10);
+ echo "\t<li><a href='./schichtplan.php?ausdatum=$tmp";
+ // ist ein raum gesetzt?
+ if (IsSet($raum)) {
+ echo "&raum=$raum";
+ }
+ echo "'>$tmp</a></li>\n";
+}
+
+?>
diff --git a/nonpublic/schichtplan.2.php b/nonpublic/schichtplan.2.php
new file mode 100755
index 00000000..8b477f41
--- /dev/null
+++ b/nonpublic/schichtplan.2.php
@@ -0,0 +1,12 @@
+<h4>&nbsp;Raum übersicht</h4>
+
+<?php
+
+foreach( $Room as $RoomEntry )
+ echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>".
+ $RoomEntry["Name"]. "</a></li>\n";
+
+echo "<br>";
+echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>";
+?>
+
diff --git a/nonpublic/schichtplan.php b/nonpublic/schichtplan.php
new file mode 100755
index 00000000..1bb08491
--- /dev/null
+++ b/nonpublic/schichtplan.php
@@ -0,0 +1,122 @@
+<?php
+$title = "Himmel";
+$header = "Schichtpl&auml;ne";
+$submenus = 2;
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+include ("./inc/funktionen.php");
+include ("./inc/funktion_schichtplan.php");
+?>
+
+<? echo Get_Text("Hello").$_SESSION['Nick'].",<br>".
+ Get_Text("pub_schicht_beschreibung");?>
+<br><br>
+<?
+
+
+// wenn kein Datum gesetzt ist (die Seite zum ersten mal aufgerufen wird),
+// das Datum auf den ersten Tag setzen...
+if( !isset($ausdatum) )
+{
+ $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '". gmdate("Y-m-d", time()+3600). "%' ORDER BY `DateS`";
+// $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '2004-12-29%' ORDER BY `DateS`";
+ $Erg = mysql_query($sql, $con);
+ if( mysql_num_rows( $Erg ) == 0 )
+ {
+ $sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1";
+ $Erg = mysql_query($sql, $con);
+ }
+ $ausdatum = substr(mysql_result($Erg,0,"DateS"),0,10);
+
+}
+
+
+
+if ( !isset($raum) )
+{
+ // Ausgabe wenn kein Raum Ausgewählt:
+ echo Get_Text("pub_schicht_auswahl_raeume"). "<br><br>\n";
+
+ foreach( $Room as $RoomEntry )
+ echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>".
+ $RoomEntry["Name"]. "</a></li>\n";
+
+ echo "<br><br>";
+ echo Get_Text("pub_schicht_alles_1"). "<a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'><u> ".
+ Get_Text("pub_schicht_alles_2"). "</u></a>".Get_Text("pub_schicht_alles_3");
+ echo "\n<br><br>\n\n";
+ echo "<hr>\n\n";
+ echo Get_Text("pub_schicht_EmptyShifts"). "\n";
+
+
+ // zeit die naesten freien schichten
+ showEmptyShifts();
+}
+else
+{ // Wenn einraum Ausgewählt ist:
+ if( $raum == -1 )
+ echo Get_Text("pub_schicht_Anzeige_1").$ausdatum.":<br><br>";
+ else
+ echo Get_Text("pub_schicht_Anzeige_1"). $ausdatum.
+ Get_Text("pub_schicht_Anzeige_2"). $RoomID[$raum]. "<br><br>";
+
+ echo "\n\n<table border=\"0\" width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
+ echo "\t<tr class=\"contenttopic\">\n";
+ echo "\t\t<td>start</td>\n";
+
+ //Ausgabe Spalten überschrift
+ if( $raum == -1 )
+ {
+ foreach( $Room as $RoomEntry )
+ if (SummRoomShifts($RoomEntry["RID"]) > 0)
+ echo "\t\t<th>". $RoomEntry["Name"]. "</th>\n";
+ }
+ else
+ echo "\t\t<th>". $RoomID[$raum]. "</th>\n";
+ echo "\t</tr>\n";
+
+ //Zeit Ausgeben
+ for( $i = 0; $i < 24; $i++ )
+ for( $j = 0; $j < $GlobalZeileProStunde; $j++)
+ {
+ $Spalten[$i * $GlobalZeileProStunde + $j] =
+ "\t<tr class=\"content\">\n\t\t";
+ if( $j==0)
+ {
+ $SpaltenTemp = "<td rowspan=\"$GlobalZeileProStunde\">";
+ if( ($i == gmdate("H", time()+3600)) && (gmdate("Y-m-d", time()+ 3600) == $ausdatum) )
+ $SpaltenTemp.= "<h1>";
+
+ if( $i < 10 )
+ $SpaltenTemp.= "0";
+ $SpaltenTemp.= "$i:";
+ if( ( ($j*60) / $GlobalZeileProStunde) < 10 )
+ $SpaltenTemp.= "0";
+
+ $SpaltenTemp.= ( ($j*60) / $GlobalZeileProStunde);
+ if( ($i == gmdate("H", time()+3600)) && (gmdate("Y-m-d", time()+ 3600) == $ausdatum) )
+ $SpaltenTemp.= "</h1>";
+
+ $SpaltenTemp.= "</td>\n";
+ $Spalten[$i * $GlobalZeileProStunde + $j].= $SpaltenTemp;
+ }
+ }
+
+ if( $raum == -1 )
+ {
+ foreach( $Room as $RoomEntry )
+ if (SummRoomShifts($RoomEntry["RID"]) > 0)
+ CreateRoomShifts( $RoomEntry["RID"] );
+ }
+ else
+ CreateRoomShifts( $raum );
+
+ //Ausageb Zeilen
+ for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++)
+ echo $Spalten[$i]."\t</tr>\n";
+
+ echo "</table>\n";
+}//if (isset($raum))
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/schichtplan_add.php b/nonpublic/schichtplan_add.php
new file mode 100755
index 00000000..33b25d2c
--- /dev/null
+++ b/nonpublic/schichtplan_add.php
@@ -0,0 +1,96 @@
+<?php
+$title = "Himmel";
+$header = "Schichtpl&auml;ne";
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+include ("./inc/funktion_schichtplan.php");
+include ("./inc/funktionen.php");
+
+if (isset($newtext) && isset($SID) && isset($TID)) {
+ SetHeaderGo2Back();
+
+ // datum der einzutragenden schicht heraussuhen...
+ $ShiftSQL = "SELECT `DateS`, `DateE` FROM `Shifts` WHERE `SID`='$SID'";
+ $ShiftErg = mysql_query ($ShiftSQL, $con);
+ $beginSchicht = mysql_result($ShiftErg, 0, "DateS");
+ $endSchicht = mysql_result($ShiftErg, 0, "DateE");
+
+ // Ueberpruefung, ob der Engel bereits für eine Schicht zu dieser Zeit eingetragen ist
+ $SSQL="SELECT * FROM `Shifts`".
+ " INNER JOIN `ShiftEntry` ON `ShiftEntry`.`SID` = `Shifts`.`SID`".
+ " WHERE ((".
+ " ((`Shifts`.`DateS` >= '$beginSchicht') and ".
+ " (`Shifts`.`DateS` < '$endSchicht'))".
+ " OR ".
+ " ((`Shifts`.`DateE` > '$beginSchicht') and ".
+ " (`Shifts`.`DateE` <= '$endSchicht')) ".
+ ") and ".
+ "(`ShiftEntry`.`UID` = '". $_SESSION['UID']. "'));";
+ $bErg = mysql_query($SSQL, $con);
+
+ if( mysql_num_rows($bErg) != 0 )
+ echo Get_Text("pub_schichtplan_add_AllreadyinShift");
+ else
+ {
+ //ermitteln der noch gesuchten
+ $SQL3 = "SELECT * FROM `ShiftEntry`".
+ " WHERE ((`SID` = '$SID') and (`TID` = '$TID') and (`UID` = '0'));";
+ $Erg3 = mysql_query($SQL3, $con);
+
+ if( mysql_num_rows($Erg3) <= 0 )
+ echo Get_Text("pub_schichtplan_add_ToManyYousers");
+ else
+ {
+ //write shift
+ $SQL = "UPDATE `ShiftEntry` SET ".
+ "`UID` = '". $_SESSION['UID']. "', ".
+ "`Comment` = '$newtext' ".
+ "WHERE ((`SID` = '$SID') and (`TID` = '$TID') and (`UID` = '0')) LIMIT 1;";
+ $Erg = mysql_query($SQL, $con);
+
+ if ($Erg != 1)
+ echo Get_Text("pub_schichtplan_add_Error");
+ else
+ echo Get_Text("pub_schichtplan_add_WriteOK");
+
+ }//TO Many USERS
+ }//Allready in Shift
+}
+elseif (isset($SID) && isset($TID)) {
+ echo Get_Text("pub_schichtplan_add_Text1"). "<br><br>\n\n".
+ "<form action=\"./schichtplan_add.php\" method=\"post\">".
+ "<table border=\"0\">";
+
+ $SQL = "SELECT * FROM `Shifts` WHERE ";
+ $SQL .="(SID = '".$SID."')";
+ $Erg = mysql_query($SQL, $con);
+
+ echo "<tr><td>". Get_Text("pub_schichtplan_add_Date"). ":</td> <td>".
+ mysql_result($Erg, 0, "DateS"). "</td></tr>\n";
+
+ echo "<tr><td>". Get_Text("pub_schichtplan_add_Place"). ":</td> <td>".
+ $RoomID[ mysql_result($Erg, 0, "RID") ]. "</td></tr>\n";
+
+ echo "<tr><td>". Get_Text("pub_schichtplan_add_Job"). ":</td> <td>".
+ $EngelTypeID[$TID]. "</td></tr>\n";
+
+ echo "<tr><td>". Get_Text("pub_schichtplan_add_Len"). ":</td> <td>".
+ mysql_result($Erg, 0, "Len"). "h</td></tr>\n";
+
+ echo "<tr><td>". Get_Text("pub_schichtplan_add_TextFor"). ":</td> <td>".
+ mysql_result($Erg, 0, "Man"). "</td></tr>\n";
+
+ echo "<tr><td valign='top'>". Get_Text("pub_schichtplan_add_Comment"). ":</td>\n <td>".
+ "<textarea name='newtext' cols='50' rows='10'></textarea> </td></tr>\n";
+
+ echo "<tr><td>&nbsp;</td>\n".
+ "<td><input type=\"submit\" value=\"". Get_Text("pub_schichtplan_add_submit"). "\"> </td></tr>\n".
+ "</table>\n".
+ "<input type=\"hidden\" name=\"SID\" value=\"$SID\">\n".
+ "<input type=\"hidden\" name=\"TID\" value=\"$TID\">\n".
+ "</form>";
+
+}
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/schichtplan_beamer.php b/nonpublic/schichtplan_beamer.php
new file mode 100755
index 00000000..c862fefa
--- /dev/null
+++ b/nonpublic/schichtplan_beamer.php
@@ -0,0 +1,56 @@
+<?php
+$title = "Himmel";
+$header = "Schichtpl&auml;ne f&uuml;r Beamer";
+$Page["Public"] = "Y";
+$Page["ShowTabel"] = "N";
+$Page["AutoReload"] = 30;
+
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+include ("./inc/funktionen.php");
+include ("./inc/funktion_schichtplan_beamer.php");
+
+$Time = time()+3600+3600;
+
+echo "<table border=\"1\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" frame=\"void\">\n";
+
+echo "<colgroup span=\"4\" valign=\"center\">
+ <col width=\"30\">
+ <col width=\"3*\">
+ <col width=\"3*\">
+ <col width=\"3*\">
+ </colgroup>\n";
+
+echo "<tr align=\"center\">\n".
+// "\t<td>&nbsp;</td>\n".
+ "\t<td>". gmdate("d.m.y", $Time). "</td>\n".
+ "\t<td>". gmdate("H", $Time-3600). ":00</td>\n".
+ "\t<td>". gmdate("H", $Time+0). ":00</td>\n".
+ "\t<td>". gmdate("H", $Time+3600). ":00</td>\n".
+ "</tr>\n";
+
+foreach( $Room as $RoomEntry )
+{
+
+ //var-init
+ $AnzahlEintraege = 0;
+
+ $Out = ausgabe_Zeile( $RoomEntry["RID"], $Time-3600, $AnzahlEintraege);
+ $Out.= ausgabe_Zeile( $RoomEntry["RID"], $Time, $AnzahlEintraege);
+ $Out.= ausgabe_Zeile( $RoomEntry["RID"], $Time+3600, $AnzahlEintraege);
+
+
+ //entfernt leere zeilen
+ if( $AnzahlEintraege==0 )
+ $Out = "";
+ else
+ $Out = "<tr>\n\t<td>_". $RoomEntry["Name"]. "_</td>\n". $Out . "</tr>\n";
+
+ echo $Out;
+}
+
+echo "</table>";
+
+
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/schichtplanneu.1.php b/nonpublic/schichtplanneu.1.php
new file mode 100755
index 00000000..e7a41f7f
--- /dev/null
+++ b/nonpublic/schichtplanneu.1.php
@@ -0,0 +1,17 @@
+<h4>&nbsp;Tage </h4>
+
+<?
+
+include ("./inc/db.php");
+
+$SQL = "SELECT Date FROM `Schichtplan` ORDER BY 'Date'";
+$Erg = mysql_query($SQL, $con);
+if (!isset($ausdatum)) $ausdatum = substr(mysql_result($Erg, $i , 0), 0,10);
+for ($i = 0 ; $i < mysql_fetch_row($Erg) ; $i++)
+ if ($tmp != substr(mysql_result($Erg, $i , 0), 0,10)) {
+ $tmp = substr(mysql_result($Erg, $i , 0), 0,10);
+// echo "<li><a href='".basename(getenv("PATH_INFO"))."?ausdatum=$tmp'>$tmp</a></li>";
+ echo "\t<li><a href='./schichtplanneu.php?ausdatum=$tmp'>$tmp</a></li>\n";
+}
+
+?>
diff --git a/nonpublic/schichtplanneu.php b/nonpublic/schichtplanneu.php
new file mode 100755
index 00000000..2585f420
--- /dev/null
+++ b/nonpublic/schichtplanneu.php
@@ -0,0 +1,106 @@
+<?php
+$title = "Himmel";
+$header = "Schichtpl&auml;ne";
+$submenus = 1;
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+include ("./inc/funktionen.php");
+
+?>
+
+Hallo <? echo $_SESSION['Nick']?>,<br>
+hier kannst du dich f&uuml;r Schichten in der Aula eintragen. Dazu w&auml;hle einfach eine freie Schicht und klicke auf den Link.<br><br>
+
+
+<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
+
+<?php
+
+if (!IsSet($ausdatum)) {
+
+ $sql = "Select Date from Schichtplan order by Date ASC limit 0, 1";
+ $Erg = mysql_query($sql, $con);
+ $ausdatum = substr(mysql_result($Erg,0,"Date"),0,10);
+ }
+
+//Zeit Ausgeben
+#for ($i = 0; $i < 24; ++$i){
+# $Spalten[$i] = "\t<tr class=\"content\">\n";
+# $Spalten[$i].= "\t\t<td>";
+# if($i < 10){
+# $Spalten[$i].= "0";
+# $Spalten[$i].= "$i:00";
+# $Spalten[$i].= "</td>\n";
+# }
+# }
+# $rowcount = mysql_num_rows($res);
+
+
+
+for ($zeit = 0; $zeit < 24; $zeit++)
+ {
+ $zzeit = $zeit;
+ if ($zzeit < 10)
+ {
+ $zzeit = "0".$zzeit;
+ }
+
+$SSQL = "SELECT * FROM Schichtplan WHERE Date = \"2002-12-27 $zzeit:00:00\" AND RID = 1";
+$SERG = mysql_query($SSQL, $con);
+$SRES = mysql_fetch_row($SERG);
+
+$USQL = "SELECT UID FROM Schichtbelegung WHERE SID = \"".$SRES[0]."\"";
+$UERG = mysql_query($USQL, $con);
+$URES = mysql_fetch_row($UERG);
+
+$NSQL = "SELECT Nick FROM User WHERE UID = \"$URES[0]\"";
+$NERG = mysql_query($NSQL, $con);
+$NRES = mysql_fetch_row($NERG);
+
+echo "\t<tr class=\"contenttopic\">\n";
+echo "\t\t<td>\n";
+echo $zzeit.":00";
+echo "\t\t</td>";
+echo "\t\t<td>\n";
+echo $NRES[0];
+echo "\t\t</td>";
+
+$SSQL2 = "SELECT * FROM Schichtplan WHERE Date = \"2002-12-28 $zzeit:00:00\" AND RID = 1";
+$SERG2 = mysql_query($SSQL2, $con);
+$SRES2 = mysql_fetch_row($SERG2);
+
+$USQL2 = "SELECT UID FROM Schichtbelegung WHERE SID = \"".$SRES2[0]."\"";
+$UERG2 = mysql_query($USQL2, $con);
+$URES2 = mysql_fetch_row($UERG2);
+
+$NSQL2 = "SELECT Nick FROM User WHERE UID = \"$URES2[0]\"";
+$NERG2 = mysql_query($NSQL2, $con);
+$NRES2 = mysql_fetch_row($NERG2);
+
+echo "\t\t<td>\n";
+echo $NRES2[0];
+echo "\t\t</td>";
+
+$SSQL3 = "SELECT * FROM Schichtplan WHERE Date = \"2002-12-29 $zzeit:00:00\" AND RID = 1";
+$SERG3 = mysql_query($SSQL3, $con);
+$SRES3 = mysql_fetch_row($SERG3);
+
+$USQL3 = "SELECT UID FROM Schichtbelegung WHERE SID = \"".$SRES3[0]."\"";
+$UERG3 = mysql_query($USQL3, $con);
+$URES3 = mysql_fetch_row($UERG3);
+
+$NSQL3 = "SELECT Nick FROM User WHERE UID = \"$URES3[0]\"";
+$NERG3 = mysql_query($NSQL3, $con);
+$NRES3 = mysql_fetch_row($NERG3);
+
+echo "\t\t<td>\n";
+echo $NRES3[0];
+echo "\t\t</td>";
+echo "\t</tr>";
+
+
+
+}
+echo "</table>\n";
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/waeckliste.php b/nonpublic/waeckliste.php
new file mode 100755
index 00000000..80303168
--- /dev/null
+++ b/nonpublic/waeckliste.php
@@ -0,0 +1,56 @@
+<?php
+include ("./inc/funktion_user.php");
+
+$title = "Himmel";
+$header = "Weckdienst - Liste der zu weckenden Engel";
+
+include ("./inc/header.php");
+
+if ($eintragen == "Weck mich!") {
+ $SQL = "INSERT INTO Wecken (`UID`, `Date`, `Ort`, `Bemerkung`) VALUES (".$_SESSION['UID'].", \"$Date\", \"$Ort\", \"$Bemerkung\") ";
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1) { Print_Text(4); }
+}
+
+if ($eintragen == "loeschen") {
+ $SQL = "Delete from Wecken where UID = ".$_SESSION['UID']." and ID = $weckID limit 1";
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1) {
+ Print_Text(4);
+ }
+}
+?>
+
+<? echo Get_Text(1). $_SESSION['Nick'].",<br>\n".
+ Get_Text("pub_waeckliste_Text1")?>
+<br><br>
+<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
+ <tr class="contenttopic">
+ <th align="left"><? echo Get_Text("pub_waeckliste_Nick");?></th>
+ <th align="left"><? echo Get_Text("pub_waeckliste_Datum");?></th>
+ <th align="left"><? echo Get_Text("pub_waeckliste_Ort");?></th>
+ <th align="left"><? echo Get_Text("pub_waeckliste_Comment");?></th>
+ </tr>
+
+<?
+ $sql = "Select * from Wecken order by Date asc";
+ $Erg = mysql_query($sql, $con);
+ $count = mysql_num_rows($Erg);
+
+ for ($i=0; $i < $count; $i++) {
+ $row=mysql_fetch_row($Erg);
+?>
+ <tr class="content">
+ <td align="left"><? echo UID2Nick(mysql_result($Erg, $i, "UID")); ?> </td>
+ <td align="left"><? echo mysql_result($Erg, $i, "Date"); ?> </td>
+ <td align="left"><? echo mysql_result($Erg, $i, "Ort"); ?> </td>
+ <td align="left"><? echo mysql_result($Erg, $i, "Bemerkung"); ?> </td>
+ </tr>
+<?
+
+ }
+?>
+</table>
+<?
+include ("./inc/footer.php");
+?>
diff --git a/nonpublic/wecken.php b/nonpublic/wecken.php
new file mode 100755
index 00000000..91c64d93
--- /dev/null
+++ b/nonpublic/wecken.php
@@ -0,0 +1,77 @@
+<?php
+$title = "Himmel";
+$header = "Weckdienst";
+
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+
+if ($eintragen == Get_Text("pub_wake_bouton") ) {
+ $SQL = "INSERT INTO Wecken (`UID`, `Date`, `Ort`, `Bemerkung`) VALUES (".$_SESSION['UID'].", \"$Date\", \"$Ort\", \"$Bemerkung\") ";
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1) { Print_Text(4); }
+}
+
+if ($eintragen == "loeschen") {
+ $SQL = "Delete from Wecken where UID = ".$_SESSION['UID']." and ID = $weckID limit 1";
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1) {
+ Print_Text(4);
+ }
+}
+?>
+
+<? echo Get_Text("Hello").$_SESSION['Nick'].",<br>".Get_Text("pub_wake_beschreibung")?>
+<br><br>
+<? echo Get_Text("pub_wake_beschreibung2"); ?>
+<br><br>
+<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
+ <tr class="contenttopic">
+ <th align="left"><? echo Get_Text("pub_wake_Datum"); ?></th>
+ <th align="left"><? echo Get_Text("pub_wake_Ort"); ?></th>
+ <th align="left"><? echo Get_Text("pub_wake_Bemerkung"); ?></th>
+ <th align="left"><? echo Get_Text("pub_wake_change"); ?></th>
+ </tr>
+
+<?
+ $sql = "Select * from Wecken where UID='".$_SESSION['UID']."' order by Date asc";
+ $Erg = mysql_query($sql, $con);
+ $count = mysql_num_rows($Erg);
+
+ for ($i=0; $i < $count; $i++) {
+ $row=mysql_fetch_row($Erg);
+?>
+ <tr class="content">
+ <td align="left"><? echo mysql_result($Erg, $i, "Date"); ?> </td>
+ <td align="left"><? echo mysql_result($Erg, $i, "Ort"); ?> </td>
+ <td align="left"><? echo mysql_result($Erg, $i, "Bemerkung"); ?> </td>
+ <td align="left"><a href="./wecken.php?eintragen=loeschen&weckID=<?
+ echo mysql_result($Erg, $i, "ID")."\">".Get_Text("pub_wake_del"); ?></a></td>
+ </tr>
+<?
+
+ }
+?>
+</table>
+<br><br>
+<? echo Get_Text("pub_wake_Text2"); ?><br><br>
+
+<form action="wecken.php" method="post">
+<table>
+ <tr>
+ <td align="right"><? echo Get_Text("pub_wake_Datum"); ?>:</td>
+ <td align="left"><input type="text" name="Date" value="2003-08-05 08:00:00"></td>
+ </tr>
+ <tr>
+ <td align="right"><? echo Get_Text("pub_wake_Ort"); ?></td>
+ <td align="left"><input type="text" name="Ort" value="Tent 23"></td>
+ </tr>
+ <tr>
+ <td align="right"><? echo Get_Text("pub_wake_Bemerkung"); ?></td>
+ <td align="left"><textarea name="Bemerkung" rows="5" cols="40">knock knock leo, follow the white rabbit to the blue tent</textarea></td>
+ </tr>
+</table>
+<input type="submit" name="eintragen" value="<? echo Get_Text("pub_wake_bouton"); ?>">
+</form>
+<?
+include ("./inc/footer.php");
+?>