bootstrapping

This commit is contained in:
Philip Häusler 2011-06-01 14:48:31 +02:00
parent 6ebee2c46b
commit a537f4bf73
18 changed files with 1172 additions and 1130 deletions

View File

@ -1,9 +1,10 @@
<?php <?php
require_once('../bootstrap.php');
$title = "Newsverwaltung"; $title = "Newsverwaltung";
$header = "Verwaltung der News"; $header = "Verwaltung der News";
include ("../../../camp2011/includes/header.php"); include ("includes/header.php");
include ("../../../camp2011/includes/funktion_db_list.php"); include ("includes/funktion_db_list.php");
if (!IsSet($_GET["action"])) if (!IsSet($_GET["action"]))
@ -85,7 +86,7 @@ else
echo "FEHLER: Eintrag \"". $_GET["date"]. "\" nicht gefunden"; echo "FEHLER: Eintrag \"". $_GET["date"]. "\" nicht gefunden";
} }
else else
echo "Fehler: \"date\" nicht übergeben"; echo "Fehler: \"date\" nicht <EFBFBD>bergeben";
break; break;
case 'change_save': case 'change_save':
@ -93,20 +94,20 @@ else
$chsql="UPDATE `News` SET `Betreff`='". $_GET["eBetreff"]. "', `Text`='". $_GET["eText"]. $chsql="UPDATE `News` SET `Betreff`='". $_GET["eBetreff"]. "', `Text`='". $_GET["eText"].
"', `Treffen`='". $_GET["eTreffen"]. "' WHERE (`Datum`='". $_GET["date"]. "') limit 1"; "', `Treffen`='". $_GET["eTreffen"]. "' WHERE (`Datum`='". $_GET["date"]. "') limit 1";
else else
echo "Fehler: nicht genügend parameter übergeben"; echo "Fehler: nicht gen<EFBFBD>gend parameter <20>bergeben";
break; break;
case 'delete': case 'delete':
if (isset($_POST["date"])) if (isset($_POST["date"]))
$chsql="DELETE FROM `News` WHERE `Datum`='". $_POST["date"]. "' LIMIT 1"; $chsql="DELETE FROM `News` WHERE `Datum`='". $_POST["date"]. "' LIMIT 1";
else else
echo "Fehler: \"date\" nicht übergeben"; echo "Fehler: \"date\" nicht <EFBFBD>bergeben";
break; break;
} //SWITCH } //SWITCH
if (IsSet($chsql)) if (IsSet($chsql))
{ {
// SQL-Statement ausführen... // SQL-Statement ausf<EFBFBD>hren...
$Erg = mysql_query($chsql, $con); $Erg = mysql_query($chsql, $con);
If ($Erg == 1) If ($Erg == 1)
echo "&Auml;nderung erfolgreich gesichert..."; echo "&Auml;nderung erfolgreich gesichert...";
@ -117,6 +118,6 @@ else
} }
}// IF-ELSE }// IF-ELSE
include ("../../../camp2011/includes/footer.php"); include ("includes/footer.php");
?> ?>

View File

@ -33,7 +33,7 @@ footer p {
margin: 0 5%; margin: 0 5%;
} }
td { td, dt, dd {
padding: 4px; padding: 4px;
} }

View File

@ -1,181 +1,214 @@
<?php <?php
$title = "Anmeldung zum Chaos-Engel"; require_once ('bootstrap.php');
$header = "";
$success = "none";
include "../config/config.php"; $title = "Anmeldung zum Chaos-Engel";
include "../includes/header.php"; $header = "";
include "../config/config_db.php"; $success = "none";
include "../includes/crypt.php";
if(isset($_POST["send"])) { include "config/config.php";
$eNick = trim($_POST["Nick"]); include "includes/header.php";
include "config/config_db.php";
include "includes/crypt.php";
if($_POST["Alter"] == "") if (isset ($_POST["send"])) {
$_POST["Alter"] = 0; $eNick = trim($_POST["Nick"]);
// user vorhanden? if ($_POST["Alter"] == "")
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'"; $_POST["Alter"] = 0;
$Ergans = mysql_query($SQLans, $con);
if(strlen($_POST["Nick"]) < 2) // user vorhanden?
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2"); $SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'";
elseif(mysql_num_rows( $Ergans) > 0) $Ergans = mysql_query($SQLans, $con);
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick3");
elseif(strlen($_POST["email"]) <= 6 && strstr($_POST["email"], "@") == FALSE && strstr($_POST["email"], ".") == false)
$error = Get_Text("makeuser_error_mail");
elseif(!is_numeric($_POST["Alter"]))
$error = Get_Text("makeuser_error_Alter");
elseif($_POST["Passwort"] != $_POST["Passwort2"])
$error = Get_Text("makeuser_error_password1");
elseif(strlen($_POST["Passwort"]) < 6)
$error = Get_Text("makeuser_error_password2");
else {
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
unset($_POST["Passwort2"]);
$SQL = "INSERT INTO `User` (". if (strlen($_POST["Nick"]) < 2)
"`Nick` , ". "`Name` , ". $error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2");
"`Vorname`, ". "`Alter` , ". elseif (mysql_num_rows($Ergans) > 0) $error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick3");
"`Telefon`, ". "`DECT`, ". elseif (strlen($_POST["email"]) <= 6 && strstr($_POST["email"], "@") == FALSE && strstr($_POST["email"], ".") == false) $error = Get_Text("makeuser_error_mail");
"`Handy`, ". "`email`, ". elseif (!is_numeric($_POST["Alter"])) $error = Get_Text("makeuser_error_Alter");
"`ICQ`, ". "`jabber`, ". elseif ($_POST["Passwort"] != $_POST["Passwort2"]) $error = Get_Text("makeuser_error_password1");
"`Size`, ". "`Passwort`, ". elseif (strlen($_POST["Passwort"]) < 6) $error = Get_Text("makeuser_error_password2");
"`Art` , ". "`kommentar`, ". else {
"`Hometown`,". "`CreateDate` ) ". $_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
"VALUES ( ". unset ($_POST["Passwort2"]);
"'". $_POST["Nick"]. "', ". "'". $_POST["Name"]. "', ".
"'". $_POST["Vorname"]. "', ". "'". $_POST["Alter"]. "', ".
"'". $_POST["Telefon"]. "', ". "'". $_POST["DECT"]. "', ".
"'". $_POST["Handy"]. "', ". "'". $_POST["email"]. "', ".
"'". $_POST["ICQ"]. "', ". "'". $_POST["jabber"]. "', ".
"'". $_POST["Size"]. "', ". "'". $_POST["Passwort"]. "', ".
"'". $_POST["Art"]. "', ". "'". $_POST["kommentar"]. "', ".
"'". $_POST["Hometown"]. "',". "NOW());";
$Erg = mysql_query($SQL, $con);
if ($Erg != 1) { $SQL = "INSERT INTO `User` (" .
echo Get_Text("makeuser_error_write1") . "<br />\n"; "`Nick` , " . "`Name` , " .
$error = mysql_error($con); "`Vorname`, " . "`Alter` , " .
} else { "`Telefon`, " . "`DECT`, " .
echo "<p class=\"important\">" . Get_Text("makeuser_writeOK") . "\n"; "`Handy`, " . "`email`, " .
"`ICQ`, " . "`jabber`, " .
"`Size`, " . "`Passwort`, " .
"`Art` , " . "`kommentar`, " .
"`Hometown`," . "`CreateDate` ) " .
"VALUES ( " .
"'" . $_POST["Nick"] . "', " . "'" . $_POST["Name"] . "', " .
"'" . $_POST["Vorname"] . "', " . "'" . $_POST["Alter"] . "', " .
"'" . $_POST["Telefon"] . "', " . "'" . $_POST["DECT"] . "', " .
"'" . $_POST["Handy"] . "', " . "'" . $_POST["email"] . "', " .
"'" . $_POST["ICQ"] . "', " . "'" . $_POST["jabber"] . "', " .
"'" . $_POST["Size"] . "', " . "'" . $_POST["Passwort"] . "', " .
"'" . $_POST["Art"] . "', " . "'" . $_POST["kommentar"] . "', " .
"'" . $_POST["Hometown"] . "'," . "NOW());";
$Erg = mysql_query($SQL, $con);
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';"; if ($Erg != 1) {
$Erg2 = mysql_query($SQL2, $con); echo Get_Text("makeuser_error_write1") . "<br />\n";
$Data = mysql_fetch_array($Erg2); $error = mysql_error($con);
} else {
echo "<p class=\"important\">" . Get_Text("makeuser_writeOK") . "\n";
$SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');"; $SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';";
$Erg3 = mysql_query($SQL3, $con); $Erg2 = mysql_query($SQL2, $con);
$Data = mysql_fetch_array($Erg2);
if ($Erg3 != 1) { $SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');";
echo "<h1>". Get_Text("makeuser_error_write2"). "<br />\n"; $Erg3 = mysql_query($SQL3, $con);
$error = mysql_error($con);
} else {
echo Get_Text("makeuser_writeOK2") . "<br />\n";
echo "<h1>" . Get_Text("makeuser_writeOK3") . "</h1>\n";
}
echo Get_Text("makeuser_writeOK4") . "</p><p></p>\n<br /><br />\n"; if ($Erg3 != 1) {
$success = "any"; echo "<h1>" . Get_Text("makeuser_error_write2") . "<br />\n";
$error = mysql_error($con);
} else {
echo Get_Text("makeuser_writeOK2") . "<br />\n";
echo "<h1>" . Get_Text("makeuser_writeOK3") . "</h1>\n";
}
if (isset($SubscribeMailinglist)) { echo Get_Text("makeuser_writeOK4") . "</p><p></p>\n<br /><br />\n";
if ($_POST["subscribe-mailinglist"] == "") { $success = "any";
$headers = "From: " . $_POST["email"] . "\r\n" .
"X-Mailer: PHP/" . phpversion();
mail($SubscribeMailinglist, "subject", "message", $headers);
}
}
}
}
if(isset($error)) if (isset ($SubscribeMailinglist)) {
echo "<p class=\"warning\">\n" . $error . "\n</p>\n\n"; if ($_POST["subscribe-mailinglist"] == "") {
} else { $headers = "From: " . $_POST["email"] . "\r\n" .
// init vars "X-Mailer: PHP/" . phpversion();
$_POST["Nick"] = ""; mail($SubscribeMailinglist, "subject", "message", $headers);
$_POST["Name"] = ""; }
$_POST["Vorname"] = ""; }
$_POST["Alter"] = ""; }
$_POST["Telefon"] = ""; }
$_POST["DECT"] = "";
$_POST["Handy"] = "";
$_POST["email"] = "";
$_POST["subscribe-mailinglist"] = "";
$_POST["ICQ"] = "";
$_POST["jabber"] = "";
$_POST["Size"] = "L";
$_POST["Art"] = "";
$_POST["kommentar"] = "";
$_POST["Hometown"] = "";
}
if($success == "none") { if (isset ($error))
echo "<h1>" . Get_Text("makeuser_text0") . "</h1>\n"; echo "<p class=\"warning\">\n" . $error . "\n</p>\n\n";
echo "<h2>" . Get_Text("makeuser_text1") . "</h2>\n"; } else {
echo "<form action=\"\" method=\"post\">\n"; // init vars
echo "<table>\n"; $_POST["Nick"] = "";
echo "<tr><td>" . Get_Text("makeuser_Nickname") . "*</td><td><input type=\"text\" size=\"40\" name=\"Nick\" value=\"" . $_POST["Nick"] . "\" /></td></tr>\n"; $_POST["Name"] = "";
echo "<tr><td>" . Get_Text("makeuser_Nachname") . "</td><td><input type=\"text\" size=\"40\" name=\"Name\" value=\"" . $_POST["Name"] . "\" /></td></tr>\n"; $_POST["Vorname"] = "";
echo "<tr><td>". Get_Text("makeuser_Vorname") . "</td><td><input type=\"text\" size=\"40\" name=\"Vorname\" value=\"" . $_POST["Vorname"] . "\" /></td></tr>\n"; $_POST["Alter"] = "";
echo "<tr><td>". Get_Text("makeuser_Alter") . "</td><td><input type=\"text\" size=\"40\" name=\"Alter\" value=\"". $_POST["Alter"]. "\"></td></tr>\n"; $_POST["Telefon"] = "";
echo "<tr><td>". Get_Text("makeuser_Telefon"). "</td><td><input type=\"text\" size=\"40\" name=\"Telefon\" value=\"". $_POST["Telefon"]. "\"></td></tr>\n"; $_POST["DECT"] = "";
echo "<tr><td>". Get_Text("makeuser_DECT"). "</td><td><input type=\"text\" size=\"40\" name=\"DECT\" value=\"". $_POST["DECT"]. "\"></td><td>\n"; $_POST["Handy"] = "";
echo "<!--a href=\"https://21c3.ccc.de/wiki/index.php/POC\"><img src=\"./pic/external.png\" alt=\"external: \">DECT</a--></td></tr>\n"; $_POST["email"] = "";
echo "<tr><td>". Get_Text("makeuser_Handy"). "</td><td><input type=\"text\" size=\"40\" name=\"Handy\" value=\"". $_POST["Handy"]. "\"></td></tr>\n"; $_POST["subscribe-mailinglist"] = "";
echo "<tr><td>". Get_Text("makeuser_E-Mail"). "*</td><td><input type=\"text\" size=\"40\" name=\"email\" value=\"". $_POST["email"]. "\"></td></tr>\n"; $_POST["ICQ"] = "";
$_POST["jabber"] = "";
$_POST["Size"] = "L";
$_POST["Art"] = "";
$_POST["kommentar"] = "";
$_POST["Hometown"] = "";
}
if(isset($SubscribeMailinglist)) if ($success == "none") {
echo "<tr><td>". Get_Text("makeuser_subscribe-mailinglist"). "</td><td><input type=\"checkbox\" name=\"subscribe-mailinglist\" value=\"". $_POST["subscribe-mailinglist"]. "\">($SubscribeMailinglist)</td></tr>\n"; echo "<h1>" . Get_Text("makeuser_text0") . "</h1>\n";
echo "<h2>" . Get_Text("makeuser_text1") . "</h2>\n";
echo "<form action=\"\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><td>" . Get_Text("makeuser_Nickname") . "*</td><td><input type=\"text\" size=\"40\" name=\"Nick\" value=\"" . $_POST["Nick"] . "\" /></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Nachname") . "</td><td><input type=\"text\" size=\"40\" name=\"Name\" value=\"" . $_POST["Name"] . "\" /></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Vorname") . "</td><td><input type=\"text\" size=\"40\" name=\"Vorname\" value=\"" . $_POST["Vorname"] . "\" /></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Alter") . "</td><td><input type=\"text\" size=\"40\" name=\"Alter\" value=\"" . $_POST["Alter"] . "\"></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Telefon") . "</td><td><input type=\"text\" size=\"40\" name=\"Telefon\" value=\"" . $_POST["Telefon"] . "\"></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_DECT") . "</td><td><input type=\"text\" size=\"40\" name=\"DECT\" value=\"" . $_POST["DECT"] . "\"></td><td>\n";
echo "<!--a href=\"https://21c3.ccc.de/wiki/index.php/POC\"><img src=\"./pic/external.png\" alt=\"external: \">DECT</a--></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Handy") . "</td><td><input type=\"text\" size=\"40\" name=\"Handy\" value=\"" . $_POST["Handy"] . "\"></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_E-Mail") . "*</td><td><input type=\"text\" size=\"40\" name=\"email\" value=\"" . $_POST["email"] . "\"></td></tr>\n";
echo "<tr><td>ICQ</td><td><input type=\"text\" size=\"40\" name=\"ICQ\" value=\"". $_POST["ICQ"]. "\"></td></tr>\n"; if (isset ($SubscribeMailinglist))
echo "<tr><td>jabber</td><td><input type=\"text\" size=\"40\" name=\"jabber\" value=\"". $_POST["jabber"]. "\"></td></tr>\n"; echo "<tr><td>" . Get_Text("makeuser_subscribe-mailinglist") . "</td><td><input type=\"checkbox\" name=\"subscribe-mailinglist\" value=\"" . $_POST["subscribe-mailinglist"] . "\">($SubscribeMailinglist)</td></tr>\n";
echo "<tr><td>". Get_Text("makeuser_T-Shirt"). " Gr&ouml;sse*</td><td align=\"left\">\n";
echo "<select name=\"Size\">\n";
echo "<option value=\"S\""; if ($_POST["Size"]=="S") echo " selected"; echo ">S</option>\n";
echo "<option value=\"M\""; if ($_POST["Size"]=="M") echo " selected"; echo ">M</option>\n";
echo "<option value=\"L\""; if ($_POST["Size"]=="L") echo " selected"; echo ">L</option>\n";
echo "<option value=\"XL\""; if ($_POST["Size"]=="XL") echo " selected"; echo ">XL</option>\n";
echo "<option value=\"2XL\""; if ($_POST["Size"]=="2XL") echo " selected"; echo ">2XL</option>\n";
echo "<option value=\"3XL\""; if ($_POST["Size"]=="3XL") echo " selected"; echo ">3XL</option>\n";
echo "<option value=\"4XL\""; if ($_POST["Size"]=="4XL") echo " selected"; echo ">4XL</option>\n";
echo "<option value=\"5XL\""; if ($_POST["Size"]=="5XL") echo " selected"; echo ">5XL</option>\n";
echo "<option value=\"S-G\""; if ($_POST["Size"]=="S-G") echo " selected"; echo ">S Girl</option>\n";
echo "<option value=\"M-G\""; if ($_POST["Size"]=="M-G") echo " selected"; echo ">M Girl</option>\n";
echo "<option value=\"L-G\""; if ($_POST["Size"]=="L-G") echo " selected"; echo ">L Girl</option>\n";
echo "<option value=\"XL-G\""; if ($_POST["Size"]=="XL-G") echo " selected"; echo ">XL Girl</option>\n";
echo "</select>\n";
echo "</td></tr>\n";
echo "<tr><td>". Get_Text("makeuser_Engelart"). "</td><td align=\"left\">\n";
echo "<select name=\"Art\">\n";
$Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`"; echo "<tr><td>ICQ</td><td><input type=\"text\" size=\"40\" name=\"ICQ\" value=\"" . $_POST["ICQ"] . "\"></td></tr>\n";
$Erg = mysql_query($Sql, $con); echo "<tr><td>jabber</td><td><input type=\"text\" size=\"40\" name=\"jabber\" value=\"" . $_POST["jabber"] . "\"></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_T-Shirt") . " Gr&ouml;sse*</td><td align=\"left\">\n";
echo "<select name=\"Size\">\n";
echo "<option value=\"S\"";
if ($_POST["Size"] == "S")
echo " selected";
echo ">S</option>\n";
echo "<option value=\"M\"";
if ($_POST["Size"] == "M")
echo " selected";
echo ">M</option>\n";
echo "<option value=\"L\"";
if ($_POST["Size"] == "L")
echo " selected";
echo ">L</option>\n";
echo "<option value=\"XL\"";
if ($_POST["Size"] == "XL")
echo " selected";
echo ">XL</option>\n";
echo "<option value=\"2XL\"";
if ($_POST["Size"] == "2XL")
echo " selected";
echo ">2XL</option>\n";
echo "<option value=\"3XL\"";
if ($_POST["Size"] == "3XL")
echo " selected";
echo ">3XL</option>\n";
echo "<option value=\"4XL\"";
if ($_POST["Size"] == "4XL")
echo " selected";
echo ">4XL</option>\n";
echo "<option value=\"5XL\"";
if ($_POST["Size"] == "5XL")
echo " selected";
echo ">5XL</option>\n";
echo "<option value=\"S-G\"";
if ($_POST["Size"] == "S-G")
echo " selected";
echo ">S Girl</option>\n";
echo "<option value=\"M-G\"";
if ($_POST["Size"] == "M-G")
echo " selected";
echo ">M Girl</option>\n";
echo "<option value=\"L-G\"";
if ($_POST["Size"] == "L-G")
echo " selected";
echo ">L Girl</option>\n";
echo "<option value=\"XL-G\"";
if ($_POST["Size"] == "XL-G")
echo " selected";
echo ">XL Girl</option>\n";
echo "</select>\n";
echo "</td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Engelart") . "</td><td align=\"left\">\n";
echo "<select name=\"Art\">\n";
for($t = 0; $t < mysql_num_rows($Erg); $t++) { $Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`";
$Name = mysql_result($Erg, $t, "Name"). Get_Text("inc_schicht_engel"); $Erg = mysql_query($Sql, $con);
echo "<option value=\"" . $Name . "\"";
if($_POST["Art"]==$Name) for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
echo " selected"; $Name = mysql_result($Erg, $t, "Name") . Get_Text("inc_schicht_engel");
echo "<option value=\"" . $Name . "\"";
echo ">$Name</option>\n"; if ($_POST["Art"] == $Name)
} echo " selected";
echo "</select>\n"; echo ">$Name</option>\n";
echo "</td>\n"; }
echo "</tr>\n";
echo "<tr>\n";
echo "<td>". Get_Text("makeuser_text2"). "</td>\n";
echo "<td><textarea rows=\"5\" cols=\"40\" name=\"kommentar\">". $_POST["kommentar"]. "</textarea></td>\n";
echo "</tr>\n";
echo "<tr><td>". Get_Text("makeuser_Hometown"). "</td><td><input type=\"text\" size=\"40\" name=\"Hometown\" value=\"". $_POST["Hometown"]. "\"></td></tr>\n";
echo "<tr><td>". Get_Text("makeuser_Passwort"). "*</td><td><input type=\"password\" size=\"40\" name=\"Passwort\"/></td></tr>\n";
echo "<tr><td>". Get_Text("makeuser_Passwort2"). "*</td><td><input type=\"password\" size=\"40\" name=\"Passwort2\"/></td></tr>\n";
echo "<tr><td>&nbsp;</td><td><input type=\"submit\" name=\"send\" value=\"". Get_Text("makeuser_Anmelden"). "\"/></td></tr>\n";
echo "</table>\n";
echo "</form>\n";
Print_Text("makeuser_text3");
}
include "../includes/footer.php"; echo "</select>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>" . Get_Text("makeuser_text2") . "</td>\n";
echo "<td><textarea rows=\"5\" cols=\"40\" name=\"kommentar\">" . $_POST["kommentar"] . "</textarea></td>\n";
echo "</tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Hometown") . "</td><td><input type=\"text\" size=\"40\" name=\"Hometown\" value=\"" . $_POST["Hometown"] . "\"></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Passwort") . "*</td><td><input type=\"password\" size=\"40\" name=\"Passwort\"/></td></tr>\n";
echo "<tr><td>" . Get_Text("makeuser_Passwort2") . "*</td><td><input type=\"password\" size=\"40\" name=\"Passwort2\"/></td></tr>\n";
echo "<tr><td>&nbsp;</td><td><input type=\"submit\" name=\"send\" value=\"" . Get_Text("makeuser_Anmelden") . "\"/></td></tr>\n";
echo "</table>\n";
echo "</form>\n";
Print_Text("makeuser_text3");
}
include "includes/footer.php";
?> ?>

