if (dbrows($result)) {
opentable($locale['420']);
echo "<form name='selectform' method='post' action='".FUSION_SELF.$aidlink."'>\n";
echo "<div style='text-align:center'>\n<select name='group_id' class='textbox'>\n";
$sel = "";
while ($data = dbarray($result)) {
if (isset($group_id)) $sel = ($group_id == $data['group_id'] ? " selected='selected'" : "");
echo "<option value='".$data['group_id']."'$sel>[".$data['group_id']."] ".$data['group_name']."</option>\n";
}
echo "</select>\n<input type='submit' name='edit' value='".$locale['421']."' class='button' />\n";
echo "<input type='submit' name='delete' value='".$locale['422']."' onclick='return DeleteGroup();' class='button' />\n";
echo "</div>\n</form>\n";
closetable();
}
if (dbrows($result)) {
opentable($locale['420']);
echo "<form name='selectform' method='post' action='".FUSION_SELF.$aidlink."'>\n";
echo "<div style='text-align:center'>\n<select name='group_id' class='textbox'>\n";
//$sel = "";
$editlist = ""; $sel = "";
while ($data = dbarray($result)) {
//if (isset($group_id)) $sel = ($group_id == $data['group_id'] ? " selected='selected'" : "");
if (isset($_POST['group_id'])) { $sel = ($_POST['group_id'] == $data['group_id'] ? " selected='selected'" : "");}
//echo "<option value='".$data['group_id']."'$sel>[".$data['group_id']."] ".$data['group_name']."</option>\n";
$editlist .= "<option value='".$data['group_id']."'$sel>[".$data['group_id']."] ".$data['group_name']."</option>\n";
}
//echo "</select>\n<input type='submit' name='edit' value='".$locale['421']."' class='button' />\n";
echo $editlist."</select>\n<input type='submit' name='edit' value='".$locale['421']."' class='button' />\n";
echo "<input type='submit' name='delete' value='".$locale['422']."' onclick='return DeleteGroup();' class='button' />\n";
echo "</div>\n</form>\n";
closetable();
}
if ($user_data['user_groups']) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'>\n";
$user_groups = (strpos($user_data['user_groups'], ".") == 0 ? explode(".", substr($user_data['user_groups'], 1)) : explode(".", $user_data['user_groups']));
for ($i = 0; $i < count($user_groups); $i++) {
echo "<div style='float:left'><a href='".FUSION_SELF."?group_id=".$user_groups[$i]."'>".getgroupname($user_groups[$i])."</a></div><div style='float:right'>".getgroupname($user_groups[$i], true)."</div><div style='float:none;clear:both'></div>\n";
}
echo "</td>\n</tr>\n</table>\n";
}
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." ORDER BY group_id ASC");
if (dbrows($result)) {
while ($data2 = dbarray($result)) {
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
$user_groups_opts .= "<option value='".$data2['group_id']."'>".$data2['group_name']."</option>\n";
}
}
if (iADMIN && checkrights("UG") && $user_groups_opts) {
echo "<td align='right' class='tbl1'>".$locale['415']."\n";
echo "<select name='user_group' class='textbox' style='width:100px'>\n".$user_groups_opts."</select>\n";
echo "<input type='submit' name='add_to_group' value='".$locale['416']."' class='button' onclick=\"return confirm('".$locale['417']."');\" /></td>\n";
}
}
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
$user_groups_opts .= "<option value='".$data2['group_id']."'>".$data2['group_name']."</option>\n";
}
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
if (!preg_match("(^{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
Category Forum
Suspected Bugs and Errors - 8Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions