Browse code

Update eFic2eFic bridge and default file backups

Clarissa Walker authored on 2026/09/08 10:18:30
Showing 1 changed files
... ...
@@ -53,9 +53,9 @@ function random_string ($charset_string, $length)
53 53
 		$email = escapestring($_POST['email']);
54 54
 		if(!isset($email) && !isADMIN) $output .= "<div style='text-align: center;'>"._EMAILREQUIRED."</div>";
55 55
 		else if($penname && !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= "<div style='text-align: center;'>"._BADUSERNAME."</div>";
56
-		else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) $output .= "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";
56
+		else if(!validEmail($email)) $output .= "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";
57 57
 		else if($action == "register") {
58
-			if(!$penname || empty($email) || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) || !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= write_error(_PENEMAILREQUIRED);
58
+			if(!$penname || !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= write_error(_PENEMAILREQUIRED);
59 59
 			else if($pwdsetting && empty($_POST['password'])) $output .= write_error(_PWDREQUIRED."  "._TRYAGAIN);
60 60
 			else  {
61 61
 				$result = dbquery("SELECT "._PENNAMEFIELD." FROM "._AUTHORTABLE." WHERE "._PENNAMEFIELD." = '".escapestring($penname)."'");
... ...
@@ -80,9 +80,9 @@ function random_string ($charset_string, $length)
80 80
 						$pass = $_POST['password2'];
81 81
 						$encryppass = md5($pass);
82 82
 					}
83
-					dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." (penname, realname, bio, email, date, password) VALUES ('".escapestring($penname)."', '".escapestring(strip_tags($_POST['realname']))."', '".strip_tags(escapestring($_POST['bio']), $allowed_tags)."', '$email', now(), '$encryppass')");
83
+					dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." (penname, realname, bio, email, date, password) VALUES ('".escapestring($penname)."', '".escapestring(strip_tags($_POST['realname']))."', '".strip_tags(escapestring($_POST['bio']), $allowed_tags)."', '$email'," . time() . ", '$encryppass')");
84 84
 					$useruid = dbinsertid();
85
-					if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, $useruid, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG')");
85
+					if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, $useruid, $_SERVER['REMOTE_ADDR']))."', '".$useruid. "', INET6_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG', " . time() . ")");
86 86
 					if(empty($siteskin)) {
87 87
 						$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
88 88
 						list($skin) = dbrow($skinquery);
... ...
@@ -108,6 +108,35 @@ function random_string ($charset_string, $length)
108 108
 					if(!$pwdsetting) $mailtext .= _SIGNUPWARNING;
109 109
 					include("includes/emailer.php");
110 110
 					sendemail($penname, $email, $sitename, $siteemail, $subject, $mailtext, "html");
111
+
112
+					/* registration notice */
113
+					if (isset($notifications))
114
+					{
115
+						$notifications = unserialize($notifications);
116
+					}
117
+
118
+					if(isset($notifications['registration_notify'])  && $notifications['registration_notify'])  {
119
+						if (isset($notifications['registration_toemail'])  && $notifications['registration_toemail'])
120
+						{
121
+							$RegSubject = "Registration Notice";
122
+							$RegIP = $_SERVER['REMOTE_ADDR'];
123
+							$RegHost = gethostbyaddr($RegIP);
124
+							$RegNoticeTo = $notifications['registration_toemail'];
125
+							$RegMessage = "Username: $penname" . "\r\n" . "Email: $email" . "\r\n" . "IP: $RegIP" . "\r\n" . "Host: $RegHost";
126
+							$RegMessage .= " registered on your site";
127
+							$RegMessage .= "<br>Profile link: " . "<a href='" . $url . "/viewuser.php?uid=" . $useruid . "'>" . $penname . "</a>";
128
+
129
+							$RegNoticeTo_array=explode(',', $RegNoticeTo);
130
+							foreach ($RegNoticeTo_array AS $RegNoticeTo_email) {
131
+								if(validEmail($RegNoticeTo_email)) {
132
+									sendemail($sitename, $RegNoticeTo_email, $siteemail, $siteemail, $RegSubject,  $RegMessage);
133
+								}
134
+							}
135
+
136
+						}
137
+					}
138
+					/* registration notice end */
139
+
111 140
 					dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
112 141
 					if(defined("AUTHORPREFIX")) dbquery("UPDATE ".AUTHORPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
113 142
 					unset($_POST['submit']);
... ...
@@ -133,7 +162,7 @@ function random_string ($charset_string, $length)
133 162
 				}
134 163
 				else {
135 164
 					dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
136
-					if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB')");
165
+					if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST['oldpenname'], $uid, $penname))."', '".USERUID."', INET6_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB', " . time() . ")");
137 166
 				}
