Vergleich admin/modules/home/index.php - 1.8.2 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 38Zeile 38
		"last_check" => TIME_NOW
);


		"last_check" => TIME_NOW
);


	require_once MYBB_ROOT."inc/class_xml.php";
$contents = fetch_remote_file("http://www.mybb.com/version_check.php");

	$contents = fetch_remote_file("https://mybb.com/version_check.php");



if(!$contents)
{


if(!$contents)
{

Zeile 53Zeile 52
	$page->output_header($lang->version_check);
$page->output_nav_tabs($sub_tabs, 'version_check');


	$page->output_header($lang->version_check);
$page->output_nav_tabs($sub_tabs, 'version_check');


	// We do this because there is some weird symbols that show up in the xml file for unknown reasons
$pos = strpos($contents, "<");
if($pos > 1)
{
$contents = substr($contents, $pos);
}

$pos = strpos(strrev($contents), ">");
if($pos > 1)
{
$contents = substr($contents, 0, (-1) * ($pos-1));
}

$parser = new XMLParser($contents);

	$contents = trim($contents);

$parser = create_xml_parser($contents);












	$tree = $parser->get_tree();


	$tree = $parser->get_tree();


	$latest_code = $tree['mybb']['version_code']['value'];
$latest_version = "<strong>".$tree['mybb']['latest_version']['value']."</strong> (".$latest_code.")";

	$latest_code = (int)$tree['mybb']['version_code']['value'];
$latest_version = "<strong>".htmlspecialchars_uni($tree['mybb']['latest_version']['value'])."</strong> (".$latest_code.")";

	if($latest_code > $mybb->version_code)

	if($latest_code > $mybb->version_code)

	{

	{

		$latest_version = "<span style=\"color: #C00;\">".$latest_version."</span>";

		$latest_version = "<span style=\"color: #C00;\">".$latest_version."</span>";

		$version_warn = 1;

 
		$updated_cache['latest_version'] = $latest_version;
$updated_cache['latest_version_code'] = $latest_code;

		$updated_cache['latest_version'] = $latest_version;
$updated_cache['latest_version_code'] = $latest_code;

	}
else
{
$latest_version = "<span style=\"color: green;\">".$latest_version."</span>";
}

if($version_warn)
{

 
		$page->output_error("<p><em>{$lang->error_out_of_date}</em> {$lang->update_forum}</p>");
}
else
{

		$page->output_error("<p><em>{$lang->error_out_of_date}</em> {$lang->update_forum}</p>");
}
else
{

 
		$latest_version = "<span style=\"color: green;\">".$latest_version."</span>";

		$page->output_success("<p><em>{$lang->success_up_to_date}</em></p>");
}


		$page->output_success("<p><em>{$lang->success_up_to_date}</em></p>");
}


Zeile 108Zeile 88
	$feed_parser->parse_feed("http://feeds.feedburner.com/MyBBDevelopmentBlog");

$updated_cache['news'] = array();

	$feed_parser->parse_feed("http://feeds.feedburner.com/MyBBDevelopmentBlog");

$updated_cache['news'] = array();





	if($feed_parser->error == '')
{

	if($feed_parser->error == '')
{

 
		require_once MYBB_ROOT . '/inc/class_parser.php';
$post_parser = new postParser();


		foreach($feed_parser->items as $item)
{
if(!isset($updated_cache['news'][2]))
{
$updated_cache['news'][] = array(
'title' => $item['title'],

		foreach($feed_parser->items as $item)
{
if(!isset($updated_cache['news'][2]))
{
$updated_cache['news'][] = array(
'title' => $item['title'],

					'description' => preg_replace('#<img(.*)/>#', '', $item['description']),

					'description' => $item['description'],

					'link' => $item['link'],
'author' => $item['author'],

					'link' => $item['link'],
'author' => $item['author'],

					'dateline' => $item['date_timestamp']

					'dateline' => $item['date_timestamp'],

				);
}

$stamp = '';
if($item['date_timestamp'])
{

				);
}

$stamp = '';
if($item['date_timestamp'])
{

				$stamp = my_date('relative', $item['date_timestamp']);
}

$content = $item['description'];
if($item['content'])
{
$content = $item['content'];

				$stamp = my_date('relative', (int)$item['date_timestamp']);







			}


			}


			$table->construct_cell("<span style=\"font-size: 16px;\"><strong>".$item['title']."</strong></span><br /><br />{$content}<strong><span style=\"float: right;\">{$stamp}</span><br /><br /><a href=\"{$item['link']}\" target=\"_blank\">&raquo; {$lang->read_more}</a></strong>");





			$link = htmlspecialchars_uni($item['link']);
$title = htmlspecialchars_uni($item['title']);
$description = htmlspecialchars_uni(strip_tags($item['description']));

$table->construct_cell("<span style=\"font-size: 16px;\"><strong>{$title}</strong></span><br /><br />{$description}<strong><span style=\"float: right;\">{$stamp}</span><br /><br /><a href=\"{$link}\" target=\"_blank\" rel=\"noopener\">&raquo; {$lang->read_more}</a></strong>");

			$table->construct_row();
}
}

			$table->construct_row();
}
}

Zeile 276Zeile 257
	// If the update check contains information about a newer version, show an alert
if(isset($update_check['latest_version_code']) && $update_check['latest_version_code'] > $mybb->version_code)
{

	// If the update check contains information about a newer version, show an alert
if(isset($update_check['latest_version_code']) && $update_check['latest_version_code'] > $mybb->version_code)
{

		$lang->new_version_available = $lang->sprintf($lang->new_version_available, "MyBB {$mybb->version}", "<a href=\"http://www.mybb.com/downloads\" target=\"_blank\">MyBB {$update_check['latest_version']}</a>");

		$lang->new_version_available = $lang->sprintf($lang->new_version_available, "MyBB {$mybb->version}", "<a href=\"https://mybb.com/download\" target=\"_blank\" rel=\"noopener\">MyBB {$update_check['latest_version']}</a>");

		$page->output_error("<p><em>{$lang->new_version_available}</em></p>");
}

$plugins->run_hooks("admin_home_index_output_message");

$adminmessage = $cache->read("adminnotes");

		$page->output_error("<p><em>{$lang->new_version_available}</em></p>");
}

$plugins->run_hooks("admin_home_index_output_message");

$adminmessage = $cache->read("adminnotes");

 

if($adminmessage === false)
{
$adminmessage = array(
'adminmessage' => '',
);
}


$table = new Table;
$table->construct_header($lang->mybb_server_stats, array("colspan" => 2));
$table->construct_header($lang->forum_stats, array("colspan" => 2));


$table = new Table;
$table->construct_header($lang->mybb_server_stats, array("colspan" => 2));
$table->construct_header($lang->forum_stats, array("colspan" => 2));





	$table->construct_cell("<strong>{$lang->mybb_version}</strong>", array('width' => '25%'));
$table->construct_cell($mybb->version, array('width' => '25%'));
$table->construct_cell("<strong>{$lang->threads}</strong>", array('width' => '25%'));
$table->construct_cell("<strong>{$threads}</strong> {$lang->threads}<br /><strong>{$newthreads}</strong> {$lang->new_today}<br /><a href=\"index.php?module=forum-moderation_queue&amp;type=threads\"><strong>{$unapproved_threads}</strong> {$lang->unapproved}</a>", array('width' => '25%'));
$table->construct_row();

	$table->construct_cell("<strong>{$lang->mybb_version}</strong>", array('width' => '25%'));
$table->construct_cell($mybb->version, array('width' => '25%'));
$table->construct_cell("<strong>{$lang->threads}</strong>", array('width' => '25%'));
$table->construct_cell("<strong>{$threads}</strong> {$lang->threads}<br /><strong>{$newthreads}</strong> {$lang->new_today}<br /><a href=\"index.php?module=forum-moderation_queue&amp;type=threads\"><strong>{$unapproved_threads}</strong> {$lang->unapproved}</a>", array('width' => '25%'));
$table->construct_row();





	$table->construct_cell("<strong>{$lang->php_version}</strong>", array('width' => '25%'));
$table->construct_cell(PHP_VERSION, array('width' => '25%'));
$table->construct_cell("<strong>{$lang->posts}</strong>", array('width' => '25%'));

	$table->construct_cell("<strong>{$lang->php_version}</strong>", array('width' => '25%'));
$table->construct_cell(PHP_VERSION, array('width' => '25%'));
$table->construct_cell("<strong>{$lang->posts}</strong>", array('width' => '25%'));

 


	$table->construct_cell("<strong>{$posts}</strong> {$lang->posts}<br /><strong>{$newposts}</strong> {$lang->new_today}<br /><a href=\"index.php?module=forum-moderation_queue&amp;type=posts\"><strong>{$unapproved_posts}</strong> {$lang->unapproved}</a><br /><strong>{$reported_posts}</strong> {$lang->reported_posts}<br /><strong>{$new_reported_posts}</strong> {$lang->unread_reports}", array('width' => '25%'));

	$table->construct_cell("<strong>{$posts}</strong> {$lang->posts}<br /><strong>{$newposts}</strong> {$lang->new_today}<br /><a href=\"index.php?module=forum-moderation_queue&amp;type=posts\"><strong>{$unapproved_posts}</strong> {$lang->unapproved}</a><br /><strong>{$reported_posts}</strong> {$lang->reported_posts}<br /><strong>{$new_reported_posts}</strong> {$lang->unread_reports}", array('width' => '25%'));

 
	

	$table->construct_row();

$table->construct_cell("<strong>{$lang->sql_engine}</strong>", array('width' => '25%'));
$table->construct_cell($db->short_title." ".$db->get_version(), array('width' => '25%'));
$table->construct_cell("<strong>{$lang->users}</strong>", array('width' => '25%'));

	$table->construct_row();

$table->construct_cell("<strong>{$lang->sql_engine}</strong>", array('width' => '25%'));
$table->construct_cell($db->short_title." ".$db->get_version(), array('width' => '25%'));
$table->construct_cell("<strong>{$lang->users}</strong>", array('width' => '25%'));

	$table->construct_cell("<a href=\"index.php?module=user-users\"><strong>{$users}</strong> {$lang->registered_users}</a><br /><strong>{$activeusers}</strong> {$lang->active_users}<br /><strong>{$newusers}</strong> {$lang->registrations_today}<br /><a href=\"index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions=".urlencode(serialize(array('usergroup' => '5')))."&amp;from=home\"><strong>{$awaitingusers}</strong> {$lang->awaiting_activation}</a>", array('width' => '25%'));

	$table->construct_cell("<a href=\"index.php?module=user-users\"><strong>{$users}</strong> {$lang->registered_users}</a><br /><strong>{$activeusers}</strong> {$lang->active_users}<br /><strong>{$newusers}</strong> {$lang->registrations_today}<br /><a href=\"index.php?module=user-awaiting_activation\"><strong>{$awaitingusers}</strong> {$lang->awaiting_activation}</a>", array('width' => '25%'));

	$table->construct_row();

$table->construct_cell("<strong>{$lang->server_load}</strong>", array('width' => '25%'));

	$table->construct_row();

$table->construct_cell("<strong>{$lang->server_load}</strong>", array('width' => '25%'));

Zeile 341Zeile 331
	{
foreach($update_check['news'] as $news_item)
{

	{
foreach($update_check['news'] as $news_item)
{

			$posted = my_date('relative', $news_item['dateline']);
$table->construct_cell("<strong><a href=\"{$news_item['link']}\" target=\"_blank\">{$news_item['title']}</a></strong><br /><span class=\"smalltext\">{$posted}</span>");





			$posted = my_date('relative', (int)$news_item['dateline']);
$link = htmlspecialchars_uni($news_item['link']);
$title = htmlspecialchars_uni($news_item['title']);
$description = htmlspecialchars_uni(strip_tags($news_item['description']));

$table->construct_cell("<strong><a href=\"{$link}\" target=\"_blank\" rel=\"noopener\">{$title}</a></strong><br /><span class=\"smalltext\">{$posted}</span>");

			$table->construct_row();


			$table->construct_row();


			$table->construct_cell(htmlspecialchars_uni($news_item['description']));

			$table->construct_cell($description);

			$table->construct_row();
}
}

			$table->construct_row();
}
}