Vergleich admin/modules/user/groups.php - 1.8.7 - 1.8.36

  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 56Zeile 57
	"canuploadavatars" => 1,
"canratemembers" => 1,
"canchangename" => 0,

	"canuploadavatars" => 1,
"canratemembers" => 1,
"canchangename" => 0,

 
	"canbeinvisible" => 1,

	"canbereported" => 0,
"canchangewebsite" => 1,
"showforumteam" => 0,

	"canbereported" => 0,
"canchangewebsite" => 1,
"showforumteam" => 0,

Zeile 64Zeile 66
	"candeletereputations" => 1,
"reputationpower" => 1,
"maxreputationsday" => 5,

	"candeletereputations" => 1,
"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 126Zeile 128
		admin_redirect("index.php?module=user-groups");
}


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


	if(!verify_post_check($mybb->input['my_post_key']))

	if(!verify_post_check($mybb->get_input('my_post_key')))

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

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


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


	if(!verify_post_check($mybb->input['my_post_key']))

	if(!verify_post_check($mybb->get_input('my_post_key')))

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-groups&action=join_requests&gid={$request['gid']}");

Zeile 199Zeile 201
				join_usergroup($uid, $group['gid']);
}
// Log admin action

				join_usergroup($uid, $group['gid']);
}
// Log admin action

			log_admin_action("approve", htmlspecialchars_uni($group['title']), $group['gid']);

			log_admin_action("approve", $group['title'], $group['gid']);

			$message = $lang->success_selected_requests_approved;
}
else
{
// Log admin action

			$message = $lang->success_selected_requests_approved;
}
else
{
// Log admin action

			log_admin_action("deny", htmlspecialchars_uni($group['title']), $group['gid']);

			log_admin_action("deny", $group['title'], $group['gid']);

			$message = $lang->success_selected_requests_denied;
}


			$message = $lang->success_selected_requests_denied;
}


Zeile 236Zeile 238
	$num_requests = $db->fetch_field($query, "num_requests");

$per_page = 20;

	$num_requests = $db->fetch_field($query, "num_requests");

$per_page = 20;


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

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

	{

	{

		$current_page = $mybb->get_input('page', MyBB::INPUT_INT);
$start = ($current_page-1)*$per_page;
$pages = $num_requests / $per_page;
$pages = ceil($pages);
if($current_page > $pages)

		$start = ($pagenum - 1) * $per_page;
$pages = ceil($num_requests / $per_page);
if($pagenum > $pages)



		{
$start = 0;

		{
$start = 0;

			$current_page = 1;

			$pagenum = 1;

		}
}
else
{
$start = 0;

		}
}
else
{
$start = 0;

		$current_page = 1;

		$pagenum = 1;

	}

// Do we need to construct the pagination?
$pagination = '';
if($num_requests > $per_page)
{

	}

// Do we need to construct the pagination?
$pagination = '';
if($num_requests > $per_page)
{

		$pagination = draw_admin_pagination($page, $per_page, $num_requests, "index.php?module=user-groups&action=join_requests&gid={$group['gid']}");

		$pagination = draw_admin_pagination($pagenum, $per_page, $num_requests, "index.php?module=user-groups&action=join_requests&gid={$group['gid']}");

		echo $pagination;
}

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

		echo $pagination;
}

$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 283Zeile 283
	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 303Zeile 303

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


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





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

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

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

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





	if(!$group['gid'])
{
flash_message($lang->error_invalid_user_group, 'error');
admin_redirect("index.php?module=user-group");

	if(!$group['gid'])
{
flash_message($lang->error_invalid_user_group, 'error');
admin_redirect("index.php?module=user-group");

	}


	}


	$plugins->run_hooks("admin_user_groups_add_leader");

$user = get_user_by_username($mybb->input['username'], array('fields' => 'username'));

	$plugins->run_hooks("admin_user_groups_add_leader");

$user = get_user_by_username($mybb->input['username'], array('fields' => 'username'));

	if(!$user['uid'])

	if(empty($user['uid']))

	{
$errors[] = $lang->error_invalid_username;
}

	{
$errors[] = $lang->error_invalid_username;
}

Zeile 364Zeile 364
		$cache->update_groupleaders();

// Log admin action

		$cache->update_groupleaders();

