Vergleich admin/modules/tools/statistics.php - 1.8.13 - 1.8.30

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 48Zeile 48
	$plugins->run_hooks("admin_tools_statistics_overall_begin");

// Do we have date range criteria?

	$plugins->run_hooks("admin_tools_statistics_overall_begin");

// Do we have date range criteria?

	if($mybb->input['from_year'])

	if($mybb->get_input('from_year'))

	{
$start_dateline = mktime(0, 0, 0, $mybb->get_input('from_month', MyBB::INPUT_INT), $mybb->get_input('from_day', MyBB::INPUT_INT), $mybb->get_input('from_year', MyBB::INPUT_INT));
$end_dateline = mktime(23, 59, 59, $mybb->get_input('to_month', MyBB::INPUT_INT), $mybb->get_input('to_day', MyBB::INPUT_INT), $mybb->get_input('to_year', MyBB::INPUT_INT));

	{
$start_dateline = mktime(0, 0, 0, $mybb->get_input('from_month', MyBB::INPUT_INT), $mybb->get_input('from_day', MyBB::INPUT_INT), $mybb->get_input('from_year', MyBB::INPUT_INT));
$end_dateline = mktime(23, 59, 59, $mybb->get_input('to_month', MyBB::INPUT_INT), $mybb->get_input('to_day', MyBB::INPUT_INT), $mybb->get_input('to_year', MyBB::INPUT_INT));

Zeile 56Zeile 56
	}

// Otherwise default to the last 30 days

	}

// Otherwise default to the last 30 days

	if(!$mybb->input['from_year'] || $start_dateline > TIME_NOW || $end_dateline > mktime(23, 59, 59))

	if(!$mybb->get_input('from_year') || $start_dateline > TIME_NOW || $end_dateline > mktime(23, 59, 59))

	{
$start_dateline = TIME_NOW-(60*60*24*30);
$end_dateline = TIME_NOW;

	{
$start_dateline = TIME_NOW-(60*60*24*30);
$end_dateline = TIME_NOW;

Zeile 69Zeile 69

$last_dateline = 0;



$last_dateline = 0;


	if($mybb->input['page'] && $mybb->input['page'] > 1)

	if(!empty($mybb->input['page']) && $mybb->input['page'] > 1)

	{
$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
$start = ($mybb->input['page']*$per_page)-$per_page;

	{
$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
$start = ($mybb->input['page']*$per_page)-$per_page;

Zeile 90Zeile 90
			$stat['change_users'] = ($stat['numusers'] - $stats[$last_dateline]['numusers']);
$stat['change_threads'] = ($stat['numthreads'] - $stats[$last_dateline]['numthreads']);
$stat['change_posts'] = ($stat['numposts'] - $stats[$last_dateline]['numposts']);

			$stat['change_users'] = ($stat['numusers'] - $stats[$last_dateline]['numusers']);
$stat['change_threads'] = ($stat['numthreads'] - $stats[$last_dateline]['numthreads']);
$stat['change_posts'] = ($stat['numposts'] - $stats[$last_dateline]['numposts']);

 
		}
else
{
$stat['change_users'] = 0;
$stat['change_threads'] = 0;
$stat['change_posts'] = 0;

		}

$stats[$stat['dateline']] = $stat;

		}

$stats[$stat['dateline']] = $stat;





		$last_dateline = $stat['dateline'];

		$last_dateline = $stat['dateline'];

	}

	}


if(empty($stats))
{
flash_message($lang->error_no_results_found_for_criteria, 'error');
}



if(empty($stats))
{
flash_message($lang->error_no_results_found_for_criteria, 'error');
}


	krsort($stats, SORT_NUMERIC);


	krsort($stats, SORT_NUMERIC);


	$page->add_breadcrumb_item($lang->overall_statistics, "index.php?module=tools-statistics");

$page->output_header($lang->statistics." - ".$lang->overall_statistics);


	$page->add_breadcrumb_item($lang->overall_statistics, "index.php?module=tools-statistics");

$page->output_header($lang->statistics." - ".$lang->overall_statistics);


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


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


	// Date range fields
$form = new Form("index.php?module=tools-statistics", "post", "overall");
echo "<fieldset><legend>{$lang->date_range}</legend>\n";

	// Date range fields
