Vergleich admin/modules/user/groups.php - 1.8.3 - 1.8.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 28Zeile 28
	"candeleteposts" => 1,
"candeletethreads" => 1,
"caneditattachments" => 1,

	"candeleteposts" => 1,
"candeletethreads" => 1,
"caneditattachments" => 1,

 
	"canviewdeletionnotice" => 1,

	"canpostpolls" => 1,
"canvotepolls" => 1,
"canundovotes" => 0,

	"canpostpolls" => 1,
"canvotepolls" => 1,
"canundovotes" => 0,

Zeile 61Zeile 62
	"showforumteam" => 0,
"usereputationsystem" => 1,
"cangivereputations" => 1,

	"showforumteam" => 0,
"usereputationsystem" => 1,
"cangivereputations" => 1,

 
	"candeletereputations" => 1,

	"reputationpower" => 1,
"maxreputationsday" => 5,

	"reputationpower" => 1,
"maxreputationsday" => 5,

	"maxreputationsperuser" => 5,
"maxreputationsperthread" => 5,

	"maxreputationsperuser" => 0,
"maxreputationsperthread" => 0,

	"candisplaygroup" => 0,
"attachquota" => 5000,
"cancustomtitle" => 0,

	"candisplaygroup" => 0,
"attachquota" => 5000,
"cancustomtitle" => 0,

Zeile 175Zeile 177

if($mybb->input['action'] == "join_requests")
{


if($mybb->input['action'] == "join_requests")
{

	$query = $db->simple_select("usergroups", "*", "gid='".(int)$mybb->input['gid']."'");

	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

	$group = $db->fetch_array($query);

if(!$group['gid'] || $group['type'] != 4)

	$group = $db->fetch_array($query);

if(!$group['gid'] || $group['type'] != 4)

Zeile 219Zeile 221
		admin_redirect("index.php?module=user-groups&action=join_requests&gid={$group['gid']}");
}


		admin_redirect("index.php?module=user-groups&action=join_requests&gid={$group['gid']}");
}


	$page->add_breadcrumb_item($lang->join_requests_for." {$group['title']}");
$page->output_header($lang->join_requests_for." {$group['title']}");

	$page->add_breadcrumb_item($lang->join_requests_for.' '.htmlspecialchars_uni($group['title']));
$page->output_header($lang->join_requests_for.' '.htmlspecialchars_uni($group['title']));


$sub_tabs = array();
$sub_tabs['join_requests'] = array(


$sub_tabs = array();
$sub_tabs['join_requests'] = array(

Zeile 238Zeile 240

if($mybb->input['page'] > 0)
{


if($mybb->input['page'] > 0)
{

		$current_page = $mybb->get_input('page', 1);

		$current_page = $mybb->get_input('page', MyBB::INPUT_INT);

		$start = ($current_page-1)*$per_page;
$pages = $num_requests / $per_page;
$pages = ceil($pages);

		$start = ($current_page-1)*$per_page;
$pages = $num_requests / $per_page;
$pages = ceil($pages);

Zeile 264Zeile 266

$form = new Form("index.php?module=user-groups&action=join_requests&gid={$group['gid']}", "post");
$table = new Table;


$form = new Form("index.php?module=user-groups&action=join_requests&gid={$group['gid']}", "post");
$table = new Table;

	$table->construct_header($form->generate_check_box("checkall", 1, "", array('class' => 'checkall')), array('width' => 1));

	$table->construct_header($form->generate_check_box("allbox", 1, "", array('class' => 'checkall')), array('width' => 1));

	$table->construct_header($lang->users);
$table->construct_header($lang->reason);
$table->construct_header($lang->date_requested, array("class" => 'align_center', "width" => 200));

	$table->construct_header($lang->users);
$table->construct_header($lang->reason);
$table->construct_header($lang->date_requested, array("class" => 'align_center', "width" => 200));

Zeile 282Zeile 284
	while($request = $db->fetch_array($query))
{
$table->construct_cell($form->generate_check_box("users[]", $request['uid'], ""));

	while($request = $db->fetch_array($query))
{
$table->construct_cell($form->generate_check_box("users[]", $request['uid'], ""));

		$table->construct_cell("<strong>".build_profile_link($request['username'], $request['uid'], "_blank")."</strong>");

		$table->construct_cell("<strong>".build_profile_link(htmlspecialchars_uni($request['username']), $request['uid'], "_blank")."</strong>");

		$table->construct_cell(htmlspecialchars_uni($request['reason']));
$table->construct_cell(my_date('relative', $request['dateline']), array('class' => 'align_center'));


		$table->construct_cell(htmlspecialchars_uni($request['reason']));
$table->construct_cell(my_date('relative', $request['dateline']), array('class' => 'align_center'));


Zeile 300Zeile 302
		$table->construct_row();
}


		$table->construct_row();
}


	$table->output($lang->join_requests_for." {$group['title']}");

	$table->output($lang->join_requests_for.' '.htmlspecialchars_uni($group['title']));

	echo $pagination;

$buttons[] = $form->generate_submit_button($lang->approve_selected_requests, array('name' => 'approve'));

	echo $pagination;

$buttons[] = $form->generate_submit_button($lang->approve_selected_requests, array('name' => 'approve'));

Zeile 312Zeile 314
}
if($mybb->input['action'] == "add_leader" && $mybb->request_method == "post")
{

}
if($mybb->input['action'] == "add_leader" && $mybb->request_method == "post")
{

	$query = $db->simple_select("usergroups", "*", "gid='".(int)$mybb->input['gid']."'");

	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

	$group = $db->fetch_array($query);

if(!$group['gid'])

	$group = $db->fetch_array($query);

if(!$group['gid'])

Zeile 345Zeile 347
		$new_leader = array(
"gid" => $group['gid'],
"uid" => $user['uid'],

		$new_leader = array(
"gid" => $group['gid'],
"uid" => $user['uid'],

			"canmanagemembers" => (int)$mybb->input['canmanagemembers'],
"canmanagerequests" => (int)$mybb->input['canmanagerequests'],
"caninvitemembers" => (int)$mybb->input['caninvitemembers']

			"canmanagemembers" => $mybb->get_input('canmanagemembers', MyBB::INPUT_INT),
"canmanagerequests" => $mybb->get_input('canmanagerequests', MyBB::INPUT_INT),
"caninvitemembers" => $mybb->get_input('caninvitemembers', MyBB::INPUT_INT)

		);

		);

 

$makeleadermember = $mybb->get_input('makeleadermember', MyBB::INPUT_INT);
if($makeleadermember == 1)
{
join_usergroup($user['uid'], $group['gid']);
}


$plugins->run_hooks("admin_user_groups_add_leader_commit");



$plugins->run_hooks("admin_user_groups_add_leader_commit");


Zeile 357Zeile 365
		$cache->update_groupleaders();

// Log admin action

		$cache->update_groupleaders();

// Log admin action

		log_admin_action($user['uid'], $mybb->input['username'], $group['gid'], $group['title']);

		log_admin_action($user['uid'], $user['username'], $group['gid'], $group['title']);





		flash_message("{$user['username']} ".$lang->success_user_made_leader, 'success');


		$username = htmlspecialchars_uni($user['username']);
flash_message("{$username} ".$lang->success_user_made_leader, 'success');

		admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
}
else

		admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");
}
else

Zeile 372Zeile 381
// Show a listing of group leaders
if($mybb->input['action'] == "leaders")
{

// Show a listing of group leaders
if($mybb->input['action'] == "leaders")
{

	$query = $db->simple_select("usergroups", "*", "gid='".(int)$mybb->input['gid']."'");

	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

	$group = $db->fetch_array($query);

if(!$group['gid'])

	$group = $db->fetch_array($query);

if(!$group['gid'])

Zeile 383Zeile 392

$plugins->run_hooks("admin_user_groups_leaders");



$plugins->run_hooks("admin_user_groups_leaders");


	$page->add_breadcrumb_item($lang->group_leaders_for." {$group['title']}");
$page->output_header($lang->group_leaders_for." {$group['title']}");

	$page->add_breadcrumb_item($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']));
$page->output_header($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']));


$sub_tabs = array();
$sub_tabs['group_leaders'] = array(


$sub_tabs = array();
$sub_tabs['group_leaders'] = array(

Zeile 454Zeile 463
		$table->construct_row();
}


		$table->construct_row();
}


	$table->output($lang->group_leaders_for." {$group['title']}");

	$table->output($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']));


$form = new Form("index.php?module=user-groups&amp;action=add_leader&amp;gid={$group['gid']}", "post");



$form = new Form("index.php?module=user-groups&amp;action=add_leader&amp;gid={$group['gid']}", "post");


Zeile 467Zeile 476
		$mybb->input = array_merge($mybb->input, array(
"canmanagemembers" => 1,
"canmanagerequests" => 1,

		$mybb->input = array_merge($mybb->input, array(
"canmanagemembers" => 1,
"canmanagerequests" => 1,

				"caninvitemembers" => 1


				"caninvitemembers" => 1,
"makeleadermember" => 0

			)
);
}


			)
);
}


	$form_container = new FormContainer($lang->add_group_leader." {$group['title']}");
$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');

	$form_container = new FormContainer($lang->add_group_leader.' '.htmlspecialchars_uni($group['title']));
$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'username');

	$form_container->output_row($lang->can_manage_group_members, $lang->can_manage_group_members_desc, $form->generate_yes_no_radio('canmanagemembers', $mybb->input['canmanagemembers']));
$form_container->output_row($lang->can_manage_group_join_requests, $lang->can_manage_group_join_requests_desc, $form->generate_yes_no_radio('canmanagerequests', $mybb->input['canmanagerequests']));
$form_container->output_row($lang->can_invite_group_members, $lang->can_invite_group_members_desc, $form->generate_yes_no_radio('caninvitemembers', $mybb->input['caninvitemembers']));

	$form_container->output_row($lang->can_manage_group_members, $lang->can_manage_group_members_desc, $form->generate_yes_no_radio('canmanagemembers', $mybb->input['canmanagemembers']));
$form_container->output_row($lang->can_manage_group_join_requests, $lang->can_manage_group_join_requests_desc, $form->generate_yes_no_radio('canmanagerequests', $mybb->input['canmanagerequests']));
$form_container->output_row($lang->can_invite_group_members, $lang->can_invite_group_members_desc, $form->generate_yes_no_radio('caninvitemembers', $mybb->input['caninvitemembers']));

	$buttons[] = $form->generate_submit_button($lang->save_group_leader);


	$form_container->output_row($lang->make_user_member, $lang->make_user_member_desc, $form->generate_yes_no_radio('makeleadermember', $mybb->input['makeleadermember']));


	$form_container->end();

	$form_container->end();

 

// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">
<script type="text/javascript" src="../jscripts/select2/select2.min.js?ver=1804"></script>
<script type="text/javascript">
<!--
$("#username").select2({
placeholder: "'.$lang->search_for_a_user.'",
minimumInputLength: 2,
multiple: false,
ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper
url: "../xmlhttp.php?action=get_users",
dataType: \'json\',
data: function (term, page) {
return {
query: term // search term
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
initSelection: function(element, callback) {
var query = $(element).val();
if (query !== "") {
$.ajax("../xmlhttp.php?action=get_users&getone=1", {
data: {
query: query
},
dataType: "json"
}).done(function(data) { callback(data); });
}
}
});
// -->
</script>';

$buttons[] = $form->generate_submit_button($lang->save_group_leader);

	$form->output_submit_wrapper($buttons);
$form->end();


	$form->output_submit_wrapper($buttons);
$form->end();


Zeile 492Zeile 541
		SELECT l.*, u.username
FROM ".TABLE_PREFIX."groupleaders l
INNER JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)

		SELECT l.*, u.username
FROM ".TABLE_PREFIX."groupleaders l
INNER JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)

		WHERE l.lid='".(int)$mybb->input['lid']."'");

		WHERE l.lid='".$mybb->get_input('lid', MyBB::INPUT_INT)."'");

	$leader = $db->fetch_array($query);

if(!$leader['lid'])

	$leader = $db->fetch_array($query);

if(!$leader['lid'])

Zeile 524Zeile 573
		$cache->update_groupleaders();

// Log admin action

		$cache->update_groupleaders();

// Log admin action

		log_admin_action($leader['lid'], $leader['username'], $group['gid'], $group['title']);

		log_admin_action($leader['uid'], $leader['username'], $group['gid'], $group['title']);


flash_message($lang->success_group_leader_deleted, 'success');
admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");


flash_message($lang->success_group_leader_deleted, 'success');
admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");

Zeile 541Zeile 590
		SELECT l.*, u.username
FROM ".TABLE_PREFIX."groupleaders l
INNER JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)

		SELECT l.*, u.username
FROM ".TABLE_PREFIX."groupleaders l
INNER JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)

		WHERE l.lid='".(int)$mybb->input['lid']."'

		WHERE l.lid='".$mybb->get_input('lid', MyBB::INPUT_INT)."'

	");
$leader = $db->fetch_array($query);


	");
$leader = $db->fetch_array($query);


Zeile 559Zeile 608
	if($mybb->request_method == "post")
{
$updated_leader = array(

	if($mybb->request_method == "post")
{
$updated_leader = array(

			"canmanagemembers" => (int)$mybb->input['canmanagemembers'],
"canmanagerequests" => (int)$mybb->input['canmanagerequests'],
"caninvitemembers" => (int)$mybb->input['caninvitemembers']

			"canmanagemembers" => $mybb->get_input('canmanagemembers', MyBB::INPUT_INT),
"canmanagerequests" => $mybb->get_input('canmanagerequests', MyBB::INPUT_INT),
"caninvitemembers" => $mybb->get_input('caninvitemembers', MyBB::INPUT_INT)

		);

$plugins->run_hooks("admin_user_groups_edit_leader_commit");

		);

$plugins->run_hooks("admin_user_groups_edit_leader_commit");

Zeile 571Zeile 620
		$cache->update_groupleaders();

// Log admin action

		$cache->update_groupleaders();

// Log admin action

		log_admin_action($leader['lid'], $leader['username'], $group['gid'], $group['title']);

		log_admin_action($leader['uid'], $leader['username'], $group['gid'], $group['title']);


flash_message($lang->success_group_leader_updated, 'success');
admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");


flash_message($lang->success_group_leader_updated, 'success');
admin_redirect("index.php?module=user-groups&action=leaders&gid={$group['gid']}");

Zeile 582Zeile 631
		$mybb->input = array_merge($mybb->input, $leader);
}


		$mybb->input = array_merge($mybb->input, $leader);
}


	$page->add_breadcrumb_item($lang->group_leaders_for." {$group['title']}", "index.php?module=user-groups&action=leaders&gid={$group['gid']}");


	$page->add_breadcrumb_item($lang->group_leaders_for.' '.htmlspecialchars_uni($group['title']), "index.php?module=user-groups&action=leaders&gid={$group['gid']}");
$leader['username'] = htmlspecialchars_uni($leader['username']);

	$page->add_breadcrumb_item($lang->edit_leader." {$leader['username']}");

$page->output_header($lang->edit_group_leader);

	$page->add_breadcrumb_item($lang->edit_leader." {$leader['username']}");

$page->output_header($lang->edit_group_leader);

Zeile 647Zeile 697
				"description" => $db->escape_string($mybb->input['description']),
"namestyle" => $db->escape_string($mybb->input['namestyle']),
"usertitle" => $db->escape_string($mybb->input['usertitle']),

				"description" => $db->escape_string($mybb->input['description']),
"namestyle" => $db->escape_string($mybb->input['namestyle']),
"usertitle" => $db->escape_string($mybb->input['usertitle']),

				"stars" => (int)$mybb->input['stars'],

				"stars" => $mybb->get_input('stars', MyBB::INPUT_INT),

				"starimage" => $db->escape_string($mybb->input['starimage']),
"disporder" => 0
);

				"starimage" => $db->escape_string($mybb->input['starimage']),
"disporder" => 0
);