View File

@ -1,32 +1,43 @@
<?php <?php
header("Content-Type: application/json"); require_once ('../bootstrap.php');
include "../../../camp2011/includes/config.php"; header("Content-Type: application/json");
include "../../../camp2011/includes/config_db.php";
$User = $_POST['user']; include "includes/config.php";
$Pass = $_POST['pw']; include "includes/config_db.php";
$SourceOuth = $_POST['so'];
if(isset($CurrentExternAuthPass) && $SourceOuth == $CurrentExternAuthPass) { $User = $_POST['user'];
$sql = "SELECT * FROM `User` WHERE `Nick`='" . $User . "'"; $Pass = $_POST['pw'];
$Erg = mysql_query($sql, $con); $SourceOuth = $_POST['so'];
if(mysql_num_rows($Erg) == 1) { if (isset ($CurrentExternAuthPass) && $SourceOuth == $CurrentExternAuthPass) {
if(mysql_result($Erg, 0, "Passwort") == $Pass) { $sql = "SELECT * FROM `User` WHERE `Nick`='" . $User . "'";
$UID = mysql_result($Erg, 0, "UID"); $Erg = mysql_query($sql, $con);
// get CVS import Data if (mysql_num_rows($Erg) == 1) {
$SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $UID . "'"; if (mysql_result($Erg, 0, "Passwort") == $Pass) {
$Erg_CVS = mysql_query($SQL, $con); $UID = mysql_result($Erg, 0, "UID");
$CVS = mysql_fetch_array($Erg_CVS);
$msg = array('status' => 'success', 'rights' => $CVS); // get CVS import Data
echo json_encode($msg); $SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $UID . "'";
} else $Erg_CVS = mysql_query($SQL, $con);
echo json_encode(array('status' => 'failed')); $CVS = mysql_fetch_array($Erg_CVS);
} else
echo json_encode(array('status' => 'failed')); $msg = array (
} else 'status' => 'success',
echo json_encode(array('status' => 'failed')); 'rights' => $CVS
);
echo json_encode($msg);
} else
echo json_encode(array (
'status' => 'failed'
));
} else
echo json_encode(array (
'status' => 'failed'
));
} else
echo json_encode(array (
'status' => 'failed'
));
?> ?>

View File

