Example #1
0
    }
    ////////////////////////////////////////////////////////////////////////////
    // SAVE DATE RANGE
    ////////////////////////////////////////////////////////////////////////////
    if ($_GET['act'] == 'save_date_range') {
        if (isset($_GET['period'])) {
            $period = $_GET['period'];
            $from = $_GET['from'];
            $to = $_GET['to'];
            require '../classes/dashboard/DashboardCommon.php';
            DashboardCommon::saveDateRangeFilter($period, $to, $from);
            echo "1";
            die;
        }
        echo "0";
        die;
    }
    if ($_GET['act'] == 'get_saved_date_range') {
        require '../classes/dashboard/DashboardCommon.php';
        $date_range = DashboardCommon::getSavedDateRangeFilter();
        header('Content-Type: application/json');
        echo json_encode($date_range);
        die;
    }
    if ($_GET['act'] == 'get_campaign_start_date') {
        require '../classes/dashboard/DashboardCommon.php';
        $start_date = DashboardCommon::getFirstCampaignStartDate();
        echo json_encode($start_date);
        die;
    }
}
Example #2
0
<?php

error_reporting(0);
include_once 'file_include.php';
include 'process.php';
require_once dirname(__FILE__) . '/classes/dashboard/DashboardCommon.php';
$saved_dates = DashboardCommon::getSavedDateRangeFilter();
$LM_PERIOD = $saved_dates['period'];
$LM_PERIOD_FROM = date('F d, Y', strtotime($saved_dates['from']));
$LM_PERIOD_TO = date('F d, Y', strtotime($saved_dates['to']));
######################
#
# 	POST SECTION
#
######################
if (isset($_POST['mode'])) {
    $inner_page = $_POST['request_page'];
    if ($inner_page == "") {
        $inner_page = "index";
    }
    include "query.include/" . $inner_page . ".php";
}
//end if(isset($_POST['mode']))
######################
#
# 	GET SECTION
#
######################
if (isset($_GET['mode'])) {
    $inner_page = $_GET['request_page'];
    if ($inner_page == "") {