Zeile 660Zeile 710
			// Copying permissions from another group
else
{

			// Copying permissions from another group
else
{

				$query = $db->simple_select("usergroups", "*", "gid='".(int)$mybb->input['copyfrom']."'");

				$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('copyfrom', MyBB::INPUT_INT)."'");

				$existing_usergroup = $db->fetch_array($query);
foreach(array_keys($usergroup_permissions) as $field)
{

				$existing_usergroup = $db->fetch_array($query);
foreach(array_keys($usergroup_permissions) as $field)
{

Zeile 677Zeile 727
			// Are we copying permissions? If so, copy all forum permissions too
if($mybb->input['copyfrom'] > 0)
{

			// Are we copying permissions? If so, copy all forum permissions too
if($mybb->input['copyfrom'] > 0)
{

				$query = $db->simple_select("forumpermissions", "*", "gid='".(int)$mybb->input['copyfrom']."'");

				$query = $db->simple_select("forumpermissions", "*", "gid='".$mybb->get_input('copyfrom', MyBB::INPUT_INT)."'");

				while($forum_permission = $db->fetch_array($query))
{
unset($forum_permission['pid']);

				while($forum_permission = $db->fetch_array($query))
{
unset($forum_permission['pid']);

Zeile 693Zeile 743
			// Log admin action
log_admin_action($gid, $mybb->input['title']);


			// Log admin action
log_admin_action($gid, $mybb->input['title']);


			flash_message($lang->success_group_created, 'success');










			$groups = $cache->read('usergroups');
$grouptitles = array_column($groups, 'title');

$message = $lang->success_group_created;
if(in_array($mybb->input['title'], $grouptitles) && count(array_keys($grouptitles, $mybb->input['title'])) > 1)
{
$message = $lang->sprintf($lang->success_group_created_duplicate_title, htmlspecialchars_uni($mybb->input['title']));
}

flash_message($message, 'success');

			admin_redirect("index.php?module=user-groups&action=edit&gid={$gid}");

			admin_redirect("index.php?module=user-groups&action=edit&gid={$gid}");

		}
}


		}
}


	$page->add_breadcrumb_item($lang->add_user_group);
$page->output_header($lang->add_user_group);

	$page->add_breadcrumb_item($lang->add_user_group);
$page->output_header($lang->add_user_group);





	$page->output_nav_tabs($sub_tabs, 'add_group');
$form = new Form("index.php?module=user-groups&amp;action=add", "post");

if($errors)

	$page->output_nav_tabs($sub_tabs, 'add_group');
$form = new Form("index.php?module=user-groups&amp;action=add", "post");

if($errors)

	{

	{

		$page->output_inline_error($errors);
}
else

		$page->output_inline_error($errors);
}
else

Zeile 726Zeile 785
	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

		$options[$usergroup['gid']] = $usergroup['title'];

		$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);

	}
$form_container->output_row($lang->copy_permissions_from, $lang->copy_permissions_from_desc, $form->generate_select_box('copyfrom', $options, $mybb->input['copyfrom'], array('id' => 'copyfrom')), 'copyfrom');

	}
$form_container->output_row($lang->copy_permissions_from, $lang->copy_permissions_from_desc, $form->generate_select_box('copyfrom', $options, $mybb->input['copyfrom'], array('id' => 'copyfrom')), 'copyfrom');





	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_user_group);
$form->output_submit_wrapper($buttons);

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_user_group);
$form->output_submit_wrapper($buttons);





	$form->end();
$page->output_footer();
}

	$form->end();
$page->output_footer();
}





if($mybb->input['action'] == "edit")
{

if($mybb->input['action'] == "edit")
{

	$query = $db->simple_select("usergroups", "*", "gid='".(int)$mybb->input['gid']."'");

	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

	$usergroup = $db->fetch_array($query);

if(!$usergroup['gid'])

	$usergroup = $db->fetch_array($query);

if(!$usergroup['gid'])

Zeile 754Zeile 813
		{
$errors[] = $lang->error_disallowed_namestyle_username;
$mybb->input['namestyle'] = $usergroup['namestyle'];

		{
$errors[] = $lang->error_disallowed_namestyle_username;
$mybb->input['namestyle'] = $usergroup['namestyle'];

		}
}

$plugins->run_hooks("admin_user_groups_edit");


		}
}

$plugins->run_hooks("admin_user_groups_edit");


	if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

	if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

Zeile 769Zeile 828
		if(my_strpos($mybb->input['namestyle'], "{username}") === false)
{
$errors[] = $lang->error_missing_namestyle_username;

		if(my_strpos($mybb->input['namestyle'], "{username}") === false)
{
$errors[] = $lang->error_missing_namestyle_username;

		}


		}


		if($mybb->input['moderate'] == 1 && $mybb->input['invite'] == 1)
{
$errors[] = $lang->error_cannot_have_both_types;

		if($mybb->input['moderate'] == 1 && $mybb->input['invite'] == 1)
{
$errors[] = $lang->error_cannot_have_both_types;

Zeile 794Zeile 853
				}
}
else

				}
}
else

			{

			{

				$mybb->input['type'] = "2";

				$mybb->input['type'] = "2";

			}


			}


			if($usergroup['type'] == 1)

			if($usergroup['type'] == 1)

			{

			{

				$mybb->input['type'] = 1;
}

if($mybb->input['stars'] < 1)
{
$mybb->input['stars'] = 0;

				$mybb->input['type'] = 1;
}

if($mybb->input['stars'] < 1)
{
$mybb->input['stars'] = 0;

			}

			}


