| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; // Exit if accessed directly |
| 5 |
} |
| 6 |
|
| 7 |
$sections = array( |
| 8 |
'students' => __( 'Students', 'learnpress' ), |
| 9 |
'instructors' => __( 'Instructors', 'learnpress' ), |
| 10 |
); |
| 11 |
|
| 12 |
$section = 'students'; |
| 13 |
$sections_count = sizeof( $sections ); |
| 14 |
$count = 0; |
| 15 |
?> |
| 16 |
|
| 17 |
<div id="learn-press-statistic" class="learn-press-statistic-orders"> |
| 18 |
<ul class="subsubsub chart-buttons"> |
| 19 |
<li> |
| 20 |
<button class="button" data-type="order-last-7-days" disabled="disabled"><?php _e( 'Last 7 Days', 'learnpress' ); ?></button> |
| 21 |
</li> |
| 22 |
<li> |
| 23 |
<button class="button" data-type="order-last-30-days"><?php _e( 'Last 30 Days', 'learnpress' ); ?></button> |
| 24 |
</li> |
| 25 |
<li> |
| 26 |
<button class="button" data-type="order-last-12-months"><?php _e( 'Last 12 Months', 'learnpress' ); ?></button> |
| 27 |
</li> |
| 28 |
<li> |
| 29 |
<button class="button" data-type="order-all"><?php _e( 'All', 'learnpress' ); ?></button> |
| 30 |
</li> |
| 31 |
<li> |
| 32 |
<form id="order-custom-time"> |
| 33 |
<span><?php _e( 'From', 'learnpress' ); ?></span> |
| 34 |
<input type="text" placeholder="Y/m/d" name="from" class="date-picker" readonly="readonly"> |
| 35 |
<span><?php _e( 'To', 'learnpress' ); ?></span> |
| 36 |
<input type="text" placeholder="Y/m/d" name="to" class="date-picker" readonly="readonly"> |
| 37 |
<input type="hidden" name="action" value="learnpress_custom_stats"> |
| 38 |
<button class="button button-primary" data-type="order-custom-time" type="submit" disabled="disabled"><?php _e( 'Go', 'learnpress' ); ?></button> |
| 39 |
</form> |
| 40 |
</li> |
| 41 |
</ul> |
| 42 |
<div class="clear"></div> |
| 43 |
<br/> |
| 44 |
<div id="chart-options"> |
| 45 |
<?php _e( 'Sale by', 'learnpress' ); ?> |
| 46 |
<select id="report_sales_by"> |
| 47 |
<option value="date"><?php _e( 'Date', 'learnpress' ); ?></option> |
| 48 |
<option value="course"><?php _e( 'Course', 'learnpress' ); ?></option> |
| 49 |
<option value="category"><?php _e( 'Course Category', 'learnpress' ); ?></option> |
| 50 |
</select> |
| 51 |
<span id="panel_report_sales_by_course" class="panel_report_option"> |
| 52 |
<?php _e( 'Select a course', 'learnpress' ); ?> |
| 53 |
<input id="report-by-course-id" class="statistics-search-course" /> |
| 54 |
</span> |
| 55 |
<span id="panel_report_sales_by_category" class="panel_report_option"> |
| 56 |
<?php _e( 'Select a course category', 'learnpress' ); ?> |
| 57 |
<input id="report-by-course-category-id" class="statistics-search-course-category" /> |
| 58 |
</span> |
| 59 |
</div> |
| 60 |
|
| 61 |
<div class="clear"></div> |
| 62 |
<div id="learn-press-chart" class="learn-press-chart"> |
| 63 |
</div> |
| 64 |
|
| 65 |
<script type="text/javascript"> |
| 66 |
var LP_Chart_Config = <?php learn_press_config_chart(); ?>; |
| 67 |
jQuery(document).ready(function ($) { |
| 68 |
$('#learn-press-chart').LP_Chart_Line(<?php echo json_encode( learn_press_get_chart_orders( null, 'days', 7 ) ); ?>, LP_Chart_Config); |
| 69 |
}); |
| 70 |
</script> |
| 71 |
</div> |
| 72 |
|
| 73 |
|