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 |
bb_register.php
001 <?php
002 /***************************************************************************
003 bb_register.php - description
004 -------------------
005 begin : Sat June 17 2000
006 copyright : (C) 2000 by James Atkinson
007 email : james@totalgeek.org
008
009 $Id: bb_register.php,v 1.21 2000/11/25 23:52:31 thefinn Exp $
010
011 ***************************************************************************/
012
013 /***************************************************************************
014 *
015 * This program is free software; you can redistribute it and/or modify
016 * it under the terms of the GNU General Public License as published by
017 * the Free Software Foundation; either version 2 of the License, or
018 * (at your option) any later version.
019 *
020 ***************************************************************************/
021 include('extention.inc');
022 include('functions.'.$phpEx);
023 include('config.'.$phpEx);
024 require('auth.'.$phpEx);
025 $pagetitle = "Register";
026 $pagetype = "Register";
027
028 if($submit) {
029 if($password == '' || $username == '' || $email == '') {
030 include('page_header.'.$phpEx);
031 die("Error - you did not fill in all the required fields, please go back and fill them in.");
032 }
033
034 if (check_username($username, $db)) {
035 die("The username you chose \"$username\" has been taken. Please go back and try another name");
036 }
037 if(validate_username($username, $db) == 1) {
038 include('page_header.'.$phpEx);
039 die("The username you chose, \"$username\" has been disallowed by the administrator. Please go back and try another name");
040 }
041
042 if($password != $password_rep) {
043 include('page_header.'.$phpEx);
044 die("The passwords you entered do not match. Please go back and try again");
045 }
046
047 $sig = str_replace("\n", "<BR>", $sig);
048 $sig = addslashes($sig);
049 $occ = addslashes($occ);
050 $intrest = addslashes($intrest);
051 $from = addslashes($from);
052 $passwd = md5($password);
053 $regdate = date("M d, Y");
054
055 if($website == "http://")
056 $website = "";
057
058 if($viewemail == 1) {
059 $sqlviewemail = "1";
060 }
061 else {
062 $sqlviewemail = "0";
063 }
064 $sql = "SELECT max(user_id) AS total FROM users";
065 if(!$r = mysql_query($sql, $db))
066 die("Error connecting to the database.");
067 list($total) = mysql_fetch_array($r);
068 $total += 1;
069 $sql = "INSERT INTO users (user_id, username, user_regdate, user_email, user_icq, user_password, user_occ, user_intrest, user_from, user_website, user_sig, user_aim, user_viewemail, user_yim, user_msnm) VALUES ('$total', '$username', '$regdate', '$email', '$icq', '$passwd', '$occ', '$intrest', '$from', '$website', '$sig', '$aim', '$sqlviewemail', '$yim', '$msnm')";
070 if(!$result = mysql_query($sql, $db)) {
071 include('page_header.'.$phpEx);
072 die("An Error Occured while trying to add the information into the database. Please go back and try again. <BR>$sql<BR>$mysql_error()");
073 }
074
075 if($cookie_username) {
076 $time = (time() + 3600 * 24 * 30 * 12);
077 setcookie($cookiename, $total, $time, $cookiepath, $cookiedomain, $cookiesecure);
078 }
079 include('page_header.'.$phpEx);
080
081 $message = "Welcome to $sitename forums!\nPlease keep this email for your records!\n\n";
082 $message .= "Your account information is as follows:\n";
083 $message .= "----------------------------\n";
084 $message .= "Username: $username\n";
085 $message .= "Password: $password\n";
086 $message .="\nPlease do not forget your password as it has been encrypted in our database and we cannot retrive it for you.";
087 $message .= " However, should you forget your password we provide an easy to use script to generate and email a new, random, password.\nThank you for registering.";
088 $message .= "\r\n$email_sig";
089
090 mail($email, "Welcome to $sitename Forums", $message, "From: $email_from");
091 echo "<p>You have been added to the database.<p>Click <a href=\"$url_phpbb/index.$phpEx\">here</a> to return to the forums index page.<br>Thank you for registering!<p><br>";
092 }
093 else {
094 include('page_header.'.$phpEx);
095 ?>
096 <FORM ACTION="<?php echo $PHP_SELF?>" METHOD="POST">
097 <TABLE BORDER="0" WIDTH="<?php echo $TableWidth?>" CELLPADDING="1" CELLSPACING="0" ALIGN="CENTER" VALIGN="TOP"><TR><TD BGCOLOR="<?php echo $table_bgcolor?>">
098 <TABLE BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="100%">
099 <TR ALIGN="LEFT">
100 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>User Name: *</b></FONT><br><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize1?>" COLOR="<?php echo $textcolor?>">(Must be unique. No 2 users can have the same Username)</FONT></TD>
101 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="username" SIZE="25" MAXLENGTH="40"></TD>
102 </TR>
103 <TR ALIGN="LEFT">
104 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Password: *</b></TD>
105 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="PASSWORD" NAME="password" SIZE="25" MAXLENGTH="25"></TD>
106 </TR>
107 <TR ALIGN="LEFT">
108 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Retype Password: *</b></TD>
109 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="PASSWORD" NAME="password_rep" SIZE="25" MAXLENGTH="25"></TD>
110 </TR>
111
112 <TR ALIGN="LEFT">
113 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>EMail Address: *<b></TD>
114 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="email" SIZE="25" MAXLENGTH="50"></TD>
115 </TR>
116 <TR ALIGN="LEFT">
117 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>ICQ Number: <b></TD>
118 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="icq" SIZE="10" MAXLENGTH="15"></TD>
119 </TR>
120 <TR ALIGN="LEFT">
121 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>AIM Name: <b></TD>
122 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="aim" SIZE="15" MAXLENGTH="18"></TD>
123 </TR>
124 <TR ALIGN="LEFT">
125 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Yahoo Messanger: <b></TD>
126 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="yim" SIZE="25" MAXLENGTH="25"></TD>
127 </TR>
128 <TR ALIGN="LEFT">
129 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>MSN Messanger: <b></TD>
130 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="msnm" SIZE="25" MAXLENGTH="25"></TD>
131 </TR>
132 <TR ALIGN="LEFT">
133 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Web Site Address: <b></TD>
134 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="website" SIZE="25" MAXLENGTH="40" VALUE="http://"></TD>
135 </TR>
136 <TR ALIGN="LEFT">
137 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Location: <b></TD>
138 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="from" SIZE="25" MAXLENGTH="40"></TD>
139 </TR>
140 <TR ALIGN="LEFT">
141 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Occupation: <b></TD>
142 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="occ" SIZE="25" MAXLENGTH="40"></TD>
143 </TR>
144 <TR ALIGN="LEFT">
145 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Intrests: <b></TD>
146 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="intrest" SIZE="25" MAXLENGTH="40"></TD>
147 </TR>
148 <TR ALIGN="LEFT">
149 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Signature:</b><br><font size=-2>This is a block of text that can be added to posts you make.<BR>255 chars max!</font></TD>
150 <TD BGCOLOR="<?php echo $color2?>"><TEXTAREA NAME="sig" ROWS=6 COLS=45></TEXTAREA></TD>
151 </TR>
152 <TR ALIGN="LEFT">
153 <TD BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<? echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Options:</b></TD>
154 <TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="CHECKBOX" NAME="viewemail" VALUE="1"> Allow other users to view my email address<BR>
155 <INPUT TYPE="CHECKBOX" NAME="cookie_username" VALUE="1"> Store username in a cookie for 1 year.<BR>
156 </TD>
157 </TR>
158 <TR ALIGN="LEFT">
159 <TD BGCOLOR="<?php echo $color1?>" colspan="2"><font size=-1>Items marked with a * are required</font></TD>
160 </TR>
161 <TR>
162 <TD BGCOLOR="<?php echo $color1?>" colspan="2" ALIGN="CENTER">
163 <INPUT TYPE="HIDDEN" NAME="forum" VALUE="<?php echo $forum?>">
164 <INPUT TYPE="HIDDEN" NAME="topic_id" VALUE="<?php echo $topic?>">
165 <INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit"> <INPUT TYPE="RESET" VALUE="Clear">
166 </TR>
167 </TABLE></TD></TR></TABLE>
168 </FORM>
169 <?php
170 }
171 require('page_tail.'.$phpEx);
172 ?>
173