1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if ( !class_exists('Wcap_Dashboard' ) ) {
class Wcap_Dashboard {
public static function wcap_display_dashboard( ) {
$start_date = '';
$end_date = '';
if( isset( $_GET['duration_select'] ) && '' != $_GET['duration_select'] ) {
$selected_data_range = $_GET['duration_select'];
} else {
$selected_data_range = 'this_month';
}
if ( isset( $selected_data_range ) && 'other' == $selected_data_range ) {
if ( isset( $_GET['wcap_start_date'] ) && '' != $_GET['wcap_start_date'] ){
$start_date = $_GET['wcap_start_date'];
}
if ( isset( $_GET['wcap_end_date'] ) && '' != $_GET['wcap_end_date'] ) {
$end_date = $_GET['wcap_end_date'];
}
}
$display_report = new Wcap_Dashboard_Report_Action();
$display_report->wcap_get_all_reports( $selected_data_range, $start_date, $end_date );
}
}
}