function MakeFactionSelect($name, $chat, $style = '', $optarg = '') { $arr = GetFactionNames($chat); echo "<select name='{$name}' style='{$style}' {$optarg}>\n"; // Start select field foreach ($arr as $key => $value) { echo "<option value='{$key}'>{$value}</option>\n"; // Add option } echo "</select>\n"; // End }
echo "</tr>\n"; echo "<tr>"; echo "<td><input type=checkbox name=pf_c " . (CheckFlags("c", $prefs['prefs']) ? "CHECKED" : "") . "> No Multi-Color</td>\n"; echo "<td><input type=checkbox name=pf_n " . (CheckFlags("n", $prefs['prefs']) ? "CHECKED" : "") . "> Registered Images</td>\n"; echo "<td><input type=checkbox name=pf_m " . (CheckFlags("m", $prefs['prefs']) ? "CHECKED" : "") . "> No Userlist IMs</td>\n"; echo "</tr>\n"; echo "<tr>"; echo "<td><input type=checkbox name=pf_rr " . (CheckFlags("R", $prefs['prefs']) ? "CHECKED" : "") . "> Reversed Output</td>\n"; echo "<td><input type=checkbox name=pf_l " . (CheckFlags("l", $prefs['prefs']) ? "CHECKED" : "") . "> Multi-Line Box</td>\n"; echo "<td><input type=checkbox name=pf_s " . (CheckFlags("s", $prefs['prefs']) ? "CHECKED" : "") . "> Force Single-Line Box</td>\n"; echo "</tr>\n"; echo "</table><input type=hidden name=npref value=x>"; echo "<input type=hidden name=adminaction value={$adminaction}>"; } } elseif (strcasecmp($adminaction, "regapps") == 0) { $arr = GetFactionNames($chatpath); if ($ruid) { $reguser = mysql_fetch_row(count_mysql_query("SELECT id,username,email,faction,description,appstat FROM uo_chat_regapps WHERE id=" . intval($ruid) . " AND chat='{$chatpath}'", $handler)); $rfaction = $arr[$reguser[3]]; echo "\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<input type='hidden' name='adminaction' value='regapps'>\n\t\t\t\t\t\t\t\t<td>Name: </td><td>{$reguser[1]}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>E-Mail: </td><td>{$reguser[2]}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Faction: </td><td>{$rfaction}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td valign='top'>Description: </td><td>{$reguser[4]}</td>\n\t\t\t\t\t\t\t</tr>"; if ($reguser[5] == 0 || $reguser[5] == 2) { echo "\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td><a href='login.php?adminaction=adduser&ruid={$reguser[0]}&login={$login}&password={$password}&new_name={$reguser[1]}&new_pass=random&new_email={$reguser[2]}&new_level=1&new_faction={$reguser[3]}&ruid={$ruid}'>Accept</a></td>\n\t\t\t\t\t\t\t\t\t<td><a href='login.php?adminaction=regapps&decline={$reguser[0]}&login={$login}&password={$password}&runame={$reguser[1]}&rmail={$reguser[2]}'>Decline</a></td>\n\t\t\t\t\t\t\t\t</tr>"; } echo "</table>"; } elseif (!empty($admcomed)) { // Admin notes $admcom = $GLOBALS['sql']->fetchAssoc($GLOBALS['sql']->query("SELECT regnotes FROM chatv2.chats WHERE chat_id=" . $GLOBALS['biglog']['chat_id'])); $admcom = $admcom['regnotes']; $admcom = htmlentities($admcom); echo "\n\t\t\t\t\t\t\t<B>Edit admin notes</B>: <BR>\n\t\t\t\t\t\t\t<div style='margin-left: 1em;'>\n\t\t\t\t\t\t\t\t<BR>\n\t\t\t\t\t\t\t\t<textarea name='regadmcom' cols=50 rows=5>{$admcom}</textarea>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<BR>\n\t\t\t\t\t\t\t<input type='hidden' name='adminaction' value='regapps'>"; } else {
function ListUsersModify($userlevel, $chatpath) { global $handler; $arr = GetFactionNames($chatpath); echo "<table BORDER=0 CELLSPACING=2 CELLPADDING=2><tr align=center valign=center><td align=center valign=center>Action:\n\t<br><SELECT NAME='modaction'>"; if (CheckFlags("FXZmM", $userlevel)) { echo "<OPTION value='faction'>Change Faction"; } if (CheckFlags("pXZmM", $userlevel)) { echo "<OPTION value='resetpass'>Reset Password"; } if (CheckFlags("RXZmM", $userlevel)) { echo "<OPTION value='rename'>Rename"; } if (CheckFlags("DXZmM", $userlevel)) { echo "<OPTION value='delete'>Delete"; } echo "</SELECT></td><td align=center valign=center>User:\n\t<br><SELECT NAME='selecteduser'>"; $result = @count_mysql_query("SELECT username,flags,faction FROM uo_chat_database WHERE chat='{$chatpath}' AND BINARY flags!='M' AND dtime IS NULL ORDER BY username ASC", $handler); while ($cuser = mysql_fetch_row($result)) { if ($cuser[0] != "") { $fname = $arr[$cuser[2] + 0]; echo "<OPTION value='{$cuser['0']}'>{$cuser['0']} # {$cuser['1']} # {$fname}\n"; } } echo "</SELECT></td><td>New Name/Faction:<br><input name='newname' value='' size=30></td></tr></table>"; return 1; }