$updated_group = array(


$updated_group = array(

				"type" => $mybb->get_input('type', 1),

				"type" => $mybb->get_input('type', MyBB::INPUT_INT),

				"title" => $db->escape_string($mybb->input['title']),
"description" => $db->escape_string($mybb->input['description']),
"namestyle" => $db->escape_string($mybb->input['namestyle']),
"usertitle" => $db->escape_string($mybb->input['usertitle']),

				"title" => $db->escape_string($mybb->input['title']),
"description" => $db->escape_string($mybb->input['description']),
"namestyle" => $db->escape_string($mybb->input['namestyle']),
"usertitle" => $db->escape_string($mybb->input['usertitle']),

				"stars" => (int)$mybb->input['stars'],

				"stars" => $mybb->get_input('stars', MyBB::INPUT_INT),

				"starimage" => $db->escape_string($mybb->input['starimage']),
"image" => $db->escape_string($mybb->input['image']),

				"starimage" => $db->escape_string($mybb->input['starimage']),
"image" => $db->escape_string($mybb->input['image']),

				"isbannedgroup" => (int)$mybb->input['isbannedgroup'],
"canview" => (int)$mybb->input['canview'],
"canviewthreads" => (int)$mybb->input['canviewthreads'],
"canviewprofiles" => (int)$mybb->input['canviewprofiles'],
"candlattachments" => (int)$mybb->input['candlattachments'],
"canviewboardclosed" => (int)$mybb->input['canviewboardclosed'],
"canpostthreads" => (int)$mybb->input['canpostthreads'],
"canpostreplys" => (int)$mybb->input['canpostreplys'],
"canpostattachments" => (int)$mybb->input['canpostattachments'],
"canratethreads" => (int)$mybb->input['canratethreads'],
"modposts" => (int)$mybb->input['modposts'],
"modthreads" => (int)$mybb->input['modthreads'],
"mod_edit_posts" => (int)$mybb->input['mod_edit_posts'],
"modattachments" => (int)$mybb->input['modattachments'],
"caneditposts" => (int)$mybb->input['caneditposts'],
"candeleteposts" => (int)$mybb->input['candeleteposts'],
"candeletethreads" => (int)$mybb->input['candeletethreads'],
"caneditattachments" => (int)$mybb->input['caneditattachments'],
"canpostpolls" => (int)$mybb->input['canpostpolls'],
"canvotepolls" => (int)$mybb->input['canvotepolls'],
"canundovotes" => (int)$mybb->input['canundovotes'],
"canusepms" => (int)$mybb->input['canusepms'],
"cansendpms" => (int)$mybb->input['cansendpms'],
"cantrackpms" => (int)$mybb->input['cantrackpms'],
"candenypmreceipts" => (int)$mybb->input['candenypmreceipts'],
"pmquota" => (int)$mybb->input['pmquota'],
"maxpmrecipients" => (int)$mybb->input['maxpmrecipients'],
"cansendemail" => (int)$mybb->input['cansendemail'],
"cansendemailoverride" => (int)$mybb->input['cansendemailoverride'],
"maxemails" => (int)$mybb->input['maxemails'],
"emailfloodtime" => (int)$mybb->input['emailfloodtime'],
"canviewmemberlist" => (int)$mybb->input['canviewmemberlist'],
"canviewcalendar" => (int)$mybb->input['canviewcalendar'],
"canaddevents" => (int)$mybb->input['canaddevents'],
"canbypasseventmod" => (int)$mybb->input['canbypasseventmod'],
"canmoderateevents" => (int)$mybb->input['canmoderateevents'],
"canviewonline" => (int)$mybb->input['canviewonline'],
"canviewwolinvis" => (int)$mybb->input['canviewwolinvis'],
"canviewonlineips" => (int)$mybb->input['canviewonlineips'],
"cancp" => (int)$mybb->input['cancp'],
"issupermod" => (int)$mybb->input['issupermod'],
"cansearch" => (int)$mybb->input['cansearch'],
"canusercp" => (int)$mybb->input['canusercp'],
"canuploadavatars" => (int)$mybb->input['canuploadavatars'],
"canchangename" => (int)$mybb->input['canchangename'],
"canbereported" => (int)$mybb->input['canbereported'],
"canchangewebsite" => (int)$mybb->input['canchangewebsite'],
"showforumteam" => (int)$mybb->input['showforumteam'],
"usereputationsystem" => (int)$mybb->input['usereputationsystem'],
"cangivereputations" => (int)$mybb->input['cangivereputations'],
"reputationpower" => (int)$mybb->input['reputationpower'],
"maxreputationsday" => (int)$mybb->input['maxreputationsday'],
"maxreputationsperuser" => (int)$mybb->input['maxreputationsperuser'],
"maxreputationsperthread" => (int)$mybb->input['maxreputationsperthread'],
"attachquota" => (int)$mybb->input['attachquota'],
"cancustomtitle" => (int)$mybb->input['cancustomtitle'],
"canwarnusers" => (int)$mybb->input['canwarnusers'],
"canreceivewarnings" =>(int)$mybb->input['canreceivewarnings'],
"maxwarningsday" => (int)$mybb->input['maxwarningsday'],
"canmodcp" => (int)$mybb->input['canmodcp'],
"showinbirthdaylist" => (int)$mybb->input['showinbirthdaylist'],
"canoverridepm" => (int)$mybb->input['canoverridepm'],
"canusesig" => (int)$mybb->input['canusesig'],
"canusesigxposts" => (int)$mybb->input['canusesigxposts'],
"signofollow" => (int)$mybb->input['signofollow'],
"edittimelimit" => (int)$mybb->input['edittimelimit'],
"maxposts" => (int)$mybb->input['maxposts'],
"showmemberlist" => (int)$mybb->input['showmemberlist'],
"canmanageannounce" => (int)$mybb->input['canmanageannounce'],
"canmanagemodqueue" => (int)$mybb->input['canmanagemodqueue'],
"canmanagereportedcontent" => (int)$mybb->input['canmanagereportedcontent'],
"canviewmodlogs" => (int)$mybb->input['canviewmodlogs'],
"caneditprofiles" => (int)$mybb->input['caneditprofiles'],
"canbanusers" => (int)$mybb->input['canbanusers'],
"canviewwarnlogs" => (int)$mybb->input['canviewwarnlogs'],
"canuseipsearch" => (int)$mybb->input['canuseipsearch']



				"isbannedgroup" => $mybb->get_input('isbannedgroup', MyBB::INPUT_INT),
"canview" => $mybb->get_input('canview', MyBB::INPUT_INT),
"canviewthreads" => $mybb->get_input('canviewthreads', MyBB::INPUT_INT),
"canviewprofiles" => $mybb->get_input('canviewprofiles', MyBB::INPUT_INT),
"candlattachments" => $mybb->get_input('candlattachments', MyBB::INPUT_INT),
"canviewboardclosed" => $mybb->get_input('canviewboardclosed', MyBB::INPUT_INT),
"canpostthreads" => $mybb->get_input('canpostthreads', MyBB::INPUT_INT),
"canpostreplys" => $mybb->get_input('canpostreplys', MyBB::INPUT_INT),
"canpostattachments" => $mybb->get_input('canpostattachments', MyBB::INPUT_INT),
"canratethreads" => $mybb->get_input('canratethreads', MyBB::INPUT_INT),
"modposts" => $mybb->get_input('modposts', MyBB::INPUT_INT),
"modthreads" => $mybb->get_input('modthreads', MyBB::INPUT_INT),
"mod_edit_posts" => $mybb->get_input('mod_edit_posts', MyBB::INPUT_INT),
"modattachments" => $mybb->get_input('modattachments', MyBB::INPUT_INT),
"caneditposts" => $mybb->get_input('caneditposts', MyBB::INPUT_INT),
"candeleteposts" => $mybb->get_input('candeleteposts', MyBB::INPUT_INT),
"candeletethreads" => $mybb->get_input('candeletethreads', MyBB::INPUT_INT),
"caneditattachments" => $mybb->get_input('caneditattachments', MyBB::INPUT_INT),
"canviewdeletionnotice" => $mybb->get_input('canviewdeletionnotice', MyBB::INPUT_INT),
"canpostpolls" => $mybb->get_input('canpostpolls', MyBB::INPUT_INT),
"canvotepolls" => $mybb->get_input('canvotepolls', MyBB::INPUT_INT),
"canundovotes" => $mybb->get_input('canundovotes', MyBB::INPUT_INT),
"canusepms" => $mybb->get_input('canusepms', MyBB::INPUT_INT),
"cansendpms" => $mybb->get_input('cansendpms', MyBB::INPUT_INT),
"cantrackpms" => $mybb->get_input('cantrackpms', MyBB::INPUT_INT),
"candenypmreceipts" => $mybb->get_input('candenypmreceipts', MyBB::INPUT_INT),
"pmquota" => $mybb->get_input('pmquota', MyBB::INPUT_INT),
"maxpmrecipients" => $mybb->get_input('maxpmrecipients', MyBB::INPUT_INT),
"cansendemail" => $mybb->get_input('cansendemail', MyBB::INPUT_INT),
"cansendemailoverride" => $mybb->get_input('cansendemailoverride', MyBB::INPUT_INT),
"maxemails" => $mybb->get_input('maxemails', MyBB::INPUT_INT),
"emailfloodtime" => $mybb->get_input('emailfloodtime', MyBB::INPUT_INT),
"canviewmemberlist" => $mybb->get_input('canviewmemberlist', MyBB::INPUT_INT),
"canviewcalendar" => $mybb->get_input('canviewcalendar', MyBB::INPUT_INT),
"canaddevents" => $mybb->get_input('canaddevents', MyBB::INPUT_INT),
"canbypasseventmod" => $mybb->get_input('canbypasseventmod', MyBB::INPUT_INT),
"canmoderateevents" => $mybb->get_input('canmoderateevents', MyBB::INPUT_INT),
"canviewonline" => $mybb->get_input('canviewonline', MyBB::INPUT_INT),
"canviewwolinvis" => $mybb->get_input('canviewwolinvis', MyBB::INPUT_INT),
"canviewonlineips" => $mybb->get_input('canviewonlineips', MyBB::INPUT_INT),
"cancp" => $mybb->get_input('cancp', MyBB::INPUT_INT),
"issupermod" => $mybb->get_input('issupermod', MyBB::INPUT_INT),
"cansearch" => $mybb->get_input('cansearch', MyBB::INPUT_INT),
"canusercp" => $mybb->get_input('canusercp', MyBB::INPUT_INT),
"canuploadavatars" => $mybb->get_input('canuploadavatars', MyBB::INPUT_INT),
"canchangename" => $mybb->get_input('canchangename', MyBB::INPUT_INT),
"canbereported" => $mybb->get_input('canbereported', MyBB::INPUT_INT),
"canchangewebsite" => $mybb->get_input('canchangewebsite', MyBB::INPUT_INT),
"showforumteam" => $mybb->get_input('showforumteam', MyBB::INPUT_INT),
"usereputationsystem" => $mybb->get_input('usereputationsystem', MyBB::INPUT_INT),
"cangivereputations" => $mybb->get_input('cangivereputations', MyBB::INPUT_INT),
"candeletereputations" => $mybb->get_input('candeletereputations', MyBB::INPUT_INT),
"reputationpower" => $mybb->get_input('reputationpower', MyBB::INPUT_INT),
"maxreputationsday" => $mybb->get_input('maxreputationsday', MyBB::INPUT_INT),
"maxreputationsperuser" => $mybb->get_input('maxreputationsperuser', MyBB::INPUT_INT),
"maxreputationsperthread" => $mybb->get_input('maxreputationsperthread', MyBB::INPUT_INT),
"attachquota" => $mybb->get_input('attachquota', MyBB::INPUT_INT),
"cancustomtitle" => $mybb->get_input('cancustomtitle', MyBB::INPUT_INT),
"canwarnusers" => $mybb->get_input('canwarnusers', MyBB::INPUT_INT),
"canreceivewarnings" =>$mybb->get_input('canreceivewarnings', MyBB::INPUT_INT),
"maxwarningsday" => $mybb->get_input('maxwarningsday', MyBB::INPUT_INT),
"canmodcp" => $mybb->get_input('canmodcp', MyBB::INPUT_INT),
"showinbirthdaylist" => $mybb->get_input('showinbirthdaylist', MyBB::INPUT_INT),
"canoverridepm" => $mybb->get_input('canoverridepm', MyBB::INPUT_INT),
"canusesig" => $mybb->get_input('canusesig', MyBB::INPUT_INT),
"canusesigxposts" => $mybb->get_input('canusesigxposts', MyBB::INPUT_INT),
"signofollow" => $mybb->get_input('signofollow', MyBB::INPUT_INT),
"edittimelimit" => $mybb->get_input('edittimelimit', MyBB::INPUT_INT),
"maxposts" => $mybb->get_input('maxposts', MyBB::INPUT_INT),
"showmemberlist" => $mybb->get_input('showmemberlist', MyBB::INPUT_INT),
"canmanageannounce" => $mybb->get_input('canmanageannounce', MyBB::INPUT_INT),
"canmanagemodqueue" => $mybb->get_input('canmanagemodqueue', MyBB::INPUT_INT),
"canmanagereportedcontent" => $mybb->get_input('canmanagereportedcontent', MyBB::INPUT_INT),
"canviewmodlogs" => $mybb->get_input('canviewmodlogs', MyBB::INPUT_INT),
"caneditprofiles" => $mybb->get_input('caneditprofiles', MyBB::INPUT_INT),
"canbanusers" => $mybb->get_input('canbanusers', MyBB::INPUT_INT),
"canviewwarnlogs" => $mybb->get_input('canviewwarnlogs', MyBB::INPUT_INT),
"canuseipsearch" => $mybb->get_input('canuseipsearch', MyBB::INPUT_INT)

			);

// Only update the candisplaygroup setting if not a default user group
if($usergroup['type'] != 1)
{

			);

// Only update the candisplaygroup setting if not a default user group
if($usergroup['type'] != 1)
{

				$updated_group['candisplaygroup'] = (int)$mybb->input['candisplaygroup'];

				$updated_group['candisplaygroup'] = $mybb->get_input('candisplaygroup', MyBB::INPUT_INT);

			}

$plugins->run_hooks("admin_user_groups_edit_commit");

			}

