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

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 63Zeile 63
	 * @var string Show a post verify error
*/
public $show_post_verify_error = '';

	 * @var string Show a post verify error
*/
public $show_post_verify_error = '';

 

/**
* @var string
*/
public $_menu;


/**
* 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 97Zeile 102
		echo "	<title>".$title."</title>\n";
echo " <meta name=\"author\" content=\"MyBB Group\" />\n";
echo " <meta name=\"copyright\" content=\"Copyright ".COPY_YEAR." MyBB Group.\" />\n";

		echo "	<title>".$title."</title>\n";
echo " <meta name=\"author\" content=\"MyBB Group\" />\n";
echo " <meta name=\"copyright\" content=\"Copyright ".COPY_YEAR." MyBB Group.\" />\n";

		echo "	<link rel=\"stylesheet\" href=\"styles/".$this->style."/main.css?ver=1804\" type=\"text/css\" />\n";
echo " <link rel=\"stylesheet\" href=\"styles/".$this->style."/modal.css\" type=\"text/css\" />\n";

		echo "	<link rel=\"stylesheet\" href=\"styles/".$this->style."/main.css?ver=1813\" type=\"text/css\" />\n";
echo " <link rel=\"stylesheet\" href=\"styles/".$this->style."/modal.css?ver=1813\" type=\"text/css\" />\n";


// Load stylesheet for this module if it has one
if(file_exists(MYBB_ADMIN_DIR."styles/{$this->style}/{$this->active_module}.css"))


// Load stylesheet for this module if it has one
if(file_exists(MYBB_ADMIN_DIR."styles/{$this->style}/{$this->active_module}.css"))

Zeile 106Zeile 111
			echo "	<link rel=\"stylesheet\" href=\"styles/{$this->style}/{$this->active_module}.css\" type=\"text/css\" />\n";
}


			echo "	<link rel=\"stylesheet\" href=\"styles/{$this->style}/{$this->active_module}.css\" type=\"text/css\" />\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/admincp.js\"></script>\n";

		echo "	<script type=\"text/javascript\" src=\"../jscripts/jquery.js?ver=1823\"></script>\n";
echo " <script type=\"text/javascript\" src=\"../jscripts/jquery.plugins.min.js?ver=1821\"></script>\n";
echo " <script type=\"text/javascript\" src=\"../jscripts/general.js?ver=1821\"></script>\n";
echo " <script type=\"text/javascript\" src=\"./jscripts/admincp.js?ver=1821\"></script>\n";

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

echo " <link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.min.css\" />\n";
echo " <link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.structure.min.css\" />\n";
echo " <link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.theme.min.css\" />\n";

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

echo " <link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.min.css\" />\n";
echo " <link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.structure.min.css\" />\n";
echo " <link rel=\"stylesheet\" href=\"jscripts/jqueryui/css/redmond/jquery-ui.theme.min.css\" />\n";

		echo "	<script src=\"jscripts/jqueryui/js/jquery-ui.min.js?ver=1804\"></script>\n";


		echo "	<script src=\"jscripts/jqueryui/js/jquery-ui.min.js?ver=1813\"></script>\n";


		// Stop JS elements showing while page is loading (JS supported browsers only)
echo " <style type=\"text/css\">.popup_button { display: none; } </style>\n";
echo " <script type=\"text/javascript\">\n".

		// Stop JS elements showing while page is loading (JS supported browsers only)
echo " <style type=\"text/css\">.popup_button { display: none; } </style>\n";
echo " <script type=\"text/javascript\">\n".

Zeile 131Zeile 136
var cookieDomain = '{$mybb->settings['cookiedomain']}';
var cookiePath = '{$mybb->settings['cookiepath']}';
var cookiePrefix = '{$mybb->settings['cookieprefix']}';

var cookieDomain = '{$mybb->settings['cookiedomain']}';
var cookiePath = '{$mybb->settings['cookiepath']}';
var cookiePrefix = '{$mybb->settings['cookieprefix']}';

 
var cookieSecureFlag = '{$mybb->settings['cookiesecureflag']}';

var imagepath = '../images';

lang.unknown_error = \"{$lang->unknown_error}\";

var imagepath = '../images';

lang.unknown_error = \"{$lang->unknown_error}\";

Zeile 142Zeile 148
		echo "<body>\n";
echo "<div id=\"container\">\n";
echo " <div id=\"logo\"><h1><span class=\"invisible\">{$lang->mybb_admin_cp}</span></h1></div>\n";

		echo "<body>\n";
echo "<div id=\"container\">\n";
echo " <div id=\"logo\"><h1><span class=\"invisible\">{$lang->mybb_admin_cp}</span></h1></div>\n";

		echo "	<div id=\"welcome\"><span class=\"logged_in_as\">{$lang->logged_in_as} <a href=\"index.php?module=user-users&amp;action=edit&amp;uid={$mybb->user['uid']}\" class=\"username\">{$mybb->user['username']}</a></span> | <a href=\"{$mybb->settings['bburl']}\" target=\"_blank\" class=\"forum\">{$lang->view_board}</a> | <a href=\"index.php?action=logout&amp;my_post_key={$mybb->post_code}\" class=\"logout\">{$lang->logout}</a></div>\n";


		$username = htmlspecialchars_uni($mybb->user['username']);
echo " <div id=\"welcome\"><span class=\"logged_in_as\">{$lang->logged_in_as} <a href=\"index.php?module=user-users&amp;action=edit&amp;uid={$mybb->user['uid']}\" class=\"username\">{$username}</a></span> | <a href=\"{$mybb->settings['bburl']}\" target=\"_blank\" class=\"forum\">{$lang->view_board}</a> | <a href=\"index.php?action=logout&amp;my_post_key={$mybb->post_code}\" class=\"logout\">{$lang->logout}</a></div>\n";

		echo $this->_build_menu();
echo " <div id=\"page\">\n";
echo " <div id=\"left_menu\">\n";

		echo $this->_build_menu();
echo " <div id=\"page\">\n";
echo " <div id=\"left_menu\">\n";

Zeile 191Zeile 198

/**
* Output the page footer.


/**
* Output the page footer.

 
	 *
* @param bool $quit

	 */
