Vergleich admin/modules/user/groups.php - 1.6.5 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: groups.php 5648 2011-11-09 08:48:00Z Tomm $

 * $Id: groups.php 5771 2012-04-19 09:37:36Z Tomm $

 */

// Array of usergroup permission fields and their default values.

 */

// Array of usergroup permission fields and their default values.

Zeile 34Zeile 34
	"pmquota" => 100,
"maxpmrecipients" => 5,
"cansendemail" => 1,

	"pmquota" => 100,
"maxpmrecipients" => 5,
"cansendemail" => 1,

 
	"cansendemailoverride" => 0,

	"maxemails" => 4,
"canviewmemberlist" => 1,
"canviewcalendar" => 1,

	"maxemails" => 4,
"canviewmemberlist" => 1,
"canviewcalendar" => 1,

Zeile 148Zeile 149
		flash_message($lang->error_invalid_join_request, 'error');
admin_redirect("index.php?module=user-groups");
}

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

	








if(!verify_post_check($mybb->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']}");
}


	// Add the user to the group
join_usergroup($request['uid'], $request['gid']);

	// Add the user to the group
join_usergroup($request['uid'], $request['gid']);

	

	

	// Delete the join request
$db->delete_query("joinrequests", "rid='{$request['rid']}'");

flash_message($lang->success_join_request_approved, "success");

	// Delete the join request
$db->delete_query("joinrequests", "rid='{$request['rid']}'");

flash_message($lang->success_join_request_approved, "success");

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

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


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


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

Zeile 170Zeile 177
	{
flash_message($lang->error_invalid_join_request, 'error');
admin_redirect("index.php?module=user-groups");

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

 
	}

if(!verify_post_check($mybb->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']}");

	}

// Delete the join request

	}

// Delete the join request

Zeile 203Zeile 216
				$uid = intval($uid);
join_usergroup($uid, $group['gid']);
}

				$uid = intval($uid);
join_usergroup($uid, $group['gid']);
}

			// Log admin action

			// Log admin action

			log_admin_action("approve", $group['title'], $group['gid']);
$message = $lang->success_selected_requests_approved;
}

			log_admin_action("approve", $group['title'], $group['gid']);
$message = $lang->success_selected_requests_approved;
}

Zeile 221Zeile 234

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


flash_message($message, 'success');
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." {$group['title']}");
$page->output_header($lang->join_requests_for." {$group['title']}");

Zeile 272Zeile 285
	$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));

	$table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2, "width" => 200));

	$table->construct_header($lang->controls, array("class" => "align_center", "width" => 200));


$query = $db->query("
SELECT j.*, u.username


$query = $db->query("
SELECT j.*, u.username

Zeile 282Zeile 295
		ORDER BY dateline ASC
LIMIT {$start}, {$per_page}
");

		ORDER BY dateline ASC
LIMIT {$start}, {$per_page}
");

 


	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(htmlspecialchars_uni($request['reason']));
$table->construct_cell(my_date($mybb->settings['dateformat'].", ".$mybb->settings['timeformat'], $request['dateline']), array('class' => 'align_center'));

	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(htmlspecialchars_uni($request['reason']));
$table->construct_cell(my_date($mybb->settings['dateformat'].", ".$mybb->settings['timeformat'], $request['dateline']), array('class' => 'align_center'));

		$table->construct_cell("<a href=\"index.php?module=user-groups&action=approve_join_request&amp;rid={$request['rid']}\">{$lang->approve}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-groups&action=deny_join_request&amp;rid={$request['rid']}\">{$lang->deny}</a>", array("class" => "align_center"));






$popup = new PopupMenu("join_{$request['rid']}", $lang->options);
$popup->add_item($lang->approve, "index.php?module=user-groups&action=approve_join_request&amp;rid={$request['rid']}&amp;my_post_key={$mybb->post_code}");
$popup->add_item($lang->deny, "index.php?module=user-groups&action=deny_join_request&amp;rid={$request['rid']}&amp;my_post_key={$mybb->post_code}");

$table->construct_cell($popup->fetch(), array('class' => "align_center"));

		$table->construct_row();	
}

if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_join_requests, array("colspan" => 6));

		$table->construct_row();	
}

if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_join_requests, array("colspan" => 6));

		$table->construct_row();
}

		$table->construct_row();
}


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


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

Zeile 325Zeile 343
	$query = $db->simple_select("users", "uid, username", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
$user = $db->fetch_array($query);
if(!$user['uid'])

	$query = $db->simple_select("users", "uid, username", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
$user = $db->fetch_array($query);
if(!$user['uid'])

	{

	{

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

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

Zeile 352Zeile 370
		$plugins->run_hooks("admin_user_groups_add_leader_commit");

$db->insert_query("groupleaders", $new_leader);

		$plugins->run_hooks("admin_user_groups_add_leader_commit");

$db->insert_query("groupleaders", $new_leader);





		$cache->update_groupleaders();

// Log admin action

		$cache->update_groupleaders();

// Log admin action

Zeile 370Zeile 388

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


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

{

{

	$plugins->run_hooks("admin_user_groups_leaders");

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

	$plugins->run_hooks("admin_user_groups_leaders");

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

Zeile 516Zeile 534
	else
{
$page->output_confirm_action("index.php?module=user-groups&amp;action=delete_leader&amp;lid={$leader['lid']}", $lang->confirm_group_leader_deletion);

	else
{
$page->output_confirm_action("index.php?module=user-groups&amp;action=delete_leader&amp;lid={$leader['lid']}", $lang->confirm_group_leader_deletion);

	}
}


	}
}


if($mybb->input['action'] == "edit_leader")
{
$plugins->run_hooks("admin_user_groups_edit_leader");

if($mybb->input['action'] == "edit_leader")
{
$plugins->run_hooks("admin_user_groups_edit_leader");

Zeile 739Zeile 757
		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;

 
		}
else
{
if(preg_match("#<((m[^a])|(b[^diloru>])|(s[^aemptu>]))(\s*[^>]*)>#si", $mybb->input['namestyle']))
{
$errors[] = $lang->error_disallowed_namestyle_username;
$mybb->input['namestyle'] = $usergroup['namestyle'];
}

		}

if(!$errors)

		}

if(!$errors)

Zeile 801Zeile 827
				"pmquota" => intval($mybb->input['pmquota']),
"maxpmrecipients" => intval($mybb->input['maxpmrecipients']),
"cansendemail" => intval($mybb->input['cansendemail']),

				"pmquota" => intval($mybb->input['pmquota']),
"maxpmrecipients" => intval($mybb->input['maxpmrecipients']),
"cansendemail" => intval($mybb->input['cansendemail']),

 
				"cansendemailoverride" => intval($mybb->input['cansendemailoverride']),

				"maxemails" => intval($mybb->input['maxemails']),		
"canviewmemberlist" => intval($mybb->input['canviewmemberlist']),
"canviewcalendar" => intval($mybb->input['canviewcalendar']),

				"maxemails" => intval($mybb->input['maxemails']),		
"canviewmemberlist" => intval($mybb->input['canviewmemberlist']),
"canviewcalendar" => intval($mybb->input['canviewcalendar']),

Zeile 1065Zeile 1092
		$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'])),
$form->generate_check_box("cansendemail", 1, $lang->can_email_users, array("checked" => $mybb->input['cansendemail'])),

		$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'])),
$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_text_box('maxemails', $mybb->input['maxemails'], array('id' => 'maxemails', 'class' => 'field50'))
);
$form_container->output_row($lang->misc, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $misc_options)."</div>");

		"{$lang->max_emails_per_day}<br /><small class=\"input\">{$lang->max_emails_per_day_desc}</small><br />".$form->generate_text_box('maxemails', $mybb->input['maxemails'], array('id' => 'maxemails', 'class' => 'field50'))
);
$form_container->output_row($lang->misc, "", "<div class=\"group_settings_bit\">".implode("</div><div class=\"group_settings_bit\">", $misc_options)."</div>");