Vergleich admin/inc/class_page.php - 1.6.7 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: class_page.php 5757 2012-03-09 15:11:56Z Tomm $

 * $Id$

 */

/*

 */

/*

Zeile 54Zeile 54
	 * @var string Any additional information to add between the <head> tags.
*/
public $extra_header = "";

	 * @var string Any additional information to add between the <head> tags.
*/
public $extra_header = "";

 

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


/**
* Output the page header.


/**
* Output the page header.

Zeile 65Zeile 70
		global $mybb, $admin_session, $lang, $plugins;

$plugins->run_hooks("admin_page_output_header");

		global $mybb, $admin_session, $lang, $plugins;

$plugins->run_hooks("admin_page_output_header");

		

		

		if(!$title)

		if(!$title)

		{

		{

			$title = $lang->mybb_admin_panel;
}


			$title = $lang->mybb_admin_panel;
}


Zeile 75Zeile 80
		if($lang->settings['rtl'] == 1)
{
$rtl = " dir=\"rtl\"";

		if($lang->settings['rtl'] == 1)
{
$rtl = " dir=\"rtl\"";

		}

		}

		
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"{$rtl}>\n";

		
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"{$rtl}>\n";

Zeile 84Zeile 89
		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\" type=\"text/css\" />\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\" 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 132Zeile 137
		echo "			</div>\n";
echo " <div id=\"inner\">\n";
if(isset($admin_session['data']['flash_message']) && $admin_session['data']['flash_message'])

		echo "			</div>\n";
echo " <div id=\"inner\">\n";
if(isset($admin_session['data']['flash_message']) && $admin_session['data']['flash_message'])

		{

		{

			$message = $admin_session['data']['flash_message']['message'];
$type = $admin_session['data']['flash_message']['type'];
echo "<div id=\"flash_message\" class=\"{$type}\">\n";

			$message = $admin_session['data']['flash_message']['message'];
$type = $admin_session['data']['flash_message']['type'];
echo "<div id=\"flash_message\" class=\"{$type}\">\n";

Zeile 143Zeile 148
		if($this->show_post_verify_error == true)
{
$this->output_error($lang->invalid_post_verify_key);

		if($this->show_post_verify_error == true)
{
$this->output_error($lang->invalid_post_verify_key);

		}

		}

	}

/**

	}

/**

Zeile 152Zeile 157
	function output_footer($quit=true)
{
global $mybb, $maintimer, $db, $lang, $plugins;

	function output_footer($quit=true)
{
global $mybb, $maintimer, $db, $lang, $plugins;

		

		

		$plugins->run_hooks("admin_page_output_footer");

		$plugins->run_hooks("admin_page_output_footer");

		
$memory_usage = $lang->na;
if(function_exists("memory_get_usage"))
{
$memory_usage = get_friendly_size(memory_get_peak_usage(true));
}


$memory_usage = get_friendly_size(get_memory_usage());





		
$totaltime = $maintimer->stop();
$querycount = $db->query_count;

		
$totaltime = $maintimer->stop();
$querycount = $db->query_count;

Zeile 206Zeile 207
		$trail = "";
foreach($this->_breadcrumb_trail as $key => $crumb)
{

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

			if($this->_breadcrumb_trail[$key+1])

			if(isset($this->_breadcrumb_trail[$key+1]))

			{
$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";

			{
$trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";

				if($this->_breadcrumb_trail[$key+2])

				if(isset($this->_breadcrumb_trail[$key+2]))

				{
$trail .= " &raquo; ";
}

				{
$trail .= " &raquo; ";
}

Zeile 291Zeile 292
		}
echo "</ul>\n";
echo "</div>\n";

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

	}

	}



/**



/**

Zeile 310Zeile 311
		$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)

		$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($lang->login_field_width)

		if(isset($lang->login_field_width))

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

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

Zeile 358Zeile 359
			$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'])
{
case 0:
$lang_username = $lang->username;
break;
case 1:
$lang_username = $lang->username1;
break;
case 2:
$lang_username = $lang->username2;
break;

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

			default:
$lang_username = $lang->username;
break;

			default:
$lang_username = $lang->username;
break;

Zeile 398Zeile 399
			<input type="hidden" name="do" value="login" />
</p>
</form>

			<input type="hidden" name="do" value="login" />
</p>
</form>

	</div>

	</div>

</div>
</body>
</html>

</div>
</body>
</html>

Zeile 437Zeile 438
	</div>
<div id="content">
<h2>{$lang->error_mybb_admin_lockedout}</h2>

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

		<div class="alert">{$lockedout_message}</div>
</div>
</div>
</body>
</html>
EOF;
exit;
}

/**

		<div class="alert">{$lockedout_message}</div>
</div>
</div>
</body>
</html>
EOF;
exit;
}

/**

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

	 */

	 */

	function show_lockout_unlock()

	function show_lockout_unlock($message="", $class="success")

	{
global $lang, $mybb, $cp_style;

	{
global $lang, $mybb, $cp_style;





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

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

				$lang_username = $lang->username;

				$lang_username = $lang->username;

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

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

Zeile 469Zeile 472
			default:
$lang_username = $lang->username;
break;

			default:
$lang_username = $lang->username;
break;

 
		}

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

		}