// Log admin action

		log_admin_action($user['uid'], $user['username'], $group['gid'], htmlspecialchars_uni($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 398Zeile 399
		'title' => $lang->manage_group_leaders,
'link' => "index.php?module=user-groups&action=leaders&gid={$group['gid']}",
'description' => $lang->manage_group_leaders_desc

		'title' => $lang->manage_group_leaders,
'link' => "index.php?module=user-groups&action=leaders&gid={$group['gid']}",
'description' => $lang->manage_group_leaders_desc

	);


	);


	$page->output_nav_tabs($sub_tabs, 'group_leaders');

$table = new Table;

	$page->output_nav_tabs($sub_tabs, 'group_leaders');

$table = new Table;

Zeile 431Zeile 432
		if($leader['canmanagerequests'])
{
$canmanagerequests = $lang->yes;

		if($leader['canmanagerequests'])
{
$canmanagerequests = $lang->yes;

		}
else
{

		}
else
{

			$canmanagerequests = $lang->no;
}


			$canmanagerequests = $lang->no;
}


Zeile 468Zeile 469
	if($errors)
{
$page->output_inline_error($errors);

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

	}

	}

	else
{
$mybb->input = array_merge($mybb->input, array(

	else
{
$mybb->input = array_merge($mybb->input, array(

Zeile 479Zeile 480
			)
);
}

			)
);
}





	$form_container = new FormContainer($lang->add_group_leader.' '.htmlspecialchars_uni($group['title']));

	$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', $mybb->input['username'], array('id' => 'username')), 'username');

	$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->make_user_member, $lang->make_user_member_desc, $form->generate_yes_no_radio('makeleadermember', $mybb->input['makeleadermember']));
$form_container->end();

	$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->make_user_member, $lang->make_user_member_desc, $form->generate_yes_no_radio('makeleadermember', $mybb->input['makeleadermember']));
$form_container->end();





	// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">

	// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">

Zeile 540Zeile 541
		FROM ".TABLE_PREFIX."groupleaders l
INNER JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
WHERE l.lid='".$mybb->get_input('lid', MyBB::INPUT_INT)."'");

		FROM ".TABLE_PREFIX."groupleaders l
INNER JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
WHERE l.lid='".$mybb->get_input('lid', MyBB::INPUT_INT)."'");

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

if(!$leader['lid'])
{
flash_message($lang->error_invalid_group_leader, 'error');
admin_redirect("index.php?module=user-groups");
}

$query = $db->simple_select("usergroups", "*", "gid='{$leader['gid']}'");
$group = $db->fetch_array($query);


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

if(!$leader['lid'])
{
flash_message($lang->error_invalid_group_leader, 'error');
admin_redirect("index.php?module=user-groups");
}

$query = $db->simple_select("usergroups", "*", "gid='{$leader['gid']}'");
$group = $db->fetch_array($query);


	// User clicked no

	// User clicked no

	if($mybb->input['no'])

	if($mybb->get_input('no'))

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

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





	$plugins->run_hooks("admin_user_groups_delete_leader");

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

	$plugins->run_hooks("admin_user_groups_delete_leader");

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

Zeile 568Zeile 569

$plugins->run_hooks("admin_user_groups_delete_leader_commit_end");



$plugins->run_hooks("admin_user_groups_delete_leader_commit_end");


		$cache->update_groupleaders();

// Log admin action
log_admin_action($leader['uid'], $leader['username'], $group['gid'], htmlspecialchars_uni($group['title']));


		$cache->update_groupleaders();

// Log admin action
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 618Zeile 619
		$cache->update_groupleaders();

// Log admin action

		$cache->update_groupleaders();

