Example #1
0
     }
     $stats[$stat['dateline']] = $stat;
     $last_dateline = $stat['dateline'];
 }
 if (empty($stats)) {
     flash_message($lang->error_no_results_found_for_criteria, 'error');
     admin_redirect("index.php?module=tools");
 }
 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->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";
 echo "{$lang->from} " . $form->generate_date_select('from', $mybb->input['from_day'], $mybb->input['from_month'], $mybb->input['from_year']);
 echo " {$lang->to} " . $form->generate_date_select('to', $mybb->input['to_day'], $mybb->input['to_month'], $mybb->input['to_year']);
 echo " " . $form->generate_submit_button($lang->view);
 echo "</fieldset>\n";
 $form->end();
 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><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><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);
 $table = new Table();