Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: management.php 5162 2010-08-01 22:09:04Z RyanGordon $
| * $Id: management.php 5620 2011-09-26 18:23:52Z ralgith $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 90 | Zeile 90 |
---|
if($mybb->input['pid'] == -1 && $mybb->input['type'] == 'f') {
|
if($mybb->input['pid'] == -1 && $mybb->input['type'] == 'f') {
|
$errors[] = $lang->error_forum_noparent;
| $errors[] = $lang->error_no_parent;
|
} if(!$errors)
| } if(!$errors)
|
Zeile 248 | Zeile 248 |
---|
$form_container->end();
$form_container = new FormContainer($lang->new_forum_settings);
|
$form_container->end();
$form_container = new FormContainer($lang->new_forum_settings);
|
$form_container->output_row($lang->create_a, $lang->create_a_desc, $form->generate_radio_button('type', 'f', $lang->forum, $create_a_options_f)."<br />\n".$form->generate_radio_button('type', 'c', $lang->category, $create_a_options_c));
| $form_container->output_row($lang->forum_type, $lang->forum_type_desc, $form->generate_radio_button('type', 'f', $lang->forum, $create_a_options_f)."<br />\n".$form->generate_radio_button('type', 'c', $lang->category, $create_a_options_c));
|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $copy_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $copy_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $copy_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
| $form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $copy_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $copy_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $copy_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
Zeile 657 | Zeile 657 |
---|
'cansearch' => 'misc', );
|
'cansearch' => 'misc', );
|
$plugins->run_hooks_by_ref("admin_forum_management_permission_groups", $groups);
| $groups = $plugins->run_hooks("admin_forum_management_permission_groups", $groups);
|
$tabs = array(); foreach(array_unique(array_values($groups)) as $group)
| $tabs = array(); foreach(array_unique(array_values($groups)) as $group)
|
Zeile 929 | Zeile 929 |
---|
}
$form_container = new FormContainer($lang->add_forum);
|
}
$form_container = new FormContainer($lang->add_forum);
|
$form_container->output_row($lang->create_a, $lang->create_a_desc, $form->generate_radio_button('type', 'f', $lang->forum, $create_a_options_f)."<br />\n".$form->generate_radio_button('type', 'c', $lang->category, $create_a_options_c));
| $form_container->output_row($lang->forum_type, $lang->forum_type_desc, $form->generate_radio_button('type', 'f', $lang->forum, $create_a_options_f)."<br />\n".$form->generate_radio_button('type', 'c', $lang->category, $create_a_options_c));
|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
| $form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
Zeile 1411 | Zeile 1411 |
---|
log_admin_action($fid, $mybb->input['title']); flash_message($lang->success_forum_updated, 'success');
|
log_admin_action($fid, $mybb->input['title']); flash_message($lang->success_forum_updated, 'success');
|
admin_redirect("index.php?module=forum-management");
| admin_redirect("index.php?module=forum-management&fid={$fid}");
|
} }
| } }
|
Zeile 1473 | Zeile 1473 |
---|
}
$form_container = new FormContainer($lang->edit_forum);
|
}
$form_container = new FormContainer($lang->edit_forum);
|
$form_container->output_row($lang->create_a, $lang->create_a_desc, $form->generate_radio_button('type', 'f', $lang->forum, $create_a_options_f)."<br />\n".$form->generate_radio_button('type', 'c', $lang->category, $create_a_options_c));
| $form_container->output_row($lang->forum_type, $lang->forum_type_desc, $form->generate_radio_button('type', 'f', $lang->forum, $create_a_options_f)."<br />\n".$form->generate_radio_button('type', 'c', $lang->category, $create_a_options_c));
|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
| $form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
Zeile 1679 | Zeile 1679 |
---|
{ $perms = $usergroup; $default_checked = true;
|
{ $perms = $usergroup; $default_checked = true;
|
} }
| } }
|
foreach($field_list as $forum_permission => $forum_perm_title) { if(isset($mybb->input['permissions']))
| foreach($field_list as $forum_permission => $forum_perm_title) { if(isset($mybb->input['permissions']))
|
Zeile 1725 | Zeile 1725 |
---|
foreach($perms_checked as $perm => $value) { if($value == 1)
|
foreach($perms_checked as $perm => $value) { if($value == 1)
|
{ $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; }
| { $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; }
|
} $field_select .= "</ul></div>\n"; $field_select .= "<div class=\"disabled\"><div class=\"fields_title\">{$lang->disabled}</div><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";
| } $field_select .= "</ul></div>\n"; $field_select .= "<div class=\"disabled\"><div class=\"fields_title\">{$lang->disabled}</div><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";
|
Zeile 1759 | Zeile 1759 |
---|
{ $field_selected[] = $forum_permission; }
|
{ $field_selected[] = $forum_permission; }
|
}
| }
|
$field_select .= "<noscript>".$form->generate_select_box('fields_'.$usergroup['gid'].'[]', $field_options, $field_selected, array('id' => 'fields_'.$usergroup['gid'].'[]', 'multiple' => true))."</noscript>\n"; $form_container->output_cell($field_select, array('colspan' => 2));
| $field_select .= "<noscript>".$form->generate_select_box('fields_'.$usergroup['gid'].'[]', $field_options, $field_selected, array('id' => 'fields_'.$usergroup['gid'].'[]', 'multiple' => true))."</noscript>\n"; $form_container->output_cell($field_select, array('colspan' => 2));
|
Zeile 1768 | Zeile 1768 |
---|
{ $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1'}); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
|
{ $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1'}); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
|
}
| }
|
else { $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1'}); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2));
| else { $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1'}); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2));
|
Zeile 1776 | Zeile 1776 |
---|
$form_container->construct_row(array('id' => 'row_'.$usergroup['gid'])); $ids[] = $usergroup['gid'];
|
$form_container->construct_row(array('id' => 'row_'.$usergroup['gid'])); $ids[] = $usergroup['gid'];
|
}
| }
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_forum);
| $form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_forum);
|
Zeile 1812 | Zeile 1812 |
---|
admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
// User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management&fid={$fid}"); }
| // User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
if($mybb->request_method == "post") { $mid = $mod['mid'];
| if($mybb->request_method == "post") { $mid = $mod['mid'];
|
Zeile 2005 | Zeile 2005 |
---|
{ $plugins->run_hooks("admin_forum_management_start"); $fid = intval($mybb->input['fid']);
|
{ $plugins->run_hooks("admin_forum_management_start"); $fid = intval($mybb->input['fid']);
|
| if($fid) { $forum = get_forum($fid); }
|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
if($fid) { $forum = get_forum($fid); }
| |
if($mybb->input['update'] == "permissions") { $inherit = array(); foreach($mybb->input as $id => $permission)
|
if($mybb->input['update'] == "permissions") { $inherit = array(); foreach($mybb->input as $id => $permission)
|
{
| {
|
// Make sure we're only skipping inputs that don't start with "fields_" and aren't fields_default_ or fields_inherit_ if(strpos($id, 'fields_') === false || (strpos($id, 'fields_default_') !== false || strpos($id, 'fields_inherit_') !== false)) {
| // Make sure we're only skipping inputs that don't start with "fields_" and aren't fields_default_ or fields_inherit_ if(strpos($id, 'fields_') === false || (strpos($id, 'fields_default_') !== false || strpos($id, 'fields_inherit_') !== false)) {
|
Zeile 2025 | Zeile 2027 |
---|
list(, $gid) = explode('fields_', $id); if($mybb->input['fields_default_'.$gid] == $permission && $mybb->input['fields_inherit_'.$gid] == 1)
|
list(, $gid) = explode('fields_', $id); if($mybb->input['fields_default_'.$gid] == $permission && $mybb->input['fields_inherit_'.$gid] == 1)
|
{
| {
|
$inherit[$gid] = 1; continue; }
| $inherit[$gid] = 1; continue; }
|
Zeile 2044 | Zeile 2046 |
---|
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls') as $name) { if($permission[$name])
|
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls') as $name) { if($permission[$name])
|
{
| {
|
$permissions[$name][$gid] = 1; } else
| $permissions[$name][$gid] = 1; } else
|
Zeile 2063 | Zeile 2065 |
---|
$canpostreplies = $permissions['canpostreplys']; save_quick_perms($fid);
|
$canpostreplies = $permissions['canpostreplys']; save_quick_perms($fid);
|
|
|
$plugins->run_hooks("admin_forum_management_start_permissions_commit"); // Log admin action
| $plugins->run_hooks("admin_forum_management_start_permissions_commit"); // Log admin action
|
Zeile 2074 | Zeile 2076 |
---|
} elseif($mybb->input['add'] == "moderators") {
|
} elseif($mybb->input['add'] == "moderators") {
|
| |
$forum = get_forum($fid); if(!$forum)
|
$forum = get_forum($fid); if(!$forum)
|
{
| {
|
flash_message($lang->error_invalid_forum, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); }
|
flash_message($lang->error_invalid_forum, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); }
|
if (!empty($mybb->input['usergroup']))
| if(!empty($mybb->input['usergroup']))
|
{
|
{
|
$query = $db->simple_select("usergroups", "gid AS id, title AS name", "title='".$db->escape_string($mybb->input['usergroup'])."'", array('limit' => 1));
| |
$isgroup = 1;
|
$isgroup = 1;
|
| $gid = intval($mybb->input['usergroup']);
if(!$groupscache[$gid]) { // Didn't select a valid moderator flash_message($lang->error_moderator_not_found, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); }
$newmod = array( "id" => $gid, "name" => $groupscache[$gid]['title'] );
|
} else { $query = $db->simple_select("users", "uid AS id, username AS name", "username='".$db->escape_string($mybb->input['username'])."'", array('limit' => 1));
|
} else { $query = $db->simple_select("users", "uid AS id, username AS name", "username='".$db->escape_string($mybb->input['username'])."'", array('limit' => 1));
|
| if(!$db->num_rows($query)) { flash_message($lang->error_moderator_not_found, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); }
|
$isgroup = 0;
|
$isgroup = 0;
|
| $newmod = $db->fetch_array($query);
|
}
|
}
|
$newmod = $db->fetch_array($query);
|
|
if($newmod['id']) { $query = $db->simple_select("moderators", "id", "id='".$newmod['id']."' AND fid='".$fid."' AND isgroup='{$isgroup}'", array('limit' => 1));
|
if($newmod['id']) { $query = $db->simple_select("moderators", "id", "id='".$newmod['id']."' AND fid='".$fid."' AND isgroup='{$isgroup}'", array('limit' => 1));
|
$mod = $db->fetch_array($query); if(!$mod['id'])
| if(!$db->num_rows($query))
|
{ $new_mod = array( "fid" => $fid,
| { $new_mod = array( "fid" => $fid,
|
Zeile 2109 | Zeile 2130 |
---|
"canmanagethreads" => 1, "canmovetononmodforum" => 1 );
|
"canmanagethreads" => 1, "canmovetononmodforum" => 1 );
|
|
|
$mid = $db->insert_query("moderators", $new_mod); if(!$isgroup) { $db->update_query("users", array('usergroup' => 6), "uid='{$newmod['id']}' AND usergroup='2'"); }
|
$mid = $db->insert_query("moderators", $new_mod); if(!$isgroup) { $db->update_query("users", array('usergroup' => 6), "uid='{$newmod['id']}' AND usergroup='2'"); }
|
|
|
$cache->update_moderators();
|
$cache->update_moderators();
|
| |
$plugins->run_hooks("admin_forum_management_start_moderators_commit"); // Log admin action
| $plugins->run_hooks("admin_forum_management_start_moderators_commit"); // Log admin action
|
Zeile 2156 | Zeile 2178 |
---|
flash_message($lang->success_forum_disporder_updated, 'success'); admin_redirect("index.php?module=forum-management&fid=".$mybb->input['fid']); }
|
flash_message($lang->success_forum_disporder_updated, 'success'); admin_redirect("index.php?module=forum-management&fid=".$mybb->input['fid']); }
|
} }
| } }
|
$page->extra_header .= "<script src=\"../jscripts/scriptaculous.js?load=effects,dragdrop,controls\" type=\"text/javascript\"></script>\n"; $page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n"; $page->extra_header .= "<script src=\"jscripts/imodal.js\" type=\"text/javascript\"></script>\n"; $page->extra_header .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/default/imodal.css\" />\n";
|
$page->extra_header .= "<script src=\"../jscripts/scriptaculous.js?load=effects,dragdrop,controls\" type=\"text/javascript\"></script>\n"; $page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n"; $page->extra_header .= "<script src=\"jscripts/imodal.js\" type=\"text/javascript\"></script>\n"; $page->extra_header .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/default/imodal.css\" />\n";
|
if($fid) {
| if($fid) {
|
$page->add_breadcrumb_item($lang->view_forum, "index.php?module=forum-management"); }
| $page->add_breadcrumb_item($lang->view_forum, "index.php?module=forum-management"); }
|
Zeile 2174 | Zeile 2196 |
---|
if($fid) { $page->output_nav_tabs($sub_tabs, 'view_forum');
|
if($fid) { $page->output_nav_tabs($sub_tabs, 'view_forum');
|
} else
| } else
|
{ $page->output_nav_tabs($sub_tabs, 'forum_management'); }
| { $page->output_nav_tabs($sub_tabs, 'forum_management'); }
|
Zeile 2192 | Zeile 2214 |
---|
); $page->output_tab_control($tabs);
|
); $page->output_tab_control($tabs);
|
|
|
echo "<div id=\"tab_subforums\">\n"; if(!is_array($forum_cache)) { cache_forums(); } $form_container = new FormContainer($lang->sprintf($lang->in_forums, $forum_cache[$fid]['name']));
|
echo "<div id=\"tab_subforums\">\n"; if(!is_array($forum_cache)) { cache_forums(); } $form_container = new FormContainer($lang->sprintf($lang->in_forums, $forum_cache[$fid]['name']));
|
}
| }
|
else { $form_container = new FormContainer($lang->manage_forums);
| else { $form_container = new FormContainer($lang->manage_forums);
|
Zeile 2210 | Zeile 2232 |
---|
build_admincp_forums_list($form_container, $fid);
|
build_admincp_forums_list($form_container, $fid);
|
$submit_options = array();
| $submit_options = array();
|
if($form_container->num_rows() == 0) { $form_container->output_cell($lang->no_forums, array('colspan' => 3));
| if($form_container->num_rows() == 0) { $form_container->output_cell($lang->no_forums, array('colspan' => 3));
|
Zeile 2225 | Zeile 2247 |
---|
$buttons[] = $form->generate_reset_button($lang->reset); $form->output_submit_wrapper($buttons);
|
$buttons[] = $form->generate_reset_button($lang->reset); $form->output_submit_wrapper($buttons);
|
|
|
if(!$fid)
|
if(!$fid)
|
{
| {
|
$form->end(); }
| $form->end(); }
|
Zeile 2240 | Zeile 2262 |
---|
while($usergroup = $db->fetch_array($query)) { $usergroups[$usergroup['gid']] = $usergroup;
|
while($usergroup = $db->fetch_array($query)) { $usergroups[$usergroup['gid']] = $usergroup;
|
}
| }
|
$query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'"); while($existing = $db->fetch_array($query)) {
| $query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'"); while($existing = $db->fetch_array($query)) {
|
Zeile 2287 | Zeile 2309 |
---|
{ $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
{ $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
} elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]; $default_checked = true; } else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']])
| } elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['fid']][$usergroup['gid']]; $default_checked = true; } else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum['pid']][$usergroup['gid']])
|
{
|
{
|
$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
| $perms = $cached_forum_perms[$forum['pid']][$usergroup['gid']];
|
$default_checked = true; } }
| $default_checked = true; } }
|
Zeile 2313 | Zeile 2335 |
---|
$perms = $existing_permissions[$usergroup['gid']]; $default_checked = false; }
|
$perms = $existing_permissions[$usergroup['gid']]; $default_checked = false; }
|
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]; $default_checked = true; } else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
| elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['fid']][$usergroup['gid']]; $default_checked = true; } else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['pid']][$usergroup['gid']];
|
$default_checked = true; }
| $default_checked = true; }
|
Zeile 2331 | Zeile 2353 |
---|
} } foreach($field_list as $forum_permission => $forum_perm_title)
|
} } foreach($field_list as $forum_permission => $forum_perm_title)
|
{
| {
|
if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
| if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
Zeile 2346 | Zeile 2368 |
---|
else { if($perms[$forum_permission] == 1)
|
else { if($perms[$forum_permission] == 1)
|
{ $perms_checked[$forum_permission] = 1;
| { $perms_checked[$forum_permission] = 1;
|
} else {
| } else {
|
Zeile 2364 | Zeile 2386 |
---|
else { $inherited_text = $lang->custom_permission;
|
else { $inherited_text = $lang->custom_permission;
|
}
| }
|
$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>"); $field_select = "<div class=\"quick_perm_fields\">\n"; $field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";
|
$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>"); $field_select = "<div class=\"quick_perm_fields\">\n"; $field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";
|
foreach($perms_checked as $perm => $value)
| foreach($perms_checked as $perm => $value)
|
{ if($value == 1) {
| { if($value == 1) {
|
Zeile 2382 | Zeile 2404 |
---|
foreach($perms_checked as $perm => $value) { if($value == 0)
|
foreach($perms_checked as $perm => $value) { if($value == 0)
|
{
| {
|
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; } }
| $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; } }
|
Zeile 2416 | Zeile 2438 |
---|
{ $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1'}); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
|
{ $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1'}); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
|
}
| }
|
else { $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1'}); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2));
| else { $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\" onclick=\"modal = new MyModal({type: 'ajax', url: 'index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1'}); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2));
|
Zeile 2431 | Zeile 2453 |
---|
$buttons[] = $form->generate_submit_button($lang->update_forum_permissions); $buttons[] = $form->generate_reset_button($lang->reset);
|
$buttons[] = $form->generate_submit_button($lang->update_forum_permissions); $buttons[] = $form->generate_reset_button($lang->reset);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
// Write in our JS based field selector echo "<script type=\"text/javascript\">\n<!--\n"; foreach($ids as $id)
| // Write in our JS based field selector echo "<script type=\"text/javascript\">\n<!--\n"; foreach($ids as $id)
|
Zeile 2460 | Zeile 2482 |
---|
if($moderator['isgroup']) { $moderator['img'] = "<img src=\"styles/{$page->style}/images/icons/group.gif\" alt=\"{$lang->group}\" title=\"{$lang->group}\" />";
|
if($moderator['isgroup']) { $moderator['img'] = "<img src=\"styles/{$page->style}/images/icons/group.gif\" alt=\"{$lang->group}\" title=\"{$lang->group}\" />";
|
$form_container->output_cell("{$moderator['img']} <a href=\"index.php?module=user-groups&action=edit&gid={$moderator['id']}\">".htmlspecialchars_uni($moderator['title'])."</a>");
| $form_container->output_cell("{$moderator['img']} <a href=\"index.php?module=user-groups&action=edit&gid={$moderator['id']}\">".htmlspecialchars_uni($moderator['title'])." ({$lang->usergroup} {$moderator['id']})</a>");
|
$form_container->output_cell("<a href=\"index.php?module=forum-management&action=editmod&mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=deletemod&id={$moderator['id']}&isgroup=1&fid={$fid}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_moderator_deletion}')\">{$lang->delete}</a>", array("class" => "align_center")); }
| $form_container->output_cell("<a href=\"index.php?module=forum-management&action=editmod&mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=deletemod&id={$moderator['id']}&isgroup=1&fid={$fid}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_moderator_deletion}')\">{$lang->delete}</a>", array("class" => "align_center")); }
|
Zeile 2483 | Zeile 2505 |
---|
// Users $buttons = array();
|
// Users $buttons = array();
|
$form = new Form("index.php?module=forum-management", "post", "management"); echo $form->generate_hidden_field("fid", $mybb->input['fid']);
| $form = new Form("index.php?module=forum-management", "post", "management"); echo $form->generate_hidden_field("fid", $mybb->input['fid']);
|
echo $form->generate_hidden_field("add", "moderators");
|
echo $form->generate_hidden_field("add", "moderators");
|
| // Usergroup Moderator if(!is_array($usergroups)) { $usergroups = $groupscache; }
foreach($usergroups as $group) { $modgroups[$group['gid']] = $lang->usergroup." ".$group['gid'].": ".$group['title']; }
|
$form_container = new FormContainer($lang->add_usergroup_as_moderator);
|
$form_container = new FormContainer($lang->add_usergroup_as_moderator);
|
$form_container->output_row($lang->usergroup." <em>*</em>", $lang->moderator_usergroup_desc, $form->generate_text_box('usergroup', $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup'); $form_container->end(); // Autocompletion for usergroups echo ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=1400"></script> <script type="text/javascript"> <!-- new autoComplete("usergroup", "../xmlhttp.php?action=get_usergroups", {valueSpan: "usergroup"}); // --> </script>';
| $form_container->output_row($lang->usergroup." <em>*</em>", $lang->moderator_usergroup_desc, $form->generate_select_box('usergroup', $modgroups, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup'); $form_container->end();
|
$buttons[] = $form->generate_submit_button($lang->add_usergroup_moderator); $form->output_submit_wrapper($buttons); $form->end();
| $buttons[] = $form->generate_submit_button($lang->add_usergroup_moderator); $form->output_submit_wrapper($buttons); $form->end();
|
Zeile 2510 | Zeile 2535 |
---|
$form_container = new FormContainer($lang->add_user_as_moderator); $form_container->output_row($lang->username." <em>*</em>", $lang->moderator_username_desc, $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->end();
|
$form_container = new FormContainer($lang->add_user_as_moderator); $form_container->output_row($lang->username." <em>*</em>", $lang->moderator_username_desc, $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->end();
|
|
|
// Autocompletion for usernames echo ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=1400"></script>
| // Autocompletion for usernames echo ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=1400"></script>
|