From 02e187a4ec8db5094789d124e3f069dea85a5076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Tue, 12 Jul 2011 16:17:18 +0200 Subject: [PATCH] #24 made t-shirt-size optional for angels --- includes/pages/guest_login.php | 150 ++++++++---------- includes/pages/user_settings.php | 38 +++-- .../default-conf/var_www_includes/config.php | 5 +- 3 files changed, 87 insertions(+), 106 deletions(-) diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index ecfcde20..30dbaf55 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -3,8 +3,8 @@ // Engel registrieren function guest_register() { - global $SubscribeMailinglist; - + global $SubscribeMailinglist, $enable_tshirt_size; + $html = ""; $success = "none"; @@ -18,24 +18,17 @@ function guest_register() { $Ergans = sql_select("SELECT UID FROM `User` WHERE `Nick`='" . sql_escape($_POST["Nick"]) . "'"); if (strlen($_POST["Nick"]) < 2) - $error = Get_Text("makeuser_error_nick1") - . $_POST["Nick"] . Get_Text("makeuser_error_nick2"); + $error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2"); - elseif (count($Ergans) > 0) - $error = Get_Text("makeuser_error_nick1") - . $_POST["Nick"] . Get_Text("makeuser_error_nick3"); + elseif (count($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 (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 (!is_numeric($_POST["Alter"])) $error = Get_Text("makeuser_error_Alter"); - elseif ($_POST["Passwort"] != $_POST["Passwort2"]) - $error = Get_Text("makeuser_error_password1"); + elseif ($_POST["Passwort"] != $_POST["Passwort2"]) $error = Get_Text("makeuser_error_password1"); - elseif (strlen($_POST["Passwort"]) < 6) - $error = Get_Text("makeuser_error_password2"); + elseif (strlen($_POST["Passwort"]) < 6) $error = Get_Text("makeuser_error_password2"); else { $_POST["Passwort"] = PassCrypt($_POST["Passwort"]); @@ -50,26 +43,7 @@ function guest_register() { "`Size`, " . "`Passwort`, " . "`Art` , " . "`kommentar`, " . "`Hometown`," . "`CreateDate`, `Sprache` ) " . - "VALUES ( '" - . sql_escape($_POST["Nick"]) . "', " . "'" - . sql_escape($_POST["Name"]) . "', " . "'" - . sql_escape($_POST["Vorname"]) . "', " . "'" - . sql_escape($_POST["Alter"]) . "', " . "'" - . sql_escape($_POST["Telefon"]) . "', " . "'" - . sql_escape($_POST["DECT"]) . "', " . "'" - . sql_escape($_POST["Handy"]) . "', " . "'" - . sql_escape($_POST["email"]) . "', " . "'" - . sql_escape($_POST["ICQ"]) . "', " . "'" - . sql_escape($_POST["jabber"]) . "', " . "'" - . sql_escape($_POST["Size"]) . "', " . "'" - . sql_escape($_POST["Passwort"]) . "', " . "'" - . sql_escape($_POST["Art"]) . "', " . "'" - . sql_escape($_POST["kommentar"]) . "', " . "'" - . sql_escape($_POST["Hometown"]) . "'," - . "NOW(), '" - . sql_escape($_SESSION["Sprache"]) - . "')" - ); + "VALUES ( '" . sql_escape($_POST["Nick"]) . "', " . "'" . sql_escape($_POST["Name"]) . "', " . "'" . sql_escape($_POST["Vorname"]) . "', " . "'" . sql_escape($_POST["Alter"]) . "', " . "'" . sql_escape($_POST["Telefon"]) . "', " . "'" . sql_escape($_POST["DECT"]) . "', " . "'" . sql_escape($_POST["Handy"]) . "', " . "'" . sql_escape($_POST["email"]) . "', " . "'" . sql_escape($_POST["ICQ"]) . "', " . "'" . sql_escape($_POST["jabber"]) . "', " . "'" . sql_escape($_POST["Size"]) . "', " . "'" . sql_escape($_POST["Passwort"]) . "', " . "'" . sql_escape($_POST["Art"]) . "', " . "'" . sql_escape($_POST["kommentar"]) . "', " . "'" . sql_escape($_POST["Hometown"]) . "'," . "NOW(), '" . sql_escape($_SESSION["Sprache"]) . "')"); if ($Erg != 1) { $html .= Get_Text("makeuser_error_write1") . "
\n"; @@ -137,58 +111,60 @@ function guest_register() { $html .= "ICQ\n"; $html .= "jabber\n"; - $html .= "" . Get_Text("makeuser_T-Shirt") . " Grösse*\n"; - $html .= "\n"; + $html .= "