2005-11-30 23:13:38 +01:00
|
|
|
<?PHP
|
2005-09-10 19:25:43 +02:00
|
|
|
$title = "Index";
|
|
|
|
$header = "Index";
|
|
|
|
|
2006-11-23 18:39:05 +01:00
|
|
|
include ("./inc/config_db.php");
|
2005-09-10 19:25:43 +02:00
|
|
|
include ("./inc/crypt.php");
|
|
|
|
|
|
|
|
session_start(); // alte Session - falls vorhanden - wiederherstellen...
|
|
|
|
|
2005-11-09 18:10:39 +01:00
|
|
|
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
|
2005-11-06 01:44:48 +01:00
|
|
|
$sql = "select * from User where Nick = '". $_POST["user"]. "'";
|
2005-09-10 19:25:43 +02:00
|
|
|
$userstring = mysql_query($sql, $con);
|
|
|
|
|
|
|
|
// anzahl zeilen
|
|
|
|
$user_anz = mysql_num_rows($userstring);
|
|
|
|
|
|
|
|
if ($user_anz == 1) { // Check, ob User angemeldet wird...
|
2005-11-06 01:44:48 +01:00
|
|
|
if (mysql_result($userstring, 0, "Passwort") == PassCrypt($_POST["password"])) { // Passwort ok...
|
2005-09-10 19:25:43 +02:00
|
|
|
// Session wird eingeleitet und Session-Variablen gesetzt..
|
|
|
|
// session_start();
|
|
|
|
session_name("Himmel");
|
|
|
|
$_SESSION['UID'] = mysql_result($userstring, 0, "UID");
|
|
|
|
$_SESSION['Nick'] = mysql_result($userstring, 0, "Nick");
|
|
|
|
$_SESSION['Name'] = mysql_result($userstring, 0, "Name");
|
|
|
|
$_SESSION['Vorname'] = mysql_result($userstring, 0, "Vorname");
|
|
|
|
$_SESSION['Alter'] = mysql_result($userstring, 0, "Alter");
|
|
|
|
$_SESSION['Telefon'] = mysql_result($userstring, 0, "Telefon");
|
|
|
|
$_SESSION['Handy'] = mysql_result($userstring, 0, "Handy");
|
|
|
|
$_SESSION['DECT'] = mysql_result($userstring, 0, "DECT");
|
|
|
|
$_SESSION['email'] = mysql_result($userstring, 0, "email");
|
2006-08-29 12:21:50 +02:00
|
|
|
$_SESSION['ICQ'] = mysql_result($userstring, 0, "ICQ");
|
|
|
|
$_SESSION['jabber'] = mysql_result($userstring, 0, "jabber");
|
2005-09-10 19:25:43 +02:00
|
|
|
$_SESSION['Size'] = mysql_result($userstring, 0, "Size");
|
|
|
|
$_SESSION['Gekommen'] = mysql_result($userstring, 0, "Gekommen");
|
|
|
|
$_SESSION['Aktiv'] = mysql_result($userstring, 0, "Aktiv");
|
|
|
|
$_SESSION['Tshirt'] = mysql_result($userstring, 0, "Tshirt");
|
2005-11-21 19:34:30 +01:00
|
|
|
$_SESSION['Menu'] = mysql_result($userstring, 0, "Menu");
|
2005-09-10 19:25:43 +02:00
|
|
|
$_SESSION['color'] = mysql_result($userstring, 0, "color");
|
|
|
|
$_SESSION['Avatar'] = mysql_result($userstring, 0, "Avatar");
|
|
|
|
$_SESSION['Sprache'] = mysql_result($userstring, 0, "Sprache");
|
2005-11-22 21:05:44 +01:00
|
|
|
$_SESSION['Hometown'] = mysql_result($userstring, 0, "Hometown");
|
2005-09-10 19:25:43 +02:00
|
|
|
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
|
|
|
|
|
|
|
// CVS import Data
|
2006-12-03 23:18:25 +01:00
|
|
|
$SQL = "SELECT * FROM `UserCVS` WHERE UID='".$_SESSION['UID']."'";
|
2005-09-10 19:25:43 +02:00
|
|
|
$Erg_CVS = mysql_query($SQL, $con);
|
|
|
|
$_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
|
2005-11-09 18:10:39 +01:00
|
|
|
|
|
|
|
LoginOK();
|
2005-09-10 19:25:43 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Passwort nicht ok...
|
2005-11-09 18:10:39 +01:00
|
|
|
$ErrorText = "pub_index_pass_no_ok";
|
2005-09-10 19:25:43 +02:00
|
|
|
} // Ende Passwort-Check
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Anzahl der User in User-Tabelle <> 1 --> keine Anmeldung
|
|
|
|
if ($user_anz == 0)
|
2005-11-09 18:10:39 +01:00
|
|
|
$ErrorText = "pub_index_User_unset";
|
2005-09-10 19:25:43 +02:00
|
|
|
else
|
2005-11-09 18:10:39 +01:00
|
|
|
$ErrorText = "pub_index_User_more_as_one";
|
2005-09-10 19:25:43 +02:00
|
|
|
} // Ende Check, ob User angemeldet wurde
|
|
|
|
}
|
|
|
|
|
2005-11-09 18:10:39 +01:00
|
|
|
include ("./inc/header.php");
|
2005-11-16 01:14:07 +01:00
|
|
|
if( isset($ErrorText))
|
2005-11-16 01:12:21 +01:00
|
|
|
echo "<h2>". Get_Text($ErrorText). "</h2><br>\n";
|
2005-11-09 18:10:39 +01:00
|
|
|
include ("./inc/login_eingabefeld.php");
|
2005-09-10 19:25:43 +02:00
|
|
|
include ("./inc/footer.php");
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|