Vergleich admin/adminfunctions.php - 1.2.1 - 1.2.9

  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: adminfunctions.php 2263 2006-09-26 09:24:25Z chris $

 * $Id: adminfunctions.php 3156 2007-06-24 12:49:57Z CraKteR $

 */

$cssselectors = array(

 */

$cssselectors = array(

Zeile 84Zeile 84
	{
$htmltag = str_replace("<html", "<html lang=\"".$lang->settings['htmllang']."\"", $htmltag);
}

	{
$htmltag = str_replace("<html", "<html lang=\"".$lang->settings['htmllang']."\"", $htmltag);
}

 


	echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo $htmltag;
echo "<head>\n";

	echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo $htmltag;
echo "<head>\n";

Zeile 116Zeile 117
	echo "<tr><td class=\"hoptobuttons\">";
if(!is_array($links))
{

	echo "<tr><td class=\"hoptobuttons\">";
if(!is_array($links))
{

		$links[] = $links;

		$links = array($links);

	}
foreach($links as $key => $val)
{

	}
foreach($links as $key => $val)
{

Zeile 143Zeile 144
	if($action != "")
{
makehiddencode("action", $action);

	if($action != "")
{
makehiddencode("action", $action);

	}
}

	}
}

function starttable($width="100%", $border=1, $padding=6)
{
echo "<table cellpadding=\"$border\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"$width\" class=\"bordercolor\">\n";

function starttable($width="100%", $border=1, $padding=6)
{
echo "<table cellpadding=\"$border\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"$width\" class=\"bordercolor\">\n";

Zeile 152Zeile 153
	echo "<table cellpadding=\"$padding\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"tback\">";
}
function tableheader($title, $anchor="", $colspan=2)

	echo "<table cellpadding=\"$padding\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"tback\">";
}
function tableheader($title, $anchor="", $colspan=2)

{

{

	global $bgcolor;

if($anchor)

	global $bgcolor;

if($anchor)

Zeile 173Zeile 174
	if(!is_array($titles))
{
$title[] = $titles;

	if(!is_array($titles))
{
$title[] = $titles;

	}

	}

	else
{
$colspan = 1;

	else
{
$colspan = 1;

Zeile 203Zeile 204
		$width1 = $width2 = "";
}
echo "<tr>\n<td class=\"$bgcolor\" colspan=\"$colspan\" valign=\"top\"$width1>$title</td>\n";

		$width1 = $width2 = "";
}
echo "<tr>\n<td class=\"$bgcolor\" colspan=\"$colspan\" valign=\"top\"$width1>$title</td>\n";

	if($value != "")

	if($value != "")

	{
echo "<td class=\"$bgcolor\" valign=\"top\" $width2>$value</td>\n";
}
echo "</tr>\n";

	{
echo "<td class=\"$bgcolor\" valign=\"top\" $width2>$value</td>\n";
}
echo "</tr>\n";

}

}

function makelinkcode($text, $url, $newwin=0, $class="")
{
if($newwin)
{
$target = "target=\"_blank\"";

function makelinkcode($text, $url, $newwin=0, $class="")
{
if($newwin)
{
$target = "target=\"_blank\"";

	}

	}

	if($class)
{
$class = "<span class=\"$class\">[$text]</span>";

	if($class)
{
$class = "<span class=\"$class\">[$text]</span>";

Zeile 226Zeile 227
	return " <a href=\"$url\" $target>$class</a>";
}
function makeinputcode($title, $name, $value="", $size="25", $extra="", $maxlength="", $autocomplete=1, $extra2="")

	return " <a href=\"$url\" $target>$class</a>";
}
function makeinputcode($title, $name, $value="", $size="25", $extra="", $maxlength="", $autocomplete=1, $extra2="")

{
$bgcolor = getaltbg();
$value = htmlspecialchars_uni($value);
if($autocomplete != 1)
{
$ac = " autocomplete=\"off\"";
}
if($value != '')

{
$bgcolor = getaltbg();
$value = htmlspecialchars_uni($value);
if($autocomplete != 1)
{
$ac = " autocomplete=\"off\"";
}
if($value != '')

	{
$value = " value=\"{$value}\"";
}

	{
$value = " value=\"{$value}\"";
}

Zeile 292Zeile 293
	echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"yes\"$yescheck />&nbsp;$lang->yes</label> &nbsp;&nbsp;<label><input type=\"radio\" name=\"$name\" value=\"no\"$nocheck />&nbsp;$lang->no</label></td>\n</tr>\n";
}
function makeonoffcode($title, $name, $value="on")

	echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"yes\"$yescheck />&nbsp;$lang->yes</label> &nbsp;&nbsp;<label><input type=\"radio\" name=\"$name\" value=\"no\"$nocheck />&nbsp;$lang->no</label></td>\n</tr>\n";
}
function makeonoffcode($title, $name, $value="on")

{

{

	global $lang;
$bgcolor = getaltbg();
if($value == "off")

	global $lang;
$bgcolor = getaltbg();
if($value == "off")

	{

	{

		$offcheck = "checked";
}
else

		$offcheck = "checked";
}
else

	{

	{

		$oncheck = "checked";
}
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"on\" $oncheck>&nbsp;$lang->on</label> &nbsp;&nbsp;<label><input type=\"radio\" name=\"$name\" value=\"off\" $offcheck>&nbsp;$lang->off</label></td>\n</tr>\n";

		$oncheck = "checked";
}
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"on\" $oncheck>&nbsp;$lang->on</label> &nbsp;&nbsp;<label><input type=\"radio\" name=\"$name\" value=\"off\" $offcheck>&nbsp;$lang->off</label></td>\n</tr>\n";

Zeile 311Zeile 312
	$bgcolor = getaltbg();
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td><td class=\"$bgcolor\" valign=\"top\" width=\"60%\">\n<select name=\"$name\">\n";
if($order)

	$bgcolor = getaltbg();
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td><td class=\"$bgcolor\" valign=\"top\" width=\"60%\">\n<select name=\"$name\">\n";
if($order)

	{

	{

		$options = array(
"order_by" => $order
);

		$options = array(
"order_by" => $order
);

Zeile 321Zeile 322
	if($blank && !$selected)
{
echo "<option value=\"\" selected> </option>";

	if($blank && !$selected)
{
echo "<option value=\"\" selected> </option>";

	}

	}

	while($item = $db->fetch_array($query))
{
if($item[$tableid] == $selected)

	while($item = $db->fetch_array($query))
{
if($item[$tableid] == $selected)

		{

		{

			echo "<option value=\"$item[$tableid]\" selected>$item[$optiondisp]</option>\n";

			echo "<option value=\"$item[$tableid]\" selected>$item[$optiondisp]</option>\n";

		}
else

		}
else

		{
echo "<option value=\"$item[$tableid]\">$item[$optiondisp]</option>\n";
}

		{
echo "<option value=\"$item[$tableid]\">$item[$optiondisp]</option>\n";
}

Zeile 350Zeile 351
		if($selected == $value)
{
echo "<option value=\"$value\" selected>$extra</option>\n";

		if($selected == $value)
{
echo "<option value=\"$value\" selected>$extra</option>\n";

		}

		}

		else
{
echo "<option value=\"$value\">$extra</option>\n";

		else
{
echo "<option value=\"$value\">$extra</option>\n";

Zeile 364Zeile 365
	$bgcolor = getaltbg();
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td><td class=\"$bgcolor\" valign=\"top\" width=\"60%\">\n<select name=\"$name\">\n";
if($blank)

	$bgcolor = getaltbg();
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td><td class=\"$bgcolor\" valign=\"top\" width=\"60%\">\n<select name=\"$name\">\n";
if($blank)

	{

	{

		echo "<option value=\"\"> $blank_label</option>";
}
if(!is_array($options))

		echo "<option value=\"\"> $blank_label</option>";
}
if(!is_array($options))

	{
$options[] = $options;

	{
$options = array($options);

	}
foreach($options as $value => $label)
{
if($value == $selected)
{
echo "<option value=\"$value\" selected=\"selected\">$label</option>\n";

	}
foreach($options as $value => $label)
{
if($value == $selected)
{
echo "<option value=\"$value\" selected=\"selected\">$label</option>\n";

		}

		}

		else
{
echo "<option value=\"$value\">$label</option>\n";

		else
{
echo "<option value=\"$value\">$label</option>\n";

		}

		}

	}
echo "</select>\n</td>\n</tr>\n";
}

	}
echo "</select>\n</td>\n</tr>\n";
}

Zeile 439Zeile 440
{
global $lang, $tid, $tcache;
if(!is_array($tcache))

{
global $lang, $tid, $tcache;
if(!is_array($tcache))

	{

	{

		cache_themes();
}
if($css['inherited'] != $tid && $css['inherited'] != 1)

		cache_themes();
}
if($css['inherited'] != $tid && $css['inherited'] != 1)

Zeile 527Zeile 528
	global $lang;
echo "<fieldset>\n";
echo "<legend>".$name."</legend>\n";

	global $lang;
echo "<fieldset>\n";
echo "<legend>".$name."</legend>\n";

	echo "<table width=\"100%\">\n";

	echo "<table width=\"100%\">\n";

	echo "<tr><td>".$lang->background."</td><td><input type=\"text\" name=\"css[$selector][$type][background]\" value=\"".htmlspecialchars_uni($css['background'])."\" size=\"8\" class=\"$highlight\" /></td></tr>\n";
echo "<tr><td>".$lang->font_color."</td><td><input type=\"text\" name=\"css[$selector][$type][color]\" value=\"".htmlspecialchars_uni($css['color'])."\" size=\"8\" class=\"$highlight\" /></td></tr>\n";
echo "<tr><td>".$lang->text_decoration."</td><td><input type=\"text\" name=\"css[$selector][$type][text-decoration]\" value=\"".htmlspecialchars_uni($css['text-decoration'])."\" size=\"8\" class=\"$highlight\" /></td></tr>\n";

	echo "<tr><td>".$lang->background."</td><td><input type=\"text\" name=\"css[$selector][$type][background]\" value=\"".htmlspecialchars_uni($css['background'])."\" size=\"8\" class=\"$highlight\" /></td></tr>\n";
echo "<tr><td>".$lang->font_color."</td><td><input type=\"text\" name=\"css[$selector][$type][color]\" value=\"".htmlspecialchars_uni($css['color'])."\" size=\"8\" class=\"$highlight\" /></td></tr>\n";
echo "<tr><td>".$lang->text_decoration."</td><td><input type=\"text\" name=\"css[$selector][$type][text-decoration]\" value=\"".htmlspecialchars_uni($css['text-decoration'])."\" size=\"8\" class=\"$highlight\" /></td></tr>\n";

	echo "</table>\n";

	echo "</table>\n";

	echo "</fieldset>\n";
}


	echo "</fieldset>\n";
}


Zeile 541Zeile 542
	starttable();
tableheader($lang->mycode_toolbar);
echo "<tr>\n<td class=\"subheader\" align=\"center\">".$lang->editor."</td><td class=\"subheader\" align=\"center\">".$lang->editor_control_bar."</td>\n</tr>\n";

	starttable();
tableheader($lang->mycode_toolbar);
echo "<tr>\n<td class=\"subheader\" align=\"center\">".$lang->editor."</td><td class=\"subheader\" align=\"center\">".$lang->editor_control_bar."</td>\n</tr>\n";

	echo "<tr>\n";
echo "<td class=\"altbg1\" width=\"50%\">\n";

	echo "<tr>\n";
echo "<td class=\"altbg1\" width=\"50%\">\n";

	echo "<table width=\"100%\">\n";
echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor][background]\" value=\"".htmlspecialchars_uni($css['editor']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "<tr>\n<td>".$lang->border."</td>\n<td><input type=\"text\" name=\"css[editor][border]\" value=\"".htmlspecialchars_uni($css['editor']['border'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";

	echo "<table width=\"100%\">\n";
echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor][background]\" value=\"".htmlspecialchars_uni($css['editor']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "<tr>\n<td>".$lang->border."</td>\n<td><input type=\"text\" name=\"css[editor][border]\" value=\"".htmlspecialchars_uni($css['editor']['border'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";

	echo "</table>\n";

	echo "</table>\n";

	echo "</td>\n";
echo "<td class=\"altbg1\" width=\"50%\">\n";

	echo "</td>\n";
echo "<td class=\"altbg1\" width=\"50%\">\n";

	echo "<table width=\"100%\">\n";

	echo "<table width=\"100%\">\n";

	echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor_control_bar][background]\" value=\"".htmlspecialchars_uni($css['editor_control_bar']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "<tr>\n<td>".$lang->border."</td>\n<td><input type=\"text\" name=\"css[editor_control_bar][border]\" value=\"".htmlspecialchars_uni($css['editor_control_bar']['border'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "</table>\n";

	echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor_control_bar][background]\" value=\"".htmlspecialchars_uni($css['editor_control_bar']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "<tr>\n<td>".$lang->border."</td>\n<td><input type=\"text\" name=\"css[editor_control_bar][border]\" value=\"".htmlspecialchars_uni($css['editor_control_bar']['border'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "</table>\n";

Zeile 557Zeile 558
	echo "</tr>\n";
echo "<tr>\n";
echo "<td class=\"altbg1\" colspan=\"2\">\n";

	echo "</tr>\n";
echo "<tr>\n";
echo "<td class=\"altbg1\" colspan=\"2\">\n";

	echo "<table width=\"100%\">\n";
echo "<tr>\n";
echo "<td>\n";

	echo "<table width=\"100%\">\n";
echo "<tr>\n";
echo "<td>\n";

	echo "<fieldset>\n";
echo "<legend>".$lang->toolbar_normal."</legend>\n";
echo "<table width=\"100%\">\n";

	echo "<fieldset>\n";
echo "<legend>".$lang->toolbar_normal."</legend>\n";
echo "<table width=\"100%\">\n";

Zeile 891Zeile 892
	{
$mybbversion = $mybb->version;
}

	{
$mybbversion = $mybb->version;
}

	echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.com\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("Y")." <a href=\"http://www.mybboard.com\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";

	echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.net\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("Y")." <a href=\"http://www.mybboard.net\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";

	echo "</body>\n";
echo "</html>";
}

	echo "</body>\n";
echo "</html>";
}

Zeile 971Zeile 972
{
if(!is_array($values))
{

{
if(!is_array($values))
{

		$values[] = $values;

		$values = array($values);

	}
foreach($values as $action => $title)
{

	}
foreach($values as $action => $title)
{

Zeile 980Zeile 981
	$buttononchange = "";
if($onchange)
{

	$buttononchange = "";
if($onchange)
{

	  $buttononchange = " onclick=\"{$onchange} this.form.submit(); return false;\"";
$onchange .= " ";
}

	  	$buttononchange = " onclick=\"{$onchange} this.form.submit(); return false;\"";
$onchange .= " ";
}

	return "<select name=\"$name\" onchange=\"{$onchange}this.form.submit();\">\n$options</select>\n&nbsp;\n<input type=\"submit\" value=\"Go\"$buttononchange />\n";
}


	return "<select name=\"$name\" onchange=\"{$onchange}this.form.submit();\">\n$options</select>\n&nbsp;\n<input type=\"submit\" value=\"Go\"$buttononchange />\n";
}


Zeile 1001Zeile 1002
function forumselect($name, $selected="",$fid="0",$depth="", $shownone="1", $extra="", $extra2="")
{
global $db, $forumselect, $lang, $cforumcache;

function forumselect($name, $selected="",$fid="0",$depth="", $shownone="1", $extra="", $extra2="")
{
global $db, $forumselect, $lang, $cforumcache;





	if(!is_array($cforumcache))
{
$options = array(

	if(!is_array($cforumcache))
{
$options = array(

Zeile 1026Zeile 1027
				$selected1 = ' selected="selected"';
}
$forumselect .= "<option value=\"-1\"$selected1>$extra</option>";

				$selected1 = ' selected="selected"';
}
$forumselect .= "<option value=\"-1\"$selected1>$extra</option>";

		}

		}

		if($extra2)

		if($extra2)

		{

		{

			$selected2 = '';
if($selected == -2)
{
$selected2 = ' selected="selected"';

			$selected2 = '';
if($selected == -2)
{
$selected2 = ' selected="selected"';

			}
$forumselect .= "<option value=\"-2\"$selected2>$extra2</option>";
}
if($extra || $extra2)
{

			}
$forumselect .= "<option value=\"-2\"$selected2>$extra2</option>";
}
if($extra || $extra2)
{

			$forumselect .= "<option value=\"0\">-----------</option>";
}
if($shownone)
{
$forumselect .= "<option value=\"0\">$lang->parentforum_none</option><option value=\"0\">-----------</option>";

			$forumselect .= "<option value=\"0\">-----------</option>";
}
if($shownone)
{
$forumselect .= "<option value=\"0\">$lang->parentforum_none</option><option value=\"0\">-----------</option>";

		}

		}

		$fid = 0;
}
else

		$fid = 0;
}
else

Zeile 1056Zeile 1057
		}
$forumselect .= ">$depth$startforum[name]</option>";
$depth .= "--";

		}
$forumselect .= ">$depth$startforum[name]</option>";
$depth .= "--";

	}

if(is_array($cforumcache['pid'][$fid]))

	}

if(is_array($cforumcache['pid'][$fid]))

	{
foreach($cforumcache['pid'][$fid] as $forum)
{

	{
foreach($cforumcache['pid'][$fid] as $forum)
{

Zeile 1119Zeile 1120
	{
$startforum = $cforumcache['fid'][$fid];
$forumchecklist .= "$depth<input type=\"checkbox\" name=\"{$name}[]\" value=\"$startforum[fid]\"";

	{
$startforum = $cforumcache['fid'][$fid];
$forumchecklist .= "$depth<input type=\"checkbox\" name=\"{$name}[]\" value=\"$startforum[fid]\"";

		if(in_array($startforum['fid'], $selected) || (is_array($selected) && in_array($forum['fid'], $selected)))

		if(is_array($selected) && (in_array($startforum['fid'], $selected) || in_array($forum['fid'], $selected)))

		{
$forumchecklist .= ' checked="checked"';
}

		{
$forumchecklist .= ' checked="checked"';
}

Zeile 1152Zeile 1153
function getadminpermissions($get_uid="", $get_gid="")
{
global $db, $mybb;

function getadminpermissions($get_uid="", $get_gid="")
{
global $db, $mybb;

 
	

	// Set UID and GID if none
$uid = $get_uid;
$gid = $get_gid;

	// Set UID and GID if none
$uid = $get_uid;
$gid = $get_gid;

 
	
$gid_array = array();


	if($uid === "")
{
$uid = $mybb->user['uid'];
}

	if($uid === "")
{
$uid = $mybb->user['uid'];
}

 
	

	if(!$gid)

	if(!$gid)

	{
$gid = $mybb->usergroup['gid'];
}

// Make sure gid is negative
$gid = (-1) * abs($gid);












	{
// Prepare user's groups since the group isn't specified
$gid_array[] = (-1) * intval($mybb->user['usergroup']);
$additional_groups = explode(',', $mybb->user['additionalgroups']);
// Make sure gids are negative
foreach($additional_groups as $g)
{
$gid_array[] = (-1) * abs($g);
}
}
else
{
// Group is specified
// Make sure gid is negative
$gid = (-1) * abs($gid);
}


	// What are we trying to find?
if($get_gid && !$get_uid)

	// What are we trying to find?
if($get_gid && !$get_uid)

	{



	{
// A group only


		$options = array(
"order_by" => "uid",
"order_dir" => "ASC",
"limit" => "1"

		$options = array(
"order_by" => "uid",
"order_dir" => "ASC",
"limit" => "1"

		);

		);





		// A group only

 
		$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='$gid' OR uid='0') AND permsset != ''", $options);
$perms = $db->fetch_array($query);
return $perms;
}
else
{

		$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='$gid' OR uid='0') AND permsset != ''", $options);
$perms = $db->fetch_array($query);
return $perms;
}
else
{

 
		// A user and/or group


		$options = array(
"order_by" => "uid",
"order_dir" => "DESC"
);

		$options = array(
"order_by" => "uid",
"order_dir" => "DESC"
);

		// A user and/or group
$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='$uid' OR uid='0' OR uid='$gid') AND permsset != ''", $options);

while($perm = $db->fetch_array($query))








		
// Prepare user's groups into SQL format
$group_sql = '';
foreach($gid_array as $gid)
{
$group_sql .= " OR uid='{$gid}'";
}

$perms_group = array();
$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='{$uid}'{$group_sql}) AND permsset != ''", $options);
while($perm = $db->fetch_array($query))

		{
// Sorting out which permission is which
if($perm['uid'] > 0)
{
$perms_user = $perm;

		{
// Sorting out which permission is which
if($perm['uid'] > 0)
{
$perms_user = $perm;

			}


				return $perms_user;
}

			elseif($perm['uid'] < 0)

			elseif($perm['uid'] < 0)

			{
$perms_group = $perm;

			{
$perms_group[] = $perm;

			}
else

			}
else

			{

			{

				$perms_def = $perm;

				$perms_def = $perm;

 
			}
}

// Figure out group permissions...ugh.
foreach($perms_group as $gperms)
{
if(!isset($final_group_perms))
{
// Use this group as the base for admin group permissions
$final_group_perms = $gperms;
continue;
}

// Loop through each specific permission to find the highest permission
foreach($gperms as $perm_name => $perm_value)
{
if($final_group_perms[$perm_name] != 'yes' && $perm_value == 'yes')
{
$final_group_perms[$perm_name] = 'yes';
}

			}
}

// Send specific user, or group permissions before default.

			}
}

// Send specific user, or group permissions before default.

		if(isset($perms_user))
{
return $perms_user;
}
elseif(isset($perms_group))

		// If user's permission are explicitly set, they've already been returned above.
if(isset($final_group_perms))




		{

		{

			return $perms_group;

			return $final_group_perms;

		}
else
{

		}
else
{

Zeile 1521Zeile 1565
		if($inherit[$usergroup['gid']] != "yes")
{
if($canview[$usergroup['gid']] == "yes")

		if($inherit[$usergroup['gid']] != "yes")
{
if($canview[$usergroup['gid']] == "yes")

			{

			{

				$pview = "yes";
}
else

				$pview = "yes";
}
else

Zeile 1995Zeile 2039
				}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->theme_style</option>";
echo "<option value=\"edit\" selected>- $lang->edit_theme_style</option>\n";

				}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->theme_style</option>";
echo "<option value=\"edit\" selected>- $lang->edit_theme_style</option>\n";



 
			}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->other_options</option>\n";
echo "<option value=\"download\">- $lang->export_theme</option>\n";

			}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->other_options</option>\n";
echo "<option value=\"download\">- $lang->export_theme</option>\n";