Verzeichnisstruktur phpBB-1.0.0
- Veröffentlicht
- 15.12.2000
So funktioniert es
|
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
login.php
01 <?php
02 /***************************************************************************
03 login.php - description
04 -------------------
05 begin : Wed June 19 2000
06 copyright : (C) 2000 by James Atkinson
07 email : james@totalgeek.org
08
09 $Id: login.php,v 1.8 2000/11/15 04:57:15 thefinn Exp $
10
11 ***************************************************************************/
12
13 /***************************************************************************
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 ***************************************************************************/
21
22 /**
23 * login.php - Nathan Codding
24 * - Used for logging in a user and setting up a session.
25 */
26 include('extention.inc');
27 include('functions.'.$phpEx);
28 include('config.'.$phpEx);
29 require('auth.'.$phpEx);
30 $pagetitle = "Login";
31 $pagetype = "other";
32
33 /* Note: page_header.php is included later on, because this page needs to be able to send a cookie. */
34
35
36 if (!$submit) {
37 include('page_header.'.$phpEx);
38 ?>
39 <TABLE BORDER="0" CELLPADDING="1" CELLSPACING=0" ALIGN="CENTER" VALIGN="TOP" WIDTH="<?php echo $TableWidth?>">
40 <TR><TD BGCOLOR="<?php echo $table_bgcolor?>">
41 <TABLE BORDER="0" CELLPADDING="1" CELLSPACING=1" WIDTH="100%">
42 <TR BGCOLOR="<?php echo $color1?>" ALIGN="LEFT">
43 <TD><P><BR><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
44 Please enter your username and password to login.<ul>
45 <FORM ACTION="<?php echo $PHP_SELF?>" METHOD="POST">
46 <b>User Name: </b><INPUT TYPE="TEXT" NAME="username" SIZE="25" MAXLENGTH="40" VALUE="<?php echo $userdata[username]?>"><BR>
47 <b>Password: </b><INPUT TYPE="PASSWORD" NAME="password" SIZE="25" MAXLENGTH="25"><br><br>
48 <INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit"> <INPUT TYPE="RESET" VALUE="Clear"></ul>
49 </FORM>
50 </TD></TR></TABLE></TD></TR></TABLE>
51
52 <?php
53 } else {
54 if ($username == '') {
55 die("You have to enter your username. Go back and do so.");
56 }
57 if ($password == '') {
58 die("You have to enter your password. Go back and do so.");
59 }
60 if (!check_username($username, $db)) {
61 die("Invalid username \"$username\". Go back and try again.");
62 }
63 if (!check_user_pw($username, $password, $db)) {
64 die("Invalid password. Go back and try again.");
65 }
66
67 /* if we get here, user has entered a good username and password. */
68
69 $userdata = get_userdata($username, $db);
70
71 $sessid = new_session($userdata[user_id], $REMOTE_ADDR, $sesscookietime, $db);
72
73 set_session_cookie($sessid, $sesscookietime, $sesscookiename, $cookiepath, $cookiedomain, $cookiesecure);
74
75 // Push back to the main index page, no need to tell the user they are logged in, they can figure that out on the index page.
76 header("Location: $url_phpbb");
77 } // if/else (!$submit)
78
79
80 require('page_tail.'.$phpEx);
81 ?>
82