function output_footer($quit=true)
{

	 */
function output_footer($quit=true)
{

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

		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";

		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=\"https://mybb.com/\" target=\"_blank\" rel=\"noopener\">MyBB</a>, &copy; 2002-".COPY_YEAR." <a href=\"https://mybb.com/\" target=\"_blank\" rel=\"noopener\">MyBB Group</a>.</p></div>\n";

		if($mybb->debug_mode)
{
echo $db->explain;

		if($mybb->debug_mode)
{
echo $db->explain;

Zeile 240Zeile 249
	/**
* 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 259

/**
* Generate a breadcrumb trail.


/**
* Generate a breadcrumb trail.

 
	 *
* @return bool|string

	 */
function _generate_breadcrumb()
{

	 */
function _generate_breadcrumb()
{

Zeile 259Zeile 270
		}
$trail = "";
foreach($this->_breadcrumb_trail as $key => $crumb)

		}
$trail = "";
foreach($this->_breadcrumb_trail as $key => $crumb)

		{

		{

			if(isset($this->_breadcrumb_trail[$key+1]))
{
$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";

			if(isset($this->_breadcrumb_trail[$key+1]))
{
$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";

Zeile 278Zeile 289

/**
* 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 288Zeile 299

/**
* 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 299Zeile 310
			$id = " id=\"{$id}\"";
}
echo "<div class=\"alert\"{$id}>{$message}</div>\n";

			$id = " id=\"{$id}\"";
}
echo "<div class=\"alert\"{$id}>{$message}</div>\n";

	}


	}


	/**
* 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)
{

	 */
function output_error($error)
{

Zeile 326Zeile 337
	/**
* 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)
{
global $lang;

	 */
function output_inline_error($errors)
{
global $lang;





		if(!is_array($errors))

		if(!is_array($errors))

		{

		{

			$errors = array($errors);

			$errors = array($errors);

		}

		}

		echo "<div class=\"error\">\n";
echo "<p><em>{$lang->encountered_errors}</em></p>\n";
echo "<ul>\n";

		echo "<div class=\"error\">\n";
echo "<p><em>{$lang->encountered_errors}</em></p>\n";
echo "<ul>\n";

Zeile 346Zeile 357
		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 372Zeile 383

// If the language string for "Username" is too cramped then use this to define how much larger you want the gap to be (in px)
if(isset($lang->login_field_width))


// If the language string for "Username" is too cramped then use this to define how much larger you want the gap to be (in px)
if(isset($lang->login_field_width))

        {
$login_label_width = " style=\"width: ".((int)$lang->login_field_width+100)."px;\"";

		{
$login_label_width = " style=\"width: ".((int)$lang->login_field_width+100)."px;\"";

			$login_container_width = " style=\"width: ".(410+((int)$lang->login_field_width))."px;\"";

			$login_container_width = " style=\"width: ".(410+((int)$lang->login_field_width))."px;\"";

        }

		}





		$login_page .= <<<EOF

		$login_page = <<<EOF

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head profile="http://gmpg.org/xfn/1">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head profile="http://gmpg.org/xfn/1">

Zeile 385Zeile 396
<meta name="author" content="MyBB Group" />
<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />

<meta name="author" content="MyBB Group" />
<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/admincp.js"></script>

<script type="text/javascript" src="../jscripts/jquery.js?ver=1823"></script>
<script type="text/javascript" src="../jscripts/general.js?ver=1821"></script>
<script type="text/javascript" src="./jscripts/admincp.js?ver=1821"></script>

<script type="text/javascript">
//<![CDATA[
loading_text = '{$lang->loading_text}';

<script type="text/javascript">
//<![CDATA[
loading_text = '{$lang->loading_text}';

Zeile 459Zeile 470
				$login_lang_string = $lang->sprintf($login_lang_string, $lang->login_email);
break;
case 2: // Username and email

				$login_lang_string = $lang->sprintf($login_lang_string, $lang->login_email);
break;
case 2: // Username and email

			default:
$login_lang_string = $lang->sprintf($login_lang_string, $lang->login_username_and_password);
break;
}

$_SERVER['PHP_SELF'] = htmlspecialchars_uni($_SERVER['PHP_SELF']);


			default:
$login_lang_string = $lang->sprintf($login_lang_string, $lang->login_username_and_password);
break;
}

$this_file = htmlspecialchars_uni($_SERVER['SCRIPT_NAME']);


		$login_page .= <<<EOF
<p>{$login_lang_string}</p>

		$login_page .= <<<EOF
<p>{$login_lang_string}</p>

		<form method="post" action="{$_SERVER['PHP_SELF']}{$query_string}">

		<form method="post" action="{$this_file}{$query_string}">

		<div class="form_container">

<div class="label"{$login_label_width}><label for="username">{$lang_username}</label></div>

		<div class="form_container">

<div class="label"{$login_label_width}><label for="username">{$lang_username}</label></div>

Zeile 486Zeile 497

<input type="submit" value="{$lang->login}" />
<input type="hidden" name="do" value="login" />


<input type="submit" value="{$lang->login}" />
<input type="hidden" name="do" value="login" />

		</p>
</form>
</div>
</div>
</body>
</html>

		</p>
</form>
</div>
</div>
</body>
</html>

EOF;

$args = array(

EOF;

$args = array(

Zeile 508Zeile 519
	function show_2fa()
{
global $lang, $cp_style, $mybb;

	function show_2fa()
{
global $lang, $cp_style, $mybb;

 

$copy_year = COPY_YEAR;


$mybb2fa_page = <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


$mybb2fa_page = <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Zeile 517Zeile 530
<meta name="author" content="MyBB Group" />
<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />

<meta name="author" content="MyBB Group" />
<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/admincp.js"></script>

<script type="text/javascript" src="../jscripts/jquery.js?ver=1823"></script>
<script type="text/javascript" src="../jscripts/general.js?ver=1821"></script>
<script type="text/javascript" src="./jscripts/admincp.js?ver=1821"></script>

<script type="text/javascript">
//<![CDATA[
loading_text = '{$lang->loading_text}';

<script type="text/javascript">
//<![CDATA[
loading_text = '{$lang->loading_text}';

Zeile 585Zeile 598
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head profile="http://gmpg.org/xfn/1">
<title>{$lang->mybb_admin_cp} - {$lang->error_mybb_admin_lockedout}</title>

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head profile="http://gmpg.org/xfn/1">
<title>{$lang->mybb_admin_cp} - {$lang->error_mybb_admin_lockedout}</title>

<meta name="author" content="MyBB Group" />
<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">
<div id="logo">
<h1><a href="../" title="{$lang->return_to_forum}"><span class="invisible">{$lang->mybb_acp}</span></a></h1>

<meta name="author" content="MyBB Group" />
<meta name="copyright" content="Copyright {$copy_year} MyBB Group." />
<link rel="stylesheet" href="./styles/{$cp_style}/login.css" type="text/css" />
</head>
<body>
<div id="container">
<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>

Zeile 611Zeile 624
	/**
* 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")
{
global $lang, $mybb, $cp_style;

$copy_year = COPY_YEAR;

	 */
function show_lockout_unlock($message="", $class="success")
{
global $lang, $mybb, $cp_style;

$copy_year = COPY_YEAR;

 

$login_label_width = "";

// If the language string for "Username" is too cramped then use this to define how much larger you want the gap to be (in px)
if(isset($lang->login_field_width))
{
$login_label_width = " style=\"width: ".((int)$lang->login_field_width+100)."px;\"";
}


		switch($mybb->settings['username_method'])
{
case 0:

		switch($mybb->settings['username_method'])
{
case 0:

Zeile 626Zeile 648
				break;
case 1:
$lang_username = $lang->username1;

				break;
case 1:
$lang_username = $lang->username1;

				break;

				break;

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

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

Zeile 686Zeile 708
</html>
EOF;
exit;

</html>
EOF;
exit;

	}

/**

	}

/**

	 * 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 731

/**
* Build the actual navigation menu.


/**
* Build the actual navigation menu.

 
	 *
* @return bool|string

	 */
function _build_menu()
{

	 */
function _build_menu()
{

Zeile 724Zeile 748
			{
$menu_item['link'] = htmlspecialchars_uni($menu_item['link']);
if($menu_item['id'] == $this->active_module)

			{
$menu_item['link'] = htmlspecialchars_uni($menu_item['link']);
if($menu_item['id'] == $this->active_module)

				{

				{

					$sub_menu = $menu_item['submenu'];
$sub_menu_title = $menu_item['title'];
$build_menu .= "<li><a href=\"{$menu_item['link']}\" class=\"active\">{$menu_item['title']}</a></li>\n";


					$sub_menu = $menu_item['submenu'];
$sub_menu_title = $menu_item['title'];
$build_menu .= "<li><a href=\"{$menu_item['link']}\" class=\"active\">{$menu_item['title']}</a></li>\n";


				}

				}

				else
{
$build_menu .= "<li><a href=\"{$menu_item['link']}\">{$menu_item['title']}</a></li>\n";
}

				else
{
$build_menu .= "<li><a href=\"{$menu_item['link']}\">{$menu_item['title']}</a></li>\n";
}

			}
}

			}
}

		$build_menu .= "</ul>\n</div>";

		$build_menu .= "</ul>\n</div>";


if($sub_menu)


if(!empty($sub_menu))

		{
$this->_build_submenu($sub_menu_title, $sub_menu);
}

		{
$this->_build_submenu($sub_menu_title, $sub_menu);
}

Zeile 747Zeile 771

/**
* 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 758Zeile 782
			$sidebar = new sideBarItem($title);
$sidebar->add_menu_items($items, $this->active_action);
$this->submenu .= $sidebar->get_markup();

			$sidebar = new sideBarItem($title);
$sidebar->add_menu_items($items, $this->active_action);
$this->submenu .= $sidebar->get_markup();

		}
}

/**
* Switch between two different alternating background colours.
*/
function get_alt_bg()
{
static $alt_bg;
if($alt_bg == "alt1")
{
$alt_bg = "alt2";
return "alt1";
}
else
{
$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 820
	/**
* 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_rel, 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 838Zeile 844
			if(isset($tab['link_target']))
{
$target = " target=\"{$tab['link_target']}\"";

			if(isset($tab['link_target']))
{
$target = " target=\"{$tab['link_target']}\"";

 
			}
$rel = '';
if(isset($tab['link_rel']))
{
$rel = " rel=\"{$tab['link_rel']}\"";

			}
if(!isset($tab['link']))
{
$tab['link'] = '';
}

			}
if(!isset($tab['link']))
{
$tab['link'] = '';
}

			echo "\t\t<li class=\"{$class}\"><a href=\"{$tab['link']}\"{$target}>{$tab['title']}</a></li>\n";

			echo "\t\t<li class=\"{$class}\"><a href=\"{$tab['link']}\"{$target}{$rel}>{$tab['title']}</a></li>\n";

			$target = '';
}
echo "\t</ul>\n";

			$target = '';
}
echo "\t</ul>\n";

		if($tabs[$active]['description'])

		if(!empty($tabs[$active]['description']))

		{
echo "\t<div class=\"tab_description\">{$tabs[$active]['description']}</div>\n";
}

		{
echo "\t<div class=\"tab_description\">{$tabs[$active]['description']}</div>\n";
}

Zeile 859Zeile 870
	/**
* 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 910
	/**
* 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)
{

		global $lang, $mybb, $smiliecache, $cache;

		global $lang, $mybb, $smiliecache, $smiliecount, $cache;


// 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)

			if(!$smiliecount)

			{

			{

				$smilie_cache = $cache->read("smilies");

				$smilie_cache = $cache->read("smilies");

 
				if(!is_array($smilie_cache))
{
$smilie_cache = array();
}

				$smiliecount = count($smilie_cache);
}

if(!$smiliecache)
{
if(!is_array($smilie_cache))

				$smiliecount = count($smilie_cache);
}

if(!$smiliecache)
{
if(!is_array($smilie_cache))

				{

				{

					$smilie_cache = $cache->read("smilies");

					$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'];
}
}
}

unset($smilie);


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

unset($smilie);





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

			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);

					$finds_count = count($finds);

					



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

					// 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")
{
$image = $mybb->settings['bburl']."/".$image;
}

					if(substr($image, 0, 4) != "http")
{
$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
{
$moresmilies .= '"'.$find.'": "'.$image.'",';

					}
else
{
$moresmilies .= '"'.$find.'": "'.$image.'",';

					}


					}


					for($j = 1; $j < $finds_count; ++$j)
{
$find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[$j]));
$hiddensmilies .= '"'.$find.'": "'.$image.'",';
}

					for($j = 1; $j < $finds_count; ++$j)
{
$find = str_replace(array('\\', '"'), array('\\\\', '\"'), htmlspecialchars_uni($finds[$j]));
$hiddensmilies .= '"'.$find.'": "'.$image.'",';
}

					++$i;

 
				}
}

				}
}

		}

$basic1 = $basic2 = $align = $font = $size = $color = $removeformat = $email = $link = $list = $code = $sourcemode = "";

		}

$basic1 = $basic2 = $align = $font = $size = $color = $removeformat = $email = $link = $list = $code = $sourcemode = "";


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


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

		{

		{

			$basic1 = "bold,italic,underline,strike|";
$basic2 = "horizontalrule,";
}

			$basic1 = "bold,italic,underline,strike|";
$basic2 = "horizontalrule,";
}

Zeile 987Zeile 1009
		if($mybb->settings['allowalignmycode'] == 1)
{
$align = "left,center,right,justify|";

		if($mybb->settings['allowalignmycode'] == 1)
{
$align = "left,center,right,justify|";

		}


		}


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

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

		{

		{

			$font = "font,";

			$font = "font,";

		}


		}


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

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

		}


		}


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

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

		{

		{

			$color = "color,";
}

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

			$color = "color,";
}

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

		}


		}


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

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

Zeile 1039Zeile 1061
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {

<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {

	plugins: "bbcode,undo",
style: "../jscripts/sceditor/textarea_styles/jquery.sceditor.mybb.css",



	plugins: "undo",
format: "bbcode",
bbcodeTrim: true,
style: "../jscripts/sceditor/styles/jquery.sceditor.mybb.css",

	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 1057Zeile 1082
		// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
hidden: {
{$hiddensmilies}

		// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
hidden: {
{$hiddensmilies}

		}

		}

	},
emoticonsCompat: true,
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",

	},
emoticonsCompat: true,
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",

Zeile 1080Zeile 1105
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 1088Zeile 1113
	 * @var string The contents of the side bar block.
*/
private $_contents;

	 * @var string The contents of the side bar block.
*/
private $_contents;


/**


/**

	 * 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 1127
	/**
* 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 1156
	/**
* 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 1165

/**
* 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 1204
	/**
* 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 1216
	/**
* 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='')
{