$plugins->run_hooks("admin_user_groups_edit_commit");

Zeile 912Zeile 973
			// Log admin action
log_admin_action($usergroup['gid'], $mybb->input['title']);


			// Log admin action
log_admin_action($usergroup['gid'], $mybb->input['title']);


			flash_message($lang->success_group_updated, 'success');










			$groups = $cache->read('usergroups');
$grouptitles = array_column($groups, 'title');

$message = $lang->success_group_updated;
if(in_array($mybb->input['title'], $grouptitles) && count(array_keys($grouptitles, $mybb->input['title'])) > 1)
{
$message = $lang->sprintf($lang->success_group_updated_duplicate_title, htmlspecialchars_uni($mybb->input['title']));
}

flash_message($message, 'success');

			admin_redirect("index.php?module=user-groups");
}
}

			admin_redirect("index.php?module=user-groups");
}
}

Zeile 934Zeile 1004
	if($errors)
{
$page->output_inline_error($errors);

	if($errors)
{
$page->output_inline_error($errors);

	}

	}

	else
{
if($usergroup['type'] == "3")

	else
{
if($usergroup['type'] == "3")

		{

		{

			$usergroup['joinable'] = 1;
$usergroup['moderate'] = 0;

			$usergroup['joinable'] = 1;
$usergroup['moderate'] = 0;

			$usergroup['invite'] = 0;

			$usergroup['invite'] = 0;

		}
elseif($usergroup['type'] == "4")

		}
elseif($usergroup['type'] == "4")

		{
$usergroup['joinable'] = 1;
$usergroup['moderate'] = 1;
$usergroup['invite'] = 0;

		{
$usergroup['joinable'] = 1;
$usergroup['moderate'] = 1;
$usergroup['invite'] = 0;

		}
elseif($usergroup['type'] == "5")
{

		}
elseif($usergroup['type'] == "5")
{

Zeile 980Zeile 1050
	$form_container->output_row($lang->username_style, $lang->username_style_desc, $form->generate_text_box('namestyle', $mybb->input['namestyle'], array('id' => 'namestyle')), 'namestyle');
$form_container->output_row($lang->user_title, $lang->user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');


	$form_container->output_row($lang->username_style, $lang->username_style_desc, $form->generate_text_box('namestyle', $mybb->input['namestyle'], array('id' => 'namestyle')), 'namestyle');
$form_container->output_row($lang->user_title, $lang->user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');


	$stars = "<table cellpadding=\"3\"><tr><td>".$form->generate_numeric_field('stars', $mybb->input['stars'], array('class' => 'field50', 'id' => 'stars'))."</td><td>".$form->generate_text_box('starimage', $mybb->input['starimage'], array('id' => 'starimage'))."</td></tr>";

	$stars = "<table cellpadding=\"3\"><tr><td>".$form->generate_numeric_field('stars', $mybb->input['stars'], array('class' => 'field50', 'id' => 'stars', 'min' => 0))."</td><td>".$form->generate_text_box('starimage', $mybb->input['starimage'], array('id' => 'starimage'))."</td></tr>";

	$stars .= "<tr><td><small>{$lang->stars}</small></td><td><small>{$lang->star_image}</small></td></tr></table>";
$form_container->output_row($lang->user_stars, $lang->user_stars_desc, $stars, "stars");


	$stars .= "<tr><td><small>{$lang->stars}</small></td><td><small>{$lang->star_image}</small></td></tr></table>";
$form_container->output_row($lang->user_stars, $lang->user_stars_desc, $stars, "stars");


Zeile 1032Zeile 1102
		$form->generate_check_box("canviewboardclosed", 1, $lang->can_view_board_closed, array("checked" => $mybb->input['canviewboardclosed']))
);
$form_container->output_row($lang->viewing_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $viewing_options)."</div>");

		$form->generate_check_box("canviewboardclosed", 1, $lang->can_view_board_closed, array("checked" => $mybb->input['canviewboardclosed']))
);
$form_container->output_row($lang->viewing_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $viewing_options)."</div>");





	$posting_options = array(
$form->generate_check_box("canpostthreads", 1, $lang->can_post_threads, array("checked" => $mybb->input['canpostthreads'])),
$form->generate_check_box("canpostreplys", 1, $lang->can_post_replies, array("checked" => $mybb->input['canpostreplys'])),
$form->generate_check_box("canratethreads", 1, $lang->can_rate_threads, array("checked" => $mybb->input['canratethreads'])),

	$posting_options = array(
$form->generate_check_box("canpostthreads", 1, $lang->can_post_threads, array("checked" => $mybb->input['canpostthreads'])),
$form->generate_check_box("canpostreplys", 1, $lang->can_post_replies, array("checked" => $mybb->input['canpostreplys'])),
$form->generate_check_box("canratethreads", 1, $lang->can_rate_threads, array("checked" => $mybb->input['canratethreads'])),

		"{$lang->max_posts_per_day}<br /><small class=\"input\">{$lang->max_posts_per_day_desc}</small><br />".$form->generate_numeric_field('maxposts', $mybb->input['maxposts'], array('id' => 'maxposts', 'class' => 'field50'))

		"{$lang->max_posts_per_day}<br /><small class=\"input\">{$lang->max_posts_per_day_desc}</small><br />".$form->generate_numeric_field('maxposts', $mybb->input['maxposts'], array('id' => 'maxposts', 'class' => 'field50', 'min' => 0))

	);
$form_container->output_row($lang->posting_rating_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $posting_options)."</div>");


	);
$form_container->output_row($lang->posting_rating_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $posting_options)."</div>");


