1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<?php /* $Id: do_login.php,v 1.1.1.1 2002/10/28 19:13:46 pbaecher Exp $ */ /* ThWboard - PHP/MySQL Bulletin Board System ============================================== (c) 2000, 2001 by Paul Baecher <paul@thewall.de> Felix Gonschorek <funner@thewall.de>
download the latest version: http://www.thwboard.de
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
==============================================
*/
include "./inc/header.inc.php";
// http://www.securiteam.com/securitynews/5FP0C204KE.html $login_name = $HTTP_POST_VARS['login_name'];
unset($msg);
$navpath .= "Login"; if( !$login_name ) { $msg .= "Sie haben vergessen einen Usernamen anzugeben.<br>"; } if( !$login_password ) { $msg .= "Sie haben vergessen ein Passwort anzugeben.<br>"; }
$r_user = thwb_query("SELECT userid, userpassword FROM ".$pref."user WHERE username='" . addslashes($login_name) . "'"); if( mysql_num_rows($r_user) < 1 ) { $msg .= "Der Angegebene Benutzername existiert nicht.<br>"; }
$user = mysql_fetch_array($r_user); if( $user['userpassword'] != md5($login_password) ) { $msg .= "Das Passwort ist leider falsch.<br>"; }
if( strlen($msg) > 0 ) { message("Fehler", "Es sind leider Fehler aufgetreten:<font color='$style[color_err]'><br><br>$msg</font>"); }
setcookie("thwb_cookie", md5($login_password) . $user['userid'], (time() + 60 * 60 * 24 * 365));
//header("Location: index.php"); if( !$source ) $source = 'index.php'; else $source = urldecode($source);
message_redirect('Sie wurden erfolgreich eingeloggt, bitte warten ...', $source);
?>
|