3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2014 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2014 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: members.php - Last Update: 07/10/2014 SVN 788 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="members.php"||
$File3Name=="/members.php") {
21 // Check if we can goto admin cp
22 if($_SESSION['UserGroup']==$Settings['GuestGroup']||
$GroupInfo['HasAdminCP']=="no") {
23 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
24 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
25 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
26 if(!isset($_POST['update'])) { $_POST['update'] = null; }
27 if(!isset($_POST['gid'])) { $_POST['gid'] = "0"; }
28 if(!isset($_POST['search'])) { $_POST['search'] = "%"; }
29 if(!is_numeric($_POST['gid'])) { $_POST['gid'] = "0"; }
30 $Error = null; $errorstr = null;
32 <table
class="Table3">
33 <tr style
="width: 100%; vertical-align: top;">
34 <td style
="width: 15%; vertical-align: top;">
36 require($SettDir['admin'].'table.php');
39 <td style
="width: 85%; vertical-align: top;">
40 <?php
if($_POST['act']=="validate"&&$_POST['update']=="now"&&$_GET['act']=="validate"&&$_POST['id']=="0") {
41 $_POST['act'] = null; $_POST['update'] = null; }
42 if($_GET['act']=="validate"&&$_POST['update']!="now") {
43 $admincptitle = " ".$ThemeSet['TitleDivider']." Validating Members";
45 <div
class="TableMenuBorder">
46 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
47 <div
class="TableMenuRow1">
48 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=validate
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Validating Members Manager
</a
></div
>
50 <table
class="TableMenu" style
="width: 100%;">
51 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
52 <tr
class="TableMenuRow1">
53 <td
class="TableMenuColumn1"><span style
="float: left;">
54 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=validate
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Validating Members Manager
</a
>
55 </span
><span style
="float: right;"> 
;</span
></td
>
57 <tr
class="TableMenuRow2">
58 <th
class="TableMenuColumn2" style
="width: 100%; text-align: left;">
59 <span style
="float: left;"> 
;Validating Members Manager
: </span
>
60 <span style
="float: right;"> 
;</span
>
63 <tr
class="TableMenuRow3">
64 <td
class="TableMenuColumn3">
65 <form style
="display: inline;" method
="post" id
="acptool" action
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=validate
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
66 <table style
="text-align: left;">
67 <tr style
="text-align: left;">
68 <td style
="width: 50%;"><label
class="TextBoxLabel" for="id">Member to validate
:</label
></td
>
69 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="id" id
="id">
71 $gquerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['ValidateGroup']));
72 $gresults=sql_query($gquerys,$SQLStat);
73 $VGroupID=sql_result($gresults,0,"id");
74 sql_free_result($gresults);
75 $getmemidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE (\"GroupID\"=%i AND \"id\"<>-1) OR (\"Validated\"='no' AND \"id\"<>-1)", array($VGroupID));
76 $getmemidr=sql_query($getmemidq,$SQLStat);
77 $getmemidnum=sql_num_rows($getmemidr);
79 if($getmemidnum<1) { ?
>
80 <option value
="0">None
</option
>
82 while ($getmemidi < $getmemidnum) {
83 $getmemidID=sql_result($getmemidr,$getmemidi,"id");
84 $getmemidName=sql_result($getmemidr,$getmemidi,"Name");
86 <option value
="<?php echo $getmemidID; ?>"><?php
echo $getmemidName; ?
></option
>
88 sql_free_result($getmemidr); ?
>
91 <table style
="text-align: left;">
92 <tr style
="text-align: left;">
93 <td style
="width: 100%;">
94 <input type
="hidden" name
="act" value
="validate" style
="display: none;" />
95 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
96 <input type
="submit" class="Button" value
="Validate Member" name
="Apply_Changes" />
97 <input type
="reset" value
="Reset Form" class="Button" name
="Reset_Form" />
102 <tr
class="TableMenuRow4">
103 <td
class="TableMenuColumn4"> 
;</td
>
107 <?php
} if($_POST['act']=="validate"&&$_POST['update']=="now"&&$_GET['act']=="validate"&&$_POST['id']!="0") {
108 $mguerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['MemberGroup']));
109 $mgresults=sql_query($mguerys,$SQLStat);
110 $MGroupID=sql_result($mgresults,0,"id");
111 sql_free_result($mgresults);
112 $gquerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['ValidateGroup']));
113 $gresults=sql_query($gquerys,$SQLStat);
114 $VGroupID=sql_result($gresults,0,"id");
115 sql_free_result($gresults);
116 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_POST['id']));
117 $result=sql_query($query,$SQLStat);
118 $num=sql_num_rows($result);
120 $VMemName=sql_result($result,$i,"Name");
121 $VMemGroup=sql_result($result,$i,"GroupID");
122 $VMemValidated=sql_result($result,$i,"Validated");
123 $admincptitle = " ".$ThemeSet['TitleDivider']." Validating Members";
124 redirect("refresh",$rbasedir.url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=members",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin'],FALSE),"4");
125 if($VMemGroup==$VGroupID) {
126 $query = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"GroupID\"='%s', \"Validated\"='%s' WHERE \"id\"=%i", array($MGroupID, "yes", $_POST['id']));
127 sql_query($query,$SQLStat); }
128 if($VMemGroup!=$VGroupID&&$VMemValidated=="no") {
129 $query = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Validated\"='%s' WHERE \"id\"=%i", array("yes", $_POST['id']));
130 sql_query($query,$SQLStat); }
132 <div
class="TableMenuBorder">
133 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
134 <div
class="TableMenuRow1">
135 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings
</a
></div
>
137 <table
class="TableMenu" style
="width: 100%;">
138 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
139 <tr
class="TableMenuRow1">
140 <td
class="TableMenuColumn1"><span style
="float: left;">
141 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings
</a
>
142 </span
><span style
="float: right;"> 
;</span
></td
>
144 <tr id
="ProfileTitle" class="TableMenuRow2">
145 <th
class="TableMenuColumn2">Updating Settings
</th
>
147 <tr
class="TableMenuRow3" id
="ProfileUpdate">
148 <td
class="TableMenuColumn3">
149 <div style
="text-align: center;">
150 <br
/><?php
echo $VMemName; ?
> was validated successfully
.<br
/> <a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Click here
</a
> to back to admin cp
.<br
/> 
;
153 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
154 <td
class="TableMenuColumn4"> 
;</td
>
156 <?php
} if($_POST['act']=="deletemember"&&$_POST['update']=="now"&&$_GET['act']=="deletemember"&&
157 ($_POST['id']=="0"||
$_POST['id']=="1"||
$_POST['id']=="-1")) {
158 $_POST['act'] = null; $_POST['update'] = null; }
159 if($_GET['act']=="deletemember"&&$_POST['update']!="now") {
160 $admincptitle = " ".$ThemeSet['TitleDivider']." Deleting Members";
162 <div
class="TableMenuBorder">
163 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
164 <div
class="TableMenuRow1">
165 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=deletemember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Deleting Members Manager
</a
></div
>
167 <table
class="TableMenu" style
="width: 100%;">
168 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
169 <tr
class="TableMenuRow1">
170 <td
class="TableMenuColumn1"><span style
="float: left;">
171 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=deletemember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Deleting Members Manager
</a
>
172 </span
><span style
="float: right;"> 
;</span
></td
>
174 <tr
class="TableMenuRow2">
175 <th
class="TableMenuColumn2" style
="width: 100%; text-align: left;">
176 <span style
="float: left;"> 
;Deleting Members Manager
: </span
>
177 <span style
="float: right;"> 
;</span
>
180 <tr
class="TableMenuRow3">
181 <td
class="TableMenuColumn3">
182 <form style
="display: inline;" method
="post" id
="acptool" action
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=deletemember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
183 <table style
="text-align: left;">
184 <tr style
="text-align: left;">
185 <td style
="width: 50%;"><label
class="TextBoxLabel" for="id">Member to delete
:</label
></td
>
186 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="id" id
="id">
188 $getmemidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE (\"id\"<>-1 AND \"id\"<>1)", array(null));
189 $getmemidr=sql_query($getmemidq,$SQLStat);
190 $getmemidnum=sql_num_rows($getmemidr);
192 if($getmemidnum<1) { ?
>
193 <option value
="0">None
</option
>
195 while ($getmemidi < $getmemidnum) {
196 $getmemidID=sql_result($getmemidr,$getmemidi,"id");
197 $getmemidName=sql_result($getmemidr,$getmemidi,"Name");
199 <option value
="<?php echo $getmemidID; ?>"><?php
echo $getmemidName; ?
></option
>
200 <?php ++
$getmemidi; }
201 sql_free_result($getmemidr); ?
>
204 <table style
="text-align: left;">
205 <tr style
="text-align: left;">
206 <td style
="width: 100%;">
207 <input type
="hidden" name
="act" value
="deletemember" style
="display: none;" />
208 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
209 <input type
="submit" class="Button" value
="Delete Member" name
="Apply_Changes" />
210 <input type
="reset" value
="Reset Form" class="Button" name
="Reset_Form" />
215 <tr
class="TableMenuRow4">
216 <td
class="TableMenuColumn4"> 
;</td
>
220 <?php
} if($_POST['act']=="deletemember"&&$_POST['update']=="now"&&$_GET['act']=="deletemember"&&
221 ($_POST['id']!="0"||
$_POST['id']!="1"||
$_POST['id']!="-1")) {
222 $DMemName = GetUserName($_POST['id'],$Settings['sqltable']);
223 $DMemName = $DMemName['Name'];
224 if($DMemName!==null&&($_POST['id']!="0"||
$_POST['id']!="1"||
$_POST['id']!="-1")) {
225 $dmquery = sql_pre_query("DELETE FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i", array($_POST['id']));
226 sql_query($dmquery,$SQLStat);
227 $dmquery = sql_pre_query("DELETE FROM \"".$Settings['sqltable']."mempermissions\" WHERE \"id\"=%i", array($_POST['id']));
228 sql_query($dmquery,$SQLStat);
229 $dmgquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."events\" SET \"GuestName\"='%s',\"UserID\"=-1 WHERE \"UserID\"=%i", array($DMemName,$_POST['id']));
230 sql_query($dmgquery,$SQLStat);
231 $dmgquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."messenger\" SET \"GuestName\"='%s',\"SenderID\"=-1 WHERE \"SenderID\"=%i", array($DMemName,$_POST['id']));
232 sql_query($dmgquery,$SQLStat);
233 $dmgquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."posts\" SET \"GuestName\"='%s',\"UserID\"=-1 WHERE \"UserID\"=%i", array($DMemName,$_POST['id']));
234 sql_query($dmgquery,$SQLStat);
235 $dmgquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"GuestName\"='%s',\"UserID\"=-1 WHERE \"UserID\"=%i", array($DMemName,$_POST['id']));
236 sql_query($dmgquery,$SQLStat); }
238 <div
class="TableMenuBorder">
239 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
240 <div
class="TableMenuRow1">
241 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings
</a
></div
>
243 <table
class="TableMenu" style
="width: 100%;">
244 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
245 <tr
class="TableMenuRow1">
246 <td
class="TableMenuColumn1"><span style
="float: left;">
247 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings
</a
>
248 </span
><span style
="float: right;"> 
;</span
></td
>
250 <tr id
="ProfileTitle" class="TableMenuRow2">
251 <th
class="TableMenuColumn2">Updating Settings
</th
>
253 <tr
class="TableMenuRow3" id
="ProfileUpdate">
254 <td
class="TableMenuColumn3">
255 <div style
="text-align: center;">
256 <br
/><?php
echo $DMemName; ?
> was deleted successfully
.<br
/> <a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Click here
</a
> to back to admin cp
.<br
/> 
;
259 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
260 <td
class="TableMenuColumn4"> 
;</td
>
262 <?php
} if($_POST['act']=="editmember"&&$_POST['update']=="now"&&$_GET['act']=="editmember"&&
263 ($_POST['id']=="0"||
$_POST['id']=="-1")) {
264 $_POST['act'] = null; $_POST['update'] = null; }
265 if($_GET['act']=="editmember"&&$_POST['update']!="now"&&!isset($_POST['id'])) {
266 $admincptitle = " ".$ThemeSet['TitleDivider']." Editing Members";
267 $_POST['search'] = stripcslashes(htmlspecialchars($_POST['search'], ENT_QUOTES
, $Settings['charset']));
268 //$_POST['search'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['search']);
269 $_POST['search'] = remove_spaces($_POST['search']);
271 <div
class="TableMenuBorder">
272 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
273 <div
class="TableMenuRow1">
274 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Editing Members Manager
</a
></div
>
276 <table
class="TableMenu" style
="width: 100%;">
277 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
278 <tr
class="TableMenuRow1">
279 <td
class="TableMenuColumn1"><span style
="float: left;">
280 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Editing Members Manager
</a
>
281 </span
><span style
="float: right;"> 
;</span
></td
>
283 <tr
class="TableMenuRow2">
284 <th
class="TableMenuColumn2" style
="width: 100%; text-align: left;">
285 <span style
="float: left;"> 
;Editing Members Manager
: </span
>
286 <span style
="float: right;"> 
;</span
>
289 <tr
class="TableMenuRow3">
290 <td
class="TableMenuColumn3">
291 <form style
="display: inline;" method
="post" id
="acpstool" action
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
292 <table style
="text-align: left;">
293 <tr style
="text-align: left;">
294 <td style
="width: 50%;"><label
class="TextBoxLabel" for="search">Search
for member name
:</label
></td
>
295 <td style
="width: 50%;"><input type
="text" name
="search" class="TextBox" id
="search" size
="20" value
="<?php echo $_POST['search']; ?>" /></td
>
297 <table style
="text-align: left;">
298 <tr style
="text-align: left;">
299 <td style
="width: 100%;">
300 <input type
="submit" class="Button" value
="Search" name
="Apply_Changes" />
303 <?php
if(isset($_POST['search'])) { ?
>
304 <form style
="display: inline;" method
="post" id
="acptool" action
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
305 <table style
="text-align: left;">
306 <tr style
="text-align: left;">
307 <td style
="width: 50%;"><label
class="TextBoxLabel" for="id">Member to edit
:</label
></td
>
308 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="id" id
="id">
310 $getmemidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Name\" LIKE '%s' AND (\"id\"<>-1)", array($_POST['search']));
311 $getmemidr=sql_query($getmemidq,$SQLStat);
312 $getmemidnum=sql_num_rows($getmemidr);
314 if($getmemidnum<1) { ?
>
315 <option value
="0">None
</option
>
317 while ($getmemidi < $getmemidnum) {
318 $getmemidID=sql_result($getmemidr,$getmemidi,"id");
319 $getmemidName=sql_result($getmemidr,$getmemidi,"Name");
321 <option value
="<?php echo $getmemidID; ?>"><?php
echo $getmemidName; ?
></option
>
322 <?php ++
$getmemidi; }
323 sql_free_result($getmemidr); ?
>
326 <table style
="text-align: left;">
327 <tr style
="text-align: left;">
328 <td style
="width: 100%;">
329 <input type
="hidden" name
="act" value
="editmember" style
="display: none;" />
330 <input type
="submit" class="Button" value
="Edit Member" name
="Apply_Changes" />
331 <input type
="reset" value
="Reset Form" class="Button" name
="Reset_Form" />
336 <tr
class="TableMenuRow4">
337 <td
class="TableMenuColumn4"> 
;</td
>
341 <?php
} if($_POST['act']=="editmember"&&$_POST['update']!="now"&&$_GET['act']=="editmember"&&
342 ($_POST['id']!="0"||
$_POST['id']!="-1")) {
343 $admincptitle = " ".$ThemeSet['TitleDivider']." Editing Members";
344 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_POST['id']));
345 $result=sql_query($query,$SQLStat);
346 $num=sql_num_rows($result);
348 redirect("location",$rbasedir.url_maker($exfile['admin'],$Settings['file_ext'],"act=editmember",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin'],false));
349 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
350 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
351 $EditMem['ID']=sql_result($result,0,"id");
352 $EditMem['Name']=sql_result($result,0,"Name");
353 $EditMem['Email']=sql_result($result,0,"Email");
354 $EditMem['GroupID']=sql_result($result,0,"GroupID");
355 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($EditMem['GroupID']));
356 $gresult=sql_query($gquery,$SQLStat);
357 $EditMem['Group']=sql_result($gresult,0,"Name");
358 sql_free_result($gresult);
359 $EditMem['LevelID']=sql_result($result,0,"LevelID");
360 $lquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."levels\" WHERE \"id\"=%i LIMIT 1", array($EditMem['LevelID']));
361 $lresult=sql_query($lquery,$SQLStat);
362 $EditMem['Level']=sql_result($lresult,0,"Name");
363 sql_free_result($lresult);
364 $EditMem['Validated']=sql_result($result,0,"Validated");
365 $EditMem['HiddenMember']=sql_result($result,0,"HiddenMember");
366 $EditMem['WarnLevel']=sql_result($result,0,"WarnLevel");
367 $EditMem['BanTime']=sql_result($result,0,"BanTime");
368 if($EditMem['BanTime']!=""&&$EditMem['BanTime']>1) {
369 $BanMonth=GMTimeChange("m",$EditMem['BanTime'],0,0,"off");
370 $BanDay=GMTimeChange("d",$EditMem['BanTime'],0,0,"off");
371 $BanYear=GMTimeChange("Y",$EditMem['BanTime'],0,0,"off");
372 $EditMem['BanTime'] = $BanMonth."/".$BanDay."/".$BanYear; }
373 $EditMem['Interests']=sql_result($result,0,"Interests");
374 $EditMem['Signature']=sql_result($result,0,"Signature");
375 $EditMem['Avatar']=sql_result($result,0,"Avatar");
376 $EditMem['AvatarSize']=sql_result($result,0,"AvatarSize");
377 $EditMem['Title']=sql_result($result,0,"Title");
378 $EditMem['Website']=sql_result($result,0,"Website");
379 $EditMem['Gender']=sql_result($result,0,"Gender");
380 $EditMem['PostCount']=sql_result($result,0,"PostCount");
381 $EditMem['Karma']=sql_result($result,0,"Karma");
382 $EditMem['TimeZone']=sql_result($result,0,"TimeZone");
383 $EditMem['DST']=sql_result($result,0,"DST");
384 $EditMem['IP']=sql_result($result,0,"IP");
385 $mpquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."mempermissions\" WHERE \"id\"=%i LIMIT 1", array($_POST['id']));
386 $mpresult=sql_query($mpquery,$SQLStat);
387 $mpnum=sql_num_rows($mpresult);
388 $EditMemPerm['PermissionID'] = sql_result($mpresult,0,"PermissionID");
389 $EditMemPerm['CanViewBoard'] = sql_result($mpresult,0,"CanViewBoard");
390 $EditMemPerm['CanViewOffLine'] = sql_result($mpresult,0,"CanViewOffLine");
391 $EditMemPerm['CanEditProfile'] = sql_result($mpresult,0,"CanEditProfile");
392 $EditMemPerm['CanAddEvents'] = sql_result($mpresult,0,"CanAddEvents");
393 $EditMemPerm['CanPM'] = sql_result($mpresult,0,"CanPM");
394 $EditMemPerm['CanSearch'] = sql_result($mpresult,0,"CanSearch");
395 $EditMemPerm['CanDoHTML'] = sql_result($mpresult,0,"CanDoHTML");
396 $EditMemPerm['CanUseBBags'] = sql_result($mpresult,0,"CanUseBBags");
397 $EditMemPerm['CanViewIPAddress'] = sql_result($mpresult,0,"CanViewIPAddress");
398 $EditMemPerm['CanViewUserAgent'] = sql_result($mpresult,0,"CanViewUserAgent");
399 $EditMemPerm['FloodControl'] = sql_result($mpresult,0,"FloodControl");
400 $EditMemPerm['SearchFlood'] = sql_result($mpresult,0,"SearchFlood");
401 $EditMemPerm['HasModCP'] = sql_result($mpresult,0,"HasModCP");
402 $EditMemPerm['HasAdminCP'] = sql_result($mpresult,0,"HasAdminCP");
403 $EditMemPerm['ViewDBInfo'] = sql_result($mpresult,0,"ViewDBInfo");
404 $MemIPList[0] = $EditMem['IP'];
406 $MemPostIP = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"UserID\"=%i ORDER BY \"TimeStamp\" ASC ", array($EditMem['ID']));
407 $mppresult = sql_query($MemPostIP,$SQLStat);
408 $mppnum = sql_num_rows($mppresult);
410 while ($mppi < $mppnum) {
411 $MemPostCheckIP=sql_result($mppresult,$mppi,"IP");
412 if(!in_array($MemPostCheckIP, $MemIPList)) {
413 $MemIPList[$MemIPArrayNum] = $MemPostCheckIP;
415 $MemPostCheckEditIP=sql_result($mppresult,$mppi,"EditIP");
416 if(!in_array($MemPostCheckEditIP, $MemIPList) && $MemPostCheckEditIP!="0") {
417 $MemIPList[$MemIPArrayNum] = $MemPostCheckEditIP;
420 sql_free_result($mppresult);
421 $MemEventIP = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"UserID\"=%i ORDER BY \"TimeStamp\" ASC ", array($EditMem['ID']));
422 $mepresult = sql_query($MemEventIP,$SQLStat);
423 $mepnum = sql_num_rows($mepresult);
425 while ($mepi < $mepnum) {
426 $MemEventCheckIP=sql_result($mepresult,$mepi,"IP");
427 if(!in_array($MemEventCheckIP, $MemIPList)) {
428 $MemIPList[$MemIPArrayNum] = $MemEventCheckIP;
431 sql_free_result($mepresult);
432 $fullistnum = count($MemIPList);
435 while($fullisti < $fullistnum) {
436 $fulliplist = $fulliplist." <a onclick=\"window.open(this.href);return false;\" href=\"".sprintf($IPCheckURL,$MemIPList[$fullisti])."\">".$MemIPList[$fullisti]."</a>";
439 <div
class="TableMenuBorder">
440 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
441 <div
class="TableMenuRow1">
442 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Editing Members Manager
</a
></div
>
444 <table
class="TableMenu" style
="width: 100%;">
445 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
446 <tr
class="TableMenuRow1">
447 <td
class="TableMenuColumn1"><span style
="float: left;">
448 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Editing Members Manager
</a
>
449 </span
><span style
="float: right;"> 
;</span
></td
>
451 <tr
class="TableMenuRow2">
452 <th
class="TableMenuColumn2" style
="width: 100%; text-align: left;">
453 <span style
="float: left;"> 
;Editing Members Manager
: </span
>
454 <span style
="float: right;"> 
;</span
>
457 <tr
class="TableMenuRow3">
458 <td
class="TableMenuColumn3">
459 <form style
="display: inline;" method
="post" id
="acptool" action
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=editmember
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
460 <table style
="text-align: left;">
461 <?php
if($GroupInfo['CanViewIPAddress']=="yes") { ?
>
462 <tr style
="text-align: left;">
463 <td style
="width: 50%;"><span
class="TextBoxLabel">Members IP
:</span
></td
>
464 <td style
="width: 50%;"><a onclick
="window.open(this.href);return false;" href
="<?php echo sprintf($IPCheckURL,$EditMem['IP']); ?>"><?php
echo $EditMem['IP']; ?
></a
></td
>
466 <?php
if($fulliplist!=null && $fullistnum>1) { ?
>
467 <tr style
="text-align: left;">
468 <td style
="width: 50%;"><span
class="TextBoxLabel">Members Old IPs
:</span
></td
>
469 <td style
="width: 50%;"><?php
echo $fulliplist; ?
></td
>
470 </tr
><?php
} } ?
><tr style
="text-align: left;">
471 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemName">Members Name
:</label
></td
>
472 <td style
="width: 50%;"><input type
="text" name
="MemName" class="TextBox" id
="MemName" size
="20" value
="<?php echo $EditMem['Name']; ?>" /></td
>
473 </tr
><tr style
="text-align: left;">
474 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemEmail">Members Email
:</label
></td
>
475 <td style
="width: 50%;"><input type
="text" name
="MemEmail" class="TextBox" id
="MemEmail" size
="20" value
="<?php echo $EditMem['Email']; ?>" /></td
>
476 <?php
if($EditMem['ID']!=1) { ?
>
477 </tr
><tr style
="text-align: left;">
478 <td style
="width: 50%;"><label
class="TextBoxLabel" for="gid">New Group
for Member
:</label
></td
>
479 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="gid" id
="gid">
481 $getgrpidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE (\"Name\"<>'%s' AND \"Name\"<>'%s')", array($Settings['GuestGroup'],$Settings['ValidateGroup']));
482 $getgrpidr=sql_query($getgrpidq,$SQLStat);
483 $getgrpidnum=sql_num_rows($getgrpidr);
485 if($getgrpidnum<1) { ?
>
486 <option value
="0">None
</option
>
488 while ($getgrpidi < $getgrpidnum) {
489 $getgrpidID=sql_result($getgrpidr,$getgrpidi,"id");
490 $getgrpidName=sql_result($getgrpidr,$getgrpidi,"Name");
492 if($getgrpidID==$EditMem['GroupID']) {
493 $GIDselected = " selected=\"selected\""; }
495 <option value
="<?php echo $getgrpidID; ?>"<?php
echo $GIDselected; ?
>><?php
echo $getgrpidName; ?
></option
>
496 <?php ++
$getgrpidi; }
497 sql_free_result($getgrpidr); ?
>
500 </tr
><tr style
="text-align: left;">
501 <td style
="width: 50%;"><label
class="TextBoxLabel" for="lid">New Level
for Member
:</label
></td
>
502 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="lid" id
="lid">
504 $getlevidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."levels\" WHERE (\"Name\"<>'%s' AND \"id\"<>%i)", array("Guest",-1));
505 $getlevidr=sql_query($getlevidq,$SQLStat);
506 $getlevidnum=sql_num_rows($getlevidr);
508 if($getlevidnum<1) { ?
>
509 <option value
="0">None
</option
>
511 while ($getlevidi < $getlevidnum) {
512 $getlevidID=sql_result($getlevidr,$getlevidi,"id");
513 $getlevidName=sql_result($getlevidr,$getlevidi,"Name");
515 if($getlevidID==$EditMem['LevelID']) {
516 $LIDselected = " selected=\"selected\""; }
518 <option value
="<?php echo $getlevidID; ?>"<?php
echo $LIDselected; ?
>><?php
echo $getlevidName; ?
></option
>
519 <?php ++
$getlevidi; }
520 sql_free_result($getlevidr); ?
>
523 </tr
><tr style
="text-align: left;">
524 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemHidden">Hidden Member
:</label
></td
>
525 <td style
="width: 50%;"><select id
="MemHidden" name
="MemHidden" class="TextBox">
526 <option selected
="selected" value
="<?php echo $EditMem['HiddenMember']; ?>">Old
Value (<?php
echo $EditMem['HiddenMember']; ?
>)</option
>
527 <option value
="no">No
</option
>
528 <option value
="yes">Yes
</option
>
530 </tr
><tr style
="text-align: left;">
531 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemWarnLevel">Members Warn Level
:</label
></td
>
532 <td style
="width: 50%;"><input type
="text" name
="MemWarnLevel" class="TextBox" id
="MemWarnLevel" size
="20" value
="<?php echo $EditMem['WarnLevel']; ?>" /></td
>
533 </tr
><tr style
="text-align: left;">
534 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemBanTime" title
="Enter date till user is banned in MM/DD/YYYY format. 0 means no ban and -1 means permanent ban.">Members Ban Time
:</label
></td
>
535 <td style
="width: 50%;"><input type
="text" name
="MemBanTime" class="TextBox" id
="MemBanTime" size
="20" value
="<?php echo $EditMem['BanTime']; ?>" /></td
>
536 </tr
><tr style
="text-align: left;">
537 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemPostCount">Members Post Count
:</label
></td
>
538 <td style
="width: 50%;"><input type
="text" name
="MemPostCount" class="TextBox" id
="MemPostCount" size
="20" value
="<?php echo $EditMem['PostCount']; ?>" /></td
>
539 </tr
><tr style
="text-align: left;">
540 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemKarma">Members Karma Count
:</label
></td
>
541 <td style
="width: 50%;"><input type
="text" name
="MemKarma" class="TextBox" id
="MemKarma" size
="20" value
="<?php echo $EditMem['Karma']; ?>" /></td
>
542 <?php
if($EditMem['ID']!=1) { ?
>
543 </tr
><tr style
="text-align: left;">
544 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemPermID">Members Permission ID
:</label
></td
>
545 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="MemPermID" id
="MemPermID">
546 <option
<?php
if($EditMemPerm['PermissionID']=="0") { echo "selected=\"selected\" "; } ?
>value
="0">use group info
</option
>
548 if($Settings['sqltype']=="mysql"||
$Settings['sqltype']=="mysqli"||
549 $Settings['sqltype']=="pgsql"||
$Settings['sqltype']=="sqlite") {
550 $getperidq = sql_pre_query("SELECT DISTINCT \"PermissionID\" FROM \"".$Settings['sqltable']."permissions\"", array(null)); }
551 if($Settings['sqltype']=="cubrid") {
552 $getperidq = sql_pre_query("SELECT DISTINCT \"permissionid\" FROM \"".$Settings['sqltable']."permissions\"", array(null)); }
553 $getperidr=sql_query($getperidq,$SQLStat);
554 $getperidnum=sql_num_rows($getperidr);
556 while ($getperidi < $getperidnum) {
557 if($Settings['sqltype']=="mysql"||
$Settings['sqltype']=="mysqli"||
558 $Settings['sqltype']=="pgsql"||
$Settings['sqltype']=="cubrid") {
559 $getperidID=sql_result($getperidr,$getperidi,"PermissionID"); }
560 if($Settings['sqltype']=="sqlite") {
561 $getperidID=sql_result($getperidr,$getperidi,"\"PermissionID\""); }
562 $getperidq2 = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."permissions\" WHERE \"PermissionID\"=%i ORDER BY \"PermissionID\" ASC", array($getperidID));
563 $getperidr2=sql_query($getperidq2,$SQLStat);
564 $getperidnum2=sql_num_rows($getperidr2);
565 $getperidName=sql_result($getperidr2,0,"Name");
566 sql_free_result($getperidr2);
568 <option
<?php
if($EditMemPerm['PermissionID']==$getperidID) { echo "selected=\"selected\" "; } ?
>value
="<?php echo $getperidID; ?>"><?php
echo $getperidName; ?
></option
>
569 <?php ++
$getperidi; }
570 sql_free_result($getperidr); ?
>
572 <?php
} if($EditMem['ID']!=1) { ?
>
573 </tr
><tr style
="text-align: left;">
574 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewBoard">Can View Board
:</label
></td
>
575 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewBoard" id
="CanViewBoard">
576 <option selected
="selected" value
="<?php echo $EditMemPerm['CanViewBoard']; ?>">Old
Value (<?php
echo $EditMemPerm['CanViewBoard']; ?
>)</option
>
577 <option value
="group">use group info
</option
>
578 <option value
="yes">yes
</option
>
579 <option value
="no">no
</option
>
581 </tr
><tr style
="text-align: left;">
582 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewOffLine">Can View OffLine Board
:</label
></td
>
583 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewOffLine" id
="CanViewOffLine">
584 <option selected
="selected" value
="<?php echo $EditMemPerm['CanViewOffLine']; ?>">Old
Value (<?php
echo $EditMemPerm['CanViewOffLine']; ?
>)</option
>
585 <option value
="group">use group info
</option
>
586 <option value
="yes">yes
</option
>
587 <option value
="no">no
</option
>
589 </tr
><tr style
="text-align: left;">
590 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanEditProfile">Can Edit Profile
:</label
></td
>
591 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanEditProfile" id
="CanEditProfile">
592 <option selected
="selected" value
="<?php echo $EditMemPerm['CanEditProfile']; ?>">Old
Value (<?php
echo $EditMemPerm['CanEditProfile']; ?
>)</option
>
593 <option value
="group">use group info
</option
>
594 <option value
="yes">yes
</option
>
595 <option value
="no">no
</option
>
597 </tr
><tr style
="text-align: left;">
598 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanAddEvents">Can Add Events
:</label
></td
>
599 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanAddEvents" id
="CanAddEvents">
600 <option selected
="selected" value
="<?php echo $EditMemPerm['CanAddEvents']; ?>">Old
Value (<?php
echo $EditMemPerm['CanAddEvents']; ?
>)</option
>
601 <option value
="group">use group info
</option
>
602 <option value
="yes">yes
</option
>
603 <option value
="no">no
</option
>
605 </tr
><tr style
="text-align: left;">
606 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanPM">Can PM
:</label
></td
>
607 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanPM" id
="CanPM">
608 <option selected
="selected" value
="<?php echo $EditMemPerm['CanPM']; ?>">Old
Value (<?php
echo $EditMemPerm['CanPM']; ?
>)</option
>
609 <option value
="group">use group info
</option
>
610 <option value
="yes">yes
</option
>
611 <option value
="no">no
</option
>
613 </tr
><tr style
="text-align: left;">
614 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanSearch">Can Search
:</label
></td
>
615 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanSearch" id
="CanSearch">
616 <option selected
="selected" value
="<?php echo $EditMemPerm['CanSearch']; ?>">Old
Value (<?php
echo $EditMemPerm['CanSearch']; ?
>)</option
>
617 <option value
="group">use group info
</option
>
618 <option value
="yes">yes
</option
>
619 <option value
="no">no
</option
>
622 </tr
><tr style
="text-align: left;">
623 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanDoHTML">Can DoHTML
:</label
></td
>
624 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanDoHTML" id
="CanDoHTML">
625 <option
<?php
if($EditMemPerm['CanDoHTML']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
626 <option
<?php
if($EditMemPerm['CanDoHTML']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
627 <option
<?php
if($EditMemPerm['CanDoHTML']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
629 </tr
><tr style
="text-align: left;">
630 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanUseBBags">Can
use BBags
:</label
></td
>
631 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanUseBBags" id
="CanUseBBags">
632 <option
<?php
if($EditMemPerm['CanUseBBags']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
633 <option
<?php
if($EditMemPerm['CanUseBBags']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
634 <option
<?php
if($EditMemPerm['CanUseBBags']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
636 <?php
if($EditMem['ID']!=1) { ?
>
637 </tr
><tr style
="text-align: left;">
638 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewIPAddress">Can view IP Address
:</label
></td
>
639 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewIPAddress" id
="CanViewIPAddress">
640 <option
<?php
if($EditMemPerm['CanViewIPAddress']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
641 <option
<?php
if($EditMemPerm['CanViewIPAddress']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
642 <option
<?php
if($EditMemPerm['CanViewIPAddress']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
644 </tr
><tr style
="text-align: left;">
645 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewUserAgent">Can view user agent
:</label
></td
>
646 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewUserAgent" id
="CanViewUserAgent">
647 <option
<?php
if($EditMemPerm['CanViewUserAgent']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
648 <option
<?php
if($EditMemPerm['CanViewUserAgent']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
649 <option
<?php
if($EditMemPerm['CanViewUserAgent']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
652 </tr
><tr style
="text-align: left;">
653 <td style
="width: 50%;"><label
class="TextBoxLabel" for="FloodControl">Flood Control in seconds
:</label
></td
>
654 <td style
="width: 50%;"><input type
="text" name
="FloodControl" class="TextBox" id
="FloodControl" size
="20" value
="<?php echo $EditMemPerm['FloodControl']; ?>" /></td
>
655 </tr
><tr style
="text-align: left;">
656 <td style
="width: 50%;"><label
class="TextBoxLabel" for="SearchFlood">Search Flood Control in seconds
:</label
></td
>
657 <td style
="width: 50%;"><input type
="text" name
="SearchFlood" class="TextBox" id
="SearchFlood" size
="20" value
="<?php echo $EditMemPerm['SearchFlood']; ?>" /></td
>
658 <?php
if($EditMem['ID']!=1) { ?
>
659 </tr
><tr style
="text-align: left;">
660 <td style
="width: 50%;"><label
class="TextBoxLabel" for="HasModCP">Can view Mod CP
:</label
></td
>
661 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="HasModCP" id
="HasModCP">
662 <option selected
="selected" value
="<?php echo $EditMemPerm['HasModCP']; ?>">Old
Value (<?php
echo $EditMemPerm['HasModCP']; ?
>)</option
>
663 <option value
="yes">yes
</option
>
664 <option value
="no">no
</option
>
666 </tr
><tr style
="text-align: left;">
667 <td style
="width: 50%;"><label
class="TextBoxLabel" for="HasAdminCP">Can view Admin CP
:</label
></td
>
668 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="HasAdminCP" id
="HasAdminCP">
669 <option selected
="selected" value
="<?php echo $EditMemPerm['HasAdminCP']; ?>">Old
Value (<?php
echo $EditMemPerm['HasAdminCP']; ?
>)</option
>
670 <option value
="group">use group info
</option
>
671 <option value
="yes">yes
</option
>
672 <option value
="no">no
</option
>
674 </tr
><tr style
="text-align: left;">
675 <td style
="width: 50%;"><label
class="TextBoxLabel" for="ViewDBInfo">Can view Database info
:</label
></td
>
676 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="ViewDBInfo" id
="ViewDBInfo">
677 <option selected
="selected" value
="<?php echo $EditMemPerm['ViewDBInfo']; ?>">Old
Value (<?php
echo $EditMemPerm['ViewDBInfo']; ?
>)</option
>
678 <option value
="group">use group info
</option
>
679 <option value
="yes">yes
</option
>
680 <option value
="no">no
</option
>
684 <table style
="text-align: left;">
685 <tr style
="text-align: left;">
686 <td style
="width: 100%;">
687 <input type
="hidden" name
="act" value
="editmember" style
="display: none;" />
688 <input type
="hidden" name
="id" value
="<?php echo $_POST['id']; ?>" style
="display: none;" />
689 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
690 <input type
="submit" class="Button" value
="Edit Member" name
="Apply_Changes" />
691 <input type
="reset" value
="Reset Form" class="Button" name
="Reset_Form" />
696 <tr
class="TableMenuRow4">
697 <td
class="TableMenuColumn4"> 
;</td
>
701 <?php
} if($_POST['act']=="editmember"&&$_POST['update']=="now"&&$_GET['act']=="editmember"&&
702 ($_POST['id']!="0"||
$_POST['id']!="-1")) {
703 $ggidquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['GuestGroup']));
704 $ggidresult=sql_query($ggidquery,$SQLStat);
705 $GuestGroupID=sql_result($ggidresult,0,"id");
706 sql_free_result($ggidresult);
707 $vgidquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['ValidateGroup']));
708 $vgidresult=sql_query($vgidquery,$SQLStat);
709 $ValidateGroupID=sql_result($vgidresult,0,"id");
710 sql_free_result($vgidresult);
711 $DMemName = GetUserName($_POST['id'],$Settings['sqltable']);
712 $DMemName = $DMemName['Name'];
713 $_POST['MemName'] = stripcslashes(htmlspecialchars($_POST['MemName'], ENT_QUOTES
, $Settings['charset']));
714 //$_POST['MemName'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['MemName']);
715 $_POST['MemName'] = remove_spaces($_POST['MemName']);
716 $_POST['MemEmail'] = remove_spaces($_POST['MemEmail']);
717 $username_check = null;
718 if($_POST['MemName']!=$DMemName) {
719 $tquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"GuestName\"='%s' WHERE \"UserID\"=%i", array($_POST['MemName'],$_POST['id']));
720 sql_query($tquery,$SQLStat);
721 $r1query = sql_pre_query("UPDATE \"".$Settings['sqltable']."posts\" SET \"GuestName\"='%s' WHERE \"UserID\"=%i", array($_POST['MemName'],$_POST['id']));
722 sql_query($r1query,$SQLStat);
723 $r2query = sql_pre_query("UPDATE \"".$Settings['sqltable']."posts\" SET \"EditUserName\"='%s' WHERE \"EditUser\"=%i", array($_POST['MemName'],$_POST['id']));
724 sql_query($r2query,$SQLStat);
725 $sql_username_check = sql_query(sql_pre_query("SELECT \"Name\" FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s'", array($_POST['MemName'])),$SQLStat);
726 $username_check = sql_num_rows($sql_username_check);
727 sql_free_result($sql_username_check); }
728 if($_POST['MemHidden']!="yes"&&$_POST['MemHidden']!="no") {
729 $_POST['MemHidden'] = "no"; }
730 if(!is_numeric($_POST['MemWarnLevel'])) { $_POST['MemWarnLevel'] = "0"; }
731 if(!is_numeric($_POST['MemPostCount'])) { $_POST['MemPostCount'] = "0"; }
732 if(!is_numeric($_POST['MemKarma'])) { $_POST['MemKarma'] = "0"; }
733 if($_POST['MemBanTime']!=null&&$_POST['MemBanTime']>1) {
734 $BirthExpl = explode("/",$_POST['MemBanTime']);
735 if(count($BirthExpl)!="3") {
736 $_POST['MemBanTime'] = "0"; $BirthExpl[0] = "0"; $BirthExpl[1] = "0"; $BirthExpl[2] = "0"; }
737 if(!is_numeric($BirthExpl[0])) { $BirthExpl[0] = "0"; }
738 if(!is_numeric($BirthExpl[1])) { $BirthExpl[1] = "0"; }
739 if(!is_numeric($BirthExpl[2])) { $BirthExpl[2] = "0"; }
740 if(count($BirthExpl)=="3"&&checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===true) {
741 if(is_numeric($BirthExpl[0])&&is_numeric($BirthExpl[1])&&is_numeric($BirthExpl[2])) {
742 if(pre_strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; }
743 if(pre_strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; }
744 if(pre_strlen($BirthExpl[0])=="2"&&pre_strlen($BirthExpl[1])=="2"&&pre_strlen($BirthExpl[2])=="4") {
745 $BirthIn = mktime(12,12,12,$BirthExpl[0],$BirthExpl[1],$BirthExpl[2]);
746 $BirthMonth=GMTimeChange("m",$BirthIn,0,0,"off");
747 $BirthDay=GMTimeChange("d",$BirthIn,0,0,"off");
748 $BirthYear=GMTimeChange("Y",$BirthIn,0,0,"off");
749 $_POST['MemBanTime'] = $BirthIn; }
750 if(pre_strlen($BirthExpl[0])!="2"||
pre_strlen($BirthExpl[1])!="2"||
pre_strlen($BirthExpl[2])!="4") {
751 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
752 if (!is_numeric($BirthExpl[0])||
!is_numeric($BirthExpl[1])||
!is_numeric($BirthExpl[2])) {
753 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
754 if(count($BirthExpl)=="3"&&
755 checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===false) {
756 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
757 if(count($BirthExpl)!="3") {
758 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
759 if($DMemName!==null&&($_POST['id']!="0"||
$_POST['id']!="-1")&&
760 ($_POST['gid']!=$GuestGroupID||
$_POST['gid']!=$ValidateGroupID)) {
761 if($_POST['MemName']==$DMemName||
$username_check>=1) {
762 if($_POST['id']!=1) {
763 if(!is_numeric($_POST['MemPermID'])) { $_POST['MemPermID'] = "0"; }
764 $dmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"GroupID\"=%i,\"LevelID\"=%i,\"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['gid'],$_POST['lid'],$_POST['MemHidden'],$_POST['MemWarnLevel'],$_POST['MemBanTime'],$_POST['MemPostCount'],$_POST['MemKarma'],$_POST['id']));
765 $dpmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."mempermissions\" SET \"PermissionID\"=%i,\"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"CanViewIPAddress\"='%s',\"CanViewUserAgent\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i,\"HasModCP\"='%s',\"HasAdminCP\"='%s',\"ViewDBInfo\"='%s' WHERE \"id\"=%i", array($_POST['MemPermID'],$_POST['CanViewBoard'],$_POST['CanViewOffLine'],$_POST['CanEditProfile'],$_POST['CanAddEvents'],$_POST['CanPM'],$_POST['CanSearch'],$_POST['CanDoHTML'],$_POST['CanUseBBags'],$_POST['CanViewIPAddress'],$_POST['CanViewUserAgent'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['HasModCP'],$_POST['HasAdminCP'],$_POST['ViewDBInfo'],$_POST['id'])); }
766 if($_POST['id']==1) {
767 $dmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['MemHidden'],$_POST['MemWarnLevel'],$_POST['MemBanTime'],$_POST['MemPostCount'],$_POST['MemKarma'],$_POST['id']));
768 $dpmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."mempermissions\" SET \"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i WHERE \"id\"=%i", array($_POST['CanDoHTML'],$_POST['CanUseBBags'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['id'])); } }
769 if($_POST['MemName']!=$DMemName&&$username_check<1) {
770 if($_POST['id']!=1) {
771 if(!is_numeric($_POST['MemPermID'])) { $_POST['MemPermID'] = "0"; }
772 $dmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Name\"='%s',\"GroupID\"=%i,\"LevelID\"=%i,\"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['MemName'],$_POST['gid'],$_POST['lid'],$_POST['MemHidden'],$_POST['MemWarnLevel'],$_POST['MemBanTime'],$_POST['MemPostCount'],$_POST['MemKarma'],$_POST['id']));
773 $dpmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."mempermissions\" SET \"PermissionID\"=%i,\"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"CanViewIPAddress\"='%s',\"CanViewUserAgent\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i,\"HasModCP\"='%s',\"HasAdminCP\"='%s',\"ViewDBInfo\"='%s' WHERE \"id\"=%i", array($_POST['MemPermID'],$_POST['CanViewBoard'],$_POST['CanViewOffLine'],$_POST['CanEditProfile'],$_POST['CanAddEvents'],$_POST['CanPM'],$_POST['CanSearch'],$_POST['CanDoHTML'],$_POST['CanUseBBags'],$_POST['CanViewIPAddress'],$_POST['CanViewUserAgent'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['HasModCP'],$_POST['HasAdminCP'],$_POST['ViewDBInfo'],$_POST['id'])); }
774 if($_POST['id']==1) {
775 $dmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Name\"='%s',\"HiddenMember\"='%s',\"WarnLevel\"=%i,\"BanTime\"=%i,\"PostCount\"=%i,\"Karma\"=%i WHERE \"id\"=%i", array($_POST['MemName'],$_POST['MemHidden'],$_POST['MemWarnLevel'],$_POST['MemBanTime'],$_POST['MemPostCount'],$_POST['MemKarma'],$_POST['id']));
776 $dpmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."mempermissions\" SET \"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBags\"='%s',\"CanViewIPAddress\"='%s',\"CanViewUserAgent\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i WHERE \"id\"=%i", array($_POST['CanViewBoard'],$_POST['CanViewOffLine'],$_POST['CanEditProfile'],$_POST['CanAddEvents'],$_POST['CanPM'],$_POST['CanSearch'],$_POST['CanDoHTML'],$_POST['CanUseBBags'],$_POST['CanViewIPAddress'],$_POST['CanViewUserAgent'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['id'])); } }
777 sql_query($dmquery,$SQLStat);
778 sql_query($dpmquery,$SQLStat); }
780 <div
class="TableMenuBorder">
781 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
782 <div
class="TableMenuRow1">
783 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings
</a
></div
>
785 <table
class="TableMenu" style
="width: 100%;">
786 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
787 <tr
class="TableMenuRow1">
788 <td
class="TableMenuColumn1"><span style
="float: left;">
789 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act
=".$_GET['act']."&menu
=members
",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings
</a
>
790 </span
><span style
="float: right;"> 
;</span
></td
>
792 <tr id
="ProfileTitle" class="TableMenuRow2">
793 <th
class="TableMenuColumn2">Updating Settings
</th
>
795 <tr
class="TableMenuRow3" id
="ProfileUpdate">
796 <td
class="TableMenuColumn3">
797 <div style
="text-align: center;">
798 <br
/><?php
echo $DMemName; ?
>'s member info was changed successfully.<br /> <a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=members",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Click here</a> to back to admin cp.<br />
801 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
802 <td
class="TableMenuColumn4"> 
;</td
>