Zeile 1058Zeile 1128

$attachment_options = array(
$form->generate_check_box("canpostattachments", 1, $lang->can_post_attachments, array("checked" => $mybb->input['canpostattachments'])),


$attachment_options = array(
$form->generate_check_box("canpostattachments", 1, $lang->can_post_attachments, array("checked" => $mybb->input['canpostattachments'])),

		"{$lang->attach_quota}<br /><small class=\"input\">{$lang->attach_quota_desc}</small><br />".$form->generate_numeric_field('attachquota', $mybb->input['attachquota'], array('id' => 'attachquota', 'class' => 'field50')). "KB"

		"{$lang->attach_quota}<br /><small class=\"input\">{$lang->attach_quota_desc}</small><br />".$form->generate_numeric_field('attachquota', $mybb->input['attachquota'], array('id' => 'attachquota', 'class' => 'field50', 'min' => 0)). "KB"

	);
$form_container->output_row($lang->attachment_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $attachment_options)."</div>");


	);
$form_container->output_row($lang->attachment_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $attachment_options)."</div>");


Zeile 1067Zeile 1137
		$form->generate_check_box("candeleteposts", 1, $lang->can_delete_posts, array("checked" => $mybb->input['candeleteposts'])),
$form->generate_check_box("candeletethreads", 1, $lang->can_delete_threads, array("checked" => $mybb->input['candeletethreads'])),
$form->generate_check_box("caneditattachments", 1, $lang->can_edit_attachments, array("checked" => $mybb->input['caneditattachments'])),

		$form->generate_check_box("candeleteposts", 1, $lang->can_delete_posts, array("checked" => $mybb->input['candeleteposts'])),
$form->generate_check_box("candeletethreads", 1, $lang->can_delete_threads, array("checked" => $mybb->input['candeletethreads'])),
$form->generate_check_box("caneditattachments", 1, $lang->can_edit_attachments, array("checked" => $mybb->input['caneditattachments'])),

		"{$lang->edit_time_limit}<br /><small class=\"input\">{$lang->edit_time_limit_desc}</small><br />".$form->generate_numeric_field('edittimelimit', $mybb->input['edittimelimit'], array('id' => 'edittimelimit', 'class' => 'field50'))


		$form->generate_check_box("canviewdeletionnotice", 1, $lang->can_view_deletion_notices, array("checked" => $mybb->input['canviewdeletionnotice'])),
