Vergleich admin/modules/home/index.php - 1.8.3 - 1.8.19

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 39Zeile 39
	);

require_once MYBB_ROOT."inc/class_xml.php";

	);

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 130Zeile 130
						'allow_html' => true,
)
);

						'allow_html' => true,
)
);

 

$description = preg_replace('#<img(.*)/>#', '', $description);
$content = preg_replace('#<img(.*)/>#', '', $content);


$updated_cache['news'][] = array(
'title' => htmlspecialchars_uni($item['title']),


$updated_cache['news'][] = array(
'title' => htmlspecialchars_uni($item['title']),

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

					'description' => $description,

					'link' => htmlspecialchars_uni($item['link']),
'author' => htmlspecialchars_uni($item['author']),
'dateline' => $item['date_timestamp'],

					'link' => htmlspecialchars_uni($item['link']),
'author' => htmlspecialchars_uni($item['author']),
'dateline' => $item['date_timestamp'],

Zeile 148Zeile 151

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



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


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

			$table->construct_cell("<span style=\"font-size: 16px;\"><strong>".htmlspecialchars_uni($item['title'])."</strong></span><br /><br />{$content}<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 175Zeile 178
		);

$cache->update("adminnotes", $update_cache);

		);

$cache->update("adminnotes", $update_cache);





		$plugins->run_hooks("admin_home_index_start_begin");

flash_message($lang->success_notes_updated, 'success');
admin_redirect("index.php");
}

		$plugins->run_hooks("admin_home_index_start_begin");

flash_message($lang->success_notes_updated, 'success');
admin_redirect("index.php");
}





	$page->add_breadcrumb_item($lang->dashboard);
$page->output_header($lang->dashboard);

	$page->add_breadcrumb_item($lang->dashboard);
$page->output_header($lang->dashboard);





	$sub_tabs['dashboard'] = array(
'title' => $lang->dashboard,
'link' => "index.php",

	$sub_tabs['dashboard'] = array(
'title' => $lang->dashboard,
'link' => "index.php",

Zeile 192Zeile 195
	);

$page->output_nav_tabs($sub_tabs, 'dashboard');

	);

$page->output_nav_tabs($sub_tabs, 'dashboard');





	// Load stats cache
$stats = $cache->read("stats");

$serverload = get_server_load();

	// Load stats cache
$stats = $cache->read("stats");

$serverload = get_server_load();





	// Get the number of users
$query = $db->simple_select("users", "COUNT(uid) AS numusers");
$users = my_number_format($db->fetch_field($query, "numusers"));

	// Get the number of users
$query = $db->simple_select("users", "COUNT(uid) AS numusers");
$users = my_number_format($db->fetch_field($query, "numusers"));





	// Get the number of users awaiting validation
$awaitingusers = $cache->read('awaitingactivation');

	// Get the number of users awaiting validation
$awaitingusers = $cache->read('awaitingactivation');





	if(!empty($awaitingusers['users']))

	if(!empty($awaitingusers['users']))

	{

	{

		$awaitingusers = (int)$awaitingusers['users'];

		$awaitingusers = (int)$awaitingusers['users'];

	}
else
{
$awaitingusers = 0;

	}
else
{
$awaitingusers = 0;

	}

if($awaitingusers < 1)
{
$awaitingusers = 0;

	}

if($awaitingusers < 1)
{
$awaitingusers = 0;

	}
else

	}
else

	{
$awaitingusers = my_number_format($awaitingusers);
}

	{
$awaitingusers = my_number_format($awaitingusers);
}

Zeile 260Zeile 263
	// Get the number of reported post
$query = $db->simple_select("reportedcontent", "COUNT(*) AS reported_posts", "type = 'post' OR type = ''");
$reported_posts = my_number_format($db->fetch_field($query, "reported_posts"));

	// Get the number of reported post
$query = $db->simple_select("reportedcontent", "COUNT(*) AS reported_posts", "type = 'post' OR type = ''");
$reported_posts = my_number_format($db->fetch_field($query, "reported_posts"));


// Get the number of reported posts that haven't been marked as read yet
$query = $db->simple_select("reportedcontent", "COUNT(*) AS new_reported_posts", "reportstatus='0' AND (type = 'post' OR type = '')");
$new_reported_posts = my_number_format($db->fetch_field($query, "new_reported_posts"));







// If report medium is MCP...
if($mybb->settings['reportmethod'] == "db")
{
// Get the number of reported posts that haven't been marked as read yet
$query = $db->simple_select("reportedcontent", "COUNT(*) AS new_reported_posts", "reportstatus='0' AND (type = 'post' OR type = '')");
$new_reported_posts = my_number_format($db->fetch_field($query, "new_reported_posts"));
}


	// Get the number and total file size of attachments
$query = $db->simple_select("attachments", "COUNT(*) AS numattachs, SUM(filesize) as spaceused", "visible='1' AND pid > '0'");
$attachs = $db->fetch_array($query);

	// Get the number and total file size of attachments
$query = $db->simple_select("attachments", "COUNT(*) AS numattachs, SUM(filesize) as spaceused", "visible='1' AND pid > '0'");
$attachs = $db->fetch_array($query);

Zeile 288Zeile 295
	// 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>");
}


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


Zeile 309Zeile 316
	$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%'));








	if($mybb->settings['reportmethod'] == "db")
{
$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%'));
}
else
{
$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}", 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 354Zeile 368
		foreach($update_check['news'] as $news_item)
{
$posted = my_date('relative', $news_item['dateline']);

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

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

			$table->construct_row();

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

			$table->construct_row();

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