// Log admin action

		log_admin_action($leader['uid'], $leader['username'], $group['gid'], htmlspecialchars_uni($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 628Zeile 629
	{
$mybb->input = array_merge($mybb->input, $leader);
}

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





	$page->add_breadcrumb_item($lang->group_leaders_for.' '.htmlspecialchars_uni($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->add_breadcrumb_item($lang->edit_leader." {$leader['username']}");


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


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


	$sub_tabs = array();
$sub_tabs['group_leaders'] = array(
'title' => $lang->edit_group_leader,
'link' => "index.php?module=user-groups&action=edit_leader&lid={$leader['lid']}",
'description' => $lang->edit_group_leader_desc
);

	$sub_tabs = array();
$sub_tabs['group_leaders'] = array(
'title' => $lang->edit_group_leader,
'link' => "index.php?module=user-groups&action=edit_leader&lid={$leader['lid']}",
'description' => $lang->edit_group_leader_desc
);





	$page->output_nav_tabs($sub_tabs, 'group_leaders');

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

$form_container = new FormContainer($lang->edit_group_leader);
$form_container->output_row($lang->username." <em>*</em>", "", $leader['username']);

	$page->output_nav_tabs($sub_tabs, 'group_leaders');

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

$form_container = new FormContainer($lang->edit_group_leader);
$form_container->output_row($lang->username." <em>*</em>", "", $leader['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']));

Zeile 678Zeile 680

if(!$errors)
{


if(!$errors)
{

			if($mybb->input['stars'] < 1)

			if($mybb->get_input('stars') < 1)

			{
$mybb->input['stars'] = 0;
}


			{
$mybb->input['stars'] = 0;
}


			if(!$mybb->input['starimage'])

			if(!$mybb->get_input('starimage'))

			{
$mybb->input['starimage'] = "images/star.png";

			{
$mybb->input['starimage'] = "images/star.png";

			}


			}


			$new_usergroup = array(
"type" => 2,
"title" => $db->escape_string($mybb->input['title']),

			$new_usergroup = array(
"type" => 2,
"title" => $db->escape_string($mybb->input['title']),

Zeile 705Zeile 707
				$new_usergroup = array_merge($new_usergroup, $usergroup_permissions);
}
// Copying permissions from another group

				$new_usergroup = array_merge($new_usergroup, $usergroup_permissions);
}
// Copying permissions from another group

			else

			else

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

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

Zeile 738Zeile 740
			$cache->update_forumpermissions();

// Log admin action

			$cache->update_forumpermissions();

// Log admin action

			log_admin_action($gid, htmlspecialchars_uni($mybb->input['title']));

			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}");
}
}

Zeile 754Zeile 765
	if($errors)
{
$page->output_inline_error($errors);

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

	}

	}

	else
{
$mybb->input = array_merge($mybb->input, array(

	else
{
$mybb->input = array_merge($mybb->input, array(

Zeile 764Zeile 775
	}

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

	}

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

	$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$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->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->get_input('title'), array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $mybb->get_input('description'), array('id' => 'description')), 'description');
$form_container->output_row($lang->username_style, $lang->username_style_desc, $form->generate_text_box('namestyle', $mybb->get_input('namestyle'), array('id' => 'namestyle')), 'namestyle');
$form_container->output_row($lang->user_title, $lang->user_title_desc, $form->generate_text_box('usertitle', $mybb->get_input('usertitle'), array('id' => 'usertitle')), 'usertitle');


$options[0] = $lang->do_not_copy_permissions;
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));


$options[0] = $lang->do_not_copy_permissions;
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));

Zeile 775Zeile 786
	{
$options[$usergroup['gid']] = htmlspecialchars_uni($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->get_input('copyfrom'), array('id' => 'copyfrom')), 'copyfrom');


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


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

Zeile 797Zeile 808
	}
else
{

	}
