<?php
$page_title = "Overall CES Stats | CES Admin";
include_once($_SERVER['DOCUMENT_ROOT'] . "/course_registration/common_functions.php"); //common functions in the course registartion system
include_once("stat_functions.php"); //stat functions
include_once($_SERVER['DOCUMENT_ROOT'] . "/course_registration/config.php"); //holds global config variables
check_if_authenticated('admin');//check if user is logged in
include_once($_SERVER['DOCUMENT_ROOT'] . "/course_registration/admin_html_top.php"); //get the HTML heading common to all pages in the CES admin module
//open connection to database
$db = mysqli_connect($mysql_server, $user, $pass, $database);
?>
<article class="ces-admin">
<h2>CES Admin - Session Report</h2>
<?php
include_once($_SERVER['DOCUMENT_ROOT'] . "/course_registration/ces_admin_nav.php");
//User Stats
?>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/data.js"></script>
<div id="user-chart-month" style="width:100%; height:400px;"></div>
<div id="user-chart-year" style="width:100%; height:400px;"></div>
<div id="user-chart-over-time" style="width:100%; height:400px;"></div>
<script>
$(function () {
$('#user-chart-month').highcharts({
data: {table: 'user-registration-table-by-month'},
chart: {type: 'areaspline'},
title: {text: 'Users by Registration Month'},
yAxis: {
title: {text: 'New Registrations'}
},
tooltip: {xDateFormat: "%B %Y"}
});//month
$('#user-chart-year').highcharts({
data: {table: 'user-registration-table-by-year'},
chart: {type: 'column'},
title: {text: 'Users by Registration Year'},
yAxis: {
title: {text: 'New Registrations'}
},
tooltip: {xDateFormat: "%Y"},
plotOptions: {
column: {
pointPadding: 0,
borderWidth: 0,
groupPadding: 0,
shadow: true,
color: '#42b79c'
}
}
});//year
$('#user-chart-over-time').highcharts({
data: {table: 'user-registration-table-over-time'},
chart: {type: 'area'},
title: {text: 'Total Number of Users: <?php echo total_number_of_users()?> '},
yAxis: {
title: {text: 'Users'}
},
tooltip: {xDateFormat: "%B %Y"},
plotOptions: {
series: {
marker: {enabled: false}
}
}
});//month
});//function
</script>
<?php
print_user_registration_by_month_table();
print_user_registration_by_year_table();
print_user_registration_over_time_table();
//Number of Unconfirmed Users
echo "\n<p>Number of Unconfirmed Users: ".number_of_unconfirmed_users()."</p>";
//Number of Blacklisted Users
echo "\n<p>Number of Blacklisted Users: ".number_of_blacklisted_users()."</p>";
//Number of HTML email Users
echo "\n<p>Number of Users Requesting HTML emails: ".number_of_htmlemail_users()."</p>";
//Course Stats
//Total Number of Courses
echo "\n<p>Total Number of Courses: ".number_of_courses()." [".number_of_duplicate_courses()." Duplicates]</p>";
//Total Number of Courses
echo "\n<p>Number of Active Courses: ".number_of_active_courses()."</p>";
//Total Number of Courses By Level
echo "\n<p>Number of Level 1 Courses: ".number_of_courses_by_level(1)."</p>";
echo "\n<p>Number of Level 2 Courses: ".number_of_courses_by_level(2)."</p>";
echo "\n<p>Number of Level 3 Courses: ".number_of_courses_by_level(3)."</p>";
//Session Stats
//Location Stats
//Other Stats - Files, Levels, Instructors
include_once($_SERVER['DOCUMENT_ROOT'] . "/course_registration/admin_html_bottom.php"); //get the bottom HTML common to all pages in the CES admin module
?>