Esempio n. 1
0
 function renderData()
 {
     global $osC_Database, $osC_Language;
     require_once 'includes/classes/piwik.php';
     require_once 'includes/classes/flash_line.php';
     $toC_Piwik = new toC_Piwik();
     $end_date = date("Y-m-d");
     $start_date = date("Y-m-d", strtotime('-2 weeks'));
     $data = $toC_Piwik->getVisits($start_date, $end_date);
     $chart = new toC_Flash_Last_Visits_Chart(' ');
     $chart->setData($data);
     $chart->render();
 }
Esempio n. 2
0
 function renderTrafficSourceSummaryFlashData()
 {
     global $osC_Language;
     $start_date = isset($_REQUEST['start_date']) && !empty($_REQUEST['start_date']) ? $_REQUEST['start_date'] : null;
     $end_date = isset($_REQUEST['end_date']) && !empty($_REQUEST['end_date']) ? $_REQUEST['end_date'] : null;
     $period = isset($_REQUEST['period']) && !empty($_REQUEST['period']) ? $_REQUEST['period'] : 'day';
     $type = isset($_REQUEST['type']) && !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'referer_type_direct';
     $toC_Piwik = new toC_Piwik();
     $visitsData = $toC_Piwik->getData($type, $start_date, $end_date, $period);
     $chart = new toC_Flash_Last_Visits_Chart($osC_Language->get('flash_chart_heading_' . $type));
     $chart->setData($visitsData);
     $chart->setToolTip(self::_getFlashChartToolTip($type));
     $chart->render();
 }