function statspro_overview in Statistics Pro 6.2
Same name and namespace in other branches
- 6 statspro.reports.inc \statspro_overview()
Callback function for overview page.
1 string reference to 'statspro_overview'
- statspro_menu in ./
statspro.module - Implementation of hook_menu().
File
- ./
statspro_overview.inc, line 14
Code
function statspro_overview($period = '', $number_of_days = NULL) {
require_once drupal_get_path('module', 'statspro') . '/statspro.inc';
$statspro = new StatsPro();
$last_run = variable_get('statspro_last_run', 0);
$updated = $last_run ? format_date($last_run) : t('never');
$output = t('Last statistics update: @updated', array(
'@updated' => $updated,
));
// add settings form
$output .= drupal_get_form('statspro_overview_settings_form', $period, $number_of_days);
if ($last_run) {
$period_info = statspro_get_period_info($_SESSION['statspro_period_overview'], $_SESSION['statspro_custom_number_days_overview']);
////////////////////////
// common
$output .= theme('statspro_content', $period_info['period_name'], $statspro
->get_stats($period_info['period'], NULL, $statspro->absolute_amounts));
////////////////////////
// pi, error and warnings
$output .= theme('statspro_log', $period_info['period_name'], $statspro
->get_stats($period_info['period'], $statspro->absolute_amounts));
}
return $output;
}