Exemple #1
0
 function renderData()
 {
     global $osC_Language;
     include 'includes/classes/piwik.php';
     include 'includes/classes/flash_pie.php';
     $end_date = date("Y-m-d");
     $start_date = date("Y-m-d", strtotime('-2 weeks'));
     $toC_Piwik = new toC_Piwik();
     $os_data = $toC_Piwik->getOS($start_date, $end_date, 'day');
     $pie_chart = new toC_Flash_Pie('', '80', '');
     $pie_chart->setData($os_data);
     $pie_chart->render();
 }
Exemple #2
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();
 }
Exemple #3
0
 function renderData()
 {
     global $osC_Language;
     include 'includes/classes/piwik.php';
     include 'includes/classes/flash_pie.php';
     $end_date = date("Y-m-d");
     $start_date = date("Y-m-d", strtotime('-2 weeks'));
     $toC_Piwik = new toC_Piwik();
     $country_data = $toC_Piwik->getUserCountry($start_date, $end_date, 'day');
     $data = array();
     foreach ($country_data as $key => $value) {
         $data += array($value['nb_label'] => $value['nb_visits']);
     }
     arsort($data);
     $pie_chart = new toC_Flash_Pie('', '80', '');
     $pie_chart->setData($data);
     $pie_chart->render();
 }
<?php

/*
  $Id: traffic_source_summary.php $
  TomatoCart Open Source Shopping Cart Solutions
  http://www.tomatocart.com

  Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
$date = toC_Piwik::getWebsiteDateCreated();
$year = substr($date, 0, 4);
$month = (int) substr($date, 5, 2) - 1;
$day = (int) substr($date, 8, 2);
?>

Toc.reports_web.TrafficSourceSummaryPanel = function(config) {
  config = config || {};

  config.width = 800;
  config.height = 460;
  config.modal = true;
  config.layout = 'border';
  config.border = false;
  
  var today = new Date();
  var start_date = today.add(Date.MONTH, -1).add(Date.DAY, -1);
  var date_created = new Date(<?php 
Exemple #5
0
 function getRefererWebsites()
 {
     global $toC_Json;
     $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';
     $toC_Piwik = new toC_Piwik();
     $websites = $toC_Piwik->getData('referers_websites', $start_date, $end_date, $period);
     $records = array();
     foreach ($websites as $website => $visitors) {
         $records[] = array('websites' => $website, 'visitors' => $visitors);
     }
     $response = array(EXT_JSON_READER_TOTAL => sizeof($records), EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }