Vergleich admin/usergroups.php - 1.2.0 - 1.2.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: usergroups.php 2193 2006-09-03 12:33:03Z chris $

 * $Id: usergroups.php 3072 2007-05-19 16:12:31Z CraKteR $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 205Zeile 205
		$success_text = sprintf($lang->leader_added, $usergroup['title']);
}


		$success_text = sprintf($lang->leader_added, $usergroup['title']);
}


	cpredirect("usergroups.php?".SID."&action=groupleaders&gid=".$mybb->input['gid'], $success_text);

	cpredirect("usergroups.php?".SID."&action=groupleaders&gid=".$mybb->input['gid'], $success_text);

}

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

}

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

Zeile 213Zeile 213
	if($mybb->input['deletesubmit'])
{
$plugins->run_hooks("admin_usergroups_do_delete");

	if($mybb->input['deletesubmit'])
{
$plugins->run_hooks("admin_usergroups_do_delete");

 
		$db->query("DELETE FROM ".TABLE_PREFIX."groupleaders WHERE gid='".intval($mybb->input['gid'])."'");

		$db->query("DELETE FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['gid'])."' AND type!='1'");
$db->query("UPDATE ".TABLE_PREFIX."users SET usergroup='2' WHERE usergroup='".intval($mybb->input['gid'])."'");
$db->query("UPDATE ".TABLE_PREFIX."users SET displaygroup=usergroup WHERE displaygroup='".intval($mybb->input['gid'])."'");

		$db->query("DELETE FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['gid'])."' AND type!='1'");
$db->query("UPDATE ".TABLE_PREFIX."users SET usergroup='2' WHERE usergroup='".intval($mybb->input['gid'])."'");
$db->query("UPDATE ".TABLE_PREFIX."users SET displaygroup=usergroup WHERE displaygroup='".intval($mybb->input['gid'])."'");

Zeile 315Zeile 316
	{
$grouparray['candisplaygroup'] = $db->escape_string($mybb->input['candisplaygroup']);
}

	{
$grouparray['candisplaygroup'] = $db->escape_string($mybb->input['candisplaygroup']);
}

	$plugins->run_hooks("admin_usergroups_do_delete");

	$plugins->run_hooks("admin_usergroups_do_edit");

	$db->update_query(TABLE_PREFIX."usergroups", $grouparray, "gid='".$mybb->input['gid']."'");
$cache->updateusergroups();
$cache->updateforumpermissions();

	$db->update_query(TABLE_PREFIX."usergroups", $grouparray, "gid='".$mybb->input['gid']."'");
$cache->updateusergroups();
$cache->updateforumpermissions();

Zeile 370Zeile 371
	tablesubheader($lang->perms_reputations);
makeyesnocode($lang->show_reputations, "usereputationsystem", "yes");
makeyesnocode($lang->can_give_reputations, "cangivereputations", "yes");

	tablesubheader($lang->perms_reputations);
makeyesnocode($lang->show_reputations, "usereputationsystem", "yes");
makeyesnocode($lang->can_give_reputations, "cangivereputations", "yes");

	$reputation_power = array(1 => 1, 2 => 2, 3 => 3);
makeselectcode_array($lang->reputation_points, "reputationpower", $reputation_power, 1);

 
	makeinputcode($lang->reputation_points, "reputationpower", 1, 4);
makeinputcode($lang->max_reputations_day, "maxreputationsday", "5", 4);


	makeinputcode($lang->reputation_points, "reputationpower", 1, 4);
makeinputcode($lang->max_reputations_day, "maxreputationsday", "5", 4);


Zeile 466Zeile 465
	makeinputcode($lang->stars, "ustars", $usergroup['stars']);
makeinputcode($lang->star_image, "starimage", $usergroup['starimage']);
makeinputcode($lang->group_image, "image", $usergroup['image']);

	makeinputcode($lang->stars, "ustars", $usergroup['stars']);
makeinputcode($lang->star_image, "starimage", $usergroup['starimage']);
makeinputcode($lang->group_image, "image", $usergroup['image']);





	tablesubheader($lang->group_options);
if($usergroup['gid'] != "1" && $usergroup['gid'] != "5")
{

	tablesubheader($lang->group_options);
if($usergroup['gid'] != "1" && $usergroup['gid'] != "5")
{

Zeile 562Zeile 561
		cperror($lang->invalid_leader);
}
$plugins->run_hooks("admin_usergroups_editgroupleader");

		cperror($lang->invalid_leader);
}
$plugins->run_hooks("admin_usergroups_editgroupleader");

	cpheader();

	cpheader();

	startform("usergroups.php", "", "do_editgroupleader");
makehiddencode("gid", $leader['gid']);
makehiddencode("lid", $leader['lid']);

	startform("usergroups.php", "", "do_editgroupleader");
makehiddencode("gid", $leader['gid']);
makehiddencode("lid", $leader['lid']);

Zeile 635Zeile 634
	if(is_array($uidin))
{
$uids = implode(",", $uidin);

	if(is_array($uidin))
{
$uids = implode(",", $uidin);

		$db->query("DELETE FROM ".TABLE_PREFIX."joinrequests WHERE uid IN($uids)");

		$db->query("DELETE FROM ".TABLE_PREFIX."joinrequests WHERE uid IN($uids) AND gid='{$mybb->input['gid']}'");

	}
cpredirect("usergroups.php?".SID, $lang->join_requests_moderated);
}

	}
cpredirect("usergroups.php?".SID, $lang->join_requests_moderated);
}

Zeile 706Zeile 705
	cpheader();

$query = $db->query("SELECT g.gid, COUNT(u.uid) AS users FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) GROUP BY gid;");

	cpheader();

$query = $db->query("SELECT g.gid, COUNT(u.uid) AS users FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) GROUP BY gid;");

	while($groupcount = $db->fetch_array($query))
{

	while($groupcount = $db->fetch_array($query))
{

		$primaryusers[$groupcount['gid']] = $groupcount['users'];
}

$query = $db->query("SELECT g.gid, COUNT(u.uid) AS users FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) WHERE g.gid!='' GROUP BY gid;");
while($groupcount = $db->fetch_array($query))

		$primaryusers[$groupcount['gid']] = $groupcount['users'];
}

$query = $db->query("SELECT g.gid, COUNT(u.uid) AS users FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) WHERE g.gid!='' GROUP BY gid;");
while($groupcount = $db->fetch_array($query))

	{

	{

		$secondaryusers[$groupcount['gid']] = $groupcount['users'];
}

$query = $db->query("SELECT g.gid, COUNT(r.uid) AS users FROM ".TABLE_PREFIX."joinrequests r LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=r.gid) GROUP BY gid;");
while($joinrequest = $db->fetch_array($query))

		$secondaryusers[$groupcount['gid']] = $groupcount['users'];
}

$query = $db->query("SELECT g.gid, COUNT(r.uid) AS users FROM ".TABLE_PREFIX."joinrequests r LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=r.gid) GROUP BY gid;");
while($joinrequest = $db->fetch_array($query))

	{

	{

		$joinrequests[$joinrequest['gid']] = $joinrequest['users'];
}
?>

		$joinrequests[$joinrequest['gid']] = $joinrequest['users'];
}
?>

Zeile 755Zeile 754

while($usergroup = $db->fetch_array($query))
{


while($usergroup = $db->fetch_array($query))
{

	  if($usergroup['description'])
{
$usergroup['description'] = "<small>".$usergroup['description']."</small>";
}

		if($usergroup['description'])
{
$usergroup['description'] = "<small>".$usergroup['description']."</small>";
}

		$bgcolor = getaltbg();

		$bgcolor = getaltbg();

		makehiddencode('gid', $usergroup['gid']);

 
		echo "<tr class=\"{$bgcolor}\">\n";
echo "<td>{$usergroup['title']}<br />{$usergroup['description']}</td>\n";
if(!$primaryusers[$usergroup['gid']])

		echo "<tr class=\"{$bgcolor}\">\n";
echo "<td>{$usergroup['title']}<br />{$usergroup['description']}</td>\n";
if(!$primaryusers[$usergroup['gid']])

Zeile 813Zeile 811
		while($usergroup = $db->fetch_array($query))
{
$bgcolor = getaltbg();

		while($usergroup = $db->fetch_array($query))
{
$bgcolor = getaltbg();

			//startform('usergroups.php');
makehiddencode('gid', $usergroup['gid']);

 
			echo "<tr class=\"{$bgcolor}\">\n";
echo "<td>{$usergroup['title']}</td>\n";
if(!$primaryusers[$usergroup['gid']])

			echo "<tr class=\"{$bgcolor}\">\n";
echo "<td>{$usergroup['title']}</td>\n";
if(!$primaryusers[$usergroup['gid']])

Zeile 872Zeile 868
		while($usergroup = $db->fetch_array($query))
{
$bgcolor = getaltbg();

		while($usergroup = $db->fetch_array($query))
{
$bgcolor = getaltbg();

			makehiddencode('gid', $usergroup['gid']);

 
			echo "<tr class=\"{$bgcolor}\">\n";
echo "<td>{$usergroup['title']}</td>\n";
if(!$primaryusers[$usergroup['gid']])

			echo "<tr class=\"{$bgcolor}\">\n";
echo "<td>{$usergroup['title']}</td>\n";
if(!$primaryusers[$usergroup['gid']])

Zeile 887Zeile 882
			$modrequests = '';
if($joinrequests[$usergroup['gid']] > 0)
{

			$modrequests = '';
if($joinrequests[$usergroup['gid']] > 0)
{

				$usergroup['joinrequests'] = "<a href=\"usergroups.php?".SID."&amp;=joinrequests&amp;gid={$usergroup['gid']}\"><span class=\"highlight1\">".$joinrequests[$usergroup['gid']]."</span></a>";

				$usergroup['joinrequests'] = "<a href=\"usergroups.php?".SID."&amp;action=joinrequests&amp;gid={$usergroup['gid']}\"><span class=\"highlight1\">".$joinrequests[$usergroup['gid']]."</span></a>";

				$modrequests = "<option value=\"joinrequests\">{$lang->moderate_join_requests}</option>\n";
}
echo "</td>\n";

				$modrequests = "<option value=\"joinrequests\">{$lang->moderate_join_requests}</option>\n";
}
echo "</td>\n";