"{$lang->edit_time_limit}<br /><small class=\"input\">{$lang->edit_time_limit_desc}</small><br />".$form->generate_numeric_field('edittimelimit', $mybb->input['edittimelimit'], array('id' => 'edittimelimit', 'class' => 'field50', 'min' => 0))

	);
$form_container->output_row($lang->editing_deleting_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $editing_options)."</div>");


	);
$form_container->output_row($lang->editing_deleting_options, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $editing_options)."</div>");


Zeile 1089Zeile 1160
		$form->generate_check_box("canusesig", 1, $lang->can_use_signature, array("checked" => $mybb->input['canusesig'])),
$form->generate_check_box("signofollow", 1, $lang->uses_no_follow, array("checked" => $mybb->input['signofollow'])),
$form->generate_check_box("canchangewebsite", 1, $lang->can_change_website, array("checked" => $mybb->input['canchangewebsite'])),

		$form->generate_check_box("canusesig", 1, $lang->can_use_signature, array("checked" => $mybb->input['canusesig'])),
$form->generate_check_box("signofollow", 1, $lang->uses_no_follow, array("checked" => $mybb->input['signofollow'])),
$form->generate_check_box("canchangewebsite", 1, $lang->can_change_website, array("checked" => $mybb->input['canchangewebsite'])),

		"{$lang->required_posts}<br /><small class=\"input\">{$lang->required_posts_desc}</small><br />".$form->generate_numeric_field('canusesigxposts', $mybb->input['canusesigxposts'], array('id' => 'canusesigxposts', 'class' => 'field50'))

		"{$lang->required_posts}<br /><small class=\"input\">{$lang->required_posts_desc}</small><br />".$form->generate_numeric_field('canusesigxposts', $mybb->input['canusesigxposts'], array('id' => 'canusesigxposts', 'class' => 'field50', 'min' => 0))

	);
$form_container->output_row($lang->account_management, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $account_options)."</div>");

$reputation_options = array(
$form->generate_check_box("usereputationsystem", 1, $lang->show_reputations, array("checked" => $mybb->input['usereputationsystem'])),
$form->generate_check_box("cangivereputations", 1, $lang->can_give_reputation, array("checked" => $mybb->input['cangivereputations'])),

	);
$form_container->output_row($lang->account_management, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $account_options)."</div>");

$reputation_options = array(
$form->generate_check_box("usereputationsystem", 1, $lang->show_reputations, array("checked" => $mybb->input['usereputationsystem'])),
$form->generate_check_box("cangivereputations", 1, $lang->can_give_reputation, array("checked" => $mybb->input['cangivereputations'])),

		"{$lang->points_to_award_take}<br /><small class=\"input\">{$lang->points_to_award_take_desc}</small><br />".$form->generate_numeric_field('reputationpower', $mybb->input['reputationpower'], array('id' => 'reputationpower', 'class' => 'field50')),
"{$lang->max_reputations_perthread}<br /><small class=\"input\">{$lang->max_reputations_perthread_desc}</small><br />".$form->generate_numeric_field('maxreputationsperthread', $mybb->input['maxreputationsperthread'], array('id' => 'maxreputationsperthread', 'class' => 'field50')),
"{$lang->max_reputations_daily}<br /><small class=\"input\">{$lang->max_reputations_daily_desc}</small><br />".$form->generate_numeric_field('maxreputationsday', $mybb->input['maxreputationsday'], array('id' => 'maxreputationsday', 'class' => 'field50'))



		$form->generate_check_box("candeletereputations", 1, $lang->can_delete_own_reputation, array("checked" => $mybb->input['candeletereputations'])),
"{$lang->points_to_award_take}<br /><small class=\"input\">{$lang->points_to_award_take_desc}</small><br />".$form->generate_numeric_field('reputationpower', $mybb->input['reputationpower'], array('id' => 'reputationpower', 'class' => 'field50', 'min' => 0)),
"{$lang->max_reputations_perthread}<br /><small class=\"input\">{$lang->max_reputations_perthread_desc}</small><br />".$form->generate_numeric_field('maxreputationsperthread', $mybb->input['maxreputationsperthread'], array('id' => 'maxreputationsperthread', 'class' => 'field50', 'min' => 0)),
"{$lang->max_reputations_peruser}<br /><small class=\"input\">{$lang->max_reputations_peruser_desc}</small><br />".$form->generate_numeric_field('maxreputationsperuser', $mybb->input['maxreputationsperuser'], array('id' => 'maxreputationsperuser', 'class' => 'field50', 'min' => 0)),
"{$lang->max_reputations_daily}<br /><small class=\"input\">{$lang->max_reputations_daily_desc}</small><br />".$form->generate_numeric_field('maxreputationsday', $mybb->input['maxreputationsday'], array('id' => 'maxreputationsday', 'class' => 'field50', 'min' => 0))

	);
$form_container->output_row($lang->reputation_system, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $reputation_options)."</div>");


	);
$form_container->output_row($lang->reputation_system, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $reputation_options)."</div>");


Zeile 1115Zeile 1188
		$form->generate_check_box("canoverridepm", 1, $lang->can_override_pms, array("checked" => $mybb->input['canoverridepm'])),
$form->generate_check_box("cantrackpms", 1, $lang->can_track_pms, array("checked" => $mybb->input['cantrackpms'])),
$form->generate_check_box("candenypmreceipts", 1, $lang->can_deny_reciept, array("checked" => $mybb->input['candenypmreceipts'])),

		$form->generate_check_box("canoverridepm", 1, $lang->can_override_pms, array("checked" => $mybb->input['canoverridepm'])),
$form->generate_check_box("cantrackpms", 1, $lang->can_track_pms, array("checked" => $mybb->input['cantrackpms'])),
$form->generate_check_box("candenypmreceipts", 1, $lang->can_deny_reciept, array("checked" => $mybb->input['candenypmreceipts'])),

		"{$lang->message_quota}<br /><small>{$lang->message_quota_desc}</small><br />".$form->generate_numeric_field('pmquota', $mybb->input['pmquota'], array('id' => 'pmquota', 'class' => 'field50')),
"{$lang->max_recipients}<br /><small>{$lang->max_recipients_desc}</small><br />".$form->generate_numeric_field('maxpmrecipients', $mybb->input['maxpmrecipients'], array('id' => 'maxpmrecipients', 'class' => 'field50'))

		"{$lang->message_quota}<br /><small>{$lang->message_quota_desc}</small><br />".$form->generate_numeric_field('pmquota', $mybb->input['pmquota'], array('id' => 'pmquota', 'class' => 'field50', 'min' => 0)),
"{$lang->max_recipients}<br /><small>{$lang->max_recipients_desc}</small><br />".$form->generate_numeric_field('maxpmrecipients', $mybb->input['maxpmrecipients'], array('id' => 'maxpmrecipients', 'class' => 'field50', 'min' => 0))

	);
$form_container->output_row($lang->private_messaging, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $pm_options)."</div>");


	);
$form_container->output_row($lang->private_messaging, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $pm_options)."</div>");


Zeile 1149Zeile 1222
		$form->generate_check_box("showinbirthdaylist", 1, $lang->show_in_birthday_list, array("checked" => $mybb->input['showinbirthdaylist'])),
