Vergleich admin/adminfunctions.php - 1.2.7 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

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

 * $Id: adminfunctions.php 2964 2007-03-26 03:03:33Z Tikitiki $

 * $Id: adminfunctions.php 3311 2007-09-13 13:55:27Z chris $

 */

$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 384Zeile 385
	}
echo "</select>\n</td>\n</tr>\n";
}

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

function makedateselect($title, $name, $day, $month, $year)
{
$dname = $name."[day]";
$mname = $name."[month]";
$yname = $name."[year]";

for($i = 1; $i <= 31; $i++)
{
if($day == $i)
{
$daylist .= "<option value=\"$i\" selected>$i</option>\n";
}
else
{
$daylist .= "<option value=\"$i\">$i</option>\n";
}
}

$monthsel[$month] = "selected";
$monthlist .= "<option value=\"\">------------</option>";
$monthlist .= "<option value=\"01\" $monthsel[01]>January</option>\n";
$monthlist .= "<option value=\"02\" $monthsel[02]>February</option>\n";
$monthlist .= "<option value=\"03\" $monthsel[03]>March</option>\n";
$monthlist .= "<option value=\"04\" $monthsel[04]>April</option>\n";
$monthlist .= "<option value=\"05\" $monthsel[05]>May</option>\n";
$monthlist .= "<option value=\"06\" $monthsel[06]>June</option>\n";
$monthlist .= "<option value=\"07\" $monthsel[07]>July</option>\n";
$monthlist .= "<option value=\"08\" $monthsel[08]>August</option>\n";
$monthlist .= "<option value=\"09\" $monthsel[09]>September</option>\n";
$monthlist .= "<option value=\"10\" $monthsel[10]>October</option>\n";
$monthlist .= "<option value=\"11\" $monthsel[11]>November</option>\n";
$monthlist .= "<option value=\"12\" $monthsel[12]>December</option>\n";
$dateselect = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>\n";
$dateselect .= "<td><b><small>Day</small></b><br />\n<select name=\"$dname\"><option value=\"\">--</option>\n$daylist</select></td>\n";
$dateselect .= "<td><b><small>Month</small></b><br />\n<select name=\"$mname\">$monthlist</select></td>\n";
$dateselect .= "<td><b><small>Year</small></b><br />\n<input name=\"$yname\" value=\"$year\" size=\"4\"></td>\n";
$dateselect .= "</tr></table>";

$bgcolor = getaltbg();

 




	echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\">$dateselect</tr>\n";
}

 
function makebuttoncode($name, $value, $type="submit", $onclick="", $nameid="name")
{
if($onclick != '')

function makebuttoncode($name, $value, $type="submit", $onclick="", $nameid="name")
{
if($onclick != '')

Zeile 531Zeile 491
	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 501
	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 "<table width=\"100%\">\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 "<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 "</td>\n";

	echo "</table>\n";
echo "</td>\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_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 "<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_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 "</table>\n";

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

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

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

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

	echo "</table>\n";
echo "</fieldset>\n";

	echo "</table>\n";
echo "</fieldset>\n";

	echo "</td>\n";
echo "<td>\n";
echo "<fieldset>\n";

	echo "</td>\n";
echo "<td>\n";
echo "<fieldset>\n";

Zeile 673Zeile 633
	echo "<table width=\"100%\">\n";
echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['color'])."\" 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[trow_reputation_positive][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";

	echo "</table>\n";

	echo "</table>\n";

	echo "</td>\n";
echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n";
echo "<table width=\"100%\">\n";

	echo "</td>\n";
echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n";
echo "<table width=\"100%\">\n";

Zeile 708Zeile 668
		$revert = "";
$highlight = "";
if($c == 2)

		$revert = "";
$highlight = "";
if($c == 2)

		{

		{

			$c = 1;
echo "<tr>\n";
echo $header_buffer;

			$c = 1;
echo "<tr>\n";
echo $header_buffer;

Zeile 718Zeile 678
			echo "</tr>";
$header_buffer = "";
$content_buffer = "";

			echo "</tr>";
$header_buffer = "";
$content_buffer = "";

		}
else

		}
else

		{
$c++;

		{
$c++;

		}

		}

		$langvar = "form_elements_".$element;
$name = $lang->$langvar;
if($css[$element]['inherited'] != $tid && $css[$element]['inherited'] != 1)

		$langvar = "form_elements_".$element;
$name = $lang->$langvar;
if($css[$element]['inherited'] != $tid && $css[$element]['inherited'] != 1)

Zeile 736Zeile 696
		{
}
else

		{
}
else

		{

		{

			$highlight = "highlight2";
$name .= " (".$lang->customized_this_style.")";
$revert = "<input type=\"checkbox\" name=\"revert_css[$element]\" value=\"1\" id=\"revert_css_$element\" /> <label for=\"revert_css_$element\">".$lang->revert_customizations."</label>";

			$highlight = "highlight2";
$name .= " (".$lang->customized_this_style.")";
$revert = "<input type=\"checkbox\" name=\"revert_css[$element]\" value=\"1\" id=\"revert_css_$element\" /> <label for=\"revert_css_$element\">".$lang->revert_customizations."</label>";

Zeile 792Zeile 752
		echo "</div>\n</div>";
}
echo "</form>\n";

		echo "</div>\n</div>";
}
echo "</form>\n";

}

}