@ -1,12 +1,14 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "Deine pers&ouml;nlichen Einstellungen";
include "../../../camp2011/includes/header.php";
include "../../../camp2011/includes/crypt.php";
if(!isset($_POST["action"])) { $title = "Himmel";
echo Get_Text("Hallo").$_SESSION['Nick'].",<br />\n\n"; $header = "Deine pers&ouml;nlichen Einstellungen";
Print_Text(13); include "includes/header.php";
include "includes/crypt.php";
if (!isset ($_POST["action"])) {
echo Get_Text("Hallo") . $_SESSION['Nick'] . ",<br />\n\n";
Print_Text(13);
?> ?>
<hr width="100%"> <hr width="100%">
<?php Print_Text("pub_einstellungen_Text_UserData"); ?> <?php Print_Text("pub_einstellungen_Text_UserData"); ?>
@ -69,7 +71,9 @@
</tr> </tr>
<?php <?php
if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
?> ?>
<tr> <tr>
<td><?php Print_Text("makeuser_T-Shirt"); ?></td> <td><?php Print_Text("makeuser_T-Shirt"); ?></td>
@ -83,7 +87,9 @@ if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
</select></td> </select></td>
</tr> </tr>
<?php <?php
}
}
?> ?>
</table> </table>
<input type="submit" value="<?php Print_Text("save"); ?>"> <input type="submit" value="<?php Print_Text("save"); ?>">
@ -147,7 +153,11 @@ if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
<select name="language"> <select name="language">
<option value="DE" <?php if($_SESSION['Sprache'] == 'DE') { echo "selected"; } ?>>Deutsch</option> <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="EN" <?php if($_SESSION['Sprache'] == 'EN') { echo "selected"; } ?>>English</option>
<?php /* <option value="NL" <?php if($_SESSION['Sprache'] == 'NL') { echo "selected"; } ?>>Dutch</option> */ ?> <?php
/* <option value="NL" <?php if($_SESSION['Sprache'] == 'NL') { echo "selected"; } ?>>Dutch</option> */
?>
</select> </select>
</td></tr> </td></tr>
</table> </table>
@ -155,224 +165,211 @@ if($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
</form> </form>
<?php <?php
if(get_cfg_var("file_uploads")) {
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
echo Get_Text('pub_einstellungen_PictureUpload') . "<br />";
echo "<form action=\"./einstellungen.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"sendPicture\">\n";
echo "<input name=\"file\" type=\"file\" size=\"50\" maxlength=\"". get_cfg_var("post_max_size"). "\">\n";
echo "(max ". get_cfg_var("post_max_size"). "Byte)<br />\n";
echo "<input type=\"submit\" value=\"". Get_Text("upload"),"\">\n";
echo "</form>\n";
}
switch( GetPicturShow( $_SESSION['UID'])) {
case 'Y':
echo Get_Text('pub_einstellungen_PictureShow'). "<br />";
echo displayPictur($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"". Get_Text("delete"),"\">\n";
echo "</form>\n";
break;
case 'N':
echo Get_Text('pub_einstellungen_PictureNoShow'). "<br />";
echo displayPictur($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"". Get_Text("delete"),"\">\n";
echo "</form>\n";
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
case '':
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
echo Get_Text(22). "<br />";
echo "\n<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"avatar\">\n";
echo "<table>\n";
echo "<tr>\n<td>". Get_Text(23). "<br /></td>\n</tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<select name=\"eAvatar\" onChange=\"document.avatar.src = '". $url. $ENGEL_ROOT. "pic/avatar/avatar' + this.value + '.gif'\" onKeyup=\"document.avatar.src = '". $url. $ENGEL_ROOT. "pic/avatar/avatar' + this.value + '.gif'\">\n";
for($i = 1; file_exists("../pic/avatar/avatar" . $i . ".gif"); $i++)
echo "<option value=\"" . $i . "\"" . ($_SESSION['Avatar'] == $i ? " selected" : "") . ">avatar" . $i . "</option>\n";
echo "</select>&nbsp;&nbsp;\n";
echo "<img src=\"" . $url . $ENGEL_ROOT . "pic/avatar/avatar" . $_SESSION['Avatar'] . ".gif\" name=\"avatar\" border=\"0\" align=\"top\">\n";
echo "</td>\n</tr>\n";
echo "</table>\n";
echo "<input type=\"submit\" value=\"" . Get_Text("save") . "\">\n";
echo "</form>\n";
break;
} //CASE
} else {
switch ($_POST["action"]) {
case 'set':
if($_POST["new1"] == $_POST["new2"]) {
Print_Text(25);
$sql = "SELECT * FROM `User` WHERE `UID`='".$_SESSION['UID']. "'";
$Erg = mysql_query($sql, $con);
if(PassCrypt($_POST["old"]) == mysql_result($Erg, 0, "Passwort")) {
Print_Text(26);
Print_Text(27);
$usql = "UPDATE `User` SET `Passwort`='". PassCrypt($_POST["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`= '". $_POST["colourid"]. "', ".
"`Menu`= '". $_POST["eMenu"]. "' ".
"WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
echo mysql_error($con);
$_SESSION['color']=$_POST["colourid"];
$_SESSION['Menu']=$_POST["eMenu"];
if ($Erg==1) {
Print_Text(32);
} else {
Print_Text(29);
}
break;
case 'sprache':
$chsql="UPDATE `User` SET `Sprache` = '". $_POST["language"]. "' WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['Sprache']=$_POST["language"];
if ($Erg==1) {
Print_Text(33);
} else {
Print_Text(29);
}
break;
case 'avatar':
$chsql="UPDATE `User` SET `Avatar`='". $_POST["eAvatar"]. "' WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['Avatar']=$_POST["eAvatar"];
if ($Erg==1)
Print_Text(34);
else
Print_Text(29);
break;
case 'setUserData':
if( $_SESSION['CVS'][ "Change T_Shirt Size" ] == "Y" )
{
$chsql= "UPDATE `User` SET ".
"`Nick`='". $_POST["eNick"]. "', `Name`='". $_POST["eName"]. "', ".
"`Vorname`='". $_POST["eVorname"]. "', `Alter`='". $_POST["eAlter"]. "', ".
"`Telefon`='". $_POST["eTelefon"]. "', `Handy`='". $_POST["eHandy"]. "', ".
"`DECT`='". $_POST["eDECT"]. "', `email`='". $_POST["eemail"]. "', ".
"`ICQ`='". $_POST["eICQ"]. "', `jabber`='". $_POST["ejabber"]."', ".
"`Hometown`='". $_POST["Hometown"]. "', `Size`='". $_POST["Sizeid"]. "' ".
"WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1;";
}
else
{
$chsql= "UPDATE `User` SET ".
"`Nick`='". $_POST["eNick"]. "', `Name`='". $_POST["eName"]. "', ".
"`Vorname`='". $_POST["eVorname"]. "', `Alter`='". $_POST["eAlter"]. "', ".
"`Telefon`='". $_POST["eTelefon"]. "', `Handy`='". $_POST["eHandy"]. "', ".
"`DECT`='". $_POST["eDECT"]. "', `email`='". $_POST["eemail"]. "', ".
"`ICQ`='". $_POST["eICQ"]. "', `jabber`='". $_POST["ejabber"]."', ".
"`Hometown`='". $_POST["Hometown"]. "' ".
"WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1;";
}
$Erg = mysql_query($chsql, $con);
if ($Erg==1)
{
$_SESSION['Nick'] = $_POST["eNick"];
$_SESSION['Name'] = $_POST["eName"];
$_SESSION['Vorname'] = $_POST["eVorname"];
$_SESSION['Alter'] = $_POST["eAlter"];
$_SESSION['Telefon'] = $_POST["eTelefon"];
$_SESSION['Handy'] = $_POST["eHandy"];
$_SESSION['DECT'] = $_POST["eDECT"];
$_SESSION['email'] = $_POST["eemail"];
$_SESSION['ICQ'] = $_POST["eICQ"];
$_SESSION['jabber'] = $_POST["ejabber"];
$_SESSION['Hometown'] = $_POST["Hometown"];
if( $_SESSION['CVS'][ "Change T_Shirt Size" ] == "Y" )
{
$_SESSION['Size']=$_POST["Sizeid"];
}
else if( $_SESSION['Size'] != $_POST["Sizeid"])
{
array_push($error_messages, "einstellungen.php, change t-shirt size not allowed\n");
}
Print_Text("pub_einstellungen_UserDateSaved"); if (get_cfg_var("file_uploads")) {
} echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
else echo Get_Text('pub_einstellungen_PictureUpload') . "<br />";
{ echo "<form action=\"./einstellungen.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
Print_Text(29); echo "<input type=\"hidden\" name=\"action\" value=\"sendPicture\">\n";
echo mysql_error( $con); echo "<input name=\"file\" type=\"file\" size=\"50\" maxlength=\"" . get_cfg_var("post_max_size") . "\">\n";
} echo "(max " . get_cfg_var("post_max_size") . "Byte)<br />\n";
break; echo "<input type=\"submit\" value=\"" . Get_Text("upload"), "\">\n";
echo "</form>\n";
}
case 'sendPicture': switch (GetPicturShow($_SESSION['UID'])) {
if( $_FILES["file"]["size"] > 0) case 'Y' :
{ echo Get_Text('pub_einstellungen_PictureShow') . "<br />";
if( ($_FILES["file"]["type"] == "image/jpeg") || echo displayPictur($_SESSION['UID'], 0);
($_FILES["file"]["type"] == "image/png") || echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
($_FILES["file"]["type"] == "image/gif") ) echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
{ echo "<input type=\"submit\" value=\"" . Get_Text("delete"), "\">\n";
$data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"]))); echo "</form>\n";
break;
case 'N' :
echo Get_Text('pub_einstellungen_PictureNoShow') . "<br />";
echo displayPictur($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"" . Get_Text("delete"), "\">\n";
echo "</form>\n";
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
case '' :
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
echo Get_Text(22) . "<br />";
echo "\n<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"avatar\">\n";
echo "<table>\n";
echo "<tr>\n<td>" . Get_Text(23) . "<br /></td>\n</tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<select name=\"eAvatar\" onChange=\"document.avatar.src = '" . $url . $ENGEL_ROOT . "pic/avatar/avatar' + this.value + '.gif'\" onKeyup=\"document.avatar.src = '" . $url . $ENGEL_ROOT . "pic/avatar/avatar' + this.value + '.gif'\">\n";
if( GetPicturShow( $_SESSION['UID']) == "") for ($i = 1; file_exists("../pic/avatar/avatar" . $i . ".gif"); $i++)
$SQL = "INSERT INTO `UserPicture` ". echo "<option value=\"" . $i . "\"" . ($_SESSION['Avatar'] == $i ? " selected" : "") . ">avatar" . $i . "</option>\n";
"( `UID`,`Bild`, `ContentType`, `show`) ".
"VALUES ('". $_SESSION['UID']. "', '$data', '". $_FILES["file"]["type"]. "', 'N')";
else
$SQL = "UPDATE `UserPicture` SET ".
"`Bild`='$data', ".
"`ContentType`='". $_FILES["file"]["type"]. "', ".
"`show`='N' ".
"WHERE `UID`='". $_SESSION['UID']. "'";
$res = mysql_query( $SQL, $con); echo "</select>&nbsp;&nbsp;\n";
if( $res) echo "<img src=\"" . $url . $ENGEL_ROOT . "pic/avatar/avatar" . $_SESSION['Avatar'] . ".gif\" name=\"avatar\" border=\"0\" align=\"top\">\n";
Print_Text("pub_einstellungen_send_OK"); echo "</td>\n</tr>\n";
else echo "</table>\n";
Print_Text("pub_einstellungen_send_KO"); echo "<input type=\"submit\" value=\"" . Get_Text("save") . "\">\n";
echo "</form>\n";
break;
} //CASE
echo "<h6>('" . $_FILES["file"]["name"] . "', MIME-Type: " . $_FILES["file"]["type"]. ", " . $_FILES["file"]["size"]. " Byte)</h6>"; } else {
} switch ($_POST["action"]) {
else case 'set' :
Print_Text("pub_einstellungen_send_KO"); if ($_POST["new1"] == $_POST["new2"]) {
} Print_Text(25);
else $sql = "SELECT * FROM `User` WHERE `UID`='" . $_SESSION['UID'] . "'";
Print_Text("pub_einstellungen_send_KO"); $Erg = mysql_query($sql, $con);
break;
case 'delPicture': if (PassCrypt($_POST["old"]) == mysql_result($Erg, 0, "Passwort")) {
$chsql="DELETE FROM `UserPicture` WHERE `UID`='". $_SESSION['UID']. "' LIMIT 1"; Print_Text(26);
$Erg = mysql_query($chsql, $con); Print_Text(27);
if ($Erg==1) $usql = "UPDATE `User` SET `Passwort`='" . PassCrypt($_POST["new1"]) . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1";
Print_Text("pub_einstellungen_del_OK"); $Erg = mysql_query($usql, $con);
else
Print_Text("pub_einstellungen_del_KO"); if ($Erg == 1) {
Break; Print_Text(28);
} else {
Print_Text(29);
}
} else {
Print_Text(30);
}
} else {
Print_Text(31);
}
break;
case 'colour' :
$chsql = "UPDATE `User` SET " .
"`color`= '" . $_POST["colourid"] . "', " .
"`Menu`= '" . $_POST["eMenu"] . "' " .
"WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
echo mysql_error($con);
$_SESSION['color'] = $_POST["colourid"];
$_SESSION['Menu'] = $_POST["eMenu"];
if ($Erg == 1) {
Print_Text(32);
} else {
Print_Text(29);
}
break;
case 'sprache' :
$chsql = "UPDATE `User` SET `Sprache` = '" . $_POST["language"] . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['Sprache'] = $_POST["language"];
if ($Erg == 1) {
Print_Text(33);
} else {
Print_Text(29);
}
break;
case 'avatar' :
$chsql = "UPDATE `User` SET `Avatar`='" . $_POST["eAvatar"] . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['Avatar'] = $_POST["eAvatar"];
if ($Erg == 1)
Print_Text(34);
else
Print_Text(29);
break;
case 'setUserData' :
if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
$chsql = "UPDATE `User` SET " .
"`Nick`='" . $_POST["eNick"] . "', `Name`='" . $_POST["eName"] . "', " .
"`Vorname`='" . $_POST["eVorname"] . "', `Alter`='" . $_POST["eAlter"] . "', " .
"`Telefon`='" . $_POST["eTelefon"] . "', `Handy`='" . $_POST["eHandy"] . "', " .
"`DECT`='" . $_POST["eDECT"] . "', `email`='" . $_POST["eemail"] . "', " .
"`ICQ`='" . $_POST["eICQ"] . "', `jabber`='" . $_POST["ejabber"] . "', " .
"`Hometown`='" . $_POST["Hometown"] . "', `Size`='" . $_POST["Sizeid"] . "' " .
"WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1;";
} else {
$chsql = "UPDATE `User` SET " .
"`Nick`='" . $_POST["eNick"] . "', `Name`='" . $_POST["eName"] . "', " .
"`Vorname`='" . $_POST["eVorname"] . "', `Alter`='" . $_POST["eAlter"] . "', " .
"`Telefon`='" . $_POST["eTelefon"] . "', `Handy`='" . $_POST["eHandy"] . "', " .
"`DECT`='" . $_POST["eDECT"] . "', `email`='" . $_POST["eemail"] . "', " .
"`ICQ`='" . $_POST["eICQ"] . "', `jabber`='" . $_POST["ejabber"] . "', " .
"`Hometown`='" . $_POST["Hometown"] . "' " .
"WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1;";
}
$Erg = mysql_query($chsql, $con);
if ($Erg == 1) {
$_SESSION['Nick'] = $_POST["eNick"];
$_SESSION['Name'] = $_POST["eName"];
$_SESSION['Vorname'] = $_POST["eVorname"];
$_SESSION['Alter'] = $_POST["eAlter"];
$_SESSION['Telefon'] = $_POST["eTelefon"];
$_SESSION['Handy'] = $_POST["eHandy"];
$_SESSION['DECT'] = $_POST["eDECT"];
$_SESSION['email'] = $_POST["eemail"];
$_SESSION['ICQ'] = $_POST["eICQ"];
$_SESSION['jabber'] = $_POST["ejabber"];
$_SESSION['Hometown'] = $_POST["Hometown"];
if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") {
$_SESSION['Size'] = $_POST["Sizeid"];
} else
if ($_SESSION['Size'] != $_POST["Sizeid"]) {
array_push($error_messages, "einstellungen.php, change t-shirt size not allowed\n");
}
Print_Text("pub_einstellungen_UserDateSaved");
} else {
Print_Text(29);
echo mysql_error($con);
}
break;
case 'sendPicture' :
if ($_FILES["file"]["size"] > 0) {
if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) {
$data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"])));
if (GetPicturShow($_SESSION['UID']) == "")
$SQL = "INSERT INTO `UserPicture` " .
"( `UID`,`Bild`, `ContentType`, `show`) " .
"VALUES ('" . $_SESSION['UID'] . "', '$data', '" . $_FILES["file"]["type"] . "', 'N')";
else
$SQL = "UPDATE `UserPicture` SET " .
"`Bild`='$data', " .
"`ContentType`='" . $_FILES["file"]["type"] . "', " .
"`show`='N' " .
"WHERE `UID`='" . $_SESSION['UID'] . "'";
$res = mysql_query($SQL, $con);
if ($res)
Print_Text("pub_einstellungen_send_OK");
else
Print_Text("pub_einstellungen_send_KO");
echo "<h6>('" . $_FILES["file"]["name"] . "', MIME-Type: " . $_FILES["file"]["type"] . ", " . $_FILES["file"]["size"] . " Byte)</h6>";
} else
Print_Text("pub_einstellungen_send_KO");
} else
Print_Text("pub_einstellungen_send_KO");
break;
case 'delPicture' :
$chsql = "DELETE FROM `UserPicture` WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1";
$Erg = mysql_query($chsql, $con);
if ($Erg == 1)
Print_Text("pub_einstellungen_del_OK");
else
Print_Text("pub_einstellungen_del_KO");
Break;
}
} }
} include ("includes/footer.php");
include ("../../../camp2011/includes/footer.php");
?> ?>

View File

@ -1,27 +1,29 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "Engelbesprechung";
include "../../../camp2011/includes/header.php";
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC"; $title = "Himmel";
$Erg = mysql_query($SQL, $con); $header = "Engelbesprechung";
include "includes/header.php";
// anzahl zeilen $SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
$Zeilen = mysql_num_rows($Erg); $Erg = mysql_query($SQL, $con);
for ($n = 0 ; $n < $Zeilen ; $n++) { // anzahl zeilen
if (mysql_result($Erg, $n, "Treffen") == "1") { $Zeilen = mysql_num_rows($Erg);
echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
// Show Admin Page for ($n = 0; $n < $Zeilen; $n++) {
if($_SESSION['CVS']["admin/news.php"] == "Y") if (mysql_result($Erg, $n, "Treffen") == "1") {
echo " <a href=\"./../admin/news.php?action=change&date=". mysql_result($Erg, $n, "Datum"). "\">[edit]</a>"; echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
echo "<br />&nbsp; &nbsp;<font size=1>".mysql_result($Erg, $n, "Datum").", "; // Show Admin Page
echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font></p>\n"; if ($_SESSION['CVS']["admin/news.php"] == "Y")
echo "<p class='answetion'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n"; echo " <a href=\"./../admin/news.php?action=change&date=" . mysql_result($Erg, $n, "Datum") . "\">[edit]</a>";
}
}
include ("../../../camp2011/includes/footer.php"); echo "<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 ("includes/footer.php");
?> ?>

View File

@ -1,11 +1,13 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "FAQ / Fragen an die Erzengel";
include "../../../camp2011/includes/header.php";
// Erstaufruf, oder Frage bereits abgeschickt? $title = "Himmel";
if(!isset($_POST["eUID"])) { $header = "FAQ / Fragen an die Erzengel";
Print_Text(35); include "includes/header.php";
// Erstaufruf, oder Frage bereits abgeschickt?
if (!isset ($_POST["eUID"])) {
Print_Text(35);
?> ?>
<br /><br /> <br /><br />
<form action="./faq.php" method="POST"> <form action="./faq.php" method="POST">
@ -14,56 +16,58 @@
<input type="submit" value="<?php Print_Text("save"); ?>"> <input type="submit" value="<?php Print_Text("save"); ?>">
</form> </form>
<?php <?php
} else { } else {
// Auswertung d. Formular-Daten: // Auswertung d. Formular-Daten:
echo "<b>".Get_Text(37)."</b><br /><br />\n".nl2br($_POST["frage"])."<br /><br />\n".Get_Text(38)."<br />\n"; echo "<b>" . Get_Text(37) . "</b><br /><br />\n" . nl2br($_POST["frage"]) . "<br /><br />\n" . Get_Text(38) . "<br />\n";
$SQL = "INSERT INTO `Questions` VALUES ('', '".$_SESSION['UID']."', '". $_POST["frage"]. "', '', '')"; $SQL = "INSERT INTO `Questions` VALUES ('', '" . $_SESSION['UID'] . "', '" . $_POST["frage"] . "', '', '')";
$Erg = mysql_query($SQL, $con); $Erg = mysql_query($SQL, $con);
} }
// Bisherige Anfragen: // Bisherige Anfragen:
echo "<br />\n<b>".Get_Text(39)."</b><br />\n"; echo "<br />\n<b>" . Get_Text(39) . "</b><br />\n";
echo "<hr width=\"99%\">\n"; echo "<hr width=\"99%\">\n";
echo "<br /><b>".Get_Text(40)."</b><br />\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"; $SQL = "SELECT * FROM `Questions` WHERE `UID` = " . $_SESSION['UID'] . " AND `AID`='0' ORDER BY 'QID' DESC";
$Erg = mysql_query($SQL, $con); $Erg = mysql_query($SQL, $con);
// anzahl zeilen // anzahl zeilen
$Zeilen = mysql_num_rows($Erg); $Zeilen = mysql_num_rows($Erg);
if ($Zeilen==0){ if ($Zeilen == 0) {
Print_Text(41); Print_Text(41);
} else { } else {
for ($n = 0 ; $n < $Zeilen ; $n++) { for ($n = 0; $n < $Zeilen; $n++) {
echo "<p class='question'>".nl2br(mysql_result($Erg, $n, "Question"))."<br />\n"; echo "<p class='question'>" . nl2br(mysql_result($Erg, $n, "Question")) . "<br />\n";
// Es gibt ja noch keine Antwort: // Es gibt ja noch keine Antwort:
// echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer"))."</p>\n"; // echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer"))."</p>\n";
echo "\n<br />---<br />"; echo "\n<br />---<br />";
} }
} }
echo "<hr width=\"99%\">\n"; echo "<hr width=\"99%\">\n";
echo "<br /><b>".Get_Text(42)."</b><br />\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"; $SQL = "SELECT * FROM `Questions` WHERE `UID`='" . $_SESSION['UID'] . "' and `AID`<>'0' ORDER BY 'QID' DESC";
$Erg = mysql_query($SQL, $con); $Erg = mysql_query($SQL, $con);
// anzahl zeilen // anzahl zeilen
$Zeilen = mysql_num_rows($Erg); $Zeilen = mysql_num_rows($Erg);
if ($Zeilen==0){ if ($Zeilen == 0) {
Print_Text(41); Print_Text(41);
} else { } else {
for ($n = 0 ; $n < $Zeilen ; $n++) { for ($n = 0; $n < $Zeilen; $n++) {
echo "<p class='question'>".nl2br(mysql_result($Erg, $n, "Question"))."<br />\n"; echo "<p class='question'>" . nl2br(mysql_result($Erg, $n, "Question")) . "<br />\n";
echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer")). echo "<p class='answer'>" . nl2br(mysql_result($Erg, $n, "Answer")) .
"@". UID2Nick(mysql_result($Erg, $n, "AID"))."\n"; "@" . UID2Nick(mysql_result($Erg, $n, "AID")) . "\n";
echo "\n<br />---<br />"; echo "\n<br />---<br />";
} }
} }
include ("../../../camp2011/includes/footer.php"); include ("includes/footer.php");
?> ?>

View File

@ -1,122 +1,124 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "";
include "../../../camp2011/includes/header.php"; $title = "Himmel";
$header = "";
if(!isset($_GET["action"])) include "includes/header.php";
$_GET["action"] = "start";
switch( $_GET["action"]) { if (!isset ($_GET["action"]))
case "start": $_GET["action"] = "start";
echo Get_Text("Hello"). $_SESSION['Nick']. ", <br />\n";
echo Get_Text("pub_messages_text1"). "<br /><br />\n";
//show exist Messages switch ($_GET["action"]) {
$SQL = "SELECT * FROM `Messages` WHERE `SUID`='" . $_SESSION["UID"] . "' OR `RUID`='" . $_SESSION["UID"] . "'"; case "start" :
$erg = mysql_query($SQL, $con); echo Get_Text("Hello") . $_SESSION['Nick'] . ", <br />\n";
echo Get_Text("pub_messages_text1") . "<br /><br />\n";
echo "<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; //show exist Messages
echo "<tr>\n"; $SQL = "SELECT * FROM `Messages` WHERE `SUID`='" . $_SESSION["UID"] . "' OR `RUID`='" . $_SESSION["UID"] . "'";
echo "<td class=\"contenttopic\"><b>". Get_Text("pub_messages_Datum"). "</b></td>\n"; $erg = mysql_query($SQL, $con);
echo "<td class=\"contenttopic\"><b>". Get_Text("pub_messages_Von"). "</b></td>\n";
echo "<td class=\"contenttopic\"><b>". Get_Text("pub_messages_An"). "</b></td>\n";
echo "<td class=\"contenttopic\"><b>". Get_Text("pub_messages_Text"). "</b></td>\n";
echo "<td class=\"contenttopic\"></td>\n";
echo "</tr>\n";
for($i = 0; $i < mysql_num_rows($erg); $i++) { echo "<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
echo "<tr class=\"content\">\n"; echo "<tr>\n";
echo "<td>" . mysql_result($erg, $i, "Datum") . "</td>\n"; echo "<td class=\"contenttopic\"><b>" . Get_Text("pub_messages_Datum") . "</b></td>\n";
echo "<td>" . UID2Nick(mysql_result($erg, $i, "SUID")) . "</td>\n"; echo "<td class=\"contenttopic\"><b>" . Get_Text("pub_messages_Von") . "</b></td>\n";
echo "<td>" . UID2Nick(mysql_result($erg, $i, "RUID")) . "</td>\n"; echo "<td class=\"contenttopic\"><b>" . Get_Text("pub_messages_An") . "</b></td>\n";
echo "<td>" . mysql_result($erg, $i, "Text") . "</td>\n"; echo "<td class=\"contenttopic\"><b>" . Get_Text("pub_messages_Text") . "</b></td>\n";
echo "<td>"; echo "<td class=\"contenttopic\"></td>\n";
echo "</tr>\n";
if(mysql_result($erg, $i, "RUID") == $_SESSION["UID"]) { for ($i = 0; $i < mysql_num_rows($erg); $i++) {
echo "<a href=\"?action=DelMsg&Datum=" . mysql_result($erg, $i, "Datum") . "\">" . Get_Text("pub_messages_DelMsg") . "</a>"; echo "<tr class=\"content\">\n";
echo "<td>" . mysql_result($erg, $i, "Datum") . "</td>\n";
echo "<td>" . UID2Nick(mysql_result($erg, $i, "SUID")) . "</td>\n";
echo "<td>" . UID2Nick(mysql_result($erg, $i, "RUID")) . "</td>\n";
echo "<td>" . mysql_result($erg, $i, "Text") . "</td>\n";
echo "<td>";
if(mysql_result($erg, $i, "isRead") == "N") if (mysql_result($erg, $i, "RUID") == $_SESSION["UID"]) {
echo "<a href=\"?action=MarkRead&Datum=" . mysql_result($erg, $i, "Datum") . "\">" . Get_Text("pub_messages_MarkRead") . "</a>"; echo "<a href=\"?action=DelMsg&Datum=" . mysql_result($erg, $i, "Datum") . "\">" . Get_Text("pub_messages_DelMsg") . "</a>";
} else {
if(mysql_result($erg, $i, "isRead") == "N")
echo Get_Text("pub_messages_NotRead");
}
echo "</td>\n"; if (mysql_result($erg, $i, "isRead") == "N")
echo "</tr>\n"; echo "<a href=\"?action=MarkRead&Datum=" . mysql_result($erg, $i, "Datum") . "\">" . Get_Text("pub_messages_MarkRead") . "</a>";
} } else {
if (mysql_result($erg, $i, "isRead") == "N")
echo Get_Text("pub_messages_NotRead");
}
// send Messeges echo "</td>\n";
echo "<form action=\"" . $_SERVER['SCRIPT_NAME'] . "?action=SendMsg\" method=\"POST\">"; echo "</tr>\n";
echo "<tr class=\"content\">\n"; }
echo "<td></td>\n";
echo "<td></td>\n";
// Listet alle Nicks auf // send Messeges
echo "<td><select name=\"RUID\">\n"; echo "<form action=\"" . $_SERVER['SCRIPT_NAME'] . "?action=SendMsg\" method=\"POST\">";
echo "<tr class=\"content\">\n";
echo "<td></td>\n";
echo "<td></td>\n";
$usql="SELECT * FROM `User` WHERE (`UID`!='". $_SESSION["UID"] ."') ORDER BY `Nick`"; // Listet alle Nicks auf
$uErg = mysql_query($usql, $con); echo "<td><select name=\"RUID\">\n";
$urowcount = mysql_num_rows($uErg);
for ($k = 0; $k < $urowcount; $k++) { $usql = "SELECT * FROM `User` WHERE (`UID`!='" . $_SESSION["UID"] . "') ORDER BY `Nick`";
echo "<option value=\"" . mysql_result($uErg, $k, "UID") . "\">" . mysql_result($uErg, $k, "Nick") . "</option>\n"; $uErg = mysql_query($usql, $con);
} $urowcount = mysql_num_rows($uErg);
echo "</select></td>\n"; for ($k = 0; $k < $urowcount; $k++) {
echo "<td><textarea name=\"Text\" cols=\"30\" rows=\"10\"></textarea></td>\n"; echo "<option value=\"" . mysql_result($uErg, $k, "UID") . "\">" . mysql_result($uErg, $k, "Nick") . "</option>\n";
echo "<td><input type=\"submit\" value=\"" . Get_Text("save") . "\"></td>\n"; }
echo "</tr>\n";
echo "</form>";
echo "</table>\n"; echo "</select></td>\n";
break; echo "<td><textarea name=\"Text\" cols=\"30\" rows=\"10\"></textarea></td>\n";
echo "<td><input type=\"submit\" value=\"" . Get_Text("save") . "\"></td>\n";
echo "</tr>\n";
echo "</form>";
case "SendMsg": echo "</table>\n";
echo Get_Text("pub_messages_Send1") . "...<br />\n"; break;
$SQL = "INSERT INTO `Messages` ( `Datum` , `SUID` , `RUID` , `Text` ) VALUES (". case "SendMsg" :
"'" . gmdate("Y-m-j H:i:s", time()) . "', ". echo Get_Text("pub_messages_Send1") . "...<br />\n";
"'" . $_SESSION["UID"]. "', ".
"'" . $_POST["RUID"]."', ".
"'" . $_POST["Text"]. "');";
$Erg = mysql_query($SQL, $con); $SQL = "INSERT INTO `Messages` ( `Datum` , `SUID` , `RUID` , `Text` ) VALUES (" .
"'" . gmdate("Y-m-j H:i:s", time()) . "', " .
"'" . $_SESSION["UID"] . "', " .
"'" . $_POST["RUID"] . "', " .
"'" . $_POST["Text"] . "');";
if($Erg == 1) $Erg = mysql_query($SQL, $con);
echo Get_Text("pub_messages_Send_OK") . "\n";
else
echo Get_Text("pub_messages_Send_Error") . "...\n(". mysql_error($con). ")";
break;
case "MarkRead": if ($Erg == 1)
$SQL = "UPDATE `Messages` SET `isRead` = 'Y' ". echo Get_Text("pub_messages_Send_OK") . "\n";
"WHERE `Datum` = '". $_GET["Datum"]. "' AND `RUID`='". $_SESSION["UID"]. "' ". else
"LIMIT 1 ;"; echo Get_Text("pub_messages_Send_Error") . "...\n(" . mysql_error($con) . ")";
$Erg = mysql_query($SQL, $con); break;
if ($Erg == 1) case "MarkRead" :
echo Get_Text("pub_messages_MarkRead_OK"). "\n"; $SQL = "UPDATE `Messages` SET `isRead` = 'Y' " .
else "WHERE `Datum` = '" . $_GET["Datum"] . "' AND `RUID`='" . $_SESSION["UID"] . "' " .
echo Get_Text("pub_messages_MarkRead_KO"). "...\n(". mysql_error($con). ")"; "LIMIT 1 ;";
break; $Erg = mysql_query($SQL, $con);
case "DelMsg": if ($Erg == 1)
$SQL = "DELETE FROM `Messages` ". echo Get_Text("pub_messages_MarkRead_OK") . "\n";
"WHERE `Datum` = '". $_GET["Datum"]. "' AND `RUID` ='". $_SESSION["UID"]. "' ". else
"LIMIT 1;"; echo Get_Text("pub_messages_MarkRead_KO") . "...\n(" . mysql_error($con) . ")";
$Erg = mysql_query($SQL, $con); break;
if ($Erg == 1) case "DelMsg" :
echo Get_Text("pub_messages_DelMsg_OK"). "\n"; $SQL = "DELETE FROM `Messages` " .
else "WHERE `Datum` = '" . $_GET["Datum"] . "' AND `RUID` ='" . $_SESSION["UID"] . "' " .
echo Get_Text("pub_messages_DelMsg_KO"). "...\n(". mysql_error($con). ")"; "LIMIT 1;";
break; $Erg = mysql_query($SQL, $con);
default: if ($Erg == 1)
echo Get_Text("pub_messages_NoCommand"); echo Get_Text("pub_messages_DelMsg_OK") . "\n";
} else
echo Get_Text("pub_messages_DelMsg_KO") . "...\n(" . mysql_error($con) . ")";
break;
include "../../../camp2011/includes/footer.php"; default :
echo Get_Text("pub_messages_NoCommand");
}
include "includes/footer.php";
?> ?>

View File

@ -1,58 +1,61 @@
<?php <?php
$title = "Himmel";
$header = "Mein Schichtplan";
include ("../../../camp2011/includes/header.php"); // Eigener Schichtplan
include ("../../../camp2011/includes/funktionen.php"); require_once ('../bootstrap.php');
include ("../../../camp2011/includes/funktion_schichtplan.php");
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
if(!isset($_GET["action"])) { $title = "Himmel";
echo Get_Text("Hello").$_SESSION['Nick'].", <br />\n"; $header = "Mein Schichtplan";
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";
$USER_ID = $_SESSION['UID']; include ("includes/header.php");
include ("includes/funktionen.php");
include ("includes/funktion_schichtplan.php");
include ("includes/funktion_schichtplan_aray.php");
if( $_SESSION['CVS'][ "admin/schichtplan.php" ] == "Y" ) { if (!isset ($_GET["action"])) {
if( !isset( $_GET["UIDs"]) ) echo Get_Text("Hello") . $_SESSION['Nick'] . ", <br />\n";
$_GET["UIDs"] = $_SESSION['UID']; echo Get_Text("pub_mywake_beschreibung1") . "<br />\n";
else echo Get_Text("pub_mywake_beschreibung2") . "<br /><br />\n";
$USER_ID = $_GET["UIDs"]; echo Get_Text("pub_mywake_beschreibung3") . ($LETZTES_AUSTRAGEN) .
Get_Text("pub_mywake_beschreibung4") . "<br /><br />\n";
echo "<form action=\"".$_SERVER['SCRIPT_NAME']."\" method=\"GET\" >"; $USER_ID = $_SESSION['UID'];
echo "Liste von <select name=\"UIDs\">\n"; if ($_SESSION['CVS']["admin/schichtplan.php"] == "Y") {
if (!isset ($_GET["UIDs"]))
$_GET["UIDs"] = $_SESSION['UID'];
else
$USER_ID = $_GET["UIDs"];
$usql="SELECT * FROM `User` ORDER BY `Nick`"; echo "<form action=\"" . $_SERVER['SCRIPT_NAME'] . "\" method=\"GET\" >";
$uErg = mysql_query($usql, $con);
$urowcount = mysql_num_rows($uErg);
for ($k=0; $k<$urowcount; $k++) { echo "Liste von <select name=\"UIDs\">\n";
echo "<option value=\"".mysql_result($uErg, $k, "UID")."\" ".
( ($_GET["UIDs"]==mysql_result($uErg, $k, "UID")) ? " selected":""). ">".
mysql_result($uErg, $k, "Nick").
"</option>\n";
}
echo "</select> anzeigen.\n"; $usql = "SELECT * FROM `User` ORDER BY `Nick`";
echo mysql_error($con); $uErg = mysql_query($usql, $con);
$urowcount = mysql_num_rows($uErg);
echo "<input type=\"submit\" value=\"zeigen\">\n"; for ($k = 0; $k < $urowcount; $k++) {
echo "<option value=\"" . mysql_result($uErg, $k, "UID") . "\" " .
(($_GET["UIDs"] == mysql_result($uErg, $k, "UID")) ? " selected" : "") . ">" .
mysql_result($uErg, $k, "Nick") .
"</option>\n";
}
echo "</form>"; echo "</select> anzeigen.\n";
} echo mysql_error($con);
$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` ". echo "<input type=\"submit\" value=\"zeigen\">\n";
"INNER JOIN `ShiftEntry` ".
"ON `Shifts`.`SID`=`ShiftEntry`.`SID` ".
"WHERE `ShiftEntry`.`UID`='$USER_ID' ".
"ORDER BY `DateS`";
$erg = mysql_query($SQL, $con);
?> echo "</form>";
}
$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` " .
"INNER JOIN `ShiftEntry` " .
"ON `Shifts`.`SID`=`ShiftEntry`.`SID` " .
"WHERE `ShiftEntry`.`UID`='$USER_ID' " .
"ORDER BY `DateS`";
$erg = mysql_query($SQL, $con);
?>
<table border="0" class="border" cellpadding="2" cellspacing="1"> <table border="0" class="border" cellpadding="2" cellspacing="1">
<tr> <tr>
<td class="contenttopic"><b><?php echo Get_Text("pub_mywake_Datum");?></b></td> <td class="contenttopic"><b><?php echo Get_Text("pub_mywake_Datum");?></b></td>
@ -65,119 +68,111 @@
</tr> </tr>
<?php <?php
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"; for ($i = 0; $i < mysql_num_rows($erg); $i++) {
echo "<td>". substr(mysql_result( $erg, $i, "DateS" ), 11). "</td>\n"; echo "<tr class=\"content\">";
echo "<td>". mysql_result( $erg, $i, "Len" ). " h</td>\n";
echo "<td>". mysql_result( $erg, $i, "Man" ). "</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 echo "<td>" . substr(mysql_result($erg, $i, "DateS"), 0, 10) . "</td>\n";
//// selber noch austragen zu koennen... echo "<td>" . substr(mysql_result($erg, $i, "DateS"), 11) . "</td>\n";
$schichtdate = mysql_result( $erg, $i, "DateS" ); echo "<td>" . mysql_result($erg, $i, "Len") . " h</td>\n";
ereg( "^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $schichtdate, $res ); echo "<td>" . mysql_result($erg, $i, "Man") . "</td>\n";
$info["year"] = $res[1]; echo "<td>" . $RoomID[mysql_result($erg, $i, "RID")] . "<br />\n" .
$info["month"] = $res[2]; "(" . TID2Type(mysql_result($erg, $i, "TID")) . Get_Text("inc_schicht_engel") . ")" .
$info["day"] = $res[3]; "</td>\n";
$info["hour"] = $res[4]; echo "<td><pre style=\"font-family:Fixedsys,Courier; padding:12x;\">\n" .
$info["min"] = $res[5]; mysql_result($erg, $i, "Comment") .
$info["sec"] = $res[6]; "\n</pre>\n";
$schichtdatum = (mktime($info["hour"],$info["min"],$info["sec"],$info["month"],$info["day"],$info["year"])); echo "<br /><a href=\"./myschichtplan.php?action=edit&SID=\n" .
$lastAustragen = $LETZTES_AUSTRAGEN*3600; mysql_result($erg, $i, "SID") . "\"># vi #</a></td>\n";
$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"; // bis $LETZTES_AUSTRAGEN (aus dem config-file) soll es moeglich sein, seine Schichten
} //// selber noch austragen zu koennen...
echo "</table>\n\n"; $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";
if( $_SESSION['CVS'][ "nonpublic/myschichtplan_ical.php" ] == "Y" ) echo "</tr>\n";
{ }
echo "<br /><a href=\"./myschichtplan_ical.php\">". Get_Text("pub_myschichtplan_ical"). "</a>\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 {
If ($_GET["action"] == "austragen") {
echo Get_Text("pub_mywake_delate1") . "<br />\n";
$sql = "SELECT * FROM `Shifts` WHERE (`SID` = '" . $_GET["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` = '" . $_GET["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 ($_GET["action"] == "edit") {
echo Get_Text("pub_myshift_Edit_Text1") . "\n";
$sql = "SELECT * FROM `ShiftEntry` WHERE ";
$sql .= "(`SID`='" . $_GET["SID"] . "' AND `UID`='" . $_SESSION['UID'] . "')";
$Erg = mysql_query($sql, $con);
echo "<form action=\"./myschichtplan.php\" method=\"GET\">\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=\"" . $_GET["SID"] . "\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"editSave\">\n";
echo "</form>";
}
elseif ($_GET["action"] == "editSave") {
echo Get_Text("pub_myshift_EditSave_Text1") . "<br />\n";
$sql = "UPDATE `ShiftEntry` " .
"SET `Comment` = '" . $_GET["newtext"] . "' " .
"WHERE `SID`='" . $_GET["SID"] . "' AND `UID`='" . $_SESSION['UID'] . "' LIMIT 1;";
$Erg = mysql_query($sql, $con);
if ($Erg == 1)
echo " ..." . Get_Text("pub_myshift_EditSave_OK") . "\n";
else
echo " ..." . Get_Text("pub_myshift_EditSave_KO") . "\n";
SetHeaderGo2Back();
}
} }
include ("includes/footer.php");
}
else
{
If( $_GET["action"] == "austragen" )
{
echo Get_Text("pub_mywake_delate1")."<br />\n";
$sql = "SELECT * FROM `Shifts` WHERE (`SID` = '". $_GET["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` = '". $_GET["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( $_GET["action"] == "edit" )
{
echo Get_Text("pub_myshift_Edit_Text1"). "\n";
$sql = "SELECT * FROM `ShiftEntry` WHERE ";
$sql.= "(`SID`='". $_GET["SID"]. "' AND `UID`='". $_SESSION['UID']. "')";
$Erg = mysql_query($sql, $con);
echo "<form action=\"./myschichtplan.php\" method=\"GET\">\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=\"". $_GET["SID"]. "\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"editSave\">\n";
echo "</form>";
}
elseif( $_GET["action"] == "editSave" )
{
echo Get_Text("pub_myshift_EditSave_Text1"). "<br />\n";
$sql = "UPDATE `ShiftEntry` ".
"SET `Comment` = '". $_GET["newtext"]. "' ".
"WHERE `SID`='". $_GET["SID"]. "' AND `UID`='". $_SESSION['UID']. "' LIMIT 1;";
$Erg = mysql_query($sql, $con);
if ($Erg == 1)
echo " ...". Get_Text("pub_myshift_EditSave_OK"). "\n";
else
echo " ...". Get_Text("pub_myshift_EditSave_KO"). "\n";
SetHeaderGo2Back();
}
}
include ("../../../camp2011/includes/footer.php");
?> ?>

View File

@ -1,52 +1,51 @@
<?php <?php
include ("../../../camp2011/includes/header_start.php"); require_once ('../bootstrap.php');
include ("../../../camp2011/includes/funktion_schichtplan_aray.php"); include ("includes/header_start.php");
$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` ". include ("includes/funktion_schichtplan_aray.php");
"INNER JOIN `ShiftEntry` ".
"ON `Shifts`.`SID`=`ShiftEntry`.`SID` ". $SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` " .
"WHERE `ShiftEntry`.`UID`='". $_SESSION['UID']. "' ". "INNER JOIN `ShiftEntry` " .
"ORDER BY `DateS`"; "ON `Shifts`.`SID`=`ShiftEntry`.`SID` " .
"WHERE `ShiftEntry`.`UID`='" . $_SESSION['UID'] . "' " .
"ORDER BY `DateS`";
$erg = mysql_query($SQL, $con); $erg = mysql_query($SQL, $con);
//HEADER //HEADER
header("Content-Type: text/x-vCalendar"); header("Content-Type: text/x-vCalendar");
header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"" ); header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"");
//DATA //DATA
echo "BEGIN:VCALENDAR\n"; echo "BEGIN:VCALENDAR\n";
echo "PRODID:-//Engelsystem//DE-EN\n"; echo "PRODID:-//Engelsystem//DE-EN\n";
echo "VERSION:2.0\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 "METHOD:PUBLISH\n";
echo "CALSCALE:GREGORIAN\n"; echo "CALSCALE:GREGORIAN\n";
echo "METHOD:PUBLISH\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 "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 "METHOD:PUBLISH\n"; echo "DTSTART;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateS"))) . "\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 "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 "SUMMARY:". str_replace( ',', '\\,',mysql_result( $erg, $i, "Man" ) ). "\n"; echo "CLASS:PUBLIC\n";
echo "CLASS:PUBLIC\n"; echo "STATUS:CONFIRMED\n";
echo "STATUS:CONFIRMED\n"; echo "URL:" . $url . $ENGEL_ROOT . "nonpublic/myschichtplan.php\n";
echo "URL:". $url. $ENGEL_ROOT. "nonpublic/myschichtplan.php\n"; echo "LOCATION:" . $RoomID[mysql_result($erg, $i, "RID")] . "\n";
echo "LOCATION:". $RoomID[mysql_result( $erg, $i, "RID" )]. "\n"; echo "BEGIN:VALARM\n";
echo "BEGIN:VALARM\n"; echo "TRIGGER;VALUE=DURATION:-PT5M\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 "ACTION:DISPLAY\n"; echo "END:VALARM\n";
echo "END:VALARM\n"; echo "END:VEVENT\n";
echo "END:VEVENT\n";
} }
echo "END:VCALENDAR\n"; echo "END:VCALENDAR\n";
include( "../../../camp2011/includes/funktion_counter.php"); include ("includes/funktion_counter.php");
?> ?>

View File

@ -1,26 +1,28 @@
<?php <?php
require_once ('../bootstrap.php');
$title = "Kommentare zu den News"; $title = "Kommentare zu den News";
$header = "Kommentar"; $header = "Kommentar";
include ("../../../camp2011/includes/header.php"); include ("includes/header.php");
if(isset($_GET["nid"])) { if (isset ($_GET["nid"])) {
if(isset( $_GET["text"])) { if (isset ($_GET["text"])) {
$ch_sql = "INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) ". $ch_sql = "INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) " .
"VALUES ('". $_GET["nid"]. "', '". date("Y-m-d H:i:s"). "', '". $_GET["text"]. "', '". $_SESSION["UID"]. "')"; "VALUES ('" . $_GET["nid"] . "', '" . date("Y-m-d H:i:s") . "', '" . $_GET["text"] . "', '" . $_SESSION["UID"] . "')";
$Erg = mysql_query($ch_sql, $con); $Erg = mysql_query($ch_sql, $con);
if ($Erg == 1) { if ($Erg == 1) {
echo "Eintrag wurde gespeichert<br /><br />"; echo "Eintrag wurde gespeichert<br /><br />";
SetHeaderGo2Back(); SetHeaderGo2Back();
} }
} }
$SQL = "SELECT * FROM `news_comments` WHERE `Refid`='". $_GET["nid"]. "' ORDER BY 'ID'"; $SQL = "SELECT * FROM `news_comments` WHERE `Refid`='" . $_GET["nid"] . "' ORDER BY 'ID'";
$Erg = mysql_query($SQL, $con); $Erg = mysql_query($SQL, $con);
echo mysql_error( $con); echo mysql_error($con);
// anzahl zeilen // anzahl zeilen
$news_rows = mysql_num_rows($Erg); $news_rows = mysql_num_rows($Erg);
?> ?>
<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1"> <table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
@ -33,26 +35,27 @@ if(isset($_GET["nid"])) {
</tr> </tr>
<?php <?php
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>";
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 /> <br />
@ -75,11 +78,9 @@ echo "</table>";
<?php <?php
} } else {
else echo "Fehlerhafter Aufruf!";
{
echo "Fehlerhafter Aufruf!";
} }
include ("../../../camp2011/includes/footer.php"); include ("includes/footer.php");
?> ?>

View File

@ -1,21 +1,20 @@
<h4>&nbsp;Tage </h4> <h4>&nbsp;Tage </h4>
<?PHP <?PHP
include ("../../../camp2011/includes/funktion_schichtplan_aray.php"); require_once ('../bootstrap.php');
function Printlink( $Datum) include ("includes/funktion_schichtplan_aray.php");
{
GLOBAL $raum; function Printlink($Datum) {
echo "\t<li><a href='./schichtplan.php?ausdatum=$Datum"; GLOBAL $raum;
// ist ein raum gesetzt? echo "\t<li><a href='./schichtplan.php?ausdatum=$Datum";
if (IsSet($raum)) // ist ein raum gesetzt?
echo "&raum=$raum"; if (IsSet ($raum))
echo "'>$Datum</a></li>\n"; echo "&raum=$raum";
echo "'>$Datum</a></li>\n";
} //function Printlink( } //function Printlink(
if( isset ($VeranstaltungsTage)) if (isset ($VeranstaltungsTage))
foreach( $VeranstaltungsTage as $k => $v) foreach ($VeranstaltungsTage as $k => $v)
Printlink( $v); Printlink($v);
?> ?>

View File

@ -1,22 +1,22 @@
<h4>&nbsp;Raum&uuml;bersicht</h4> <h4>&nbsp;Raum&uuml;bersicht</h4>
<?php <?php
require_once ('../bootstrap.php');
include ("../../../camp2011/includes/funktion_schichtplan_aray.php"); include ("includes/funktion_schichtplan_aray.php");
if( isset ($Room)) if (isset ($Room))
foreach( $Room as $RoomEntry ) foreach ($Room as $RoomEntry) {
{ if (isset ($ausdatum))
if(isset($ausdatum)) echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=" . $RoomEntry["RID"] . "'>" .
echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>". $RoomEntry["Name"] . "</a></li>\n";
$RoomEntry["Name"]. "</a></li>\n"; else
else echo "\t<li><a href='./schichtplan.php?raum=" . $RoomEntry["RID"] . "'>" .
echo "\t<li><a href='./schichtplan.php?raum=". $RoomEntry["RID"]. "'>". $RoomEntry["Name"] . "</a></li>\n";
$RoomEntry["Name"]. "</a></li>\n"; }
}
echo "<br />"; echo "<br />";
if(isset($ausdatum)) if (isset ($ausdatum))
echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>"; echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>";
else else
echo "<li><a href='./schichtplan.php?raum=-1'>alle</a></li>"; echo "<li><a href='./schichtplan.php?raum=-1'>alle</a></li>";
?> ?>

View File

@ -1,200 +1,178 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "Schichtpl&auml;ne";
$submenus = 2;
if(isset($_GET["ausdatum"])) $title = "Himmel";
$ausdatum = $_GET["ausdatum"]; $header = "Schichtpl&auml;ne";
if(isset($_GET["raum"])) { $submenus = 2;
$raum = $_GET["raum"];
if($raum==-1 && isset($_GET["show"])) { if (isset ($_GET["ausdatum"]))
$raum = ""; $ausdatum = $_GET["ausdatum"];
foreach ($_GET as $k => $v) { if (isset ($_GET["raum"])) {
if(substr($k, 0, 5) == "raum_") { $raum = $_GET["raum"];
$raum = $raum. ";". $v;
}
}
}
}
include ("../../../camp2011/includes/header.php"); if ($raum == -1 && isset ($_GET["show"])) {
include ("../../../camp2011/includes/funktionen.php"); $raum = "";
include ("../../../camp2011/includes/funktion_schichtplan.php"); foreach ($_GET as $k => $v) {
include ("../../../camp2011/includes/funktion_schichtplan_aray.php"); if (substr($k, 0, 5) == "raum_") {
$raum = $raum . ";" . $v;
}
}
}
}
echo Get_Text("Hello").$_SESSION['Nick'].",<br />". include ("includes/header.php");
Get_Text("pub_schicht_beschreibung"). "<br /><br />"; include ("includes/funktionen.php");
include ("includes/funktion_schichtplan.php");
include ("includes/funktion_schichtplan_aray.php");
function ShowSwitchDay() { echo Get_Text("Hello") . $_SESSION['Nick'] . ",<br />" .
global $VeranstaltungsTage, $VeranstaltungsTageMax, $ausdatum, $raum; Get_Text("pub_schicht_beschreibung") . "<br /><br />";
echo "\n\n<table border=\"0\" width=\"100%\"><tr>\n"; function ShowSwitchDay() {
global $VeranstaltungsTage, $VeranstaltungsTageMax, $ausdatum, $raum;
if( isset($VeranstaltungsTage)) echo "\n\n<table border=\"0\" width=\"100%\"><tr>\n";
foreach( $VeranstaltungsTage as $k => $v)
if( $ausdatum == $v) if (isset ($VeranstaltungsTage))
{ foreach ($VeranstaltungsTage as $k => $v)
if( $k > 0) if ($ausdatum == $v) {
echo "\t\t\t<td align=\"left\">". if ($k > 0)
"<a href='./schichtplan.php?ausdatum=". $VeranstaltungsTage[$k-1]. echo "\t\t\t<td align=\"left\">" .
"&raum=$raum'>". $VeranstaltungsTage[$k-1]. "</a></td>\n"; "<a href='./schichtplan.php?ausdatum=" . $VeranstaltungsTage[$k -1] .
if( $k < $VeranstaltungsTageMax) "&raum=$raum'>" . $VeranstaltungsTage[$k -1] . "</a></td>\n";
echo "\t\t\t<td align=\"right\">". if ($k < $VeranstaltungsTageMax)
"<a href='./schichtplan.php?ausdatum=". $VeranstaltungsTage[$k+1]. echo "\t\t\t<td align=\"right\">" .
"&raum=$raum'>". $VeranstaltungsTage[$k+1]. "</a></td>\n"; "<a href='./schichtplan.php?ausdatum=" . $VeranstaltungsTage[$k +1] .
} "&raum=$raum'>" . $VeranstaltungsTage[$k +1] . "</a></td>\n";
echo "\n\n</table>"; }
echo "\n\n</table>";
} }
// wenn kein Datum gesetzt ist (die Seite zum ersten mal aufgerufen wird), // wenn kein Datum gesetzt ist (die Seite zum ersten mal aufgerufen wird),
// das Datum auf den ersten Tag setzen... // das Datum auf den ersten Tag setzen...
if( !isset($ausdatum) ) if (!isset ($ausdatum)) {
{ $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '" . gmdate("Y-m-d", time() + $gmdateOffset) . "%' ORDER BY `DateS`";
$sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '". gmdate("Y-m-d", time()+$gmdateOffset). "%' ORDER BY `DateS`"; // $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '2004-12-29%' ORDER BY `DateS`";
// $sql = "SELECT `DateS` FROM `Shifts` WHERE `DateS` like '2004-12-29%' ORDER BY `DateS`"; $Erg = mysql_query($sql, $con);
$Erg = mysql_query($sql, $con); if (mysql_num_rows($Erg) == 0) {
if( mysql_num_rows( $Erg ) == 0 ) $sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1";
{ $Erg = mysql_query($sql, $con);
$sql = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` ASC LIMIT 0, 1"; }
$Erg = mysql_query($sql, $con); if (mysql_num_rows($Erg) > 0)
} $ausdatum = substr(mysql_result($Erg, 0, "DateS"), 0, 10);
if( mysql_num_rows( $Erg ) > 0 ) else
$ausdatum = substr(mysql_result($Erg,0,"DateS"),0,10); $ausdatum = gmdate("Y-m-d", time() + $gmdateOffset);
else
$ausdatum = gmdate("Y-m-d", time()+$gmdateOffset);
} }
if (!isset ($raum)) {
// Ausgabe wenn kein Raum Ausgew<65>hlt:
echo Get_Text("pub_schicht_auswahl_raeume") . "<br /><br />\n";
if (isset ($Room)) {
echo "<form action=\"./schichtplan.php\" method=\"GET\">\n";
foreach ($Room as $RoomEntry) {
echo "\t<li><input type=\"checkbox\" name=\"raum_" . $RoomEntry["RID"] . "\" value=\"" . $RoomEntry["RID"] . " \">";
echo "<a href='./schichtplan.php?ausdatum=$ausdatum&raum=" . $RoomEntry["RID"] . "'>" . $RoomEntry["Name"] . "</a>";
echo "</input></li>\n";
}
echo "<input type=\"hidden\" name=\"ausdatum\" value=\"$ausdatum\">";
echo "<input type=\"hidden\" name=\"raum\" value=\"-1\">";
echo "<input type=\"submit\" name=\"show\" value=\"show\">\n";
echo "</form>\n";
}
if ( !isset($raum) ) echo "<br /><br />";
{ echo Get_Text("pub_schicht_alles_1") . "<a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'> <u>" .
// Ausgabe wenn kein Raum Ausgewählt: Get_Text("pub_schicht_alles_2") . "</u> </a>" . Get_Text("pub_schicht_alles_3");
echo Get_Text("pub_schicht_auswahl_raeume"). "<br /><br />\n"; echo "\n<br /><br />\n\n";
echo "<hr>\n\n";
echo Get_Text("pub_schicht_EmptyShifts") . "\n";
if( isset($Room)) // zeit die naesten freien schichten
{ showEmptyShifts();
echo "<form action=\"./schichtplan.php\" method=\"GET\">\n"; } else { // Wenn einraum Ausgew<65>hlt ist:
foreach( $Room as $RoomEntry ) if ($raum == -1)
{ echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . ":<br /><br />";
echo "\t<li><input type=\"checkbox\" name=\"raum_". $RoomEntry["RID"]. "\" value=\"". $RoomEntry["RID"]." \">"; elseif (substr($raum, 0, 1) == ";") echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum . ":<br /><br />";
echo "<a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>". $RoomEntry["Name"]. "</a>"; else
echo "</input></li>\n"; echo Get_Text("pub_schicht_Anzeige_1") . $ausdatum .
} Get_Text("pub_schicht_Anzeige_2") . $RoomID[$raum] . "<br /><br />";
echo "<input type=\"hidden\" name=\"ausdatum\" value=\"$ausdatum\">";
echo "<input type=\"hidden\" name=\"raum\" value=\"-1\">";
echo "<input type=\"submit\" name=\"show\" value=\"show\">\n";
echo "</form>\n";
}
echo "<br /><br />"; ShowSwitchDay();
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";
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";
// zeit die naesten freien schichten //Ausgabe Spalten <20>berschrift
showEmptyShifts(); if ($raum == -1) {
} if (isset ($Room))
else foreach ($Room as $RoomEntry)
{ // Wenn einraum Ausgewählt ist: if (SummRoomShifts($RoomEntry["RID"]) > 0)
if( $raum == -1 ) echo "\t\t<th>" . $RoomEntry["Name"] . "</th>\n";
echo Get_Text("pub_schicht_Anzeige_1").$ausdatum.":<br /><br />"; }
elseif( substr( $raum, 0, 1) == ";" ) elseif (substr($raum, 0, 1) == ";") {
echo Get_Text("pub_schicht_Anzeige_1").$ausdatum.":<br /><br />"; $words = preg_split("/;/", $raum);
else foreach ($words as $word) {
echo Get_Text("pub_schicht_Anzeige_1"). $ausdatum. if (strlen(trim($word)) > 0)
Get_Text("pub_schicht_Anzeige_2"). $RoomID[$raum]. "<br /><br />"; echo "\t\t<th>" . $RoomID[trim($word)] . "</th>\n";
}
} else
echo "\t\t<th>" . $RoomID[$raum] . "</th>\n";
echo "\t</tr>\n";
ShowSwitchDay(); //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";
echo "\n\n<table border=\"0\" width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; //Stunde:
echo "\t<tr class=\"contenttopic\">\n"; $SpaltenTemp = "";
echo "\t\t<td>start</td>\n"; $SpaltenTemp .= ($i < 10) ? "0$i:" : "$i:";
//Ausgabe Spalten überschrift //Minute
if( $raum == -1 ) $TempMinuten = (($j * 60) / $GlobalZeileProStunde);
{ $SpaltenTemp .= ($TempMinuten < 10) ? "0$TempMinuten" : "$TempMinuten";
if( isset($Room))
foreach( $Room as $RoomEntry )
if (SummRoomShifts($RoomEntry["RID"]) > 0)
echo "\t\t<th>". $RoomEntry["Name"]. "</th>\n";
}
elseif( substr( $raum, 0, 1) == ";" )
{
$words = preg_split("/;/", $raum);
foreach ($words as $word)
{
if( strlen(trim($word)) > 0)
echo "\t\t<th>". $RoomID[trim($word)]. "</th>\n";
}
}
else
echo "\t\t<th>". $RoomID[$raum]. "</th>\n";
echo "\t</tr>\n";
//Zeit Ausgeben //aktuelle stunde markieren
for( $i = 0; $i < 24; $i++ ) if (($j == 0) && ($i == gmdate("H", time() + $gmdateOffset)) && (gmdate("Y-m-d", time() + $gmdateOffset) == $ausdatum))
for( $j = 0; $j < $GlobalZeileProStunde; $j++) $SpaltenTemp = "<h1>$SpaltenTemp</h1>";
{
$Spalten[$i * $GlobalZeileProStunde + $j] =
"\t<tr class=\"content\">\n\t\t";
//Stunde: $SpaltenTemp = "<td>$SpaltenTemp</td>\n";
$SpaltenTemp=""; $Spalten[$i * $GlobalZeileProStunde + $j] .= $SpaltenTemp;
$SpaltenTemp.= ($i<10)? "0$i:": "$i:"; }
//Minute if ($raum == -1) {
$TempMinuten = (($j*60) / $GlobalZeileProStunde); if (isset ($Room))
$SpaltenTemp.= ($TempMinuten<10)? "0$TempMinuten": "$TempMinuten"; foreach ($Room as $RoomEntry)
if (SummRoomShifts($RoomEntry["RID"]) > 0)
CreateRoomShifts($RoomEntry["RID"]);
}
elseif (substr($raum, 0, 1) == ";") {
if (isset ($Room)) {
$words = preg_split("/;/", $raum);
foreach ($words as $word) {
if (strlen(trim($word)) > 0)
if (SummRoomShifts($word) > 0)
CreateRoomShifts($word);
}
}
} else
CreateRoomShifts($raum);
//aktuelle stunde markieren //Ausageb Zeilen
if( ($j==0) && ($i == gmdate("H", time()+$gmdateOffset)) && (gmdate("Y-m-d", time()+ $gmdateOffset) == $ausdatum) ) for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) {
$SpaltenTemp = "<h1>$SpaltenTemp</h1>"; echo $Spalten[$i] . "\t</tr>\n";
}
$SpaltenTemp = "<td>$SpaltenTemp</td>\n"; echo "</table>\n";
$Spalten[$i * $GlobalZeileProStunde + $j].= $SpaltenTemp;
}
if( $raum == -1 ) ShowSwitchDay();
{
if( isset($Room))
foreach( $Room as $RoomEntry )
if (SummRoomShifts($RoomEntry["RID"]) > 0)
CreateRoomShifts( $RoomEntry["RID"] );
}
elseif( substr( $raum, 0, 1) == ";" )
{
if( isset($Room))
{
$words = preg_split("/;/", $raum);
foreach ($words as $word)
{
if( strlen(trim($word)) > 0)
if (SummRoomShifts($word) > 0)
CreateRoomShifts( $word );
}
}
}
else
CreateRoomShifts( $raum );
//Ausageb Zeilen } //if (isset($raum))
for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++)
{
echo $Spalten[$i]."\t</tr>\n";
}
echo "</table>\n"; echo "<a href=\"" . $_SESSION["newurl"] . "&Icon=0\">@</a>";
ShowSwitchDay(); include ("includes/footer.php");
}//if (isset($raum))
echo "<a href=\"". $_SESSION["newurl"]. "&Icon=0\">@</a>";
include ("../../../camp2011/includes/footer.php");
?> ?>

View File

@ -1,111 +1,114 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "Schichtpl&auml;ne";
include "../../../camp2011/includes/header.php";
include "../../../camp2011/includes/funktion_schichtplan.php";
include "../../../camp2011/includes/funktion_schichtplan_aray.php";
include "../../../camp2011/includes/funktionen.php";
if(isset($_POST["newtext"]) && isset($_POST["SID"]) && isset($_POST["TID"])) { $title = "Himmel";
SetHeaderGo2Back(); $header = "Schichtpl&auml;ne";
include "includes/header.php";
include "includes/funktion_schichtplan.php";
include "includes/funktion_schichtplan_aray.php";
include "includes/funktionen.php";
// datum der einzutragenden Schicht heraussuhen... if (isset ($_POST["newtext"]) && isset ($_POST["SID"]) && isset ($_POST["TID"])) {
$ShiftSQL = "SELECT `DateS`, `DateE` FROM `Shifts` WHERE `SID`='" . $_POST["SID"] . ".'"; SetHeaderGo2Back();
$ShiftErg = mysql_query ($ShiftSQL, $con);
$beginSchicht = mysql_result($ShiftErg, 0, "DateS");
$endSchicht = mysql_result($ShiftErg, 0, "DateE");
// wenn keien rechte definiert sind // datum der einzutragenden Schicht heraussuhen...
if(!isset($_SESSION['CVS'][$TID2Name[$_POST["TID"]]])) $ShiftSQL = "SELECT `DateS`, `DateE` FROM `Shifts` WHERE `SID`='" . $_POST["SID"] . ".'";
$_SESSION['CVS'][$TID2Name[$_POST["TID"]]] = "Y"; $ShiftErg = mysql_query($ShiftSQL, $con);
$beginSchicht = mysql_result($ShiftErg, 0, "DateS");
$endSchicht = mysql_result($ShiftErg, 0, "DateE");
if($_SESSION['CVS'][$TID2Name[$_POST["TID"]]] == "Y") { // wenn keien rechte definiert sind
// Ueberpruefung, ob der Engel bereits fuer eine Schicht zu dieser Zeit eingetragen ist if (!isset ($_SESSION['CVS'][$TID2Name[$_POST["TID"]]]))
$SSQL = "SELECT * FROM `Shifts`". $_SESSION['CVS'][$TID2Name[$_POST["TID"]]] = "Y";
" 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) if ($_SESSION['CVS'][$TID2Name[$_POST["TID"]]] == "Y") {
echo Get_Text("pub_schichtplan_add_AllreadyinShift"); // Ueberpruefung, ob der Engel bereits fuer eine Schicht zu dieser Zeit eingetragen ist
else { $SSQL = "SELECT * FROM `Shifts`" .
// ermitteln der noch gesuchten " INNER JOIN `ShiftEntry` ON `ShiftEntry`.`SID` = `Shifts`.`SID`" .
$SQL3 = "SELECT * FROM `ShiftEntry`". " WHERE ((" .
" WHERE ((`SID` = '". $_POST["SID"]. "') AND (`TID` = '". $_POST["TID"]. "') AND (`UID` = '0'));"; " ((`Shifts`.`DateS` >= '$beginSchicht') and " .
$Erg3 = mysql_query($SQL3, $con); " (`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($Erg3) <= 0) if (mysql_num_rows($bErg) != 0)
echo Get_Text("pub_schichtplan_add_ToManyYousers"); echo Get_Text("pub_schichtplan_add_AllreadyinShift");
else { else {
//write shift // ermitteln der noch gesuchten
$SQL = "UPDATE `ShiftEntry` SET ". $SQL3 = "SELECT * FROM `ShiftEntry`" .
"`UID` = '". $_SESSION['UID']. "', ". " WHERE ((`SID` = '" . $_POST["SID"] . "') AND (`TID` = '" . $_POST["TID"] . "') AND (`UID` = '0'));";
"`Comment` = '". $_POST["newtext"]. "' ". $Erg3 = mysql_query($SQL3, $con);
"WHERE ( (`SID` = '". $_POST["SID"]. "') and ".
"(`TID` = '". $_POST["TID"]. "') and ".
"(`UID` = '0')) LIMIT 1;";
$Erg = mysql_query($SQL, $con);
if($Erg != 1) if (mysql_num_rows($Erg3) <= 0)
echo Get_Text("pub_schichtplan_add_Error"); echo Get_Text("pub_schichtplan_add_ToManyYousers");
else else {
echo Get_Text("pub_schichtplan_add_WriteOK"); //write shift
} $SQL = "UPDATE `ShiftEntry` SET " .
} "`UID` = '" . $_SESSION['UID'] . "', " .
} else { "`Comment` = '" . $_POST["newtext"] . "' " .
echo "<h1>:-(</h1>"; "WHERE ( (`SID` = '" . $_POST["SID"] . "') and " .
array_push($error_messages, "Hack atteck\n"); "(`TID` = '" . $_POST["TID"] . "') and " .
} "(`UID` = '0')) LIMIT 1;";
} elseif (isset($_GET["SID"]) && isset($_GET["TID"])) { $Erg = mysql_query($SQL, $con);
//wenn keine Rechte definiert sind
if( !isset($_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ]))
$_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ] = "Y";
if( $_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ] == "Y") { if ($Erg != 1)
echo Get_Text("pub_schichtplan_add_Text1"). "<br /><br />\n\n". echo Get_Text("pub_schichtplan_add_Error");
"<form action=\"./schichtplan_add.php\" method=\"post\">\n". else
"<table border=\"0\">\n"; echo Get_Text("pub_schichtplan_add_WriteOK");
}
}
} else {
echo "<h1>:-(</h1>";
array_push($error_messages, "Hack atteck\n");
}
}
elseif (isset ($_GET["SID"]) && isset ($_GET["TID"])) {
//wenn keine Rechte definiert sind
if (!isset ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]]))
$_SESSION['CVS'][$TID2Name[$_GET["TID"]]] = "Y";
$SQL = "SELECT * FROM `Shifts` WHERE "; if ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]] == "Y") {
$SQL .="(`SID` = '". $_GET["SID"]. "')"; echo Get_Text("pub_schichtplan_add_Text1") . "<br /><br />\n\n" .
$Erg = mysql_query($SQL, $con); "<form action=\"./schichtplan_add.php\" method=\"post\">\n" .
"<table border=\"0\">\n";
echo "<tr><td>". Get_Text("pub_schichtplan_add_Date"). ":</td> <td>". $SQL = "SELECT * FROM `Shifts` WHERE ";
mysql_result($Erg, 0, "DateS"). "</td></tr>\n"; $SQL .= "(`SID` = '" . $_GET["SID"] . "')";
$Erg = mysql_query($SQL, $con);
echo "<tr><td>". Get_Text("pub_schichtplan_add_Place"). ":</td> <td>". echo "<tr><td>" . Get_Text("pub_schichtplan_add_Date") . ":</td> <td>" .
$RoomID[ mysql_result($Erg, 0, "RID") ]. "</td></tr>\n"; mysql_result($Erg, 0, "DateS") . "</td></tr>\n";
echo "<tr><td>". Get_Text("pub_schichtplan_add_Job"). ":</td> <td>". echo "<tr><td>" . Get_Text("pub_schichtplan_add_Place") . ":</td> <td>" .
$EngelTypeID[$_GET["TID"]]. "</td></tr>\n"; $RoomID[mysql_result($Erg, 0, "RID")] . "</td></tr>\n";
echo "<tr><td>". Get_Text("pub_schichtplan_add_Len"). ":</td> <td>". echo "<tr><td>" . Get_Text("pub_schichtplan_add_Job") . ":</td> <td>" .
mysql_result($Erg, 0, "Len"). "h</td></tr>\n"; $EngelTypeID[$_GET["TID"]] . "</td></tr>\n";
echo "<tr><td>". Get_Text("pub_schichtplan_add_TextFor"). ":</td> <td>". echo "<tr><td>" . Get_Text("pub_schichtplan_add_Len") . ":</td> <td>" .
mysql_result($Erg, 0, "Man"). "</td></tr>\n"; mysql_result($Erg, 0, "Len") . "h</td></tr>\n";
echo "<tr><td valign='top'>". Get_Text("pub_schichtplan_add_Comment"). ":</td>\n <td>". echo "<tr><td>" . Get_Text("pub_schichtplan_add_TextFor") . ":</td> <td>" .
"<textarea name='newtext' cols='50' rows='10'></textarea> </td></tr>\n"; mysql_result($Erg, 0, "Man") . "</td></tr>\n";
echo "<tr><td>&nbsp;</td>\n". echo "<tr><td valign='top'>" . Get_Text("pub_schichtplan_add_Comment") . ":</td>\n <td>" .
"<td><input type=\"submit\" value=\"". Get_Text("pub_schichtplan_add_submit"). "\"> </td></tr>\n". "<textarea name='newtext' cols='50' rows='10'></textarea> </td></tr>\n";
"</table>\n".
"<input type=\"hidden\" name=\"SID\" value=\"". $_GET["SID"]. "\">\n".
"<input type=\"hidden\" name=\"TID\" value=\"". $_GET["TID"]. "\">\n".
"</form>";
} else {
echo "<h1>:-(</h1>";
array_push($error_messages, "Hack atteck\n");
}
}
include "../../../camp2011/includes/footer.php"; 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=\"" . $_GET["SID"] . "\">\n" .
"<input type=\"hidden\" name=\"TID\" value=\"" . $_GET["TID"] . "\">\n" .
"</form>";
} else {
echo "<h1>:-(</h1>";
array_push($error_messages, "Hack atteck\n");
}
}
include "includes/footer.php";
?> ?>