$form->generate_check_box("cansendemail", 1, $lang->can_email_users, array("checked" => $mybb->input['cansendemail'])),
$form->generate_check_box("cansendemailoverride", 1, $lang->can_email_users_override, array("checked" => $mybb->input['cansendemailoverride'])),

		$form->generate_check_box("showinbirthdaylist", 1, $lang->show_in_birthday_list, array("checked" => $mybb->input['showinbirthdaylist'])),
$form->generate_check_box("cansendemail", 1, $lang->can_email_users, array("checked" => $mybb->input['cansendemail'])),
$form->generate_check_box("cansendemailoverride", 1, $lang->can_email_users_override, array("checked" => $mybb->input['cansendemailoverride'])),

		"{$lang->max_emails_per_day}<br /><small class=\"input\">{$lang->max_emails_per_day_desc}</small><br />".$form->generate_numeric_field('maxemails', $mybb->input['maxemails'], array('id' => 'maxemails', 'class' => 'field50')),
"{$lang->email_flood_time}<br /><small class=\"input\">{$lang->email_flood_time_desc}</small><br />".$form->generate_numeric_field('emailfloodtime', $mybb->input['emailfloodtime'], array('id' => 'emailfloodtime', 'class' => 'field50'))

		"{$lang->max_emails_per_day}<br /><small class=\"input\">{$lang->max_emails_per_day_desc}</small><br />".$form->generate_numeric_field('maxemails', $mybb->input['maxemails'], array('id' => 'maxemails', 'class' => 'field50', 'min' => 0)),
"{$lang->email_flood_time}<br /><small class=\"input\">{$lang->email_flood_time_desc}</small><br />".$form->generate_numeric_field('emailfloodtime', $mybb->input['emailfloodtime'], array('id' => 'emailfloodtime', 'class' => 'field50', 'min' => 0))

	);
$form_container->output_row($lang->misc, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $misc_options)."</div>");


	);
$form_container->output_row($lang->misc, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $misc_options)."</div>");


Zeile 1193Zeile 1266

if($mybb->input['action'] == "delete")
{


if($mybb->input['action'] == "delete")
{

	$query = $db->simple_select("usergroups", "*", "gid='".(int)$mybb->input['gid']."'");

	$query = $db->simple_select("usergroups", "*", "gid='".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

	$usergroup = $db->fetch_array($query);

if(!$usergroup['gid'])

	$usergroup = $db->fetch_array($query);

if(!$usergroup['gid'])

Zeile 1217Zeile 1290

if($mybb->request_method == "post")
{


if($mybb->request_method == "post")
{

		// Move any users back to the registered group
$updated_users = array("usergroup" => 2);










		if($usergroup['isbannedgroup'] == 1)
{
// If banned group, move users to default banned group
$updated_users = array("usergroup" => 7);
}
else
{
// Move any users back to the registered group
$updated_users = array("usergroup" => 2);
}


		$db->update_query("users", $updated_users, "usergroup='{$usergroup['gid']}'");

$updated_users = array("displaygroup" => "usergroup");
$plugins->run_hooks("admin_user_groups_delete_commit");

		$db->update_query("users", $updated_users, "usergroup='{$usergroup['gid']}'");

$updated_users = array("displaygroup" => "usergroup");
$plugins->run_hooks("admin_user_groups_delete_commit");





		$db->update_query("users", $updated_users, "displaygroup='{$usergroup['gid']}'", "", true); // No quotes = displaygroup=usergroup

switch($db->type)

		$db->update_query("users", $updated_users, "displaygroup='{$usergroup['gid']}'", "", true); // No quotes = displaygroup=usergroup

switch($db->type)

Zeile 1240Zeile 1322
			leave_usergroup($user['uid'], $usergroup['gid']);
}


			leave_usergroup($user['uid'], $usergroup['gid']);
}


 
		$db->update_query("banned", array("gid" => 7), "gid='{$usergroup['gid']}'");
$db->update_query("banned", array("oldgroup" => 2), "oldgroup='{$usergroup['gid']}'");
$db->update_query("banned", array("olddisplaygroup" => "oldgroup"), "olddisplaygroup='{$usergroup['gid']}'", "", true); // No quotes = displaygroup=usergroup

$db->delete_query("forumpermissions", "gid='{$usergroup['gid']}'");
$db->delete_query("calendarpermissions", "gid='{$usergroup['gid']}'");
$db->delete_query("joinrequests", "gid='{$usergroup['gid']}'");
$db->delete_query("moderators", "id='{$usergroup['gid']}' AND isgroup='1'");

		$db->delete_query("groupleaders", "gid='{$usergroup['gid']}'");
$db->delete_query("usergroups", "gid='{$usergroup['gid']}'");


		$db->delete_query("groupleaders", "gid='{$usergroup['gid']}'");
$db->delete_query("usergroups", "gid='{$usergroup['gid']}'");


Zeile 1249Zeile 1339
		$cache->update_moderators();
$cache->update_usergroups();
$cache->update_forumpermissions();

		$cache->update_moderators();
$cache->update_usergroups();
$cache->update_forumpermissions();

 
		$cache->update_banned();


// Log admin action
log_admin_action($usergroup['gid'], $usergroup['title']);


// Log admin action
log_admin_action($usergroup['gid'], $usergroup['title']);

Zeile 1373Zeile 1464
	");
while($leader = $db->fetch_array($query))
{

	");
while($leader = $db->fetch_array($query))
{

		$leaders[$leader['gid']][] = build_profile_link($leader['username'], $leader['uid'], "_blank");

		$leaders[$leader['gid']][] = build_profile_link(htmlspecialchars_uni($leader['username']), $leader['uid'], "_blank");

	}

$form_container = new FormContainer($lang->user_groups);

	}

$form_container = new FormContainer($lang->user_groups);

Zeile 1397Zeile 1488
		$leaders_list = '';
if(isset($leaders[$usergroup['gid']]))
{

		$leaders_list = '';
if(isset($leaders[$usergroup['gid']]))
{

			$leaders_list = "<br />{$lang->group_leaders}: ".implode(", ", $leaders[$usergroup['gid']]);

			$leaders_list = "<br />{$lang->group_leaders}: ".implode($lang->comma, $leaders[$usergroup['gid']]);

		}

$join_requests = '';

		}

$join_requests = '';

Zeile 1410Zeile 1501
			$join_requests = " <small><a href=\"index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}\"><span style=\"color: red;\">({$joinrequests[$usergroup['gid']]} {$lang->outstanding_join_request})</span></a></small>";
}


			$join_requests = " <small><a href=\"index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}\"><span style=\"color: red;\">({$joinrequests[$usergroup['gid']]} {$lang->outstanding_join_request})</span></a></small>";
}


		$form_container->output_cell("<div class=\"float_right\">{$icon}</div><div><strong><a href=\"index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}\">{$usergroup['title']}</a></strong>{$join_requests}<br /><small>{$usergroup['description']}{$leaders_list}</small></div>");

		$form_container->output_cell("<div class=\"float_right\">{$icon}</div><div><strong><a href=\"index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}\">".format_name(htmlspecialchars_uni($usergroup['title']), $usergroup['gid'])."</a></strong>{$join_requests}<br /><small>".htmlspecialchars_uni($usergroup['description'])."{$leaders_list}</small></div>");


if(!$primaryusers[$usergroup['gid']])
{


if(!$primaryusers[$usergroup['gid']])
{