function makewarning($text)


function makewarning($text)

{

{

	echo "<p class=\"warning\">\n".$text."\n</p>\n";
}

	echo "<p class=\"warning\">\n".$text."\n</p>\n";
}





function cperror($message="")
{
global $lang;

function cperror($message="")
{
global $lang;

Zeile 811Zeile 771

// Are there multiple errors or is there just one?
if(is_array($message))


// Are there multiple errors or is there just one?
if(is_array($message))

	{

	{

		$error = "<ul>\n";
foreach($message as $item)
{
$error .= "\t<li>{$item}</li>\n";
}
$error .= "</ul>\n";

		$error = "<ul>\n";
foreach($message as $item)
{
$error .= "\t<li>{$item}</li>\n";
}
$error .= "</ul>\n";

	}
else
{

	}
else
{

		$error = $message;
}


		$error = $message;
}


Zeile 828Zeile 788
	starttable("65%");
tableheader($lang->cp_error_header);
makelabelcode($error);

	starttable("65%");
tableheader($lang->cp_error_header);
makelabelcode($error);

	endtable();
cpfooter();
exit;
}

	endtable();
cpfooter();
exit;
}


function cpmessage($message="")
{


function cpmessage($message="")
{

Zeile 849Zeile 809
	exit;
}
function cpredirect($url, $message="")

	exit;
}
function cpredirect($url, $message="")

