From 90242f14becf6081b7cf5b7800134e84c6c1919c Mon Sep 17 00:00:00 2001 From: cookie Date: Wed, 9 Nov 2005 17:10:39 +0000 Subject: fehlermeldungen werden wieder angezeigt, und das rechtemengement ist dadurch genauer git-svn-id: svn://svn.cccv.de/engel-system@29 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/nonpublic/index.php | 64 +++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 43 deletions(-) (limited to 'www-ssl/nonpublic') diff --git a/www-ssl/nonpublic/index.php b/www-ssl/nonpublic/index.php index 54cbabf4..45f28f8f 100755 --- a/www-ssl/nonpublic/index.php +++ b/www-ssl/nonpublic/index.php @@ -7,10 +7,20 @@ include ("./inc/crypt.php"); session_start(); // alte Session - falls vorhanden - wiederherstellen... -if ( IsSet($_POST["user"])) { - +function LoginOK() +{ + include ("./inc/config.php"); + header("HTTP/1.1 302 Moved Temporarily"); + header("Location: ". substr($url, 0, strlen($url)-1). $ENGEL_ROOT. "nonpublic/news.php"); +} + +if ( !IsSet($_POST["user"])) +{ // User ist bereits angemeldet... normaler Inhalt... + LoginOK(); +} +else +{ // User ist noch nicht angemeldet $sql = "select * from User where Nick = '". $_POST["user"]. "'"; - $userstring = mysql_query($sql, $con); // anzahl zeilen @@ -43,58 +53,26 @@ if ( IsSet($_POST["user"])) { $SQL = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID']; $Erg_CVS = mysql_query($SQL, $con); $_SESSION['CVS'] = mysql_fetch_array($Erg_CVS); - - include ("./inc/header.php"); - - echo Get_Text(1).$_SESSION['Nick']; - echo nl2br(Get_Text(2)); - - include ("./news_output.php"); - + + LoginOK(); } else { // Passwort nicht ok... - - include ("./inc/header.php"); - - echo Get_Text("pub_index_pass_no_ok"); - include ("./inc/login_eingabefeld.php"); - + $ErrorText = "pub_index_pass_no_ok"; } // Ende Passwort-Check - } else { // Anzahl der User in User-Tabelle <> 1 --> keine Anmeldung - include ("./inc/header.php"); if ($user_anz == 0) - { - echo Get_Text("pub_index_User_unset"); - } + $ErrorText = "pub_index_User_unset"; else - { - echo Get_Text("pub_index_User_more_as_one"); - } - - include ("./inc/login_eingabefeld.php"); + $ErrorText = "pub_index_User_more_as_one"; } // Ende Check, ob User angemeldet wurde } -else -{ // User ist bereits angemeldet... normaler Inhalt... - - include ("./inc/header.php"); - echo Get_Text(1).$_SESSION['Nick']; - echo nl2br(Get_Text(2)); - - include ("./news_output.php"); - -} // Ende Ueberpruefung, ob User bereits angemeldet... - - -?> - -". Get_Text($ErrorText). "
\n"; +include ("./inc/login_eingabefeld.php"); include ("./inc/footer.php"); ?> -- cgit v1.2.3-54-g00ecf