View File

@ -1,9 +1,11 @@
<?php <?php
include "../../../camp2011/includes/header_start.php"; require_once ('../bootstrap.php');
include "../../../camp2011/includes/funktionen.php";
include "../../../camp2011/includes/funktion_schichtplan_beamer.php";
$Time = time() + 3600 + 3600; include "includes/header_start.php";
include "includes/funktionen.php";
include "includes/funktion_schichtplan_beamer.php";
$Time = time() + 3600 + 3600;
?> ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@ -16,7 +18,9 @@
<body> <body>
<?php <?php
echo "<table border=\"1\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" frame=\"void\">\n";
echo "<table border=\"1\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" frame=\"void\">\n";
echo "<colgroup span=\"4\" valign=\"center\"> echo "<colgroup span=\"4\" valign=\"center\">
<col width=\"30\"> <col width=\"30\">
@ -26,26 +30,26 @@ echo "<colgroup span=\"4\" valign=\"center\">
</colgroup>\n"; </colgroup>\n";
echo "<tr align=\"center\">\n" . echo "<tr align=\"center\">\n" .
"<td>". gmdate("d.m.y", $Time) ."</td>\n". "<td>" . gmdate("d.m.y", $Time) . "</td>\n" .
"<td>". gmdate("H", $Time - 3600) . ":00</td>\n". "<td>" . gmdate("H", $Time -3600) . ":00</td>\n" .
"<td>". gmdate("H", $Time + 0) . ":00</td>\n". "<td>" . gmdate("H", $Time +0) . ":00</td>\n" .
"<td>". gmdate("H", $Time + 3600) .":00</td>\n". "<td>" . gmdate("H", $Time +3600) . ":00</td>\n" .
"</tr>\n"; "</tr>\n";
foreach($Room as $RoomEntry) { foreach ($Room as $RoomEntry) {
// var-init // var-init
$AnzahlEintraege = 0; $AnzahlEintraege = 0;
$Out = ausgabe_Zeile($RoomEntry["RID"], $Time - 3600, $AnzahlEintraege); $Out = ausgabe_Zeile($RoomEntry["RID"], $Time -3600, $AnzahlEintraege);
$Out .= ausgabe_Zeile($RoomEntry["RID"], $Time, $AnzahlEintraege); $Out .= ausgabe_Zeile($RoomEntry["RID"], $Time, $AnzahlEintraege);
$Out .= ausgabe_Zeile($RoomEntry["RID"], $Time + 3600, $AnzahlEintraege); $Out .= ausgabe_Zeile($RoomEntry["RID"], $Time +3600, $AnzahlEintraege);
if($AnzahlEintraege == 0) if ($AnzahlEintraege == 0)
$Out = ""; $Out = "";
else else
$Out = "<tr>\n<td>_" . $RoomEntry["Name"] . "_</td>\n" . $Out . "</tr>\n"; $Out = "<tr>\n<td>_" . $RoomEntry["Name"] . "_</td>\n" . $Out . "</tr>\n";
echo $Out; echo $Out;
} }
?> ?>