138 167
 			}
139 168
 /* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
... ...
@@ -168,7 +197,7 @@ function random_string ($charset_string, $length)
168 197
 			list($tos) = dbrow($query);
169 198
 			$output .= "<div class='tblborder' style='width: 90%; margin: 1em auto;'>$tos</div>";
170 199
 		}
171
-		$output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" style='margin: 0 auto;' action=\"user.php?action=$action".($uid != USERUID ? "&uid=".$uid : "")."\">
200
+		$output .= "<div id='settingsform'><form method=\"POST\" id=\"editbio\" name=\"editbio\" enctype=\"multipart/form-data\" style='width: 260%; margin: 0 auto;' action=\"user.php?action=$action".($uid != USERUID ? "&uid=".$uid : "")."\">
172 201
 		<div><label for='newpenname'>"._PENNAME.":</label>";
173 202
 		if((isADMIN && uLEVEL == 1) || $action == "register")
174 203
 			$output .= "<INPUT name=\"newpenname\" type=\"text\" class=\"textbox\" maxlength=\"200\" value=\"".(isset($user) ? $user['penname'] : "")."\"><INPUT name=\"oldpenname\" type=\"hidden\" value=\"".(isset($user) ? $user['penname'] : "")."\"><font color=\"red\">*</font> ";
... ...
@@ -213,4 +242,4 @@ function random_string ($charset_string, $length)
213 242
 	 	}
214 243
 	 	$output .= "</div></form></div>".write_message("<font color=\"red\">*</font> "._REQUIREDFIELDS);
215 244
 	}
216
-?>
217 245
\ No newline at end of file
246
+?>
Browse code

Add eFic2eFic bridge and default file copies

Clarissa Walker authored on 2026/09/08 09:57:23
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,216 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// eFiction 3.2
4
+// Copyright (c) 2007 by Tammy Keefer
5
+// Valid HTML 4.01 Transitional
6
+// Based on eFiction 1.1
7
+// Copyright (C) 2003 by Rebecca Smallwood.
8
+// http://efiction.sourceforge.net/
9
+// ----------------------------------------------------------------------
10
+// LICENSE
11
+//
12
+// This program is free software; you can redistribute it and/or
13
+// modify it under the terms of the GNU General Public License (GPL)
14
+// as published by the Free Software Foundation; either version 2
15
+// of the License, or (at your option) any later version.
16
+//
17
+// This program is distributed in the hope that it will be useful,
18
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+// GNU General Public License for more details.
21
+//
22
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
23
+// ----------------------------------------------------------------------
24
+
25
+if(!defined("_CHARSET")) exit( );
26
+if(!function_exists("random_char")) {
27
+
28
+function random_char($string)
29
+{
30
+	$length = strlen($string);
31
+	$position = mt_rand(0, $length - 1);
32
+	$output = ($string[$position]);
33
+	return $output;
34
+}
35
+
36
+function random_string ($charset_string, $length)
37
+{
38
+	$return_string = random_char($charset_string);
39
+	for ($x = 1; $x < $length; $x++)
40
+	$return_string .= random_char($charset_string);
41
+	return $return_string;
42
+}
43
+
44
+}
45
+	$uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : false;
46
+	if(!$uid) $uid = USERUID;
47
+
48
+	if((!isADMIN || uLEVEL > 2) && $uid != USERUID && $action == "editbio") $output .= write_error(_NOTAUTHORIZED);
49
+	if(isMEMBER) $output .= "<div id=\"pagetitle\">"._EDITPERSONAL."</div>";
50
+	else $output .= "<div id=\"pagetitle\">"._NEWACCOUNT."</div>";
51
+	if(!empty($_POST['submit'])) {
52
+		$penname = isset($_POST['newpenname']) ? escapestring($_POST['newpenname']) : false;
53
+		$email = escapestring($_POST['email']);
54
+		if(!isset($email) && !isADMIN) $output .= "<div style='text-align: center;'>"._EMAILREQUIRED."</div>";
55
+		else if($penname && !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= "<div style='text-align: center;'>"._BADUSERNAME."</div>";
56
+		else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) $output .= "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";
57
+		else if($action == "register") {
58
+			if(!$penname || empty($email) || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) || !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= write_error(_PENEMAILREQUIRED);
59
+			else if($pwdsetting && empty($_POST['password'])) $output .= write_error(_PWDREQUIRED."  "._TRYAGAIN);
60
+			else  {
61
+				$result = dbquery("SELECT "._PENNAMEFIELD." FROM "._AUTHORTABLE." WHERE "._PENNAMEFIELD." = '".escapestring($penname)."'");
62
+				$result2 = dbquery("SELECT "._EMAILFIELD." as email FROM "._AUTHORTABLE." WHERE "._EMAILFIELD." = '$email'");
63
+				if($captcha && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL);
64
+				else if(dbnumrows($result) > 0) $output .= write_error(_PENNAMEINUSE."  "._TRYAGAIN);
65
+				else if(dbnumrows($result2) > 0) $output .= write_error(_EMAILINUSE."  "._TRYAGAIN);
66
+				else if(preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) {
67
+					if(!$pwdsetting) {
68
+						$charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ';
69
+						$pass = random_string($charset, 10);
70
+						$encryppass = md5($pass);
71
+					}
72
+					else {
73
+						if($_POST['password'] != $_POST['password2']) {
74
+							$output .=  write_error(_PASSWORDTWICE);
75
+							$tpl->assign("output", $output);
76
+							$tpl->printToScreen( );
77
+							dbclose( );
78
+							exit( );
79
+						}
80
+						$pass = $_POST['password2'];
81
+						$encryppass = md5($pass);
82
+					}
83
+					dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." (penname, realname, bio, email, date, password) VALUES ('".escapestring($penname)."', '".escapestring(strip_tags($_POST['realname']))."', '".strip_tags(escapestring($_POST['bio']), $allowed_tags)."', '$email', now(), '$encryppass')");
84
+					$useruid = dbinsertid();
85
+					if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, $useruid, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG')");
86
+					if(empty($siteskin)) {
87
+						$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
88
+						list($skin) = dbrow($skinquery);
89
+					}
90
+					else $skin = $siteskin;
91
+					dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(uid, userskin, storyindex, sortby, tinyMCE) VALUES('".$useruid."', '$skin', '$displayindex', '$defaultsort', '$tinyMCE')");
92
+/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
93
+					$fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
94
+					while($field = dbassoc($fields)) {
95
+						$uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false;
96
+						if(!$uid) continue;
97
+						$oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
98
+						if(dbnumrows($oldfield) > 0) {
99
+							$newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring($_POST["af_".$field['field_name']]) : false;
100
+							if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='$newinfo' WHERE uid = '$uid' AND field = '".$field['field_id']."'");
101
+							else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
102
+						}
103
+						else if(!empty($_POST["af_".$field['field_name']])) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorinfo(`uid`, `info`, `field`) VALUES('$uid', '".escapestring($_POST["af_".$field['field_name']])."', '".$field['field_id']."');");
104
+					}
105
+/* End dynamic fields */
106
+					$subject = _SIGNUPSUBJECT;
107
+					$mailtext = _SIGNUPMESSAGE._LOGIN.": $penname\n"._PASSWORD.": $pass \n\n";
108
+					if(!$pwdsetting) $mailtext .= _SIGNUPWARNING;
109
+					include("includes/emailer.php");
110
+					sendemail($penname, $email, $sitename, $siteemail, $subject, $mailtext, "html");
111
+					dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
112
+					if(defined("AUTHORPREFIX")) dbquery("UPDATE ".AUTHORPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
113
+					unset($_POST['submit']);
114
+					$output = write_message(_ACTIONSUCCESSFUL);
115
+					define("_LOGINCHECK", true);
116
+					include("user/login.php");
117
+				}
118
+				else $output .= _BADUSERNAME;
119
+			}
120
+		}
121
+		else{
122
+			 if(($_POST['password']) && ($_POST['password2'])) {
123
+				if($_POST['password'] == $_POST['password2']) {
124
+					$encryppassword = md5($_POST['password']);
125
+					dbquery("UPDATE "._AUTHORTABLE." SET password='$encryppassword' WHERE uid = '$uid'");
126
+				}
127
+				else $output .=  write_error(_PASSWORDTWICE);
128
+			}
129
+			if(isset($_POST['oldpenname']) && $penname != $_POST['oldpenname']) {
130
+				$checkresult = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE penname = '".escapestring($penname)."'");
131
+				if(dbnumrows($checkresult)) {
132
+					$output .= write_message(_PENNAMEINUSE."  "._TRYAGAIN);
133
+				}
134
+				else {
135
+					dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
136
+					if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB')");
137
+				}
138
+			}
139
+/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
140
+			$fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
141
+			while($field = dbassoc($fields)) {
142
+				$uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false;
143
+				if(!$uid) continue;
144
+				$oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
145
+				if(dbnumrows($oldfield) > 0) {
146
+					$newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring(descript($_POST["af_".$field['field_name']])) : false;
147
+					if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='".$newinfo."' WHERE uid = '$uid' AND field = '".descript($field['field_id'])."'");
148
+					else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
149
+				}
150
+				else if(!empty($_POST["af_".$field['field_name']])) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorinfo(`uid`, `info`, `field`) VALUES('$uid', '".escapestring($_POST["af_".$field['field_name']])."', '".$field['field_id']."');");
151
+			}
152
+/* End dynamic fields */
153
+			dbquery("UPDATE "._AUTHORTABLE." SET realname='".descript(strip_tags(escapestring($_POST['realname'])), $allowed_tags)."', email='$email', bio='".descript(strip_tags(escapestring($_POST['bio']), $allowed_tags))."', image='".($imageupload && !empty($_POST['image']) ? escapestring($_POST['image']) : "")."' WHERE uid = '$uid'");
154
+			$output .= write_message(_ACTIONSUCCESSFUL."  ".(isset($_GET['uid']) ? _BACK2ADMIN : _BACK2ACCT));
155
+		}
156
+	}
157
+	else {
158
+		if($action != "register") {
159
+			$result = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
160
+			$user = dbassoc($result);
161
+			$result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
162
+			while($field = dbassoc($result2)) {
163
+				$user["af_".$field['field']] = $field['info'];
164
+			}
165
+		}
166
+		if($action == "register") {
167
+			$query = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tos'");
168
+			list($tos) = dbrow($query);
169
+			$output .= "<div class='tblborder' style='width: 90%; margin: 1em auto;'>$tos</div>";
170
+		}
171
+		$output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" style='margin: 0 auto;' action=\"user.php?action=$action".($uid != USERUID ? "&uid=".$uid : "")."\">
172
+		<div><label for='newpenname'>"._PENNAME.":</label>";
173
+		if((isADMIN && uLEVEL == 1) || $action == "register")
174
+			$output .= "<INPUT name=\"newpenname\" type=\"text\" class=\"textbox\" maxlength=\"200\" value=\"".(isset($user) ? $user['penname'] : "")."\"><INPUT name=\"oldpenname\" type=\"hidden\" value=\"".(isset($user) ? $user['penname'] : "")."\"><font color=\"red\">*</font> ";
175
+		else if(isset($user)) $output .= " ".$user['penname'];
176
+		$output .= "</div>
177
+	 	<div><label for='realname'>"._REALNAME.": </label><INPUT type=\"text\" class=\"textbox=\" name=\"realname\" maxlength=\"200\" value=\"".(isset($user) ? $user['realname'] : "")."\"></div>
178
+	 	<div><label for='email'>"._EMAIL.":</label><INPUT  type=\"text\" class=\"textbox=\" name=\"email\" value=\"".(isset($user) ? $user['email'] : "")."\" maxlength=\"200\" size=\"35\"><font color=\"red\">*</font></div>
179
+	 	<div><label for='bio'>"._BIO.":</label></div>
180
+		<div style='width: 450px; margin: 0 auto;'><textarea class=\"textbox\" name=\"bio\" cols=\"50\" rows=\"6\">".(isset($user) ? stripslashes($user['bio']) : "")."</TEXTAREA></div>";
181
+/* The section adds fields to the form from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
182
+		$authorfields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
183
+		while($field = dbassoc($authorfields)) {
184
+			if($field['field_type'] == 1 || $field['field_type'] == 4 || $field['field_type'] == 6) 
185
+				$output .= "<div><label for='".$field['field_name']."'>".$field['field_title'].":</label>\n<input type='text' class='textbox' name='af_".$field['field_name']."'".(!empty($user["af_".$field['field_id']]) ? "value='".$user["af_".$field['field_id']]."'" : "").">\n</div>\n";
186
+			if($field['field_type'] == 2) {
187
+				$output .= "<div><label for='".$field['field_name']."'>".$field['field_title'].":</label>\n
188
+						<select class='textbox' name='af_".$field['field_name']."'>\n";
189
+				$opts = explode("|#|", $field['field_options']);
190
+				foreach($opts as $opt) {
191
+					$output .= "<option".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == $opt ? " selected" : "").">$opt</option>\n";
192
+				}
193
+				$output .= "</select>\n</div>\n";
194
+			}
195
+			if($field['field_type'] == 5) eval(stripslashes($field['field_code_in']));
196
+			if($field['field_type'] == 3) {
197
+				$output .= "<div class='fieldset'><span class='label'>".$field['field_title'].":</span>\n";
198
+				$output .= "<input type='radio' name='af_".$field['field_name']."' id='af_".$field['field_name']._YES."' value='"._YES."'".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == _YES ? "checked='checked'" : "")."> <label for='".$field['field_name']._YES."'>"._YES."</label>\n
199
+					<input type='radio' name='af_".$field['field_name']."' id='af_".$field['field_name']._NO."' value='"._NO."'".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == _NO ? "checked='checked'" : "")."> <label for='".$field['field_name']._NO."'>"._NO."</label></div>\n";
200
+			}
201
+		}
202
+/* End dynamic fields */
203
+	 	if($imageupload == "1")
204
+	 		$output .= "<div><label for='image'>"._IMAGE.":</label> <INPUT  type=\"text\" class=\"textbox=\" name=\"image\" maxlength=\"200\" value=\"".(!empty($user['image']) ? $user['image'] : "")."\"></div>";
205
+		if($action != "register" || $pwdsetting)
206
+	 	$output .= "<div><label for='password'>"._PASSWORD.":</label>  <INPUT name=\"password\" class=\"textbox\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>
207
+			<div><label for='password2'>"._PASSWORD2.":</label> <INPUT name=\"password2\" class=\"textbox=\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>";
208
+		if(!empty($captcha) && $action == "register") $output .= "<div><label for='userdigit'>"._CAPTCHANOTE."</label><input MAXLENGTH=5 SIZE=5 name=\"userdigit\" type=\"text\" value=\"\"><div style='text-align: center;'><img width=120 height=30 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div></div>";
209
+	 	$output .= "<div style='text-align: center; margin: 1em;'><INPUT type=\"hidden\" name=\"uid\" value=\"".(isset($user) ? $user['uid'] : "")."\"><INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\">";
210
+	 	if(!isADMIN)
211
+	 	{
212
+			 	$output .= " [<a href=\"admin.php?action=members&delete=$uid\">"._DELETE."</a>]";
213
+	 	}
214
+	 	$output .= "</div></form></div>".write_message("<font color=\"red\">*</font> "._REQUIREDFIELDS);
215
+	}
216
+?>
0 217
\ No newline at end of file