{

{

	global $lang;
if(!$message)
{

	global $lang;
if(!$message)
{

Zeile 877Zeile 837
}

function cpfooter($showversion=1)

}

function cpfooter($showversion=1)

{

{

	global $mybb, $db, $maintimer, $lang;

echo "<div align=\"center\">\n<br />\n<br />\n";

	global $mybb, $db, $maintimer, $lang;

echo "<div align=\"center\">\n<br />\n<br />\n";

Zeile 934Zeile 894
	echo "<ul>\n";
echo $navoptions;
echo "</ul>\n</td>\n";

	echo "<ul>\n";
echo $navoptions;
echo "</ul>\n</td>\n";

 
	echo "</tr>\n";

	echo "</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<br />\n";

	echo "</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<br />\n";

Zeile 1269Zeile 1230
function logadmin()
{
global $mybbadmin, $db, $mybb;

function logadmin()
{
global $mybbadmin, $db, $mybb;

	$scriptname = basename($_SERVER['PHP_SELF']);

	$scriptname = basename($_SERVER['SCRIPT_NAME']);

	$qstring = explode("&", $_SERVER['QUERY_STRING']);
$sep = '';
foreach($qstring as $key => $value)

	$qstring = explode("&", $_SERVER['QUERY_STRING']);
$sep = '';
foreach($qstring as $key => $value)

Zeile 1293Zeile 1254
		"action" => $db->escape_string($mybb->input['action']),
"querystring" => $db->escape_string($querystring),
"ipaddress" => $db->escape_string(get_ip())

		"action" => $db->escape_string($mybb->input['action']),
"querystring" => $db->escape_string($querystring),
"ipaddress" => $db->escape_string(get_ip())

	);

	);


$db->insert_query(TABLE_PREFIX."adminlog", $insertquery);
}


$db->insert_query(TABLE_PREFIX."adminlog", $insertquery);
}

Zeile 1875Zeile 1836
function makethemebitedit($title, $name)
{
global $tid, $themebits, $tcache, $lang, $db, $theme;

function makethemebitedit($title, $name)
{
global $tid, $themebits, $tcache, $lang, $db, $theme;

	if(!is_array($tcache))
{
cache_themes();
}

	if(!is_array($tcache))
{
cache_themes();
}

	$bgcolor = getaltbg();
if($name == "extracss" && $themebits['extracss'] == "")
{
$themebits['inherited']['extracss'] = 0;

	$bgcolor = getaltbg();
if($name == "extracss" && $themebits['extracss'] == "")
{
$themebits['inherited']['extracss'] = 0;

	}

	}

	if($themebits['inherited'][$name] && $themebits['inherited'][$name] != $tid && $themebits['inherited'][$name] != 1)
{
$inheritid = $themebits['inherited'][$name];

	if($themebits['inherited'][$name] && $themebits['inherited'][$name] != $tid && $themebits['inherited'][$name] != 1)
{
$inheritid = $themebits['inherited'][$name];

Zeile 1892Zeile 1853
		$inheritnote = "(".$lang->inherited_from." ".$inheritedfrom.")";
}
elseif($themebits['inherited'][$name] == 1 || $tcache[$tid]['parent'] == 0)

		$inheritnote = "(".$lang->inherited_from." ".$inheritedfrom.")";
}
elseif($themebits['inherited'][$name] == 1 || $tcache[$tid]['parent'] == 0)

	{

	{

		$highlight = "";
}
else

		$highlight = "";
}
else

Zeile 1902Zeile 1863
		$custom = 1;
}
if($name != "extracss")

		$custom = 1;
}
if($name != "extracss")

	{

	{

	echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n";
echo "<td class=\"$bgcolor\" valign=\"top\" width=\"60%\">";
echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td>\n";

	echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n";
echo "<td class=\"$bgcolor\" valign=\"top\" width=\"60%\">";
echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td>\n";

Zeile 1915Zeile 1876
		);

$query = $db->simple_select(TABLE_PREFIX."templatesets", "*", "", $options);

		);

$query = $db->simple_select(TABLE_PREFIX."templatesets", "*", "", $options);





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

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

Zeile 2057Zeile 2018
	if(!$tid)
{
$themeselect .= "<select name=\"$name\">";

	if(!$tid)
{
$themeselect .= "<select name=\"$name\">";

	}
if(!is_array($tcache))
{
cache_themes();
}

	}
if(!is_array($tcache))
{
cache_themes();
}

	if(!is_array($tcache2))
{
foreach($tcache as $theme)

	if(!is_array($tcache2))
{
foreach($tcache as $theme)

Zeile 2134Zeile 2095
		$theme['css'] .= $masterextra;
}
if($theme['extracss'] && $tid != 1 && serialize($theme['extracss']) != serialize($masterextra))

		$theme['css'] .= $masterextra;
}
if($theme['extracss'] && $tid != 1 && serialize($theme['extracss']) != serialize($masterextra))

	{

	{

		$theme['css'] .= "\n/* Additional CSS (Custom) */\n";
$theme['css'] .= $theme['extracss'];

		$theme['css'] .= "\n/* Additional CSS (Custom) */\n";
$theme['css'] .= $theme['extracss'];

	}


	}


	$theme['css'] = $db->escape_string($theme['css']);
$theme['themebits'] = $db->escape_string(serialize($theme['themebits']));
$theme['cssbits'] = $db->escape_string(serialize($theme['cssbits']));

	$theme['css'] = $db->escape_string($theme['css']);
$theme['themebits'] = $db->escape_string(serialize($theme['themebits']));
$theme['cssbits'] = $db->escape_string(serialize($theme['cssbits']));

Zeile 2147Zeile 2108

// Cache the CSS if we're supposed to
update_css_file($tid);


// Cache the CSS if we're supposed to
update_css_file($tid);





	// Update kids!
if(is_array($tcache2[$tid]))
{

	// Update kids!
if(is_array($tcache2[$tid]))
{

Zeile 2170Zeile 2131
	foreach($array as $key => $val)
{
if(is_array($val))

	foreach($array as $key => $val)
{
if(is_array($val))

		{

		{

			$array[$key] = killempty($val);
$val = $array[$key];
}
if(empty($val))

			$array[$key] = killempty($val);
$val = $array[$key];
}
if(empty($val))

		{

		{

			unset($array[$key]);
}
}

			unset($array[$key]);
}
}

Zeile 2205Zeile 2166
		if($d == $options['selected_day'])
{
$dropdown .= "<option selected=\"selected\" value=\"{$d}\">{$d}</option>\n";

		if($d == $options['selected_day'])
{
$dropdown .= "<option selected=\"selected\" value=\"{$d}\">{$d}</option>\n";

		}
else

		}
else

		{
$dropdown .= "<option value=\"{$d}\">{$d}</option>\n";
}

		{
$dropdown .= "<option value=\"{$d}\">{$d}</option>\n";
}

Zeile 2460Zeile 2421
		}
}
return $navigation;

		}
}
return $navigation;

 
}

function fetch_iconv_encoding($mysql_encoding)
{
$mysql_encoding = explode("_", $mysql_encoding);
switch($mysql_encoding[0])
{
case "utf8":
return "utf-8";
break;
case "latin1":
return "iso-8859-1";
break;
default:
return $mysql_encoding[0];
}

}
?>

}
?>