View File

@ -1,8 +1,10 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "Weckdienst - Liste der zu weckenden Engel";
include "../../../camp2011/includes/header.php"; $title = "Himmel";
$header = "Weckdienst - Liste der zu weckenden Engel";
include "includes/header.php";
?> ?>
<p><?php echo Get_Text("Hello") . $_SESSION['Nick'] . ",<br />\n" . Get_Text("pub_waeckliste_Text1"); ?></p> <p><?php echo Get_Text("Hello") . $_SESSION['Nick'] . ",<br />\n" . Get_Text("pub_waeckliste_Text1"); ?></p>
@ -15,12 +17,14 @@
</tr> </tr>
<?php <?php
$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); $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"> <tr class="content">
<td align="left"><?php echo UID2Nick(mysql_result($Erg, $i, "UID")); ?> </td> <td align="left"><?php echo UID2Nick(mysql_result($Erg, $i, "UID")); ?> </td>
@ -29,10 +33,14 @@
<td align="left"><?php echo mysql_result($Erg, $i, "Bemerkung"); ?> </td> <td align="left"><?php echo mysql_result($Erg, $i, "Bemerkung"); ?> </td>
</tr> </tr>
<?php <?php
}
}
?> ?>
</table> </table>
<?php <?php
include "../../../camp2011/includes/footer.php";
include "includes/footer.php";
?> ?>

