| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
$sections = array( |
| 8 |
'students' => __( 'Students', 'learnpress' ), |
| 9 |
'instructors' => __( 'Instructors', 'learnpress' ), |
| 10 |
); |
| 11 |
$section = 'students';// $this->section ? $this->section : 'students'; |
| 12 |
$sections_count = sizeof( $sections ); |
| 13 |
$count = 0; |
| 14 |
?> |
| 15 |
<div id="learn-press-statistic" class="learn-press-statistic-courses"> |
| 16 |
<ul class="subsubsub chart-buttons"> |
| 17 |
<li> |
| 18 |
<button class="button" data-type="course-last-7-days" disabled="disabled"><?php _e( 'Last 7 Days', 'learnpress' ); ?></button> |
| 19 |
</li> |
| 20 |
<li> |
| 21 |
<button class="button" data-type="course-last-30-days"><?php _e( 'Last 30 Days', 'learnpress' ); ?></button> |
| 22 |
</li> |
| 23 |
<li> |
| 24 |
<button class="button" data-type="course-last-12-months"><?php _e( 'Last 12 Months', 'learnpress' ); ?></button> |
| 25 |
</li> |
| 26 |
<li> |
| 27 |
<button class="button" data-type="course-all"><?php _e( 'All', 'learnpress' ); ?></button> |
| 28 |
</li> |
| 29 |
<li> |
| 30 |
<form id="course-custom-time"> |
| 31 |
<span><?php _e( 'From', 'learnpress' ); ?></span> |
| 32 |
<input type="text" placeholder="Y/m/d" name="from" class="date-picker" readonly="readonly"> |
| 33 |
<span><?php _e( 'To', 'learnpress' ); ?></span> |
| 34 |
<input type="text" placeholder="Y/m/d" name="to" class="date-picker" readonly="readonly"> |
| 35 |
<input type="hidden" name="action" value="learnpress_custom_stats"> |
| 36 |
<button class="button button-primary" data-type="course-custom-time" type="submit" disabled="disabled"><?php _e( 'Go', 'learnpress' ); ?></button> |
| 37 |
</form> |
| 38 |
</li> |
| 39 |
</ul> |
| 40 |
<div class="clear"></div> |
| 41 |
<div id="learn-press-chart" class="learn-press-chart"> |
| 42 |
</div> |
| 43 |
|
| 44 |
<script type="text/javascript"> |
| 45 |
var LP_Chart_Config = <?php learn_press_config_chart(); ?>; |
| 46 |
jQuery(document).ready(function ($) { |
| 47 |
$('#learn-press-chart').LP_Chart_Line(<?php echo json_encode( learn_press_get_chart_courses( null, 'days', 7 ) ); ?>, LP_Chart_Config); |
| 48 |
}); |
| 49 |
</script> |
| 50 |
</div> |
| 51 |
|
| 52 |
|