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-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: members.php - Last Update: 08/02/2019 SVN 905 - 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 $tmpusrcurtime = new DateTime();
370 $tmpusrcurtime->setTimestamp($EditMem['BanTime']);
371 $tmpusrcurtime->setTimezone($utctz);
372 $BanMonth=$tmpusrcurtime->format("m");
373 $BanDay=$tmpusrcurtime->format("d");
374 $BanYear=$tmpusrcurtime->format("Y");
375 $EditMem['BanTime'] = $BanMonth."/".$BanDay."/".$BanYear; }
376 $EditMem['Interests']=sql_result($result,0,"Interests");
377 $EditMem['Signature']=sql_result($result,0,"Signature");
378 $EditMem['Avatar']=sql_result($result,0,"Avatar");
379 $EditMem['AvatarSize']=sql_result($result,0,"AvatarSize");
380 $EditMem['Title']=sql_result($result,0,"Title");
381 $EditMem['Website']=sql_result($result,0,"Website");
382 $EditMem['Gender']=sql_result($result,0,"Gender");
383 $EditMem['PostCount']=sql_result($result,0,"PostCount");
384 $EditMem['Karma']=sql_result($result,0,"Karma");
385 $EditMem['TimeZone']=sql_result($result,0,"TimeZone");
386 $EditMem['DST']=sql_result($result,0,"DST");
387 $EditMem['IP']=sql_result($result,0,"IP");
388 $mpquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."mempermissions\" WHERE \"id\"=%i LIMIT 1", array($_POST['id']));
389 $mpresult=sql_query($mpquery,$SQLStat);
390 $mpnum=sql_num_rows($mpresult);
391 $EditMemPerm['PermissionID'] = sql_result($mpresult,0,"PermissionID");
392 $EditMemPerm['CanViewBoard'] = sql_result($mpresult,0,"CanViewBoard");
393 $EditMemPerm['CanViewOffLine'] = sql_result($mpresult,0,"CanViewOffLine");
394 $EditMemPerm['CanEditProfile'] = sql_result($mpresult,0,"CanEditProfile");
395 $EditMemPerm['CanAddEvents'] = sql_result($mpresult,0,"CanAddEvents");
396 $EditMemPerm['CanPM'] = sql_result($mpresult,0,"CanPM");
397 $EditMemPerm['CanSearch'] = sql_result($mpresult,0,"CanSearch");
398 $EditMemPerm['CanDoHTML'] = sql_result($mpresult,0,"CanDoHTML");
399 $EditMemPerm['CanUseBBTags'] = sql_result($mpresult,0,"CanUseBBTags");
400 $EditMemPerm['CanViewIPAddress'] = sql_result($mpresult,0,"CanViewIPAddress");
401 $EditMemPerm['CanViewUserAgent'] = sql_result($mpresult,0,"CanViewUserAgent");
402 $EditMemPerm['FloodControl'] = sql_result($mpresult,0,"FloodControl");
403 $EditMemPerm['SearchFlood'] = sql_result($mpresult,0,"SearchFlood");
404 $EditMemPerm['HasModCP'] = sql_result($mpresult,0,"HasModCP");
405 $EditMemPerm['HasAdminCP'] = sql_result($mpresult,0,"HasAdminCP");
406 $EditMemPerm['ViewDBInfo'] = sql_result($mpresult,0,"ViewDBInfo");
407 $MemIPList[0] = $EditMem['IP'];
409 $MemPostIP = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"UserID\"=%i ORDER BY \"TimeStamp\" ASC ", array($EditMem['ID']));
410 $mppresult = sql_query($MemPostIP,$SQLStat);
411 $mppnum = sql_num_rows($mppresult);
413 while ($mppi < $mppnum) {
414 $MemPostCheckIP=sql_result($mppresult,$mppi,"IP");
415 if(!in_array($MemPostCheckIP, $MemIPList)) {
416 $MemIPList[$MemIPArrayNum] = $MemPostCheckIP;
418 $MemPostCheckEditIP=sql_result($mppresult,$mppi,"EditIP");
419 if(!in_array($MemPostCheckEditIP, $MemIPList) && $MemPostCheckEditIP!="0") {
420 $MemIPList[$MemIPArrayNum] = $MemPostCheckEditIP;
423 sql_free_result($mppresult);
424 $MemEventIP = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"UserID\"=%i ORDER BY \"TimeStamp\" ASC ", array($EditMem['ID']));
425 $mepresult = sql_query($MemEventIP,$SQLStat);
426 $mepnum = sql_num_rows($mepresult);
428 while ($mepi < $mepnum) {
429 $MemEventCheckIP=sql_result($mepresult,$mepi,"IP");
430 if(!in_array($MemEventCheckIP, $MemIPList)) {
431 $MemIPList[$MemIPArrayNum] = $MemEventCheckIP;
434 sql_free_result($mepresult);
435 $fullistnum = count($MemIPList);
438 while($fullisti < $fullistnum) {
439 $fulliplist = $fulliplist." <a onclick=\"window.open(this.href);return false;\" href=\"".sprintf($IPCheckURL,$MemIPList[$fullisti])."\">".$MemIPList[$fullisti]."</a>";
442 <div
class="TableMenuBorder">
443 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
444 <div
class="TableMenuRow1">
445 <?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
>
447 <table
class="TableMenu" style
="width: 100%;">
448 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
449 <tr
class="TableMenuRow1">
450 <td
class="TableMenuColumn1"><span style
="float: left;">
451 <?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
>
452 </span
><span style
="float: right;"> 
;</span
></td
>
454 <tr
class="TableMenuRow2">
455 <th
class="TableMenuColumn2" style
="width: 100%; text-align: left;">
456 <span style
="float: left;"> 
;Editing Members Manager
: </span
>
457 <span style
="float: right;"> 
;</span
>
460 <tr
class="TableMenuRow3">
461 <td
class="TableMenuColumn3">
462 <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']); ?>">
463 <table style
="text-align: left;">
464 <?php
if($GroupInfo['CanViewIPAddress']=="yes") { ?
>
465 <tr style
="text-align: left;">
466 <td style
="width: 50%;"><span
class="TextBoxLabel">Members IP
:</span
></td
>
467 <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
>
469 <?php
if($fulliplist!=null && $fullistnum>1) { ?
>
470 <tr style
="text-align: left;">
471 <td style
="width: 50%;"><span
class="TextBoxLabel">Members Old IPs
:</span
></td
>
472 <td style
="width: 50%;"><?php
echo $fulliplist; ?
></td
>
473 </tr
><?php
} } ?
><tr style
="text-align: left;">
474 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemName">Members Name
:</label
></td
>
475 <td style
="width: 50%;"><input type
="text" name
="MemName" class="TextBox" id
="MemName" size
="20" value
="<?php echo $EditMem['Name']; ?>" /></td
>
476 </tr
><tr style
="text-align: left;">
477 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemEmail">Members Email
:</label
></td
>
478 <td style
="width: 50%;"><input type
="email" name
="MemEmail" class="TextBox" id
="MemEmail" size
="20" value
="<?php echo $EditMem['Email']; ?>" /></td
>
479 <?php
if($EditMem['ID']!=1) { ?
>
480 </tr
><tr style
="text-align: left;">
481 <td style
="width: 50%;"><label
class="TextBoxLabel" for="gid">New Group
for Member
:</label
></td
>
482 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="gid" id
="gid">
484 $getgrpidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE (\"Name\"<>'%s' AND \"Name\"<>'%s')", array($Settings['GuestGroup'],$Settings['ValidateGroup']));
485 $getgrpidr=sql_query($getgrpidq,$SQLStat);
486 $getgrpidnum=sql_num_rows($getgrpidr);
488 if($getgrpidnum<1) { ?
>
489 <option value
="0">None
</option
>
491 while ($getgrpidi < $getgrpidnum) {
492 $getgrpidID=sql_result($getgrpidr,$getgrpidi,"id");
493 $getgrpidName=sql_result($getgrpidr,$getgrpidi,"Name");
495 if($getgrpidID==$EditMem['GroupID']) {
496 $GIDselected = " selected=\"selected\""; }
498 <option value
="<?php echo $getgrpidID; ?>"<?php
echo $GIDselected; ?
>><?php
echo $getgrpidName; ?
></option
>
499 <?php ++
$getgrpidi; }
500 sql_free_result($getgrpidr); ?
>
503 </tr
><tr style
="text-align: left;">
504 <td style
="width: 50%;"><label
class="TextBoxLabel" for="lid">New Level
for Member
:</label
></td
>
505 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="lid" id
="lid">
507 $getlevidq = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."levels\" WHERE (\"Name\"<>'%s' AND \"id\"<>%i)", array("Guest",-1));
508 $getlevidr=sql_query($getlevidq,$SQLStat);
509 $getlevidnum=sql_num_rows($getlevidr);
511 if($getlevidnum<1) { ?
>
512 <option value
="0">None
</option
>
514 while ($getlevidi < $getlevidnum) {
515 $getlevidID=sql_result($getlevidr,$getlevidi,"id");
516 $getlevidName=sql_result($getlevidr,$getlevidi,"Name");
518 if($getlevidID==$EditMem['LevelID']) {
519 $LIDselected = " selected=\"selected\""; }
521 <option value
="<?php echo $getlevidID; ?>"<?php
echo $LIDselected; ?
>><?php
echo $getlevidName; ?
></option
>
522 <?php ++
$getlevidi; }
523 sql_free_result($getlevidr); ?
>
526 </tr
><tr style
="text-align: left;">
527 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemHidden">Hidden Member
:</label
></td
>
528 <td style
="width: 50%;"><select id
="MemHidden" name
="MemHidden" class="TextBox">
529 <option selected
="selected" value
="<?php echo $EditMem['HiddenMember']; ?>">Old
Value (<?php
echo $EditMem['HiddenMember']; ?
>)</option
>
530 <option value
="no">No
</option
>
531 <option value
="yes">Yes
</option
>
533 </tr
><tr style
="text-align: left;">
534 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemWarnLevel">Members Warn Level
:</label
></td
>
535 <td style
="width: 50%;"><input type
="number" name
="MemWarnLevel" class="TextBox" id
="MemWarnLevel" size
="20" value
="<?php echo $EditMem['WarnLevel']; ?>" /></td
>
536 </tr
><tr style
="text-align: left;">
537 <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
>
538 <td style
="width: 50%;"><input type
="date" name
="MemBanTime" class="TextBox" id
="MemBanTime" size
="20" value
="<?php echo preg_replace("/([0-9]{2})\
/([0-9]{2})\
/([0-9]{4})/", "$3-$1-$2", $EditMem['BanTime']); ?>" /></td
>
539 </tr
><tr style
="text-align: left;">
540 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemPostCount">Members Post Count
:</label
></td
>
541 <td style
="width: 50%;"><input type
="number" name
="MemPostCount" class="TextBox" id
="MemPostCount" size
="20" value
="<?php echo $EditMem['PostCount']; ?>" /></td
>
542 </tr
><tr style
="text-align: left;">
543 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemKarma">Members Karma Count
:</label
></td
>
544 <td style
="width: 50%;"><input type
="number" name
="MemKarma" class="TextBox" id
="MemKarma" size
="20" value
="<?php echo $EditMem['Karma']; ?>" /></td
>
545 <?php
if($EditMem['ID']!=1) { ?
>
546 </tr
><tr style
="text-align: left;">
547 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MemPermID">Members Permission ID
:</label
></td
>
548 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="MemPermID" id
="MemPermID">
549 <option
<?php
if($EditMemPerm['PermissionID']=="0") { echo "selected=\"selected\" "; } ?
>value
="0">use group info
</option
>
551 if($Settings['sqltype']=="mysql"||
$Settings['sqltype']=="mysqli"||
552 $Settings['sqltype']=="pgsql"||
$Settings['sqltype']=="sqlite"||
553 $Settings['sqltype']=="sqlite3") {
554 $getperidq = sql_pre_query("SELECT DISTINCT \"PermissionID\" FROM \"".$Settings['sqltable']."permissions\"", array(null)); }
555 if($Settings['sqltype']=="cubrid") {
556 $getperidq = sql_pre_query("SELECT DISTINCT \"permissionid\" FROM \"".$Settings['sqltable']."permissions\"", array(null)); }
557 $getperidr=sql_query($getperidq,$SQLStat);
558 $getperidnum=sql_num_rows($getperidr);
560 while ($getperidi < $getperidnum) {
561 if($Settings['sqltype']=="mysql"||
$Settings['sqltype']=="mysqli"||
562 $Settings['sqltype']=="pgsql"||
$Settings['sqltype']=="cubrid"||
563 $Settings['sqltype']=="sqlite3") {
564 $getperidID=sql_result($getperidr,$getperidi,"PermissionID"); }
565 if($Settings['sqltype']=="sqlite") {
566 $getperidID=sql_result($getperidr,$getperidi,"\"PermissionID\""); }
567 $getperidq2 = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."permissions\" WHERE \"PermissionID\"=%i ORDER BY \"PermissionID\" ASC", array($getperidID));
568 $getperidr2=sql_query($getperidq2,$SQLStat);
569 $getperidnum2=sql_num_rows($getperidr2);
570 $getperidName=sql_result($getperidr2,0,"Name");
571 sql_free_result($getperidr2);
573 <option
<?php
if($EditMemPerm['PermissionID']==$getperidID) { echo "selected=\"selected\" "; } ?
>value
="<?php echo $getperidID; ?>"><?php
echo $getperidName; ?
></option
>
574 <?php ++
$getperidi; }
575 sql_free_result($getperidr); ?
>
577 <?php
} if($EditMem['ID']!=1) { ?
>
578 </tr
><tr style
="text-align: left;">
579 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewBoard">Can View Board
:</label
></td
>
580 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewBoard" id
="CanViewBoard">
581 <option selected
="selected" value
="<?php echo $EditMemPerm['CanViewBoard']; ?>">Old
Value (<?php
echo $EditMemPerm['CanViewBoard']; ?
>)</option
>
582 <option value
="group">use group info
</option
>
583 <option value
="yes">yes
</option
>
584 <option value
="no">no
</option
>
586 </tr
><tr style
="text-align: left;">
587 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewOffLine">Can View OffLine Board
:</label
></td
>
588 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewOffLine" id
="CanViewOffLine">
589 <option selected
="selected" value
="<?php echo $EditMemPerm['CanViewOffLine']; ?>">Old
Value (<?php
echo $EditMemPerm['CanViewOffLine']; ?
>)</option
>
590 <option value
="group">use group info
</option
>
591 <option value
="yes">yes
</option
>
592 <option value
="no">no
</option
>
594 </tr
><tr style
="text-align: left;">
595 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanEditProfile">Can Edit Profile
:</label
></td
>
596 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanEditProfile" id
="CanEditProfile">
597 <option selected
="selected" value
="<?php echo $EditMemPerm['CanEditProfile']; ?>">Old
Value (<?php
echo $EditMemPerm['CanEditProfile']; ?
>)</option
>
598 <option value
="group">use group info
</option
>
599 <option value
="yes">yes
</option
>
600 <option value
="no">no
</option
>
602 </tr
><tr style
="text-align: left;">
603 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanAddEvents">Can Add Events
:</label
></td
>
604 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanAddEvents" id
="CanAddEvents">
605 <option selected
="selected" value
="<?php echo $EditMemPerm['CanAddEvents']; ?>">Old
Value (<?php
echo $EditMemPerm['CanAddEvents']; ?
>)</option
>
606 <option value
="group">use group info
</option
>
607 <option value
="yes">yes
</option
>
608 <option value
="no">no
</option
>
610 </tr
><tr style
="text-align: left;">
611 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanPM">Can PM
:</label
></td
>
612 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanPM" id
="CanPM">
613 <option selected
="selected" value
="<?php echo $EditMemPerm['CanPM']; ?>">Old
Value (<?php
echo $EditMemPerm['CanPM']; ?
>)</option
>
614 <option value
="group">use group info
</option
>
615 <option value
="yes">yes
</option
>
616 <option value
="no">no
</option
>
618 </tr
><tr style
="text-align: left;">
619 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanSearch">Can Search
:</label
></td
>
620 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanSearch" id
="CanSearch">
621 <option selected
="selected" value
="<?php echo $EditMemPerm['CanSearch']; ?>">Old
Value (<?php
echo $EditMemPerm['CanSearch']; ?
>)</option
>
622 <option value
="group">use group info
</option
>
623 <option value
="yes">yes
</option
>
624 <option value
="no">no
</option
>
627 </tr
><tr style
="text-align: left;">
628 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanDoHTML">Can DoHTML
:</label
></td
>
629 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanDoHTML" id
="CanDoHTML">
630 <option
<?php
if($EditMemPerm['CanDoHTML']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
631 <option
<?php
if($EditMemPerm['CanDoHTML']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
632 <option
<?php
if($EditMemPerm['CanDoHTML']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
634 </tr
><tr style
="text-align: left;">
635 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanUseBBTags">Can
use BBTags
:</label
></td
>
636 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanUseBBTags" id
="CanUseBBTags">
637 <option
<?php
if($EditMemPerm['CanUseBBTags']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
638 <option
<?php
if($EditMemPerm['CanUseBBTags']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
639 <option
<?php
if($EditMemPerm['CanUseBBTags']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
641 <?php
if($EditMem['ID']!=1) { ?
>
642 </tr
><tr style
="text-align: left;">
643 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewIPAddress">Can view IP Address
:</label
></td
>
644 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewIPAddress" id
="CanViewIPAddress">
645 <option
<?php
if($EditMemPerm['CanViewIPAddress']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
646 <option
<?php
if($EditMemPerm['CanViewIPAddress']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
647 <option
<?php
if($EditMemPerm['CanViewIPAddress']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
649 </tr
><tr style
="text-align: left;">
650 <td style
="width: 50%;"><label
class="TextBoxLabel" for="CanViewUserAgent">Can view user agent
:</label
></td
>
651 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="CanViewUserAgent" id
="CanViewUserAgent">
652 <option
<?php
if($EditMemPerm['CanViewUserAgent']=="group") { echo "selected=\"selected\" "; } ?
>value
="group">use group info
</option
>
653 <option
<?php
if($EditMemPerm['CanViewUserAgent']=="yes") { echo "selected=\"selected\" "; } ?
>value
="yes">yes
</option
>
654 <option
<?php
if($EditMemPerm['CanViewUserAgent']=="no") { echo "selected=\"selected\" "; } ?
>value
="no">no
</option
>
657 </tr
><tr style
="text-align: left;">
658 <td style
="width: 50%;"><label
class="TextBoxLabel" for="FloodControl">Flood Control in seconds
:</label
></td
>
659 <td style
="width: 50%;"><input type
="text" name
="FloodControl" class="TextBox" id
="FloodControl" size
="20" value
="<?php echo $EditMemPerm['FloodControl']; ?>" /></td
>
660 </tr
><tr style
="text-align: left;">
661 <td style
="width: 50%;"><label
class="TextBoxLabel" for="SearchFlood">Search Flood Control in seconds
:</label
></td
>
662 <td style
="width: 50%;"><input type
="text" name
="SearchFlood" class="TextBox" id
="SearchFlood" size
="20" value
="<?php echo $EditMemPerm['SearchFlood']; ?>" /></td
>
663 <?php
if($EditMem['ID']!=1) { ?
>
664 </tr
><tr style
="text-align: left;">
665 <td style
="width: 50%;"><label
class="TextBoxLabel" for="HasModCP">Can view Mod CP
:</label
></td
>
666 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="HasModCP" id
="HasModCP">
667 <option selected
="selected" value
="<?php echo $EditMemPerm['HasModCP']; ?>">Old
Value (<?php
echo $EditMemPerm['HasModCP']; ?
>)</option
>
668 <option value
="yes">yes
</option
>
669 <option value
="no">no
</option
>
671 </tr
><tr style
="text-align: left;">
672 <td style
="width: 50%;"><label
class="TextBoxLabel" for="HasAdminCP">Can view Admin CP
:</label
></td
>
673 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="HasAdminCP" id
="HasAdminCP">
674 <option selected
="selected" value
="<?php echo $EditMemPerm['HasAdminCP']; ?>">Old
Value (<?php
echo $EditMemPerm['HasAdminCP']; ?
>)</option
>
675 <option value
="group">use group info
</option
>
676 <option value
="yes">yes
</option
>
677 <option value
="no">no
</option
>
679 </tr
><tr style
="text-align: left;">
680 <td style
="width: 50%;"><label
class="TextBoxLabel" for="ViewDBInfo">Can view Database info
:</label
></td
>
681 <td style
="width: 50%;"><select size
="1" class="TextBox" name
="ViewDBInfo" id
="ViewDBInfo">
682 <option selected
="selected" value
="<?php echo $EditMemPerm['ViewDBInfo']; ?>">Old
Value (<?php
echo $EditMemPerm['ViewDBInfo']; ?
>)</option
>
683 <option value
="group">use group info
</option
>
684 <option value
="yes">yes
</option
>
685 <option value
="no">no
</option
>
689 <table style
="text-align: left;">
690 <tr style
="text-align: left;">
691 <td style
="width: 100%;">
692 <input type
="hidden" name
="act" value
="editmember" style
="display: none;" />
693 <input type
="hidden" name
="id" value
="<?php echo $_POST['id']; ?>" style
="display: none;" />
694 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
695 <input type
="submit" class="Button" value
="Edit Member" name
="Apply_Changes" />
696 <input type
="reset" value
="Reset Form" class="Button" name
="Reset_Form" />
701 <tr
class="TableMenuRow4">
702 <td
class="TableMenuColumn4"> 
;</td
>
706 <?php
} if($_POST['act']=="editmember"&&$_POST['update']=="now"&&$_GET['act']=="editmember"&&
707 ($_POST['id']!="0"||
$_POST['id']!="-1")) {
708 $ggidquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['GuestGroup']));
709 $ggidresult=sql_query($ggidquery,$SQLStat);
710 $GuestGroupID=sql_result($ggidresult,0,"id");
711 sql_free_result($ggidresult);
712 $vgidquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($Settings['ValidateGroup']));
713 $vgidresult=sql_query($vgidquery,$SQLStat);
714 $ValidateGroupID=sql_result($vgidresult,0,"id");
715 sql_free_result($vgidresult);
716 $DMemName = GetUserName($_POST['id'],$Settings['sqltable']);
717 $DMemName = $DMemName['Name'];
718 $_POST['MemName'] = stripcslashes(htmlspecialchars($_POST['MemName'], ENT_QUOTES
, $Settings['charset']));
719 //$_POST['MemName'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['MemName']);
720 $_POST['MemName'] = remove_spaces($_POST['MemName']);
721 $_POST['MemEmail'] = remove_spaces($_POST['MemEmail']);
722 $username_check = null;
723 if($_POST['MemName']!=$DMemName) {
724 $tquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."topics\" SET \"GuestName\"='%s' WHERE \"UserID\"=%i", array($_POST['MemName'],$_POST['id']));
725 sql_query($tquery,$SQLStat);
726 $r1query = sql_pre_query("UPDATE \"".$Settings['sqltable']."posts\" SET \"GuestName\"='%s' WHERE \"UserID\"=%i", array($_POST['MemName'],$_POST['id']));
727 sql_query($r1query,$SQLStat);
728 $r2query = sql_pre_query("UPDATE \"".$Settings['sqltable']."posts\" SET \"EditUserName\"='%s' WHERE \"EditUser\"=%i", array($_POST['MemName'],$_POST['id']));
729 sql_query($r2query,$SQLStat);
730 $sql_username_check = sql_query(sql_pre_query("SELECT \"Name\" FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s'", array($_POST['MemName'])),$SQLStat);
731 $username_check = sql_num_rows($sql_username_check);
732 sql_free_result($sql_username_check); }
733 if($_POST['MemHidden']!="yes"&&$_POST['MemHidden']!="no") {
734 $_POST['MemHidden'] = "no"; }
735 if(!is_numeric($_POST['MemWarnLevel'])) { $_POST['MemWarnLevel'] = "0"; }
736 if(!is_numeric($_POST['MemPostCount'])) { $_POST['MemPostCount'] = "0"; }
737 if(!is_numeric($_POST['MemKarma'])) { $_POST['MemKarma'] = "0"; }
738 if(preg_match("/([0-9]{4})\-([0-9]{2})\-([0-9]{2})/", $_POST['MemBanTime'])) { $_POST['MemBanTime'] = preg_replace("/([0-9]{4})\-([0-9]{2})\-([0-9]{2})/", "$2/$3/$1", $_POST['MemBanTime']); }
739 if($_POST['MemBanTime']!=null&&$_POST['MemBanTime']>1) {
740 $BirthExpl = explode("/",$_POST['MemBanTime']);
741 if(count($BirthExpl)!="3") {
742 $_POST['MemBanTime'] = "0"; $BirthExpl[0] = "0"; $BirthExpl[1] = "0"; $BirthExpl[2] = "0"; }
743 if(!is_numeric($BirthExpl[0])) { $BirthExpl[0] = "0"; }
744 if(!is_numeric($BirthExpl[1])) { $BirthExpl[1] = "0"; }
745 if(!is_numeric($BirthExpl[2])) { $BirthExpl[2] = "0"; }
746 if(count($BirthExpl)=="3"&&checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===true) {
747 if(is_numeric($BirthExpl[0])&&is_numeric($BirthExpl[1])&&is_numeric($BirthExpl[2])) {
748 if(pre_strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; }
749 if(pre_strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; }
750 if(pre_strlen($BirthExpl[0])=="2"&&pre_strlen($BirthExpl[1])=="2"&&pre_strlen($BirthExpl[2])=="4") {
751 $BirthIn = mktime(12,12,12,$BirthExpl[0],$BirthExpl[1],$BirthExpl[2]);
752 $tmpusrcurtime = new DateTime();
753 $tmpusrcurtime->setTimestamp($BirthIn);
754 $tmpusrcurtime->setTimezone($utctz);
755 $BirthMonth=$tmpusrcurtime->format("m");
756 $BirthDay=$tmpusrcurtime->format("d");
757 $BirthYear=$tmpusrcurtime->format("Y");
758 $_POST['MemBanTime'] = $BirthIn; }
759 if(pre_strlen($BirthExpl[0])!="2"||
pre_strlen($BirthExpl[1])!="2"||
pre_strlen($BirthExpl[2])!="4") {
760 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
761 if (!is_numeric($BirthExpl[0])||
!is_numeric($BirthExpl[1])||
!is_numeric($BirthExpl[2])) {
762 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
763 if(count($BirthExpl)=="3"&&
764 checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===false) {
765 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
766 if(count($BirthExpl)!="3") {
767 $_POST['MemBanTime'] = "0"; $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
768 if($DMemName!==null&&($_POST['id']!="0"||
$_POST['id']!="-1")&&
769 ($_POST['gid']!=$GuestGroupID||
$_POST['gid']!=$ValidateGroupID)) {
770 if($_POST['MemName']==$DMemName||
$username_check>=1) {
771 if($_POST['id']!=1) {
772 if(!is_numeric($_POST['MemPermID'])) { $_POST['MemPermID'] = "0"; }
773 $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']));
774 $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',\"CanUseBBTags\"='%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['CanUseBBTags'],$_POST['CanViewIPAddress'],$_POST['CanViewUserAgent'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['HasModCP'],$_POST['HasAdminCP'],$_POST['ViewDBInfo'],$_POST['id'])); }
775 if($_POST['id']==1) {
776 $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']));
777 $dpmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."mempermissions\" SET \"CanDoHTML\"='%s',\"CanUseBBTags\"='%s',\"FloodControl\"=%i,\"SearchFlood\"=%i WHERE \"id\"=%i", array($_POST['CanDoHTML'],$_POST['CanUseBBTags'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['id'])); } }
778 if($_POST['MemName']!=$DMemName&&$username_check<1) {
779 if($_POST['id']!=1) {
780 if(!is_numeric($_POST['MemPermID'])) { $_POST['MemPermID'] = "0"; }
781 $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']));
782 $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',\"CanUseBBTags\"='%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['CanUseBBTags'],$_POST['CanViewIPAddress'],$_POST['CanViewUserAgent'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['HasModCP'],$_POST['HasAdminCP'],$_POST['ViewDBInfo'],$_POST['id'])); }
783 if($_POST['id']==1) {
784 $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']));
785 $dpmquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."mempermissions\" SET \"CanViewBoard\"='%s',\"CanViewOffLine\"='%s',\"CanEditProfile\"='%s',\"CanAddEvents\"='%s',\"CanPM\"='%s',\"CanSearch\"='%s',\"CanDoHTML\"='%s',\"CanUseBBTags\"='%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['CanUseBBTags'],$_POST['CanViewIPAddress'],$_POST['CanViewUserAgent'],$_POST['FloodControl'],$_POST['SearchFlood'],$_POST['id'])); } }
786 sql_query($dmquery,$SQLStat);
787 sql_query($dpmquery,$SQLStat); }
789 <div
class="TableMenuBorder">
790 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
791 <div
class="TableMenuRow1">
792 <?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
>
794 <table
class="TableMenu" style
="width: 100%;">
795 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
796 <tr
class="TableMenuRow1">
797 <td
class="TableMenuColumn1"><span style
="float: left;">
798 <?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
>
799 </span
><span style
="float: right;"> 
;</span
></td
>
801 <tr id
="ProfileTitle" class="TableMenuRow2">
802 <th
class="TableMenuColumn2">Updating Settings
</th
>
804 <tr
class="TableMenuRow3" id
="ProfileUpdate">
805 <td
class="TableMenuColumn3">
806 <div style
="text-align: center;">
807 <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 />
810 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
811 <td
class="TableMenuColumn4"> 
;</td
>