Vergleich admin/modules/home/index.php - 1.8.21 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 105Zeile 105

foreach($feed_parser->items as $item)
{


foreach($feed_parser->items as $item)
{

			$description = $item['description'];
$content = $item['content'];

$description = $post_parser->parse_message($description, array(
'allow_html' => true,
)
);

$content = $post_parser->parse_message($content, array(
'allow_html' => true,
)
);

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


 
			if(!isset($updated_cache['news'][2]))
{
$updated_cache['news'][] = array(

			if(!isset($updated_cache['news'][2]))
{
$updated_cache['news'][] = array(

					'title' => htmlspecialchars_uni($item['title']),
'description' => $description,
'link' => htmlspecialchars_uni($item['link']),
'author' => htmlspecialchars_uni($item['author']),

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

					'dateline' => $item['date_timestamp'],
);
}

					'dateline' => $item['date_timestamp'],
);
}

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

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

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

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

			}

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

			}

$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>".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_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 184Zeile 170
	);

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

	);

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





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

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





	$serverload = get_server_load();

// Get the number of users

	$serverload = get_server_load();

// Get the number of users

Zeile 198Zeile 184
	$awaitingusers = $cache->read('awaitingactivation');

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

	$awaitingusers = $cache->read('awaitingactivation');

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

	{

	{

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

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

	}
else
{

	}
else
{

		$awaitingusers = 0;
}

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

		$awaitingusers = 0;
}

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

	}

	}

	else
{
$awaitingusers = my_number_format($awaitingusers);

	else
{
$awaitingusers = my_number_format($awaitingusers);

	}

	}


// Get the number of new users for today
$timecut = TIME_NOW - 86400;
$query = $db->simple_select("users", "COUNT(uid) AS newusers", "regdate > '$timecut'");
$newusers = my_number_format($db->fetch_field($query, "newusers"));


// Get the number of new users for today
$timecut = TIME_NOW - 86400;
$query = $db->simple_select("users", "COUNT(uid) AS newusers", "regdate > '$timecut'");
$newusers = my_number_format($db->fetch_field($query, "newusers"));





	// Get the number of active users today
$query = $db->simple_select("users", "COUNT(uid) AS activeusers", "lastvisit > '$timecut'");
$activeusers = my_number_format($db->fetch_field($query, "activeusers"));

	// Get the number of active users today
$query = $db->simple_select("users", "COUNT(uid) AS activeusers", "lastvisit > '$timecut'");
$activeusers = my_number_format($db->fetch_field($query, "activeusers"));





	// Get the number of threads
$threads = my_number_format($stats['numthreads']);

	// Get the number of threads
$threads = my_number_format($stats['numthreads']);





	// Get the number of unapproved threads
$unapproved_threads = my_number_format($stats['numunapprovedthreads']);

// Get the number of new threads for today
$query = $db->simple_select("threads", "COUNT(*) AS newthreads", "dateline > '$timecut' AND visible='1' AND closed NOT LIKE 'moved|%'");
$newthreads = my_number_format($db->fetch_field($query, "newthreads"));

	// Get the number of unapproved threads
$unapproved_threads = my_number_format($stats['numunapprovedthreads']);

// Get the number of new threads for today
$query = $db->simple_select("threads", "COUNT(*) AS newthreads", "dateline > '$timecut' AND visible='1' AND closed NOT LIKE 'moved|%'");
$newthreads = my_number_format($db->fetch_field($query, "newthreads"));





	// Get the number of posts
$posts = my_number_format($stats['numposts']);


	// Get the number of posts
$posts = my_number_format($stats['numposts']);


Zeile 241Zeile 227
	if($stats['numunapprovedposts'] < 0)
{
$stats['numunapprovedposts'] = 0;

	if($stats['numunapprovedposts'] < 0)
{
$stats['numunapprovedposts'] = 0;

	}

$unapproved_posts = my_number_format($stats['numunapprovedposts']);


	}

$unapproved_posts = my_number_format($stats['numunapprovedposts']);


	// Get the number of new posts for today
$query = $db->simple_select("posts", "COUNT(*) AS newposts", "dateline > '$timecut' AND visible='1'");
$newposts = my_number_format($db->fetch_field($query, "newposts"));

	// Get the number of new posts for today
$query = $db->simple_select("posts", "COUNT(*) AS newposts", "dateline > '$timecut' AND visible='1'");
$newposts = my_number_format($db->fetch_field($query, "newposts"));





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

Zeile 266Zeile 252
	$attachs = $db->fetch_array($query);
$attachs['spaceused'] = get_friendly_size($attachs['spaceused']);
$approved_attachs = my_number_format($attachs['numattachs']);

	$attachs = $db->fetch_array($query);
$attachs['spaceused'] = get_friendly_size($attachs['spaceused']);
$approved_attachs = my_number_format($attachs['numattachs']);





	// Get the number of unapproved attachments
$query = $db->simple_select("attachments", "COUNT(*) AS numattachs", "visible='0' AND pid > '0'");
$unapproved_attachs = my_number_format($db->fetch_field($query, "numattachs"));

	// Get the number of unapproved attachments
$query = $db->simple_select("attachments", "COUNT(*) AS numattachs", "visible='0' AND pid > '0'");
$unapproved_attachs = my_number_format($db->fetch_field($query, "numattachs"));





	// Fetch the last time an update check was run
$update_check = $cache->read("update_check");


	// Fetch the last time an update check was run
$update_check = $cache->read("update_check");


Zeile 325Zeile 311
	$table->construct_cell($serverload, array('width' => '25%'));
$table->construct_cell("<strong>{$lang->attachments}</strong>", array('width' => '25%'));
$table->construct_cell("<strong>{$approved_attachs}</strong> {$lang->attachments}<br /><a href=\"index.php?module=forum-moderation_queue&amp;type=attachments\"><strong>{$unapproved_attachs}</strong> {$lang->unapproved}</a><br /><strong>{$attachs['spaceused']}</strong> {$lang->used}", array('width' => '25%'));

	$table->construct_cell($serverload, array('width' => '25%'));
$table->construct_cell("<strong>{$lang->attachments}</strong>", array('width' => '25%'));
$table->construct_cell("<strong>{$approved_attachs}</strong> {$lang->attachments}<br /><a href=\"index.php?module=forum-moderation_queue&amp;type=attachments\"><strong>{$unapproved_attachs}</strong> {$lang->unapproved}</a><br /><strong>{$attachs['spaceused']}</strong> {$lang->used}", array('width' => '25%'));

	$table->construct_row();

$table->output($lang->dashboard);


	$table->construct_row();

$table->output($lang->dashboard);


	echo '
<div class="float_right" style="width: 48%;">';

	echo '
<div class="float_right" style="width: 48%;">';


$table = new Table;


$table = new Table;

	$table->construct_header($lang->admin_notes_public);

$form = new Form("index.php", "post");

	$table->construct_header($lang->admin_notes_public);

$form = new Form("index.php", "post");

Zeile 356Zeile 342
	{
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\" rel=\"noopener\">{$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($news_item['description']);

			$table->construct_cell($description);

			$table->construct_row();
}
}

			$table->construct_row();
}
}