$require_admin = TRUE; require_once '../../include/baseTheme.php'; $toolName = $langVisitsStats; $navigation[] = array("url" => "index.php", "name" => $langAdmin); $page_title = $langPlatformStats . ": " . $langVisitsStats; load_js('tools.js'); load_js('bootstrap-datetimepicker'); $head_content .= "<script type='text/javascript'> $(function() { $('#user_date_start, #user_date_end').datetimepicker({ format: 'dd-mm-yyyy hh:ii', pickerPosition: 'bottom-left', language: '" . $language . "', autoclose: true }); }); </script>"; require_once 'admin_statistics_tools_bar.php'; admin_statistics_tools("platformStats"); //show chart with statistics require_once "modules/admin/statsResults.php"; //show form for determining time period and user require_once "modules/admin/statsForm.php"; draw($tool_content, 3, null, $head_content);
$head_content .= "<script type='text/javascript'> $(function() { $('#user_date_start, #user_date_end').datetimepicker({ format: 'dd-mm-yyyy hh:ii', pickerPosition: 'bottom-left', language: '".$language."', autoclose: true }); }); </script>"; $toolName = $langVisitsCourseStats; $navigation[] = array('url' => 'index.php', 'name' => $langAdmin); require_once 'admin_statistics_tools_bar.php'; admin_statistics_tools("visitsCourseStats"); /* * ****************************************** start making the chart * ******************************************* */ require_once 'modules/graphics/plotter.php'; if (isset($_POST['user_date_start'])) { $uds = DateTime::createFromFormat('d-m-Y H:i', $_POST['user_date_start']); $u_date_start = $uds->format('Y-m-d H:i'); $user_date_start = $uds->format('d-m-Y H:i'); } else { $date_start = new DateTime(); $date_start->sub(new DateInterval('P30D')); $u_date_start = $date_start->format('Y-m-d H:i'); $user_date_start = $date_start->format('d-m-Y H:i');
/** * @file stateclass.php * @brief display various statistics */ $require_admin = TRUE; require_once '../../include/baseTheme.php'; require_once 'include/log.php'; require_once 'admin_statistics_tools_bar.php'; $toolName = $langPlatformGenStats; $navigation[] = array("url" => "index.php", "name" => $langAdmin); admin_statistics_tools("stateclass"); $tool_content .= "<div class='table-responsive'> <table class='table-default'> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=login'>$langNbLogin</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=failurelogin'>$langLoginFailures</a><small> ($langLast15Days)</small></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=users'>$langUsers</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=percourse'>$langUsersPerCourse</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=cours'>$langStatCour</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=musers'>$langMultipleUsers</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=memail'>$langMultipleAddr e-mail</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=mlogins'>$langMultiplePairs LOGIN - PASS</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=vmusers'>$langMailVerification</a></td></tr> <tr><td><a href='$_SERVER[SCRIPT_NAME]?stats=unregusers'>$langUnregUsers</a><small> ($langLastMonth)</small></td></tr> </table> </div>";
$head_content .= "<script type='text/javascript'> $(function() { $('#user_date_start, #user_date_end').datetimepicker({ format: 'dd-mm-yyyy hh:ii', pickerPosition: 'bottom-left', language: '".$language."', autoclose: true }); }); </script>"; $toolName = $langOldStats; $navigation[] = array("url" => "index.php", "name" => $langAdmin); require_once 'admin_statistics_tools_bar.php'; admin_statistics_tools("oldStats"); //$min_w is the min date in 'loginout'. Statistics older than $min_w will be shown. $query = "SELECT MIN(`when`) AS min_when FROM loginout"; foreach (Database::get()->queryArray($query) as $row) { $min_when = strtotime($row->min_when); } $min_w = date("d-m-Y", $min_when); $tool_content .= '<div class="alert alert-info">' . sprintf($langOldStatsLoginsExpl, get_config('actions_expire_interval')) . '</div>'; /* * *************************************** start making chart * ***************************************** */ require_once 'modules/graphics/plotter.php';
/** * @file monltyReport.php * @brief Shows a form in order for the user to choose a month and display a report regarding this month. The report is based on information stored in table 'monthly_summary' in database. */ $require_admin = true; require_once '../../include/baseTheme.php'; $toolName = $langMonthlyReport; $navigation[] = array('url' => 'index.php', 'name' => $langAdmin); require_once 'admin_statistics_tools_bar.php'; admin_statistics_tools("monthlyReport"); $months = ""; for ($i = 0; $i < 12; $i++) { $mon = mktime(0, 0, 0, date('m') - $i - 1, date('d'), date('Y')); $mval = date('m Y', $mon); $months .= "<option value='$mval'>" . $langMonths[date('m', $mon)] . date(' Y', $mon); } $tool_content .= '<div class="form-wrapper"> <form class="form-horizontal" role="form" method="post"> <div class="form-group"><div class="col-sm-10"><select name="selectedMonth" class="form-control">' . $months . '</select></div> <input class="btn btn-primary" type="submit" name="btnUsage" value="' . $langSubmit . '"> </div> </form> </div>';