From f0f10bc349caf2758556b2c53d4effb4a7c2e179 Mon Sep 17 00:00:00 2001 From: cookie Date: Tue, 8 Nov 2005 20:04:05 +0000 Subject: update engelanmeldung upadte menue strucktur git-svn-id: svn://svn.cccv.de/engel-system@25 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/admin/menu.php | 3 +- www-ssl/admin/user.php | 82 ++++++++++++++------------- www-ssl/inc/funktion_user.php | 10 +++- www-ssl/makeuser.php | 110 ----------------------------------- www-ssl/makeuser.php.de | 129 ++++++++++++++++++++++++++++++++++++++++++ www-ssl/makeuser.php.en | 125 ++++++++++++++++++++++++++++++++++++++++ www-ssl/menu.php | 9 +++ www-ssl/nonpublic/menu.php | 4 +- www-ssl/pic/external.png | Bin 0 -> 267 bytes 9 files changed, 320 insertions(+), 152 deletions(-) delete mode 100755 www-ssl/makeuser.php create mode 100755 www-ssl/makeuser.php.de create mode 100755 www-ssl/makeuser.php.en create mode 100755 www-ssl/pic/external.png (limited to 'www-ssl') diff --git a/www-ssl/admin/menu.php b/www-ssl/admin/menu.php index bd0761ed..45c59725 100755 --- a/www-ssl/admin/menu.php +++ b/www-ssl/admin/menu.php @@ -35,7 +35,8 @@ $Menu["Entry"][11]["Line"] = "

"; $Menu["Entry"][10]["File"] = "list.php"; $Menu["Entry"][10]["Name"] = "Debug"; -if ($_SESSION['CVS']["MenueShowAdminSection"] == "Y") { +if ($_SESSION['CVS']["MenueShowAdminSection"] == "Y") +{ $MenuAdmin["Name"] = "Erzengel"; $MenuAdmin["Entry"][0]["File"] = "../nonpublic/index.php"; $MenuAdmin["Entry"][0]["Name"] = "Engel-Menü"; diff --git a/www-ssl/admin/user.php b/www-ssl/admin/user.php index a1c2aa4b..678a8a36 100755 --- a/www-ssl/admin/user.php +++ b/www-ssl/admin/user.php @@ -4,12 +4,15 @@ $title = "User-Liste"; $header = "Editieren der Engelliste"; include ("./inc/header.php"); include ("./inc/funktion_db_list.php"); +include ("./inc/funktion_user.php"); if (!IsSet($_GET["enterUID"])) { // Userliste, keine UID uebergeben... echo "Neuen Engel eintragen

\n"; + + echo "\nEdit logout User

\n"; if( !isset($_GET["OrderBy"]) ) $_GET["OrderBy"] = "Nick"; $SQL = "SELECT * FROM User ORDER BY ". $_GET["OrderBy"]. " ASC"; @@ -98,27 +101,26 @@ else { // UserID wurde mit uebergeben --> Aendern... - $SQL = "SELECT * FROM User where UID=". $_GET["enterUID"]; - $Erg = mysql_query($SQL, $con); + echo "Hallo,
". + "hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' ". + "wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, ". + "dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. ". + "Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel ". + "bereits sein T-Shirt erhalten hat.

\n"; - $anzahl = mysql_num_rows($Erg); + echo "
\n"; + echo "\n"; + echo "\n"; - if ($anzahl != 1) - echo "Sorry, der Engel (UID=". $_GET["enterUID"]. ") wurde in der Liste nicht gefunden."; - else + if( $_GET["Type"] == "Normal" ) { - echo "Hallo,
". - "hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' ". - "wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, ". - "dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. ". - "Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel ". - "bereits sein T-Shirt erhalten hat.

