Vergleich admin/inc/class_page.php - 1.8.5 - 1.8.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 67Zeile 67
	/**
* Output the page header.
*

	/**
* Output the page header.
*

	 * @param string The title of the page.

	 * @param string $title The title of the page.

	 */
function output_header($title="")
{

	 */
function output_header($title="")
{

Zeile 108Zeile 108

echo " <script type=\"text/javascript\" src=\"../jscripts/jquery.js\"></script>\n";
echo " <script type=\"text/javascript\" src=\"../jscripts/jquery.plugins.min.js\"></script>\n";


echo " <script type=\"text/javascript\" src=\"../jscripts/jquery.js\"></script>\n";
echo " <script type=\"text/javascript\" src=\"../jscripts/jquery.plugins.min.js\"></script>\n";

		echo "	<script type=\"text/javascript\" src=\"../jscripts/general.js\"></script>\n";

		echo "	<script type=\"text/javascript\" src=\"../jscripts/general.js?ver=1806\"></script>\n";

		echo "	<script type=\"text/javascript\" src=\"./jscripts/admincp.js\"></script>\n";
echo " <script type=\"text/javascript\" src=\"./jscripts/tabs.js\"></script>\n";


		echo "	<script type=\"text/javascript\" src=\"./jscripts/admincp.js\"></script>\n";
echo " <script type=\"text/javascript\" src=\"./jscripts/tabs.js\"></script>\n";


Zeile 191Zeile 191

/**
* Output the page footer.


/**
* Output the page footer.

 
	 *
* @param bool $quit

	 */
function output_footer($quit=true)
{

	 */
function output_footer($quit=true)
{

Zeile 220Zeile 222
		echo "			</div>\n";
echo " </div>\n";
echo " <br style=\"clear: both;\" />";

		echo "			</div>\n";
echo " </div>\n";
echo " <br style=\"clear: both;\" />";

		echo "	<br style=\"clear: both;\" />";

		echo "	<br style=\"clear: both;\" />";

		echo "	</div>\n";
echo "<div id=\"footer\"><p class=\"generation\">".$lang->sprintf($lang->generated_in, $totaltime, $debuglink, $querycount, $memory_usage)."</p><p class=\"powered\">Powered By <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB</a>, &copy; 2002-".COPY_YEAR." <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB Group</a>.</p></div>\n";
if($mybb->debug_mode)

		echo "	</div>\n";
echo "<div id=\"footer\"><p class=\"generation\">".$lang->sprintf($lang->generated_in, $totaltime, $debuglink, $querycount, $memory_usage)."</p><p class=\"powered\">Powered By <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB</a>, &copy; 2002-".COPY_YEAR." <a href=\"http://www.mybb.com/\" target=\"_blank\">MyBB Group</a>.</p></div>\n";
if($mybb->debug_mode)

Zeile 240Zeile 242
	/**
* Add an item to the page breadcrumb trail.
*

	/**
* Add an item to the page breadcrumb trail.
*

	 * @param string The name of the item to add.
* @param string The URL to the item we're adding (if there is one)

	 * @param string $name The name of the item to add.
* @param string $url The URL to the item we're adding (if there is one)

	 */
function add_breadcrumb_item($name, $url="")
{

	 */
function add_breadcrumb_item($name, $url="")
{

Zeile 250Zeile 252

/**
* Generate a breadcrumb trail.


/**
* Generate a breadcrumb trail.

 
	 *
* @return bool|string

	 */
function _generate_breadcrumb()
{

	 */
function _generate_breadcrumb()
{

Zeile 279Zeile 283
	/**
* Output a success message.
*

	/**
* Output a success message.
*

	 * @param string The message to output.

	 * @param string $message The message to output.

	 */
function output_success($message)
{

	 */
function output_success($message)
{

Zeile 289Zeile 293
	/**
* Output an alert/warning message.
*

	/**
* Output an alert/warning message.
*

	 * @param string The message to output.
* @param string The ID of the alert/warning (optional)

	 * @param string $message The message to output.
* @param string $id The ID of the alert/warning (optional)

	 */
function output_alert($message, $id="")
{

	 */
function output_alert($message, $id="")
{

Zeile 304Zeile 308
	/**
* Output an inline message.
*

	/**
* Output an inline message.
*

	 * @param string The message to output.

	 * @param string $message The message to output.

	 */
function output_inline_message($message)
{
echo "<div class=\"inline_message\">{$message}</div>\n";

	 */
function output_inline_message($message)
{
echo "<div class=\"inline_message\">{$message}</div>\n";

	}

	}


/**
* Output a single error message.
*


/**
* Output a single error message.
*

	 * @param string The message to output.

	 * @param string $error The message to output.

	 */
function output_error($error)
{
echo "<div class=\"error\">\n";
echo "{$error}\n";

	 */
function output_error($error)
{
echo "<div class=\"error\">\n";
echo "{$error}\n";

		echo "</div>\n";
}

		echo "</div>\n";
}


/**
* Output one or more inline error messages.
*


/**
* Output one or more inline error messages.
*

	 * @param array Array of error messages to output.

	 * @param array $errors Array of error messages to output.

	 */
function output_inline_error($errors)
{

	 */
function output_inline_error($errors)
{

Zeile 346Zeile 350
		echo "</ul>\n";
echo "</div>\n";
}

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





	/**
* Generate the login page.
*

	/**
* Generate the login page.
*

	 * @param string The any message to output on the page if there is one.
* @param string The class name of the message (defaults to success)

	 * @param string $message The any message to output on the page if there is one.
* @param string $class The class name of the message (defaults to success)

	 */
function show_login($message="", $class="success")
{

	 */
function show_login($message="", $class="success")
{

Zeile 386Zeile 390
<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
<script type="text/javascript" src="../jscripts/jquery.js"></script>

<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
<script type="text/javascript" src="../jscripts/jquery.js"></script>

<script type="text/javascript" src="../jscripts/general.js"></script>

<script type="text/javascript" src="../jscripts/general.js?ver=1806"></script>

<script type="text/javascript" src="./jscripts/admincp.js"></script>
<script type="text/javascript">
//<![CDATA[

<script type="text/javascript" src="./jscripts/admincp.js"></script>
<script type="text/javascript">
//<![CDATA[

Zeile 408Zeile 412
		if($message)
{
$login_page .= "<p id=\"message\" class=\"{$class}\"><span class=\"text\">{$message}</span></p>";

		if($message)
{
$login_page .= "<p id=\"message\" class=\"{$class}\"><span class=\"text\">{$message}</span></p>";

		}
// Make query string nice and pretty so that user can go to his/her preferred destination
$query_string = '';
if($_SERVER['QUERY_STRING'])
{
$query_string = '?'.preg_replace('#adminsid=(.{32})#i', '', $_SERVER['QUERY_STRING']);
$query_string = preg_replace('#my_post_key=(.{32})#i', '', $query_string);
$query_string = str_replace('action=logout', '', $query_string);
$query_string = preg_replace('#&+#', '&', $query_string);
$query_string = str_replace('?&', '?', $query_string);
$query_string = htmlspecialchars_uni($query_string);
}
switch($mybb->settings['username_method'])
{
case 0:
$lang_username = $lang->username;
break;
case 1:
$lang_username = $lang->username1;
break;

		}
// Make query string nice and pretty so that user can go to his/her preferred destination
$query_string = '';
if($_SERVER['QUERY_STRING'])
{
$query_string = '?'.preg_replace('#adminsid=(.{32})#i', '', $_SERVER['QUERY_STRING']);
$query_string = preg_replace('#my_post_key=(.{32})#i', '', $query_string);
$query_string = str_replace('action=logout', '', $query_string);
$query_string = preg_replace('#&+#', '&', $query_string);
$query_string = str_replace('?&', '?', $query_string);
$query_string = htmlspecialchars_uni($query_string);
}
switch($mybb->settings['username_method'])
{
case 0:
$lang_username = $lang->username;
break;
case 1:
$lang_username = $lang->username1;
break;

			case 2:
$lang_username = $lang->username2;
break;

			case 2:
$lang_username = $lang->username2;
break;

Zeile 518Zeile 522
<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
<script type="text/javascript" src="../jscripts/jquery.js"></script>

<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
<script type="text/javascript" src="../jscripts/jquery.js"></script>

<script type="text/javascript" src="../jscripts/general.js"></script>

<script type="text/javascript" src="../jscripts/general.js?ver=1806"></script>

<script type="text/javascript" src="./jscripts/admincp.js"></script>
<script type="text/javascript">
//<![CDATA[

<script type="text/javascript" src="./jscripts/admincp.js"></script>
<script type="text/javascript">
//<![CDATA[

Zeile 611Zeile 615
	/**
* Generate the lockout unlock page
*

	/**
* Generate the lockout unlock page
*

	 * @param string The any message to output on the page if there is one.
* @param string The class name of the message (defaults to success)

	 * @param string $message The any message to output on the page if there is one.
* @param string $class The class name of the message (defaults to success)

	 */
function show_lockout_unlock($message="", $class="success")
{

	 */
function show_lockout_unlock($message="", $class="success")
{

Zeile 654Zeile 658
	<div id="header">
<div id="logo">
<h1><a href="../" title="{$lang->return_to_forum}"><span class="invisible">{$lang->mybb_acp}</span></a></h1>

	<div id="header">
<div id="logo">
<h1><a href="../" title="{$lang->return_to_forum}"><span class="invisible">{$lang->mybb_acp}</span></a></h1>


</div>
</div>


</div>
</div>

	<div id="content">
<h2>{$lang->lockout_unlock}</h2>
{$message}

	<div id="content">
<h2>{$lang->lockout_unlock}</h2>
{$message}

Zeile 691Zeile 695
	/**
* Add an item to the primary navigation menu.
*

	/**
* Add an item to the primary navigation menu.
*

	 * @param string The title of the menu item.
* @param string The ID of the menu item. This should correspond with the module the menu will run.
* @param string The link to follow when the menu item is clicked.
* @param int The display order of the menu item. Lower display order means closer to start of the menu.
* @param array Array of sub menu items if there are any.

	 * @param string $title The title of the menu item.
* @param string $id The ID of the menu item. This should correspond with the module the menu will run.
* @param string $link The link to follow when the menu item is clicked.
* @param int $order The display order of the menu item. Lower display order means closer to start of the menu.
* @param array $submenu Array of sub menu items if there are any.

	 */
function add_menu_item($title, $id, $link, $order=10, $submenu=array())
{

	 */
function add_menu_item($title, $id, $link, $order=10, $submenu=array())
{

Zeile 709Zeile 713

/**
* Build the actual navigation menu.


/**
* Build the actual navigation menu.

 
	 *
* @return bool|string

	 */
function _build_menu()
{

	 */
function _build_menu()
{

Zeile 748Zeile 754
	/**
* Build a navigation sub menu if we have one.
*

	/**
* Build a navigation sub menu if we have one.
*

	 * @param string A title for the sub menu.
* @param array Array of items for the sub menu.

	 * @param string $title A title for the sub menu.
* @param array $items Array of items for the sub menu.

	 */
function _build_submenu($title, $items)
{

	 */
function _build_submenu($title, $items)
{

Zeile 763Zeile 769

/**
* Switch between two different alternating background colours.


/**
* Switch between two different alternating background colours.

 
	 *
* @return string

	 */
function get_alt_bg()
{
static $alt_bg;
if($alt_bg == "alt1")

	 */
function get_alt_bg()
{
static $alt_bg;
if($alt_bg == "alt1")

		{

		{

			$alt_bg = "alt2";
return "alt1";
}

			$alt_bg = "alt2";
return "alt1";
}

Zeile 776Zeile 784
		{
$alt_bg = "alt1";
return $alt_bg;

		{
$alt_bg = "alt1";
return $alt_bg;

		}

		}

	}

/**
* Output a Javascript based tab control on to the page.
*

	}

/**
* Output a Javascript based tab control on to the page.
*

	 * @param array Array of tabs in name => title format. Name should correspond to the name of a DIV containing the tab content.
* @param boolean Whether or not to run the event onload or instantly
* @param string The ID to use for the tabs for if you run multiple instances of the tabbing control in one html page

	 * @param array $tabs Array of tabs in name => title format. Name should correspond to the name of a DIV containing the tab content.
* @param boolean $observe_onload Whether or not to run the event onload or instantly
* @param string $id The ID to use for the tabs for if you run multiple instances of the tabbing control in one html page

	 */
function output_tab_control($tabs=array(), $observe_onload=true, $id="tabs")
{

	 */
function output_tab_control($tabs=array(), $observe_onload=true, $id="tabs")
{

Zeile 814Zeile 822
	/**
* Output a series of primary navigation tabs for swithcing between items within a particular module/action.
*

	/**
* Output a series of primary navigation tabs for swithcing between items within a particular module/action.
*

	 * @param array Nested array of tabs containing possible keys of align, link_target, link, title.
* @param string The name of the active tab. Corresponds with the key of each tab item.

	 * @param array $tabs Nested array of tabs containing possible keys of align, link_target, link, title.
* @param string $active The name of the active tab. Corresponds with the key of each tab item.

	 */
function output_nav_tabs($tabs=array(), $active='')
{

	 */
function output_nav_tabs($tabs=array(), $active='')
{

Zeile 859Zeile 867
	/**
* Output a page asking if a user wishes to continue performing a specific action.
*

	/**
* Output a page asking if a user wishes to continue performing a specific action.
*

	 * @param string The URL to be forwarded to.
* @param string The confirmation message to output.
* @param string The title to use in the output header

	 * @param string $url The URL to be forwarded to.
* @param string $message The confirmation message to output.
* @param string $title The title to use in the output header

	 */
function output_confirm_action($url, $message="", $title="")
{

	 */
function output_confirm_action($url, $message="", $title="")
{

Zeile 899Zeile 907
	/**
* Build a clickable MyCode editor for the Admin CP.
*

	/**
* Build a clickable MyCode editor for the Admin CP.
*

	 * @param string The ID of the textarea to bind the editor to.
* @param string The language string for the editor.


	 * @param string $bind The ID of the textarea to bind the editor to.
* @param string $editor_language The language string for the editor.
* @param bool $smilies Whether or not smilies should be included

	 * @return string The build MyCode editor Javascript.
*/
function build_codebuttons_editor($bind, $editor_language, $smilies)

	 * @return string The build MyCode editor Javascript.
*/
function build_codebuttons_editor($bind, $editor_language, $smilies)

Zeile 910Zeile 919
		// Smilies
$emoticon = "";
$emoticons_enabled = "false";

		// Smilies
$emoticon = "";
$emoticons_enabled = "false";

		if($smilies && $mybb->settings['smilieinserter'] != 0 && $mybb->settings['smilieinsertercols'] && $mybb->settings['smilieinsertertot'])

		if($smilies)

		{

		{

			$emoticon = ",emoticon";




			if($mybb->settings['smilieinserter'] && $mybb->settings['smilieinsertercols'] && $mybb->settings['smilieinsertertot'])
{
$emoticon = ",emoticon";
}

			$emoticons_enabled = "true";

			$emoticons_enabled = "true";

 
			

			if(!$smiliecount)
{
$smilie_cache = $cache->read("smilies");

			if(!$smiliecount)
{
$smilie_cache = $cache->read("smilies");

Zeile 925Zeile 938
				if(!is_array($smilie_cache))
{
$smilie_cache = $cache->read("smilies");

				if(!is_array($smilie_cache))
{
$smilie_cache = $cache->read("smilies");

				}

				}

				foreach($smilie_cache as $smilie)
{

				foreach($smilie_cache as $smilie)
{

					if($smilie['showclickable'] != 0)
{
$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);
$smiliecache[$smilie['find']] = $smilie['image'];
}

					$smilie['image'] = str_replace("{theme}", "images", $smilie['image']);
$smiliecache[$smilie['sid']] = $smilie;




				}
}

				}
}





			unset($smilie);

if(is_array($smiliecache))
{
reset($smiliecache);

			unset($smilie);

if(is_array($smiliecache))
{
reset($smiliecache);





				$dropdownsmilies = $moresmilies = $hiddensmilies = "";
$i = 0;


				$dropdownsmilies = $moresmilies = $hiddensmilies = "";
$i = 0;


				foreach($smiliecache as $find => $image)

				foreach($smiliecache as $smilie)

				{

				{

					$finds = explode("\n", $find);

					$finds = explode("\n", $smilie['find']);

					$finds_count = count($finds);

// Only show the first text to replace in the box
$find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[0]));

					$finds_count = count($finds);

// Only show the first text to replace in the box
$find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[0]));

					$image = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($image));

					$image = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($smilie['image']));

					if(substr($image, 0, 4) != "http")

					if(substr($image, 0, 4) != "http")

					{

					{

						$image = $mybb->settings['bburl']."/".$image;

						$image = $mybb->settings['bburl']."/".$image;

					}
if($i < $mybb->settings['smilieinsertertot'])
{






					}

if(!$mybb->settings['smilieinserter'] || !$mybb->settings['smilieinsertercols'] || !$mybb->settings['smilieinsertertot'] || !$smilie['showclickable'])
{
$hiddensmilies .= '"'.$find.'": "'.$image.'",';
}
elseif($i < $mybb->settings['smilieinsertertot'])
{

						$dropdownsmilies .= '"'.$find.'": "'.$image.'",';

						$dropdownsmilies .= '"'.$find.'": "'.$image.'",';

 
						++$i;

					}
else
{

					}
else
{

Zeile 971Zeile 987
						$find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[$j]));
$hiddensmilies .= '"'.$find.'": "'.$image.'",';
}

						$find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[$j]));
$hiddensmilies .= '"'.$find.'": "'.$image.'",';
}

					++$i;

 
				}
}
}

				}
}
}

Zeile 997Zeile 1012
		if($mybb->settings['allowsizemycode'] == 1)
{
$size = "size,";

		if($mybb->settings['allowsizemycode'] == 1)
{
$size = "size,";

		}

		}


if($mybb->settings['allowcolormycode'] == 1)
{
$color = "color,";


if($mybb->settings['allowcolormycode'] == 1)
{
$color = "color,";

		}

		}


if($mybb->settings['allowfontmycode'] == 1 || $mybb->settings['allowsizemycode'] == 1 || $mybb->settings['allowcolormycode'] == 1)
{


if($mybb->settings['allowfontmycode'] == 1 || $mybb->settings['allowsizemycode'] == 1 || $mybb->settings['allowcolormycode'] == 1)
{

Zeile 1010Zeile 1025
		}

if($mybb->settings['allowemailmycode'] == 1)

		}

if($mybb->settings['allowemailmycode'] == 1)

		{

		{

			$email = "email,";

			$email = "email,";

		}


		}


		if($mybb->settings['allowlinkmycode'] == 1)

		if($mybb->settings['allowlinkmycode'] == 1)

		{

		{

			$link = "link,unlink";
}

if($mybb->settings['allowlistmycode'] == 1)
{
$list = "bulletlist,orderedlist|";

			$link = "link,unlink";
}

if($mybb->settings['allowlistmycode'] == 1)
{
$list = "bulletlist,orderedlist|";

		}

		}


if($mybb->settings['allowcodemycode'] == 1)
{


if($mybb->settings['allowcodemycode'] == 1)
{

Zeile 1044Zeile 1059
	rtl: {$lang->settings['rtl']},
locale: "mybblang",
enablePasteFiltering: true,

	rtl: {$lang->settings['rtl']},
locale: "mybblang",
enablePasteFiltering: true,

 
	autoUpdate: true,

	emoticonsEnabled: {$emoticons_enabled},
emoticons: {
// Emoticons to be included in the dropdown

	emoticonsEnabled: {$emoticons_enabled},
emoticons: {
// Emoticons to be included in the dropdown

Zeile 1080Zeile 1096
class DefaultSidebarItem
{
/**

class DefaultSidebarItem
{
/**

	 * @var The title of the side bar block.

	 * @var string The title of the side bar block.

	 */
private $_title;


	 */
private $_title;


Zeile 1092Zeile 1108
	/**
* Constructor. Set the title of the side bar block.
*

	/**
* Constructor. Set the title of the side bar block.
*

	 * @param string The title of the side bar block.

	 * @param string $title The title of the side bar block.

	 */
function __construct($title="")
{

	 */
function __construct($title="")
{

Zeile 1102Zeile 1118
	/**
* Add menus item to the side bar block.
*

	/**
* Add menus item to the side bar block.
*

	 * @param array Array of menu items to add. Each menu item should be a nested array of id, link and title.
* @param string The ID of the active menu item if there is one.

	 * @param array $items Array of menu items to add. Each menu item should be a nested array of id, link and title.
* @param string $active The ID of the active menu item if there is one.

	 */
function add_menu_items($items, $active)
{

	 */
function add_menu_items($items, $active)
{

Zeile 1131Zeile 1147
	/**
* Sets custom html to the contents variable
*

	/**
* Sets custom html to the contents variable
*

	 * @param string The custom html to set

	 * @param string $html The custom html to set

	 */
function set_contents($html)
{

	 */
function set_contents($html)
{

Zeile 1140Zeile 1156

/**
* Fetch the HTML markup for the side bar box.


/**
* Fetch the HTML markup for the side bar box.

 
	 *
* @return string

	 */
function get_markup()
{

	 */
function get_markup()
{

Zeile 1177Zeile 1195
	/**
* Initialise a new popup menu.
*

	/**
* Initialise a new popup menu.
*

	 * @var string The ID of the popup menu.
* @var string The title of the popup menu.

	 * @var string $id The ID of the popup menu.
* @var string $title The title of the popup menu.

	 */
function __construct($id, $title='')
{

	 */
function __construct($id, $title='')
{

Zeile 1189Zeile 1207
	/**
* Add an item to the popup menu.
*

	/**
* Add an item to the popup menu.
*

	 * @param string The title of this item.
* @param string The page this item should link to.
* @param string The onclick event handler if we have one.

	 * @param string $text The title of this item.
* @param string $link The page this item should link to.
* @param string $onclick The onclick event handler if we have one.

	 */
function add_item($text, $link, $onclick='')
{

	 */
function add_item($text, $link, $onclick='')
{