else
{

		if(preg_match("#<((m[^a])|(b[^diloru>])|(s[^aemptu>]))(\s*[^>]*)>#si", $mybb->input['namestyle']))

		if(preg_match("#<((m[^a])|(b[^diloru>])|(s[^aemptu >]))(\s*[^>]*)>#si", $mybb->get_input('namestyle')))

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

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

Zeile 808Zeile 819

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


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

		if(!trim($mybb->input['title']))

		if(!trim($mybb->get_input('title')))

		{
$errors[] = $lang->error_missing_title;
}


		{
$errors[] = $lang->error_missing_title;
}


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

		if(my_strpos($mybb->get_input('namestyle'), "{username}") === false)

		{
$errors[] = $lang->error_missing_namestyle_username;
}


		{
$errors[] = $lang->error_missing_namestyle_username;
}


		if($mybb->input['moderate'] == 1 && $mybb->input['invite'] == 1)

		if($mybb->get_input('moderate') == 1 && $mybb->get_input('invite') == 1)

		{
$errors[] = $lang->error_cannot_have_both_types;
}

if(!$errors)
{

		{
$errors[] = $lang->error_cannot_have_both_types;
}

if(!$errors)
{

			if($mybb->input['joinable'] == 1)

			if($mybb->get_input('joinable') == 1)

			{

			{

				if($mybb->input['moderate'] == 1)

				if($mybb->get_input('moderate') == 1)

				{
$mybb->input['type'] = "4";
}

				{
$mybb->input['type'] = "4";
}

				elseif($mybb->input['invite'] == 1)

				elseif($mybb->get_input('invite') == 1)

				{
$mybb->input['type'] = "5";
}

				{
$mybb->input['type'] = "5";
}

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


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


			if($mybb->input['stars'] < 1)

			if($mybb->get_input('stars') < 1)

			{
$mybb->input['stars'] = 0;
}

			{
$mybb->input['stars'] = 0;
}

Zeile 882Zeile 893
				"candeleteposts" => $mybb->get_input('candeleteposts', MyBB::INPUT_INT),
"candeletethreads" => $mybb->get_input('candeletethreads', MyBB::INPUT_INT),
"caneditattachments" => $mybb->get_input('caneditattachments', 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),

				"canpostpolls" => $mybb->get_input('canpostpolls', MyBB::INPUT_INT),
"canvotepolls" => $mybb->get_input('canvotepolls', MyBB::INPUT_INT),
"canundovotes" => $mybb->get_input('canundovotes', MyBB::INPUT_INT),

Zeile 910Zeile 922
				"canuploadavatars" => $mybb->get_input('canuploadavatars', MyBB::INPUT_INT),
"canchangename" => $mybb->get_input('canchangename', MyBB::INPUT_INT),
"canbereported" => $mybb->get_input('canbereported', 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),

 
				"canbeinvisible" => $mybb->get_input('canbeinvisible', 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),

				"canchangewebsite" => $mybb->get_input('canchangewebsite', MyBB::INPUT_INT),
"showforumteam" => $mybb->get_input('showforumteam', MyBB::INPUT_INT),
"usereputationsystem" => $mybb->get_input('usereputationsystem', MyBB::INPUT_INT),

Zeile 958Zeile 971
			$cache->update_forumpermissions();

// Log admin action

			$cache->update_forumpermissions();

// Log admin action

			log_admin_action($usergroup['gid'], htmlspecialchars_uni($mybb->input['title']));

			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 1021Zeile 1043
	$tabs = $plugins->run_hooks("admin_user_groups_edit_graph_tabs", $tabs);
$page->output_tab_control($tabs);


	$tabs = $plugins->run_hooks("admin_user_groups_edit_graph_tabs", $tabs);
$page->output_tab_control($tabs);


	echo "<div id=\"tab_general\">";













	echo "<div id=\"tab_general\">
<script type=\"text/javascript\">
$(function(){
$('input[name=\"moderate\"]').parents(\".group_settings_bit\").addClass(\"joinable_dependent\");
$('input[name=\"invite\"]').parents(\".group_settings_bit\").addClass(\"joinable_dependent\");
if($('input[name=\"joinable\"]').prop(\"checked\") == false){
$(\".joinable_dependent\").hide();
}
$('input[name=\"joinable\"]').on('change', function() {
$(\".joinable_dependent\").slideToggle();
})
});
</script>";

	$form_container = new FormContainer($lang->general);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

	$form_container = new FormContainer($lang->general);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

Zeile 1094Zeile 1128
		$form->generate_check_box("modthreads", 1, $lang->mod_new_threads, array("checked" => $mybb->input['modthreads'])),
$form->generate_check_box("modattachments", 1, $lang->mod_new_attachments, array("checked" => $mybb->input['modattachments'])),
$form->generate_check_box("mod_edit_posts", 1, $lang->mod_after_edit, array("checked" => $mybb->input['mod_edit_posts']))

		$form->generate_check_box("modthreads", 1, $lang->mod_new_threads, array("checked" => $mybb->input['modthreads'])),
$form->generate_check_box("modattachments", 1, $lang->mod_new_attachments, array("checked" => $mybb->input['modattachments'])),
$form->generate_check_box("mod_edit_posts", 1, $lang->mod_after_edit, array("checked" => $mybb->input['mod_edit_posts']))

	);

	);

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

$poll_options = array(
$form->generate_check_box("canpostpolls", 1, $lang->can_post_polls, array("checked" => $mybb->input['canpostpolls'])),
$form->generate_check_box("canvotepolls", 1, $lang->can_vote_polls, array("checked" => $mybb->input['canvotepolls'])),
$form->generate_check_box("canundovotes", 1, $lang->can_undo_votes, array("checked" => $mybb->input['canundovotes']))

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

$poll_options = array(
$form->generate_check_box("canpostpolls", 1, $lang->can_post_polls, array("checked" => $mybb->input['canpostpolls'])),
$form->generate_check_box("canvotepolls", 1, $lang->can_vote_polls, array("checked" => $mybb->input['canvotepolls'])),
$form->generate_check_box("canundovotes", 1, $lang->can_undo_votes, array("checked" => $mybb->input['canundovotes']))

	);

	);

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

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





	$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', 'min' => 0)). "KB"

	$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', '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>");


	$editing_options = array(
$form->generate_check_box("caneditposts", 1, $lang->can_edit_posts, array("checked" => $mybb->input['caneditposts'])),
$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', '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->end();
echo "</div>";







	// Remove these options if the group being editied is Guest (GID=1)
if($usergroup['gid'] != 1)
{
$editing_options = array(
$form->generate_check_box("caneditposts", 1, $lang->can_edit_posts, array("checked" => $mybb->input['caneditposts'])),
$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("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->end();
echo "</div>";


	//
// USERS AND PERMISSIONS
//

	//
// USERS AND PERMISSIONS
//

Zeile 1130Zeile 1169

$account_options = array(
$form->generate_check_box("canbereported", 1, $lang->can_be_reported, array("checked" => $mybb->input['canbereported'])),


$account_options = array(
$form->generate_check_box("canbereported", 1, $lang->can_be_reported, array("checked" => $mybb->input['canbereported'])),

 
		$form->generate_check_box("canbeinvisible", 1, $lang->can_be_invisible, array("checked" => $mybb->input['canbeinvisible'])),

		$form->generate_check_box("canusercp", 1, $lang->can_access_usercp, array("checked" => $mybb->input['canusercp'])),
$form->generate_check_box("canchangename", 1, $lang->can_change_username, array("checked" => $mybb->input['canchangename'])),
$form->generate_check_box("cancustomtitle", 1, $lang->can_use_usertitles, array("checked" => $mybb->input['cancustomtitle'])),

		$form->generate_check_box("canusercp", 1, $lang->can_access_usercp, array("checked" => $mybb->input['canusercp'])),
$form->generate_check_box("canchangename", 1, $lang->can_change_username, array("checked" => $mybb->input['canchangename'])),
$form->generate_check_box("cancustomtitle", 1, $lang->can_use_usertitles, array("checked" => $mybb->input['cancustomtitle'])),

Zeile 1138Zeile 1178
		$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', 'min' => 0))

		$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', '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_container->output_row($lang->account_management, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $account_options)."</div>");

$reputation_options = array(

Zeile 1147Zeile 1187
		$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)),

		$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>");

		"{$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>");

Zeile 1174Zeile 1215

//
// MISC


//
// MISC

	//

	//

	echo "<div id=\"tab_misc\">";
$form_container = new FormContainer($lang->misc);

	echo "<div id=\"tab_misc\">";
$form_container = new FormContainer($lang->misc);





	$calendar_options = array(
$form->generate_check_box("canviewcalendar", 1, $lang->can_view_calendar, array("checked" => $mybb->input['canviewcalendar'])),
$form->generate_check_box("canaddevents", 1, $lang->can_post_events, array("checked" => $mybb->input['canaddevents'])),
$form->generate_check_box("canbypasseventmod", 1, $lang->can_bypass_event_moderation, array("checked" => $mybb->input['canbypasseventmod'])),
$form->generate_check_box("canmoderateevents", 1, $lang->can_moderate_events, array("checked" => $mybb->input['canmoderateevents']))

	$calendar_options = array(
$form->generate_check_box("canviewcalendar", 1, $lang->can_view_calendar, array("checked" => $mybb->input['canviewcalendar'])),
$form->generate_check_box("canaddevents", 1, $lang->can_post_events, array("checked" => $mybb->input['canaddevents'])),
$form->generate_check_box("canbypasseventmod", 1, $lang->can_bypass_event_moderation, array("checked" => $mybb->input['canbypasseventmod'])),
$form->generate_check_box("canmoderateevents", 1, $lang->can_moderate_events, array("checked" => $mybb->input['canmoderateevents']))

	);

	);

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

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





	$wol_options = array(
$form->generate_check_box("canviewonline", 1, $lang->can_view_whos_online, array("checked" => $mybb->input['canviewonline'])),
$form->generate_check_box("canviewwolinvis", 1, $lang->can_view_invisible, array("checked" => $mybb->input['canviewwolinvis'])),
$form->generate_check_box("canviewonlineips", 1, $lang->can_view_ips, array("checked" => $mybb->input['canviewonlineips']))
);
$form_container->output_row($lang->whos_online, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $wol_options)."</div>");

	$wol_options = array(
$form->generate_check_box("canviewonline", 1, $lang->can_view_whos_online, array("checked" => $mybb->input['canviewonline'])),
$form->generate_check_box("canviewwolinvis", 1, $lang->can_view_invisible, array("checked" => $mybb->input['canviewwolinvis'])),
$form->generate_check_box("canviewonlineips", 1, $lang->can_view_ips, array("checked" => $mybb->input['canviewonlineips']))
);
$form_container->output_row($lang->whos_online, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $wol_options)."</div>");





	$misc_options = array(
$form->generate_check_box("canviewmemberlist", 1, $lang->can_view_member_list, array("checked" => $mybb->input['canviewmemberlist'])),
$form->generate_check_box("showinbirthdaylist", 1, $lang->show_in_birthday_list, array("checked" => $mybb->input['showinbirthdaylist'])),

	$misc_options = array(
$form->generate_check_box("canviewmemberlist", 1, $lang->can_view_member_list, array("checked" => $mybb->input['canviewmemberlist'])),
$form->generate_check_box("showinbirthdaylist", 1, $lang->show_in_birthday_list, array("checked" => $mybb->input['showinbirthdaylist'])),

Zeile 1205Zeile 1246

$form_container->end();
echo "</div>";


$form_container->end();
echo "</div>";


//


//

	// MODERATOR CP
//
echo "<div id=\"tab_modcp\">";
$form_container = new FormContainer($lang->mod_cp);

	// MODERATOR CP
//
echo "<div id=\"tab_modcp\">";
$form_container = new FormContainer($lang->mod_cp);





	$forum_post_options = array(
$form->generate_check_box("canmanageannounce", 1, $lang->can_manage_announce, array("checked" => $mybb->input['canmanageannounce'])),
$form->generate_check_box("canmanagemodqueue", 1, $lang->can_manage_mod_queue, array("checked" => $mybb->input['canmanagemodqueue'])),

	$forum_post_options = array(
$form->generate_check_box("canmanageannounce", 1, $lang->can_manage_announce, array("checked" => $mybb->input['canmanageannounce'])),
$form->generate_check_box("canmanagemodqueue", 1, $lang->can_manage_mod_queue, array("checked" => $mybb->input['canmanagemodqueue'])),

Zeile 1248Zeile 1289
	if(!$usergroup['gid'])
{
flash_message($lang->error_invalid_user_group, 'error');

	if(!$usergroup['gid'])
{
flash_message($lang->error_invalid_user_group, 'error');

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

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

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

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

Zeile 1257Zeile 1298
	}

// User clicked no

	}

// User clicked no

	if($mybb->input['no'])

	if($mybb->get_input('no'))

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

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

Zeile 1315Zeile 1356
		$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

		log_admin_action($usergroup['gid'], htmlspecialchars_uni($usergroup['title']));

		log_admin_action($usergroup['gid'], $usergroup['title']);


flash_message($lang->success_group_deleted, 'success');
admin_redirect("index.php?module=user-groups");


flash_message($lang->success_group_deleted, 'success');
admin_redirect("index.php?module=user-groups");

Zeile 1326Zeile 1366
	else
{
$page->output_confirm_action("index.php?module=user-groups&amp;action=delete&amp;gid={$usergroup['gid']}", $lang->confirm_group_deletion);

	else
{
$page->output_confirm_action("index.php?module=user-groups&amp;action=delete&amp;gid={$usergroup['gid']}", $lang->confirm_group_deletion);

	}
}

	}
}


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


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

Zeile 1381Zeile 1421
	$page->output_nav_tabs($sub_tabs, 'manage_groups');

$form = new Form("index.php?module=user-groups", "post", "groups");

	$page->output_nav_tabs($sub_tabs, 'manage_groups');

$form = new Form("index.php?module=user-groups", "post", "groups");

 

$primaryusers = $secondaryusers = array();


$query = $db->query("
SELECT g.gid, COUNT(u.uid) AS users


$query = $db->query("
SELECT g.gid, COUNT(u.uid) AS users

Zeile 1401Zeile 1443
				SELECT g.gid, COUNT(u.uid) AS users
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups g ON (','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%')

				SELECT g.gid, COUNT(u.uid) AS users
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups g ON (','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%')

				WHERE g.gid != '0' AND g.gid is not NULL GROUP BY g.gid
");

				WHERE g.gid != '0' AND g.gid is not NULL GROUP BY g.gid
");

			break;
default:
$query = $db->query("

			break;
default:
$query = $db->query("

Zeile 1439Zeile 1481
		ORDER BY u.username ASC
");
while($leader = $db->fetch_array($query))

		ORDER BY u.username ASC
");
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 1459Zeile 1501
		else
{
$icon = "<img src=\"styles/default/images/icons/default.png\" alt=\"{$lang->default_user_group}\" style=\"vertical-align: middle;\" />";

		else
{
$icon = "<img src=\"styles/default/images/icons/default.png\" alt=\"{$lang->default_user_group}\" style=\"vertical-align: middle;\" />";

		}

		}


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


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

		}


		}


		$join_requests = '';

		$join_requests = '';

		if($joinrequests[$usergroup['gid']] > 1 && $usergroup['type'] == 4)
{
$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>";
}
else if($joinrequests[$usergroup['gid']] == 1 && $usergroup['type'] == 4)
{

		if(isset($joinrequests[$usergroup['gid']]) && $joinrequests[$usergroup['gid']] > 1 && $usergroup['type'] == 4)
{
$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>";
}
else if(isset($joinrequests[$usergroup['gid']]) && $joinrequests[$usergroup['gid']] == 1 && $usergroup['type'] == 4)
{

			$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']}\">".htmlspecialchars_uni($usergroup['title'])."</a></strong>{$join_requests}<br /><small>".htmlspecialchars_uni($usergroup['description'])."{$leaders_list}</small></div>");

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


$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(!isset($primaryusers[$usergroup['gid']]))
{

			$primaryusers[$usergroup['gid']] = 0;

			$primaryusers[$usergroup['gid']] = 0;

 
		}
if(!isset($secondaryusers[$usergroup['gid']]))
{
$secondaryusers[$usergroup['gid']] = 0;

		}
$numusers = $primaryusers[$usergroup['gid']];
$numusers += $secondaryusers[$usergroup['gid']];

		}
$numusers = $primaryusers[$usergroup['gid']];
$numusers += $secondaryusers[$usergroup['gid']];

Zeile 1490Zeile 1536

if($usergroup['showforumteam'] == 1)
{


if($usergroup['showforumteam'] == 1)
{

			$form_container->output_cell("<input type=\"text\" name=\"disporder[{$usergroup['gid']}]\" value=\"{$usergroup['disporder']}\" class=\"text_input align_center\" style=\"width: 80%;\" />", array("class" => "align_center"));

			$form_container->output_cell($form->generate_numeric_field("disporder[{$usergroup['gid']}]", "{$usergroup['disporder']}", array('class' => 'align_center', 'style' => 'width:80%')), array("class" => "align_center"));

		}
else
{

		}
else
{

Zeile 1500Zeile 1546
		$popup = new PopupMenu("usergroup_{$usergroup['gid']}", $lang->options);
$popup->add_item($lang->edit_group, "index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}");
$popup->add_item($lang->list_users, "index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions[usergroup]={$usergroup['gid']}");

		$popup = new PopupMenu("usergroup_{$usergroup['gid']}", $lang->options);
$popup->add_item($lang->edit_group, "index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}");
$popup->add_item($lang->list_users, "index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions[usergroup]={$usergroup['gid']}");

		if($joinrequests[$usergroup['gid']] > 0 && $usergroup['type'] == 4)

		if(isset($joinrequests[$usergroup['gid']]) && $joinrequests[$usergroup['gid']] > 0 && $usergroup['type'] == 4)

		{
$popup->add_item($lang->join_requests, "index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}");
}

		{
$popup->add_item($lang->join_requests, "index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}");
}