$form = new Form("index.php?module=tools-statistics", "post", "overall");
echo "<fieldset><legend>{$lang->date_range}</legend>\n";

Zeile 123Zeile 129
	{
echo "<fieldset><legend>{$lang->users}</legend>\n";
echo "<img src=\"index.php?module=tools-statistics&amp;action=do_graph&amp;type=users{$range}\" />\n";

	{
echo "<fieldset><legend>{$lang->users}</legend>\n";
echo "<img src=\"index.php?module=tools-statistics&amp;action=do_graph&amp;type=users{$range}\" />\n";

		echo "</fieldset>\n";

		echo "</fieldset>\n";


echo "<fieldset><legend>{$lang->threads}</legend>\n";
echo "<img src=\"index.php?module=tools-statistics&amp;action=do_graph&amp;type=threads{$range}\" />\n";


echo "<fieldset><legend>{$lang->threads}</legend>\n";
echo "<img src=\"index.php?module=tools-statistics&amp;action=do_graph&amp;type=threads{$range}\" />\n";

		echo "</fieldset>\n";


		echo "</fieldset>\n";


		echo "<fieldset><legend>{$lang->posts}</legend>\n";
echo "<img src=\"index.php?module=tools-statistics&amp;action=do_graph&amp;type=posts{$range}\" />\n";
echo "</fieldset>\n";

$total_rows = count($stats);

		echo "<fieldset><legend>{$lang->posts}</legend>\n";
echo "<img src=\"index.php?module=tools-statistics&amp;action=do_graph&amp;type=posts{$range}\" />\n";
echo "</fieldset>\n";

$total_rows = count($stats);

 
		$pages = ceil($total_rows / $per_page);
if($mybb->input['page'] > $pages)
{
$mybb->input['page'] = 1;
$start = 0;
}


$table = new Table;
$table->construct_header($lang->date);


$table = new Table;
$table->construct_header($lang->date);

Zeile 155Zeile 167
		$url_range .= "&amp;to_month=".$mybb->get_input('to_month', MyBB::INPUT_INT)."&amp;to_day=".$mybb->get_input('to_day', MyBB::INPUT_INT)."&amp;to_year=".$mybb->get_input('to_year', MyBB::INPUT_INT);

echo draw_admin_pagination($mybb->input['page'], $per_page, $total_rows, "index.php?module=tools-statistics{$url_range}&amp;page={page}");

		$url_range .= "&amp;to_month=".$mybb->get_input('to_month', MyBB::INPUT_INT)."&amp;to_day=".$mybb->get_input('to_day', MyBB::INPUT_INT)."&amp;to_year=".$mybb->get_input('to_year', MyBB::INPUT_INT);

echo draw_admin_pagination($mybb->input['page'], $per_page, $total_rows, "index.php?module=tools-statistics{$url_range}&amp;page={page}");

	}

	}


$page->output_footer();
}


$page->output_footer();
}

Zeile 172Zeile 184
	if($number === null)
{
return "";

	if($number === null)
{
return "";

	}

	}


$number = (int)$number;
$friendly_number = my_number_format(abs($number));

if($number > 0)


$number = (int)$number;
$friendly_number = my_number_format(abs($number));

if($number > 0)

	{

	{

		$growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/increase.png\" alt=\"{$lang->increase}\" title=\"{$lang->increase}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";

		$growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/increase.png\" alt=\"{$lang->increase}\" title=\"{$lang->increase}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";

	}

	}

	elseif($number == 0)

	elseif($number == 0)

	{

	{

		$growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/no_change.png\" alt=\"{$lang->no_change}\" title=\"{$lang->no_change}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
}
else
{
$growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/decrease.png\" alt=\"{$lang->decrease}\" title=\"{$lang->decrease}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";

		$growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/no_change.png\" alt=\"{$lang->no_change}\" title=\"{$lang->no_change}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
}
else
{
$growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/decrease.png\" alt=\"{$lang->decrease}\" title=\"{$lang->decrease}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";

	}

	}


return $growth_string;
}


return $growth_string;
}

Zeile 221Zeile 233
	}

require_once MYBB_ROOT.'inc/class_graph.php';

	}

require_once MYBB_ROOT.'inc/class_graph.php';

 

if(!Graph::can_use())
{
die;
}


$points = $stats = $datelines = array();
if($start == 0)


$points = $stats = $datelines = array();
if($start == 0)