escape($_POST['edit_group_name']):""; $edit_group_description = isset($_POST['edit_group_description'])?$wpdb->escape($_POST['edit_group_description']):""; $edit_group_id = isset($_POST['edit_group_id'])?$_POST['edit_group_id']:""; if($_POST['edit_group_name'] == "") echo "

".__("You must specify a forum name", "mingleforum")."

"; global $wpdb, $table_prefix; $wpdb->query("UPDATE ".$table_prefix."forum_forums SET name = '$edit_group_name', description = '$edit_group_description' WHERE id = $edit_group_id" ); $this->update_usergroups($usergroups, $edit_group_id); $this->update_usercanpost($usercanpost, $edit_group_id); echo "

".__("Forum updated successfully", "mingleforum")."

"; } if(($_GET['do'] == "editgroup") && (!isset($_POST['edit_save_group']))){ $gr_id = (is_numeric($_GET['groupid']))?$_GET['groupid']:0; global $mingleforum; $usergroups = $mingleforum->get_usergroups(); $usergroups_with_access = $this->get_usersgroups_with_access_to_group($gr_id); $usergroups_can_post = $this->get_usersgroups_with_access_to_post($gr_id); $group_name = stripslashes($mingleforum->get_groupname($gr_id)); global $wpdb, $table_prefix; echo "

".__("Edit forum", "mingleforum")." \"$group_name\"

"; echo "
"; echo ""; echo "
".__("Name:", "mingleforum")."
".__("Description", "mingleforum")."
".__("User Groups:", "mingleforum")." "; echo "".__("Members of the checked User Groups have access to the forums in this category:", "mingleforum")." "; if($usergroups){ $i = 0; echo ""; echo ""; foreach($usergroups as $usergroup){ $col = 4; if($mingleforum->array_search($usergroup->id, $usergroups_with_access)) $checked = "checked='checked'"; else $checked = ""; $e = "

".stripslashes($usergroup->name)."

\n\r"; if($i == 0){ echo ""; $i = 0; } } echo "
$e"; ++$i; } elseif($i < $col){ echo "$e"; ++$i; } else{ echo "$e
"; } else echo __("There are no User Groups", "mingleforum"); echo "
".__("User Groups:", "mingleforum")." "; echo "".__("Members of the checked User Groups can post to the forums in this category:", "mingleforum")." "; if($usergroups){ $i = 0; echo ""; echo ""; foreach($usergroups as $usergroup){ $col = 4; $checked = ""; if($mingleforum->array_search($usergroup->id, $usergroups_can_post)) $checked = "checked='checked'"; $e = "

".stripslashes($usergroup->name)."

\n\r"; if($i == 0){ echo ""; $i = 0; } } echo "
$e"; ++$i; } elseif($i < $col){ echo "$e"; ++$i; } else{ echo "$e
"; } else echo __("There are no User Groups", "mingleforum"); echo "
"; echo "
"; } } else { echo '

Nice TRY!

'; }