Vergleich admin/inc/class_page.php - 1.8.12 - 1.8.37

  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.

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?ver=1810\"></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";


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

Zeile 226Zeile 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=\"https://mybb.com/\" target=\"_blank\">MyBB</a>, &copy; 2002-".COPY_YEAR." <a href=\"https://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 277Zeile 282
			else
{
$trail .= "<span class=\"active\">".$crumb['name']."</span>";

			else
{
$trail .= "<span class=\"active\">".$crumb['name']."</span>";

			}
}

			}
}

		return $trail;
}


		return $trail;
}


Zeile 290Zeile 295
	function output_success($message)
{
echo "<div class=\"success\">{$message}</div>\n";

	function output_success($message)
{
echo "<div class=\"success\">{$message}</div>\n";

	}


	}


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

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

Zeile 315Zeile 320
	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.
*
* @param string $error The message to output.

	 * Output a single error message.
*
* @param string $error The message to output.

Zeile 378Zeile 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

		}

$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">
<title>{$lang->mybb_admin_login}</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" />

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head profile="http://gmpg.org/xfn/1">
<title>{$lang->mybb_admin_login}</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" />

<script type="text/javascript" src="../jscripts/jquery.js"></script>
<script type="text/javascript" src="../jscripts/general.js?ver=1807"></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 425Zeile 430
			$query_string = preg_replace('#&+#', '&', $query_string);
$query_string = str_replace('?&', '?', $query_string);
$query_string = htmlspecialchars_uni($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'])

		}
switch($mybb->settings['username_method'])

		{
case 0:

		{
case 0:

				$lang_username = $lang->username;
break;

				$lang_username = $lang->username;
break;

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

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

				break;

				break;

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

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

				break;

				break;

		}

// Secret PIN

		}

// Secret PIN

Zeile 452Zeile 457
		else
{
$secret_pin = '';

		else
{
$secret_pin = '';

		}

		}


$login_lang_string = $lang->enter_username_and_password;



$login_lang_string = $lang->enter_username_and_password;


Zeile 470Zeile 475
				break;
}


				break;
}


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

       	$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="field"><input type="text" name="username" id="username" class="text_input initial_focus" /></div>

		<div class="form_container">

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

<div class="field"><input type="text" name="username" id="username" class="text_input initial_focus" /></div>





			<div class="label"{$login_label_width}><label for="password">{$lang->password}</label></div>
<div class="field"><input type="password" name="password" id="password" class="text_input" /></div>
{$secret_pin}

			<div class="label"{$login_label_width}><label for="password">{$lang->password}</label></div>
<div class="field"><input type="password" name="password" id="password" class="text_input" /></div>
{$secret_pin}

Zeile 492Zeile 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>

		</p>

		</form>
</div>
</div>
</body>
</html>
EOF;

		</form>
</div>
</div>
</body>
</html>
EOF;





		$args = array(
'this' => &$this,
'login_page' => &$login_page

		$args = array(
'this' => &$this,
'login_page' => &$login_page

		);


		);


		$plugins->run_hooks('admin_page_show_login_end', $args);

echo $login_page;

		$plugins->run_hooks('admin_page_show_login_end', $args);

echo $login_page;

Zeile 514Zeile 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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

		$mybb2fa_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">

Zeile 523Zeile 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?ver=1807"></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 541Zeile 548
	</div>
<div id="content">
<h2>{$lang->my2fa}</h2>

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

EOF;

EOF;

		// Make query string nice and pretty so that user can go to his/her preferred destination
$query_string = '';
if($_SERVER['QUERY_STRING'])

		// Make query string nice and pretty so that user can go to his/her preferred destination
$query_string = '';
if($_SERVER['QUERY_STRING'])

Zeile 591Zeile 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">

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

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

</div>

	</div>

	</div>

	<div id="content">
<h2>{$lang->error_mybb_admin_lockedout}</h2>
<div class="alert">{$lockedout_message}</div>

	<div id="content">
<h2>{$lang->error_mybb_admin_lockedout}</h2>
<div class="alert">{$lockedout_message}</div>

Zeile 625Zeile 632
		global $lang, $mybb, $cp_style;

$copy_year = COPY_YEAR;

		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 746Zeile 762
		}
$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 804Zeile 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 $tabs Nested array of tabs containing possible keys of align, link_target, link, title.

	 * @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.

	 * @param string $active The name of the active tab. Corresponds with the key of each tab item.

	 */

	 */

	function output_nav_tabs($tabs=array(), $active='')
{
global $plugins;

	function output_nav_tabs($tabs=array(), $active='')
{
global $plugins;

Zeile 819Zeile 835
			if($id == $active)
{
$class = ' active';

			if($id == $active)
{
$class = ' active';

			}

			}

			if(isset($tab['align']) == "right")

			if(isset($tab['align']) == "right")

			{

			{

				$class .= " right";

				$class .= " right";

			}

			}

			$target = '';
if(isset($tab['link_target']))

			$target = '';
if(isset($tab['link_target']))

			{

			{

				$target = " target=\"{$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 872Zeile 893
		}
$this->output_header($title);
$form = new Form($url, 'post');

		}
$this->output_header($title);
$form = new Form($url, 'post');





		echo "<div class=\"confirm_action\">\n";
echo "<p>{$message}</p>\n";
echo "<br />\n";

		echo "<div class=\"confirm_action\">\n";
echo "<p>{$message}</p>\n";
echo "<br />\n";

Zeile 885Zeile 906
		$form->end();
$this->output_footer();
}

		$form->end();
$this->output_footer();
}





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

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

Zeile 896Zeile 917
	 */
function build_codebuttons_editor($bind, $editor_language, $smilies)
{

	 */
function build_codebuttons_editor($bind, $editor_language, $smilies)
{

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

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


// Smilies
$emoticon = "";


// Smilies
$emoticon = "";

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

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

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

				$smiliecount = count($smilie_cache);
}


				$smiliecount = count($smilie_cache);
}


Zeile 1036Zeile 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,