bootstrapping
parent
6ebee2c46b
commit
a537f4bf73
@ -1,181 +1,214 @@
|
||||
<?php
|
||||
$title = "Anmeldung zum Chaos-Engel";
|
||||
$header = "";
|
||||
$success = "none";
|
||||
|
||||
include "../config/config.php";
|
||||
include "../includes/header.php";
|
||||
include "../config/config_db.php";
|
||||
include "../includes/crypt.php";
|
||||
|
||||
if(isset($_POST["send"])) {
|
||||
$eNick = trim($_POST["Nick"]);
|
||||
|
||||
if($_POST["Alter"] == "")
|
||||
$_POST["Alter"] = 0;
|
||||
|
||||
// user vorhanden?
|
||||
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'";
|
||||
$Ergans = mysql_query($SQLans, $con);
|
||||
|
||||
if(strlen($_POST["Nick"]) < 2)
|
||||
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2");
|
||||
elseif(mysql_num_rows( $Ergans) > 0)
|
||||
$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` (".
|
||||
"`Nick` , ". "`Name` , ".
|
||||
"`Vorname`, ". "`Alter` , ".
|
||||
"`Telefon`, ". "`DECT`, ".
|
||||
"`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);
|
||||
|
||||
if ($Erg != 1) {
|
||||
echo Get_Text("makeuser_error_write1") . "<br />\n";
|
||||
$error = mysql_error($con);
|
||||
} else {
|
||||
echo "<p class=\"important\">" . Get_Text("makeuser_writeOK") . "\n";
|
||||
|
||||
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';";
|
||||
$Erg2 = mysql_query($SQL2, $con);
|
||||
$Data = mysql_fetch_array($Erg2);
|
||||
|
||||
$SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');";
|
||||
$Erg3 = mysql_query($SQL3, $con);
|
||||
|
||||
if ($Erg3 != 1) {
|
||||
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";
|
||||
}
|
||||
|
||||
echo Get_Text("makeuser_writeOK4") . "</p><p></p>\n<br /><br />\n";
|
||||
$success = "any";
|
||||
|
||||
if (isset($SubscribeMailinglist)) {
|
||||
if ($_POST["subscribe-mailinglist"] == "") {
|
||||
$headers = "From: " . $_POST["email"] . "\r\n" .
|
||||
"X-Mailer: PHP/" . phpversion();
|
||||
mail($SubscribeMailinglist, "subject", "message", $headers);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($error))
|
||||
echo "<p class=\"warning\">\n" . $error . "\n</p>\n\n";
|
||||
} else {
|
||||
// init vars
|
||||
$_POST["Nick"] = "";
|
||||
$_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") {
|
||||
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";
|
||||
|
||||
if(isset($SubscribeMailinglist))
|
||||
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>ICQ</td><td><input type=\"text\" size=\"40\" name=\"ICQ\" value=\"". $_POST["ICQ"]. "\"></td></tr>\n";
|
||||
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ö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`";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
||||
for($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
$Name = mysql_result($Erg, $t, "Name"). Get_Text("inc_schicht_engel");
|
||||
echo "<option value=\"" . $Name . "\"";
|
||||
|
||||
if($_POST["Art"]==$Name)
|
||||
echo " selected";
|
||||
|
||||
echo ">$Name</option>\n";
|
||||
}
|
||||
|
||||
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> </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";
|
||||
require_once ('bootstrap.php');
|
||||
|
||||
$title = "Anmeldung zum Chaos-Engel";
|
||||
$header = "";
|
||||
$success = "none";
|
||||
|
||||
include "config/config.php";
|
||||
include "includes/header.php";
|
||||
include "config/config_db.php";
|
||||
include "includes/crypt.php";
|
||||
|
||||
if (isset ($_POST["send"])) {
|
||||
$eNick = trim($_POST["Nick"]);
|
||||
|
||||
if ($_POST["Alter"] == "")
|
||||
$_POST["Alter"] = 0;
|
||||
|
||||
// user vorhanden?
|
||||
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'";
|
||||
$Ergans = mysql_query($SQLans, $con);
|
||||
|
||||
if (strlen($_POST["Nick"]) < 2)
|
||||
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2");
|
||||
elseif (mysql_num_rows($Ergans) > 0) $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` (" .
|
||||
"`Nick` , " . "`Name` , " .
|
||||
"`Vorname`, " . "`Alter` , " .
|
||||
"`Telefon`, " . "`DECT`, " .
|
||||
"`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);
|
||||
|
||||
if ($Erg != 1) {
|
||||
echo Get_Text("makeuser_error_write1") . "<br />\n";
|
||||
$error = mysql_error($con);
|
||||
} else {
|
||||
echo "<p class=\"important\">" . Get_Text("makeuser_writeOK") . "\n";
|
||||
|
||||
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';";
|
||||
$Erg2 = mysql_query($SQL2, $con);
|
||||
$Data = mysql_fetch_array($Erg2);
|
||||
|
||||
$SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');";
|
||||
$Erg3 = mysql_query($SQL3, $con);
|
||||
|
||||
if ($Erg3 != 1) {
|
||||
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";
|
||||
}
|
||||
|
||||
echo Get_Text("makeuser_writeOK4") . "</p><p></p>\n<br /><br />\n";
|
||||
$success = "any";
|
||||
|
||||
if (isset ($SubscribeMailinglist)) {
|
||||
if ($_POST["subscribe-mailinglist"] == "") {
|
||||
$headers = "From: " . $_POST["email"] . "\r\n" .
|
||||
"X-Mailer: PHP/" . phpversion();
|
||||
mail($SubscribeMailinglist, "subject", "message", $headers);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset ($error))
|
||||
echo "<p class=\"warning\">\n" . $error . "\n</p>\n\n";
|
||||
} else {
|
||||
// init vars
|
||||
$_POST["Nick"] = "";
|
||||
$_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") {
|
||||
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";
|
||||
|
||||
if (isset ($SubscribeMailinglist))
|
||||
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>ICQ</td><td><input type=\"text\" size=\"40\" name=\"ICQ\" value=\"" . $_POST["ICQ"] . "\"></td></tr>\n";
|
||||
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ö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`";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
$Name = mysql_result($Erg, $t, "Name") . Get_Text("inc_schicht_engel");
|
||||
echo "<option value=\"" . $Name . "\"";
|
||||
|
||||
if ($_POST["Art"] == $Name)
|
||||
echo " selected";
|
||||
|
||||
echo ">$Name</option>\n";
|
||||
}
|
||||
|
||||
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> </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";
|
||||
?>
|
||||
|
@ -1,32 +1,43 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
include "../../../camp2011/includes/config.php";
|
||||
include "../../../camp2011/includes/config_db.php";
|
||||
header("Content-Type: application/json");
|
||||
|
||||
$User = $_POST['user'];
|
||||
$Pass = $_POST['pw'];
|
||||
$SourceOuth = $_POST['so'];
|
||||
include "includes/config.php";
|
||||
include "includes/config_db.php";
|
||||
|
||||
if(isset($CurrentExternAuthPass) && $SourceOuth == $CurrentExternAuthPass) {
|
||||
$sql = "SELECT * FROM `User` WHERE `Nick`='" . $User . "'";
|
||||
$Erg = mysql_query($sql, $con);
|
||||
$User = $_POST['user'];
|
||||
$Pass = $_POST['pw'];
|
||||
$SourceOuth = $_POST['so'];
|
||||
|
||||
if(mysql_num_rows($Erg) == 1) {
|
||||
if(mysql_result($Erg, 0, "Passwort") == $Pass) {
|
||||
$UID = mysql_result($Erg, 0, "UID");
|
||||
if (isset ($CurrentExternAuthPass) && $SourceOuth == $CurrentExternAuthPass) {
|
||||
$sql = "SELECT * FROM `User` WHERE `Nick`='" . $User . "'";
|
||||
$Erg = mysql_query($sql, $con);
|
||||
|
||||
// get CVS import Data
|
||||
$SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $UID . "'";
|
||||
$Erg_CVS = mysql_query($SQL, $con);
|
||||
$CVS = mysql_fetch_array($Erg_CVS);
|
||||
if (mysql_num_rows($Erg) == 1) {
|
||||
if (mysql_result($Erg, 0, "Passwort") == $Pass) {
|
||||
$UID = mysql_result($Erg, 0, "UID");
|
||||
|
||||
$msg = array('status' => 'success', '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'));
|
||||
// get CVS import Data
|
||||
$SQL = "SELECT * FROM `UserCVS` WHERE `UID`='" . $UID . "'";
|
||||
$Erg_CVS = mysql_query($SQL, $con);
|
||||
$CVS = mysql_fetch_array($Erg_CVS);
|
||||
|
||||
$msg = array (
|
||||
'status' => 'success',
|
||||
'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'
|
||||
));
|
||||
?>
|
||||
|
@ -1,27 +1,29 @@
|
||||
<?php
|
||||
$title = "Himmel";
|
||||
$header = "Engelbesprechung";
|
||||
include "../../../camp2011/includes/header.php";
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$title = "Himmel";
|
||||
$header = "Engelbesprechung";
|
||||
include "includes/header.php";
|
||||
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||
if (mysql_result($Erg, $n, "Treffen") == "1") {
|
||||
echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
// Show Admin Page
|
||||
if($_SESSION['CVS']["admin/news.php"] == "Y")
|
||||
echo " <a href=\"./../admin/news.php?action=change&date=". mysql_result($Erg, $n, "Datum"). "\">[edit]</a>";
|
||||
for ($n = 0; $n < $Zeilen; $n++) {
|
||||
if (mysql_result($Erg, $n, "Treffen") == "1") {
|
||||
echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
|
||||
|
||||
echo "<br /> <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";
|
||||
}
|
||||
}
|
||||
// Show Admin Page
|
||||
if ($_SESSION['CVS']["admin/news.php"] == "Y")
|
||||
echo " <a href=\"./../admin/news.php?action=change&date=" . mysql_result($Erg, $n, "Datum") . "\">[edit]</a>";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
echo "<br /> <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");
|
||||
?>
|
||||
|
@ -1,122 +1,124 @@
|
||||
<?php
|
||||
$title = "Himmel";
|
||||
$header = "";
|
||||
|
||||
include "../../../camp2011/includes/header.php";
|
||||
|
||||
if(!isset($_GET["action"]))
|
||||
$_GET["action"] = "start";
|
||||
|
||||
switch( $_GET["action"]) {
|
||||
case "start":
|
||||
echo Get_Text("Hello"). $_SESSION['Nick']. ", <br />\n";
|
||||
echo Get_Text("pub_messages_text1"). "<br /><br />\n";
|
||||
|
||||
//show exist Messages
|
||||
$SQL = "SELECT * FROM `Messages` WHERE `SUID`='" . $_SESSION["UID"] . "' OR `RUID`='" . $_SESSION["UID"] . "'";
|
||||
$erg = mysql_query($SQL, $con);
|
||||
|
||||
echo "<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td class=\"contenttopic\"><b>". Get_Text("pub_messages_Datum"). "</b></td>\n";
|
||||
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 "<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, "RUID") == $_SESSION["UID"]) {
|
||||
echo "<a href=\"?action=DelMsg&Datum=" . mysql_result($erg, $i, "Datum") . "\">" . Get_Text("pub_messages_DelMsg") . "</a>";
|
||||
|
||||
if(mysql_result($erg, $i, "isRead") == "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");
|
||||
}
|
||||
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
// send Messeges
|
||||
echo "<form action=\"" . $_SERVER['SCRIPT_NAME'] . "?action=SendMsg\" method=\"POST\">";
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "<td></td>\n";
|
||||
echo "<td></td>\n";
|
||||
|
||||
// Listet alle Nicks auf
|
||||
echo "<td><select name=\"RUID\">\n";
|
||||
|
||||
$usql="SELECT * FROM `User` WHERE (`UID`!='". $_SESSION["UID"] ."') ORDER BY `Nick`";
|
||||
$uErg = mysql_query($usql, $con);
|
||||
$urowcount = mysql_num_rows($uErg);
|
||||
|
||||
for ($k = 0; $k < $urowcount; $k++) {
|
||||
echo "<option value=\"" . mysql_result($uErg, $k, "UID") . "\">" . mysql_result($uErg, $k, "Nick") . "</option>\n";
|
||||
}
|
||||
|
||||
echo "</select></td>\n";
|
||||
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>";
|
||||
|
||||
echo "</table>\n";
|
||||
break;
|
||||
|
||||
case "SendMsg":
|
||||
echo Get_Text("pub_messages_Send1") . "...<br />\n";
|
||||
|
||||
$SQL = "INSERT INTO `Messages` ( `Datum` , `SUID` , `RUID` , `Text` ) VALUES (".
|
||||
"'" . gmdate("Y-m-j H:i:s", time()) . "', ".
|
||||
"'" . $_SESSION["UID"]. "', ".
|
||||
"'" . $_POST["RUID"]."', ".
|
||||
"'" . $_POST["Text"]. "');";
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if($Erg == 1)
|
||||
echo Get_Text("pub_messages_Send_OK") . "\n";
|
||||
else
|
||||
echo Get_Text("pub_messages_Send_Error") . "...\n(". mysql_error($con). ")";
|
||||
break;
|
||||
|
||||
case "MarkRead":
|
||||
$SQL = "UPDATE `Messages` SET `isRead` = 'Y' ".
|
||||
"WHERE `Datum` = '". $_GET["Datum"]. "' AND `RUID`='". $_SESSION["UID"]. "' ".
|
||||
"LIMIT 1 ;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg == 1)
|
||||
echo Get_Text("pub_messages_MarkRead_OK"). "\n";
|
||||
else
|
||||
echo Get_Text("pub_messages_MarkRead_KO"). "...\n(". mysql_error($con). ")";
|
||||
break;
|
||||
|
||||
case "DelMsg":
|
||||
$SQL = "DELETE FROM `Messages` ".
|
||||
"WHERE `Datum` = '". $_GET["Datum"]. "' AND `RUID` ='". $_SESSION["UID"]. "' ".
|
||||
"LIMIT 1;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg == 1)
|
||||
echo Get_Text("pub_messages_DelMsg_OK"). "\n";
|
||||
else
|
||||
echo Get_Text("pub_messages_DelMsg_KO"). "...\n(". mysql_error($con). ")";
|
||||
break;
|
||||
|
||||
default:
|
||||
echo Get_Text("pub_messages_NoCommand");
|
||||
}
|
||||
|
||||
include "../../../camp2011/includes/footer.php";
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Himmel";
|
||||
$header = "";
|
||||
|
||||
include "includes/header.php";
|
||||
|
||||
if (!isset ($_GET["action"]))
|
||||
$_GET["action"] = "start";
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
case "start" :
|
||||
echo Get_Text("Hello") . $_SESSION['Nick'] . ", <br />\n";
|
||||
echo Get_Text("pub_messages_text1") . "<br /><br />\n";
|
||||
|
||||
//show exist Messages
|
||||
$SQL = "SELECT * FROM `Messages` WHERE `SUID`='" . $_SESSION["UID"] . "' OR `RUID`='" . $_SESSION["UID"] . "'";
|
||||
$erg = mysql_query($SQL, $con);
|
||||
|
||||
echo "<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td class=\"contenttopic\"><b>" . Get_Text("pub_messages_Datum") . "</b></td>\n";
|
||||
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 "<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, "RUID") == $_SESSION["UID"]) {
|
||||
echo "<a href=\"?action=DelMsg&Datum=" . mysql_result($erg, $i, "Datum") . "\">" . Get_Text("pub_messages_DelMsg") . "</a>";
|
||||
|
||||
if (mysql_result($erg, $i, "isRead") == "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");
|
||||
}
|
||||
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
// send Messeges
|
||||
echo "<form action=\"" . $_SERVER['SCRIPT_NAME'] . "?action=SendMsg\" method=\"POST\">";
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "<td></td>\n";
|
||||
echo "<td></td>\n";
|
||||
|
||||
// Listet alle Nicks auf
|
||||
echo "<td><select name=\"RUID\">\n";
|
||||
|
||||
$usql = "SELECT * FROM `User` WHERE (`UID`!='" . $_SESSION["UID"] . "') ORDER BY `Nick`";
|
||||
$uErg = mysql_query($usql, $con);
|
||||
$urowcount = mysql_num_rows($uErg);
|
||||
|
||||
for ($k = 0; $k < $urowcount; $k++) {
|
||||
echo "<option value=\"" . mysql_result($uErg, $k, "UID") . "\">" . mysql_result($uErg, $k, "Nick") . "</option>\n";
|
||||
}
|
||||
|
||||
echo "</select></td>\n";
|
||||
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>";
|
||||
|
||||
echo "</table>\n";
|
||||
break;
|
||||
|
||||
case "SendMsg" :
|
||||
echo Get_Text("pub_messages_Send1") . "...<br />\n";
|
||||
|
||||
$SQL = "INSERT INTO `Messages` ( `Datum` , `SUID` , `RUID` , `Text` ) VALUES (" .
|
||||
"'" . gmdate("Y-m-j H:i:s", time()) . "', " .
|
||||
"'" . $_SESSION["UID"] . "', " .
|
||||
"'" . $_POST["RUID"] . "', " .
|
||||
"'" . $_POST["Text"] . "');";
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg == 1)
|
||||
echo Get_Text("pub_messages_Send_OK") . "\n";
|
||||
else
|
||||
echo Get_Text("pub_messages_Send_Error") . "...\n(" . mysql_error($con) . ")";
|
||||
break;
|
||||
|
||||
case "MarkRead" :
|
||||
$SQL = "UPDATE `Messages` SET `isRead` = 'Y' " .
|
||||
"WHERE `Datum` = '" . $_GET["Datum"] . "' AND `RUID`='" . $_SESSION["UID"] . "' " .
|
||||
"LIMIT 1 ;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg == 1)
|
||||
echo Get_Text("pub_messages_MarkRead_OK") . "\n";
|
||||
else
|
||||
echo Get_Text("pub_messages_MarkRead_KO") . "...\n(" . mysql_error($con) . ")";
|
||||
break;
|
||||
|
||||
case "DelMsg" :
|
||||
$SQL = "DELETE FROM `Messages` " .
|
||||
"WHERE `Datum` = '" . $_GET["Datum"] . "' AND `RUID` ='" . $_SESSION["UID"] . "' " .
|
||||
"LIMIT 1;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg == 1)
|
||||
echo Get_Text("pub_messages_DelMsg_OK") . "\n";
|
||||
else
|
||||
echo Get_Text("pub_messages_DelMsg_KO") . "...\n(" . mysql_error($con) . ")";
|
||||
break;
|
||||
|
||||
default :
|
||||
echo Get_Text("pub_messages_NoCommand");
|
||||
}
|
||||
|
||||
include "includes/footer.php";
|
||||
?>
|
||||
|
@ -1,52 +1,51 @@
|
||||
<?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` ".
|
||||
"INNER JOIN `ShiftEntry` ".
|
||||
"ON `Shifts`.`SID`=`ShiftEntry`.`SID` ".
|
||||
"WHERE `ShiftEntry`.`UID`='". $_SESSION['UID']. "' ".
|
||||
"ORDER BY `DateS`";
|
||||
$erg = mysql_query($SQL, $con);
|
||||
include ("includes/funktion_schichtplan_aray.php");
|
||||
|
||||
$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` " .
|
||||
"INNER JOIN `ShiftEntry` " .
|
||||
"ON `Shifts`.`SID`=`ShiftEntry`.`SID` " .
|
||||
"WHERE `ShiftEntry`.`UID`='" . $_SESSION['UID'] . "' " .
|
||||
"ORDER BY `DateS`";
|
||||
$erg = mysql_query($SQL, $con);
|
||||
|
||||
//HEADER
|
||||
header("Content-Type: text/x-vCalendar");
|
||||
header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"" );
|
||||
header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"");
|
||||
|
||||
//DATA
|
||||
echo "BEGIN:VCALENDAR\n";
|
||||
echo "PRODID:-//Engelsystem//DE-EN\n";
|
||||
echo "VERSION:2.0\n";
|
||||
echo "PRODID:". md5('icalschichtplan:'.$_SESSION['UID']). "\n";
|
||||
echo "PRODID:" . md5('icalschichtplan:' . $_SESSION['UID']) . "\n";
|
||||
echo "METHOD:PUBLISH\n";
|
||||
echo "CALSCALE:GREGORIAN\n";
|
||||
echo "METHOD:PUBLISH\n";
|
||||
echo "X-WR-CALNAME;VALUE=TEXT:". "Himmel - Schichtplan\n";
|
||||
|
||||
for( $i=0; $i<mysql_num_rows( $erg ); $i++ )
|
||||
{
|
||||
echo "BEGIN:VEVENT\n";
|
||||
echo "UID:". md5(mysql_result( $erg, $i, "Man" ). mysql_result( $erg, $i, "DateS" ))."\n";
|
||||
echo "METHOD:PUBLISH\n";
|
||||
echo "DTSTART;TZID=Europe/Berlin:". date( 'Ymd\THis', strtotime( mysql_result( $erg, $i, "DateS" ) ) ). "\n";
|
||||
echo "DTEND;TZID=Europe/Berlin:". date( 'Ymd\THis', strtotime( mysql_result( $erg, $i, "DateE" ) ) ). "\n";
|
||||
echo "SUMMARY:". str_replace( ',', '\\,',mysql_result( $erg, $i, "Man" ) ). "\n";
|
||||
echo "CLASS:PUBLIC\n";
|
||||
echo "STATUS:CONFIRMED\n";
|
||||
echo "URL:". $url. $ENGEL_ROOT. "nonpublic/myschichtplan.php\n";
|
||||
echo "LOCATION:". $RoomID[mysql_result( $erg, $i, "RID" )]. "\n";
|
||||
echo "BEGIN:VALARM\n";
|
||||
echo "TRIGGER;VALUE=DURATION:-PT5M\n";
|
||||
echo "DESCRIPTION:". str_replace( ',', '\\,',mysql_result( $erg, $i, "Man" ) ). "\n";
|
||||
echo "ACTION:DISPLAY\n";
|
||||
echo "END:VALARM\n";
|
||||
echo "END:VEVENT\n";
|
||||
echo "X-WR-CALNAME;VALUE=TEXT:" . "Himmel - Schichtplan\n";
|
||||
|
||||
for ($i = 0; $i < mysql_num_rows($erg); $i++) {
|
||||
echo "BEGIN:VEVENT\n";
|
||||
echo "UID:" . md5(mysql_result($erg, $i, "Man") . mysql_result($erg, $i, "DateS")) . "\n";
|
||||
echo "METHOD:PUBLISH\n";
|
||||
echo "DTSTART;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateS"))) . "\n";
|
||||
echo "DTEND;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateE"))) . "\n";
|
||||
echo "SUMMARY:" . str_replace(',', '\\,', mysql_result($erg, $i, "Man")) . "\n";
|
||||
echo "CLASS:PUBLIC\n";
|
||||
echo "STATUS:CONFIRMED\n";
|
||||
echo "URL:" . $url . $ENGEL_ROOT . "nonpublic/myschichtplan.php\n";
|
||||
echo "LOCATION:" . $RoomID[mysql_result($erg, $i, "RID")] . "\n";
|
||||
echo "BEGIN:VALARM\n";
|
||||
echo "TRIGGER;VALUE=DURATION:-PT5M\n";
|
||||
echo "DESCRIPTION:" . str_replace(',', '\\,', mysql_result($erg, $i, "Man")) . "\n";
|
||||
echo "ACTION:DISPLAY\n";
|
||||
echo "END:VALARM\n";
|
||||
echo "END:VEVENT\n";
|
||||
}
|
||||
echo "END:VCALENDAR\n";
|
||||
|
||||
include( "../../../camp2011/includes/funktion_counter.php");
|
||||
|
||||
include ("includes/funktion_counter.php");
|
||||
?>
|
||||
|
||||
|
@ -1,21 +1,20 @@
|
||||
<h4> Tage </h4>
|
||||
|
||||
<?PHP
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
function Printlink( $Datum)
|
||||
{
|
||||
GLOBAL $raum;
|
||||
echo "\t<li><a href='./schichtplan.php?ausdatum=$Datum";
|
||||
// ist ein raum gesetzt?
|
||||
if (IsSet($raum))
|
||||
echo "&raum=$raum";
|
||||
echo "'>$Datum</a></li>\n";
|
||||
} //function Printlink(
|
||||
|
||||
if( isset ($VeranstaltungsTage))
|
||||
foreach( $VeranstaltungsTage as $k => $v)
|
||||
Printlink( $v);
|
||||
include ("includes/funktion_schichtplan_aray.php");
|
||||
|
||||
function Printlink($Datum) {
|
||||
GLOBAL $raum;
|
||||
echo "\t<li><a href='./schichtplan.php?ausdatum=$Datum";
|
||||
// ist ein raum gesetzt?
|
||||
if (IsSet ($raum))
|
||||
echo "&raum=$raum";
|
||||
echo "'>$Datum</a></li>\n";
|
||||
} //function Printlink(
|
||||
|
||||
if (isset ($VeranstaltungsTage))
|
||||
foreach ($VeranstaltungsTage as $k => $v)
|
||||
Printlink($v);
|
||||
?>
|
||||
|
@ -1,22 +1,22 @@
|
||||
<h4> Raumübersicht</h4>
|
||||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
include ("includes/funktion_schichtplan_aray.php");
|
||||
|
||||
if( isset ($Room))
|
||||
foreach( $Room as $RoomEntry )
|
||||
{
|
||||
if(isset($ausdatum))
|
||||
echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=". $RoomEntry["RID"]. "'>".
|
||||
$RoomEntry["Name"]. "</a></li>\n";
|
||||
else
|
||||
echo "\t<li><a href='./schichtplan.php?raum=". $RoomEntry["RID"]. "'>".
|
||||
$RoomEntry["Name"]. "</a></li>\n";
|
||||
}
|
||||
if (isset ($Room))
|
||||
foreach ($Room as $RoomEntry) {
|
||||
if (isset ($ausdatum))
|
||||
echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=" . $RoomEntry["RID"] . "'>" .
|
||||
$RoomEntry["Name"] . "</a></li>\n";
|
||||
else
|
||||
echo "\t<li><a href='./schichtplan.php?raum=" . $RoomEntry["RID"] . "'>" .
|
||||
$RoomEntry["Name"] . "</a></li>\n";
|
||||
}
|
||||
echo "<br />";
|
||||
if(isset($ausdatum))
|
||||
echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>";
|
||||
if (isset ($ausdatum))
|
||||
echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>";
|
||||
else
|
||||
echo "<li><a href='./schichtplan.php?raum=-1'>alle</a></li>";
|
||||
echo "<li><a href='./schichtplan.php?raum=-1'>alle</a></li>";
|
||||
?>
|
||||
|
||||
|
@ -1,111 +1,114 @@
|
||||
<?php
|
||||
$title = "Himmel";
|
||||
$header = "Schichtplä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"])) {
|
||||
SetHeaderGo2Back();
|
||||
|
||||
// datum der einzutragenden Schicht heraussuhen...
|
||||
$ShiftSQL = "SELECT `DateS`, `DateE` FROM `Shifts` WHERE `SID`='" . $_POST["SID"] . ".'";
|
||||
$ShiftErg = mysql_query ($ShiftSQL, $con);
|
||||
$beginSchicht = mysql_result($ShiftErg, 0, "DateS");
|
||||
$endSchicht = mysql_result($ShiftErg, 0, "DateE");
|
||||
|
||||
// wenn keien rechte definiert sind
|
||||
if(!isset($_SESSION['CVS'][$TID2Name[$_POST["TID"]]]))
|
||||
$_SESSION['CVS'][$TID2Name[$_POST["TID"]]] = "Y";
|
||||
|
||||
if($_SESSION['CVS'][$TID2Name[$_POST["TID"]]] == "Y") {
|
||||
// Ueberpruefung, ob der Engel bereits fuer eine Schicht zu dieser Zeit eingetragen ist
|
||||
$SSQL = "SELECT * FROM `Shifts`".
|
||||
" INNER JOIN `ShiftEntry` ON `ShiftEntry`.`SID` = `Shifts`.`SID`".
|
||||
" WHERE ((".
|
||||
" ((`Shifts`.`DateS` >= '$beginSchicht') and ".
|
||||
" (`Shifts`.`DateS` < '$endSchicht'))".
|
||||
" OR ".
|
||||
" ((`Shifts`.`DateE` > '$beginSchicht') and ".
|
||||
" (`Shifts`.`DateE` <= '$endSchicht')) ".
|
||||
") and ".
|
||||
"(`ShiftEntry`.`UID` = '". $_SESSION['UID']. "'));";
|
||||
$bErg = mysql_query($SSQL, $con);
|
||||
|
||||
if(mysql_num_rows($bErg) != 0)
|
||||
echo Get_Text("pub_schichtplan_add_AllreadyinShift");
|
||||
else {
|
||||
// ermitteln der noch gesuchten
|
||||
$SQL3 = "SELECT * FROM `ShiftEntry`".
|
||||
" WHERE ((`SID` = '". $_POST["SID"]. "') AND (`TID` = '". $_POST["TID"]. "') AND (`UID` = '0'));";
|
||||
$Erg3 = mysql_query($SQL3, $con);
|
||||
|
||||
if(mysql_num_rows($Erg3) <= 0)
|
||||
echo Get_Text("pub_schichtplan_add_ToManyYousers");
|
||||
else {
|
||||
//write shift
|
||||
$SQL = "UPDATE `ShiftEntry` SET ".
|
||||
"`UID` = '". $_SESSION['UID']. "', ".
|
||||
"`Comment` = '". $_POST["newtext"]. "' ".
|
||||
"WHERE ( (`SID` = '". $_POST["SID"]. "') and ".
|
||||
"(`TID` = '". $_POST["TID"]. "') and ".
|
||||
"(`UID` = '0')) LIMIT 1;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if($Erg != 1)
|
||||
echo Get_Text("pub_schichtplan_add_Error");
|
||||
else
|
||||
echo Get_Text("pub_schichtplan_add_WriteOK");
|
||||
}
|
||||
}
|
||||
} 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";
|
||||
|
||||
if( $_SESSION['CVS'][ $TID2Name[$_GET["TID"]] ] == "Y") {
|
||||
echo Get_Text("pub_schichtplan_add_Text1"). "<br /><br />\n\n".
|
||||
"<form action=\"./schichtplan_add.php\" method=\"post\">\n".
|
||||
"<table border=\"0\">\n";
|
||||
|
||||
$SQL = "SELECT * FROM `Shifts` WHERE ";
|
||||
$SQL .="(`SID` = '". $_GET["SID"]. "')";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo "<tr><td>". Get_Text("pub_schichtplan_add_Date"). ":</td> <td>".
|
||||
mysql_result($Erg, 0, "DateS"). "</td></tr>\n";
|
||||
|
||||
echo "<tr><td>". Get_Text("pub_schichtplan_add_Place"). ":</td> <td>".
|
||||
$RoomID[ mysql_result($Erg, 0, "RID") ]. "</td></tr>\n";
|
||||
|
||||
echo "<tr><td>". Get_Text("pub_schichtplan_add_Job"). ":</td> <td>".
|
||||
$EngelTypeID[$_GET["TID"]]. "</td></tr>\n";
|
||||
|
||||
echo "<tr><td>". Get_Text("pub_schichtplan_add_Len"). ":</td> <td>".
|
||||
mysql_result($Erg, 0, "Len"). "h</td></tr>\n";
|
||||
|
||||
echo "<tr><td>". Get_Text("pub_schichtplan_add_TextFor"). ":</td> <td>".
|
||||
mysql_result($Erg, 0, "Man"). "</td></tr>\n";
|
||||
|
||||
echo "<tr><td valign='top'>". Get_Text("pub_schichtplan_add_Comment"). ":</td>\n <td>".
|
||||
"<textarea name='newtext' cols='50' rows='10'></textarea> </td></tr>\n";
|
||||
|
||||
echo "<tr><td> </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 "../../../camp2011/includes/footer.php";
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Himmel";
|
||||
$header = "Schichtpläne";
|
||||
include "includes/header.php";
|
||||
include "includes/funktion_schichtplan.php";
|
||||
include "includes/funktion_schichtplan_aray.php";
|
||||
include "includes/funktionen.php";
|
||||
|
||||
if (isset ($_POST["newtext"]) && isset ($_POST["SID"]) && isset ($_POST["TID"])) {
|
||||
SetHeaderGo2Back();
|
||||
|
||||
// datum der einzutragenden Schicht heraussuhen...
|
||||
$ShiftSQL = "SELECT `DateS`, `DateE` FROM `Shifts` WHERE `SID`='" . $_POST["SID"] . ".'";
|
||||
$ShiftErg = mysql_query($ShiftSQL, $con);
|
||||
$beginSchicht = mysql_result($ShiftErg, 0, "DateS");
|
||||
$endSchicht = mysql_result($ShiftErg, 0, "DateE");
|
||||
|
||||
// wenn keien rechte definiert sind
|
||||
if (!isset ($_SESSION['CVS'][$TID2Name[$_POST["TID"]]]))
|
||||
$_SESSION['CVS'][$TID2Name[$_POST["TID"]]] = "Y";
|
||||
|
||||
if ($_SESSION['CVS'][$TID2Name[$_POST["TID"]]] == "Y") {
|
||||
// Ueberpruefung, ob der Engel bereits fuer eine Schicht zu dieser Zeit eingetragen ist
|
||||
$SSQL = "SELECT * FROM `Shifts`" .
|
||||
" INNER JOIN `ShiftEntry` ON `ShiftEntry`.`SID` = `Shifts`.`SID`" .
|
||||
" WHERE ((" .
|
||||
" ((`Shifts`.`DateS` >= '$beginSchicht') and " .
|
||||
" (`Shifts`.`DateS` < '$endSchicht'))" .
|
||||
" OR " .
|
||||
" ((`Shifts`.`DateE` > '$beginSchicht') and " .
|
||||
" (`Shifts`.`DateE` <= '$endSchicht')) " .
|
||||
") and " .
|
||||
"(`ShiftEntry`.`UID` = '" . $_SESSION['UID'] . "'));";
|
||||
$bErg = mysql_query($SSQL, $con);
|
||||
|
||||
if (mysql_num_rows($bErg) != 0)
|
||||
echo Get_Text("pub_schichtplan_add_AllreadyinShift");
|
||||
else {
|
||||
// ermitteln der noch gesuchten
|
||||
$SQL3 = "SELECT * FROM `ShiftEntry`" .
|
||||
" WHERE ((`SID` = '" . $_POST["SID"] . "') AND (`TID` = '" . $_POST["TID"] . "') AND (`UID` = '0'));";
|
||||
$Erg3 = mysql_query($SQL3, $con);
|
||||
|
||||
if (mysql_num_rows($Erg3) <= 0)
|
||||
echo Get_Text("pub_schichtplan_add_ToManyYousers");
|
||||
else {
|
||||
//write shift
|
||||
$SQL = "UPDATE `ShiftEntry` SET " .
|
||||
"`UID` = '" . $_SESSION['UID'] . "', " .
|
||||
"`Comment` = '" . $_POST["newtext"] . "' " .
|
||||
"WHERE ( (`SID` = '" . $_POST["SID"] . "') and " .
|
||||
"(`TID` = '" . $_POST["TID"] . "') and " .
|
||||
"(`UID` = '0')) LIMIT 1;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg != 1)
|
||||
echo Get_Text("pub_schichtplan_add_Error");
|
||||
else
|
||||
echo Get_Text("pub_schichtplan_add_WriteOK");
|
||||
}
|
||||
}
|
||||
} 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";
|
||||
|
||||
if ($_SESSION['CVS'][$TID2Name[$_GET["TID"]]] == "Y") {
|
||||
echo Get_Text("pub_schichtplan_add_Text1") . "<br /><br />\n\n" .
|
||||
"<form action=\"./schichtplan_add.php\" method=\"post\">\n" .
|
||||
"<table border=\"0\">\n";
|
||||
|
||||
$SQL = "SELECT * FROM `Shifts` WHERE ";
|
||||
$SQL .= "(`SID` = '" . $_GET["SID"] . "')";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo "<tr><td>" . Get_Text("pub_schichtplan_add_Date") . ":</td> <td>" .
|
||||
mysql_result($Erg, 0, "DateS") . "</td></tr>\n";
|
||||
|
||||
echo "<tr><td>" . Get_Text("pub_schichtplan_add_Place") . ":</td> <td>" .
|
||||
$RoomID[mysql_result($Erg, 0, "RID")] . "</td></tr>\n";
|
||||
|
||||
echo "<tr><td>" . Get_Text("pub_schichtplan_add_Job") . ":</td> <td>" .
|
||||
$EngelTypeID[$_GET["TID"]] . "</td></tr>\n";
|
||||
|
||||
echo "<tr><td>" . Get_Text("pub_schichtplan_add_Len") . ":</td> <td>" .
|
||||
mysql_result($Erg, 0, "Len") . "h</td></tr>\n";
|
||||
|
||||
echo "<tr><td>" . Get_Text("pub_schichtplan_add_TextFor") . ":</td> <td>" .
|
||||
mysql_result($Erg, 0, "Man") . "</td></tr>\n";
|
||||
|
||||
echo "<tr><td valign='top'>" . Get_Text("pub_schichtplan_add_Comment") . ":</td>\n <td>" .
|
||||
"<textarea name='newtext' cols='50' rows='10'></textarea> </td></tr>\n";
|
||||
|
||||
echo "<tr><td> </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";
|
||||
?>
|
||||
|
Loading…
Reference in New Issue