\n"; - - echo "\n"; - echo "
\n"; - echo "\n"; - - if( $_GET["Type"] == "Normal" ) + $SQL = "SELECT * FROM User where UID=". $_GET["enterUID"]; + $Erg = mysql_query($SQL, $con); + + if (mysql_num_rows($Erg) != 1) + echo ""; + else { echo " \n"; } //IF TYPE + } + if( $_GET["Type"] == "Secure" ) + { + // CVS-Rechte + echo " \n"; - if( $_GET["Type"] == "Secure" ) + $SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=". $_GET["enterUID"]; + $Erg_CVS = mysql_query($SQL_CVS, $con); + + if( mysql_num_rows($Erg_CVS) != 1) + echo "Sorry, der Engel (UID=". $_GET["enterUID"]. ") wurde in der Liste nicht gefunden."; + else { - // CVS-Rechte - echo " \n"; - - $SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=". $_GET["enterUID"]; - $Erg_CVS = mysql_query($SQL_CVS, $con); $CVS_Data = mysql_fetch_array($Erg_CVS); $CVS_Data_i = 1; foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value) @@ -222,25 +229,22 @@ else } //Foreach echo "\n"; } // IF TYPE + } + // Ende Formular + echo "\n"; + echo "
Sorry, der Engel (UID=". $_GET["enterUID"]. + ") wurde in der Liste nicht gefunden.
Nick". "Yes \n"; echo "

Rights of \"". UID2Nick($_GET["enterUID"]). "\":

Rights of \"". mysql_result($Erg, 0, "Nick"). "\":
\n"; + echo "\n"; + echo "\n"; + echo "
"; - // Ende Formular - echo "\n"; - echo "\n"; + if( $_GET["Type"] == "Normal" ) + { + echo "
\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
"; - - if( $_GET["Type"] == "Normal" ) - { - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
"; - } - - } - + } } include ("./inc/footer.php"); diff --git a/www-ssl/inc/funktion_user.php b/www-ssl/inc/funktion_user.php index a420a09a..573a59d8 100755 --- a/www-ssl/inc/funktion_user.php +++ b/www-ssl/inc/funktion_user.php @@ -7,7 +7,15 @@ function UID2Nick($UID) { $Erg = mysql_query($SQL, $con); //echo $UID."#"; - return mysql_result($Erg, 0); + if( mysql_num_rows($Erg)) + return mysql_result($Erg, 0); + else + { + if( $UID == -1) + return "logout User"; + else + return "UserID $UID not found"; + } } diff --git a/www-ssl/makeuser.php b/www-ssl/makeuser.php deleted file mode 100755 index ae21b44a..00000000 --- a/www-ssl/makeuser.php +++ /dev/null @@ -1,110 +0,0 @@ -\n\n"; - -if( !isset($_POST["action"]) ) - $_POST["action"]="new"; - -if( $_POST["action"]=="newsave") -{ - $eNick = trim($_POST["eNick"]); - if( strlen($_POST["eNick"]) < 2 ) - { - $error= "

error: nick '".$_POST["eNick"]."' is to short (min. 2 characters)

"; - } - elseif( strlen($_POST["eemail"]) <= 7 || - strstr($_POST["eemail"], "@") == FALSE || - strstr($_POST["eemail"], ".") == FALSE ) - { - $error= "

error: e-mail address is not correct

"; - } - elseif( $_POST["ePasswort"] != $_POST["ePasswort2"] ) - { - $error= "error: passswords are not identical"; - } - elseif( strlen($_POST["ePasswort"]) < 6 ) - { - $error= "error: password is to short (min. 6 characters)"; - } - else - { - $_POST["ePasswort"] = PassCrypt($_POST["ePasswort"]); - $SQL = "INSERT INTO `User` (`Nick`, `Name`, `Vorname`, `Alter`, `Telefon`, `DECT`, `Handy`, ". - "`email`, `Size`, `Passwort`) ". - "VALUES ('". $_POST["eNick"]. "', '". $_POST["eName"]. "', '". $_POST["eVorname"]. - "', '". $_POST["eAlter"]. "', '". $_POST["eTelefon"]. "', '". $_POST["eDECT"]. - "', '". $_POST["eHandy"]. "', '". $_POST["eemail"]. "', '". $_POST["eSize"]. - "', '". $_POST["ePasswort"]. "');"; - $Erg = mysql_query($SQL, $con); - if ($Erg != 1) - echo "error: can't save personal informations...
(error: ".mysql_error($con).")
"; - else - { - echo "personal informations was saved...
"; - - $SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["eNick"]. "';"; - $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 "error: can't save userright...
(".mysql_error($con).")
"; - } - else - { - echo "userright was saved...
"; - echo "

Your acount was sucsessfull creat, hafe al lot of fun."; - } - } - } -} - -if( $_POST["action"] == "new" || isset($error)) -{ - if( !isset($error) ) - echo "If you wont to be an angel please insert your personal information into this form:
"; - else - echo $error; - echo "\n\n
\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
nick*
last name
first name
age
phone
DECT on congress
mobile
e-mail*
T-Shirt size*
password*
password Confirm*
\n"; - echo "\n"; - echo "\n"; - echo "
"; - echo "\n\n\n\t* entry required!\n"; -} - -include ("./inc/footer.php"); -?> - diff --git a/www-ssl/makeuser.php.de b/www-ssl/makeuser.php.de new file mode 100755 index 00000000..00033de1 --- /dev/null +++ b/www-ssl/makeuser.php.de @@ -0,0 +1,129 @@ + $value){ + + $value = strtr($value, get_html_translation_table(HTML_ENTITIES)); + $keys .= $key.", "; + $values .= "'".$value."', "; + } + $keys = substr($keys, 0, -2); + $values = substr($values, 0, -2); + $sql = "INSERT INTO $table (".$keys.") VALUES (".$values.")"; + mysql_query($sql, $con); + } + + mysqlinsert('User', $con, $_POST); + $Erg = mysql_affected_rows(); + + if ($Erg != 1) { + echo "Fehler: Kann die eingegebenen Daten nicht sichern?!?
"; + echo "\n
(Fehler: ".mysql_error($con).")
"; + } else { + echo "

Die Anmeldung war erfolgreich. Vielen Dank für deine Anmeldung.

\n

"; + + + $SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["Nick"]. "';"; + $Erg2 = mysql_query($SQL2, $con); + $Data = mysql_fetch_array($Erg2); + } + } + if( !isset($error) ){ + echo "Wenn du dich zum Chaos-Engel anmelden möchtest, fülle bitte folgendes Formular aus:
"; + } else { + echo "

\n$error\n

"; + } +} +else +{ + //init vars + $_POST["Nick"] = ""; + $_POST["Name"] = ""; + $_POST["Vorname"] = ""; + $_POST["Alta"] = ""; + $_POST["Telefon"] = ""; + $_POST["DECT"] = ""; + $_POST["Handy"] = ""; + $_POST["email"] = ""; + $_POST["Size"] = ""; + $_POST["Art"] = ""; +} +?> + +

Anmeldung zum Chaos-Engel

+ +Mit dieser Maske meldet Ihr euch im Engelsystem an. Durch das Engelsystem findet auf dem Congress die Aufgabenverteilung der Engel statt. + + +
+ + + + + + + + + + + + + + + + + + + + +
Nickname*"/>
Nachname"/>
Vorname"/>
Alter"/>
Telefon"/>
DECT"/>
Handy"/>
E-Mail*"/>
T-Shirt Grösse* + +
Engelart + +
Habt ihr schon einmal am
+ Congress mitgeholfen?
+ Wenn ja, in welchem/
+ welchen Aufgabengebiet(en)?
Passwort*
Passwort Bestätigung*
 
+
+ * Dieser Eintrag ist eine Pflichtangabe. + + diff --git a/www-ssl/makeuser.php.en b/www-ssl/makeuser.php.en new file mode 100755 index 00000000..86ee286d --- /dev/null +++ b/www-ssl/makeuser.php.en @@ -0,0 +1,125 @@ + $value){ + + $value = strtr($value, get_html_translation_table(HTML_ENTITIES)); + $keys .= $key.", "; + $values .= "'".$value."', "; + } + $keys = substr($keys, 0, -2); + $values = substr($values, 0, -2); + $sql = "INSERT INTO $table (".$keys.") VALUES (".$values.")"; + mysql_query($sql, $con); + } + + mysqlinsert('User', $con, $_POST); + $Erg = mysql_affected_rows(); + + if ($Erg != 1) { + echo "error: can't save your data...
(error: ".mysql_error($con).")
"; + } else { + echo "

transmitted. Thank you for your participation..

\n

"; + + $SQL2 = "SELECT UID FROM `User` WHERE Nick='". $_POST["Nick"]. "';"; + $Erg2 = mysql_query($SQL2, $con); + $Data = mysql_fetch_array($Erg2); + } + } + if( !isset($error) ){ + echo "If you would like to be an chaos angel please insert following details into this form:
"; + } else { + echo "

\n$error\n

"; + } +} +else +{ + //init vars + $_POST["Nick"] = ""; + $_POST["Name"] = ""; + $_POST["Vorname"] = ""; + $_POST["Alta"] = ""; + $_POST["Telefon"] = ""; + $_POST["DECT"] = ""; + $_POST["Handy"] = ""; + $_POST["email"] = ""; + $_POST["Size"] = ""; + $_POST["Art"] = ""; +} +?> +

Chaos-Angel registration

+ +By completing this form you're registering as a Chaos-Angel. This script will create you an account in the congress angel task system. + +
+ + + + + + + + + + + + + + + + + + +
nick*"/>
last name"/>
first name"/>
age"/>
phone"/>
DECT"/>
mobile"/>
e-mail*"/>
shirt size* + +
type of angel + +
+ Did you help at former
+ congresses and which tasks
+ have you performed then?
+
+
password*
password confirm*
 
+
+ * entry required! + + + diff --git a/www-ssl/menu.php b/www-ssl/menu.php index f2789d17..9d9c7efa 100755 --- a/www-ssl/menu.php +++ b/www-ssl/menu.php @@ -34,4 +34,13 @@ $Menu["Entry"][3]["Line"] = "
"; $Menu["Entry"][4]["File"] = "nonpublic/schichtplan_beamer.php"; $Menu["Entry"][4]["Name"] = Get_Text("pub_menu_SchichtplanBeamer"); +if ($_SESSION['CVS']["nonpublic/index.php"] == "Y") +{ + $MenuAdmin["Path"] = ""; + $MenuAdmin["Name"] = Get_Text("pub_menu_menuname"); + $MenuAdmin["Entry"][0]["File"] = "nonpublic/index.php"; + $MenuAdmin["Entry"][0]["Name"] = "Engel-Menü"; +} // MenueShowAdminSection + + ?> diff --git a/www-ssl/nonpublic/menu.php b/www-ssl/nonpublic/menu.php index 7dac48bb..10cf2a2d 100755 --- a/www-ssl/nonpublic/menu.php +++ b/www-ssl/nonpublic/menu.php @@ -24,7 +24,9 @@ $Menu["Entry"][8]["File"] = "../logout.php"; $Menu["Entry"][8]["Name"] = Get_Text("pub_menu_Abmelden"); -if ($_SESSION['CVS']["MenueShowAdminSection"] == "Y") { +if ($_SESSION['CVS']["MenueShowAdminSection"] == "Y") +{ + $MenuAdmin["Path"] = ""; $MenuAdmin["Name"] = "Erzengel"; $MenuAdmin["Entry"][0]["File"] = "../admin/index.php"; $MenuAdmin["Entry"][0]["Name"] = "Erzengel-Menü"; diff --git a/www-ssl/pic/external.png b/www-ssl/pic/external.png new file mode 100755 index 00000000..8ae475d8 Binary files /dev/null and b/www-ssl/pic/external.png differ -- cgit v1.2.3-70-g09d2