View File

@ -1,32 +1,34 @@
<?php <?php
$title = "Himmel"; require_once ('../bootstrap.php');
$header = "Weckdienst";
include "../../../camp2011/includes/header.php"; $title = "Himmel";
$header = "Weckdienst";
if(isset($_POST["eintragen"])) { include "includes/header.php";
if($_POST["eintragen"] == Get_Text("pub_wake_bouton")) {
$SQL = "INSERT INTO `Wecken` (`UID`, `Date`, `Ort`, `Bemerkung`) ".
"VALUES ('". $_SESSION['UID']. "', '". $_POST["Date"]. "', '". $_POST["Ort"]. "', ".
"'". $_POST["Bemerkung"]. "')";
$Erg = mysql_query($SQL, $con);
if($Erg == 1) if (isset ($_POST["eintragen"])) {
Print_Text(4); if ($_POST["eintragen"] == Get_Text("pub_wake_bouton")) {
} $SQL = "INSERT INTO `Wecken` (`UID`, `Date`, `Ort`, `Bemerkung`) " .
} "VALUES ('" . $_SESSION['UID'] . "', '" . $_POST["Date"] . "', '" . $_POST["Ort"] . "', " .
"'" . $_POST["Bemerkung"] . "')";
$Erg = mysql_query($SQL, $con);
if(isset($_GET["eintragen"])) { if ($Erg == 1)
if ($_GET["eintragen"] == "loeschen") { Print_Text(4);
$SQL = "DELETE FROM `Wecken` WHERE `UID`='" . $_SESSION['UID'] . "' AND `ID`='" . $_GET["weckID"] . "' LIMIT 1"; }
$Erg = mysql_query($SQL, $con); }
if ($Erg == 1)
Print_Text(4);
}
}
echo "<p>" . Get_Text("Hello") . $_SESSION['Nick'] . ",<br />" . Get_Text("pub_wake_beschreibung") . "</p>\n\n"; if (isset ($_GET["eintragen"])) {
echo Get_Text("pub_wake_beschreibung2"); if ($_GET["eintragen"] == "loeschen") {
$SQL = "DELETE FROM `Wecken` WHERE `UID`='" . $_SESSION['UID'] . "' AND `ID`='" . $_GET["weckID"] . "' LIMIT 1";
$Erg = mysql_query($SQL, $con);
if ($Erg == 1)
Print_Text(4);
}
}
echo "<p>" . Get_Text("Hello") . $_SESSION['Nick'] . ",<br />" . Get_Text("pub_wake_beschreibung") . "</p>\n\n";
echo Get_Text("pub_wake_beschreibung2");
?> ?>
<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1"> <table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
@ -38,12 +40,13 @@
</tr> </tr>
<?php <?php
$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++) { $sql = "SELECT * FROM `Wecken` WHERE `UID`='" . $_SESSION['UID'] . "' ORDER BY `Date` ASC";
$row = mysql_fetch_row($Erg); $Erg = mysql_query($sql, $con);
$count = mysql_num_rows($Erg);
for ($i = 0; $i < $count; $i++) {
$row = mysql_fetch_row($Erg);
?> ?>
<tr class="content"> <tr class="content">
<td align="left"><?php echo mysql_result($Erg, $i, "Date"); ?> </td> <td align="left"><?php echo mysql_result($Erg, $i, "Date"); ?> </td>
@ -52,7 +55,8 @@
<td align="left"><a href="./wecken.php?eintragen=loeschen&weckID=<?php echo mysql_result($Erg, $i, "ID") . "\">" . Get_Text("pub_wake_del"); ?></a></td> <td align="left"><a href="./wecken.php?eintragen=loeschen&weckID=<?php echo mysql_result($Erg, $i, "ID") . "\">" . Get_Text("pub_wake_del"); ?></a></td>
</tr> </tr>
<?php <?php
}
}
?> ?>
</table> </table>
<br /><br /> <br /><br />
@ -77,5 +81,6 @@
<input type="submit" name="eintragen" value="<?php echo Get_Text("pub_wake_bouton"); ?>" /> <input type="submit" name="eintragen" value="<?php echo Get_Text("pub_wake_bouton"); ?>" />
</form> </form>
<?php <?php
include ("../../../camp2011/includes/footer.php");
include ("includes/footer.php");
?> ?>