Vergleich admin/inc/class_page.php - 1.6.6 - 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 5620 2011-09-26 18:23:52Z ralgith $

 * $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)
{
$title = $lang->mybb_admin_panel;

		if(!$title)
{
$title = $lang->mybb_admin_panel;

Zeile 129Zeile 134
		echo "		<div id=\"content\">\n";
echo " <div class=\"breadcrumb\">\n";
echo $this->_generate_breadcrumb();

		echo "		<div id=\"content\">\n";
echo " <div class=\"breadcrumb\">\n";
echo $this->_generate_breadcrumb();

		echo "			</div>\n";

		echo "			</div>\n";

		echo "           <div id=\"inner\">\n";

		echo "           <div id=\"inner\">\n";

		if($admin_session['data']['flash_message'])

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

		{
$message = $admin_session['data']['flash_message']['message'];
$type = $admin_session['data']['flash_message']['type'];

Zeile 154Zeile 159
		global $mybb, $maintimer, $db, $lang, $plugins;

$plugins->run_hooks("admin_page_output_footer");

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

$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 178Zeile 179
		echo "</html>\n";

if($quit != false)

		echo "</html>\n";

if($quit != false)

		{

		{

			exit;
}
}

			exit;
}
}

Zeile 205Zeile 206
		}
$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; ";
}

			}

			}

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

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

	}	

/**
* Output an introductory message.
*
* @param string The title of the introductory message.
* @param string The introductory message.
* @param string An additional class name to add to the message if there is one.
*/
function output_intro($title, $description, $class="")
{
echo " <div class=\"intro_description\">\n";
echo " <div class=\"{$class}\">\n";
echo " <h2>{$title}</h2>\n";
echo " <p>{$description}</p>\n";
echo "</div>\n";
echo "</div>\n";

 
	}

/**

	}

/**

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

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

		global $lang, $cp_style;

		global $lang, $cp_style, $mybb;


$copy_year = COPY_YEAR;



$copy_year = COPY_YEAR;


Zeile 327Zeile 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 368Zeile 352
		// 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'])

		{

		{

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

			$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;
default:
$lang_username = $lang->username;
break;

		}

// TODO: Better Fix?

		}

// TODO: Better Fix?

Zeile 383Zeile 382
		<p>{$lang->enter_username_and_password}</p>
<form method="post" action="{$_SERVER['PHP_SELF']}{$query_string}">
<div class="form_container">

		<p>{$lang->enter_username_and_password}</p>
<form method="post" action="{$_SERVER['PHP_SELF']}{$query_string}">
<div class="form_container">


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


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


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

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

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

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

</html>
EOF;
exit;

</html>
EOF;
exit;

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

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

EOF;
exit;
}

EOF;
exit;
}

Zeile 451Zeile 450
	/**
* 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;

		$copy_year = COPY_YEAR;

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

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


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


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

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


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

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


Zeile 539Zeile 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 662Zeile 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 785Zeile 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>";