print <<<EOF

		}

print <<<EOF

Zeile 490Zeile 498
	</div>
<div id="content">
<h2>{$lang->lockout_unlock}</h2>

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

 
		{$message}

		<p>{$lang->enter_username_and_token}</p>
<form method="post" action="index.php">
<div class="form_container">

		<p>{$lang->enter_username_and_token}</p>
<form method="post" action="index.php">
<div class="form_container">

Zeile 552Zeile 561
		{
foreach($items as $menu_item)
{

		{
foreach($items as $menu_item)
{

				$menu_item['link'] = htmlspecialchars($menu_item['link']);

				$menu_item['link'] = htmlspecialchars_uni($menu_item['link']);

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

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

Zeile 602Zeile 611
		{
$alt_bg = "alt2";
return "alt1";

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

		}

		}

		else
{
$alt_bg = "alt1";

		else
{
$alt_bg = "alt1";

Zeile 612Zeile 621

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

Zeile 622Zeile 631
		global $plugins;
$tabs = $plugins->run_hooks("admin_page_output_tab_control_start", $tabs);
echo "<script type=\"text/javascript\">\n";

		global $plugins;
$tabs = $plugins->run_hooks("admin_page_output_tab_control_start", $tabs);
echo "<script type=\"text/javascript\">\n";

		if($observe_onload)

		if($observe_onload)

		{
echo "Event.observe(window,'load',function(){\n";
}

		{
echo "Event.observe(window,'load',function(){\n";
}

Zeile 631Zeile 640
		echo "		new Control.Tabs(tabs);\n";
echo " });\n";
if($observe_onload)

		echo "		new Control.Tabs(tabs);\n";
echo " });\n";
if($observe_onload)

		{

		{

			echo "});\n";
}
echo "</script>\n";

			echo "});\n";
}
echo "</script>\n";

Zeile 675Zeile 684
			{
$class = ' active';
}

			{
$class = ' active';
}

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

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

			{
$class .= " right";
}

			{
$class .= " right";
}

			if($tab['link_target'])
{


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

				$target = " target=\"{$tab['link_target']}\"";

				$target = " target=\"{$tab['link_target']}\"";

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

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

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

Zeile 798Zeile 812
			{
$class = "active";
}

			{
$class = "active";
}

			$item['link'] = htmlspecialchars($item['link']);

			$item['link'] = htmlspecialchars_uni($item['link']);

			$this->_contents .= "<li class=\"{$class}\"><a href=\"{$item['link']}\">{$item['title']}</a></li>\n";
}
$this->_contents .= "</ul>";

			$this->_contents .= "<li class=\"{$class}\"><a href=\"{$item['link']}\">{$item['title']}</a></li>\n";
}
$this->_contents .= "</ul>";