Esempio n. 1
0
echo "<br/><br/>";
$data['E10'] = 4.8;
$data['Fe10'] = 6.65;
$data['Ma10'] = 8.5;
$data['Ab10'] = 12.53;
$data['Ma10'] = 11.06;
$data['Ju10'] = 15.64;
$data['Jul10'] = 16.22;
$data['Ag10'] = 13.28;
$data['Se10'] = 13.87;
$data['Oc10'] = 13.93;
$data['No10'] = 12.03;
$data['Di10'] = 10.43;
$data['E11'] = 2.65;
$data['Fe11'] = 4.32;
$data['Ma11'] = 5.19;
$data['Ab11'] = 6.55;
$data['Ma11'] = 7.41;
$data['Ju11'] = 13.83;
$data['Ju11'] = 8.56;
$data['Ag11'] = 1.48;
$mc = new maxChart($data);
$mc->displayChart('Porcentajes referidos al mes', 1, 700, 150);
echo "<br/><br/>";
?>
 
          
      </div> 
 </div> 
    
</body>
Esempio n. 2
0
function year_graphics($month, $year)
{
    global $dbh, $language, $statistics_screen;
    $start_month = $month + 1;
    $start_year = $year - 1;
    if ($month == 12) {
        $start_year = $year;
        $start_month = 1;
    }
    for ($i = 1; $i < 13; $i++) {
        if ($start_month == 13) {
            $start_month = 1;
            $start_year++;
        }
        $date = $start_year . '-' . $start_month . '-' . "1";
        $first_day = strtotime($date);
        $Days_In_Month = cal_days_in_month(CAL_GREGORIAN, $start_month, $start_year);
        $latest_day = $first_day + 86400 * $Days_In_Month;
        if ($statistics_screen == 'visitors') {
            // *** Show visitors ***
            $datasql = $dbh->query("SELECT stat_ip_address FROM humo_stat_date\n\t\t\t\tWHERE stat_date_linux > " . $first_day . " AND stat_date_linux < " . $latest_day . "\n\t\t\t\tGROUP BY stat_ip_address");
        } else {
            // *** Show visited families ***
            $datasql = $dbh->query("SELECT * FROM humo_stat_date\n\t\t\t\tWHERE stat_date_linux > " . $first_day . " AND stat_date_linux < " . $latest_day);
        }
        if ($datasql) {
            $nr_statistics = $datasql->rowCount();
        }
        if ($start_month == '1') {
            $month_name = __('jan');
        }
        if ($start_month == '2') {
            $month_name = __('feb');
        }
        if ($start_month == '3') {
            $month_name = __('mar');
        }
        if ($start_month == '4') {
            $month_name = __('apr');
        }
        if ($start_month == '5') {
            $month_name = __('may');
        }
        if ($start_month == '6') {
            $month_name = __('jun');
        }
        if ($start_month == '7') {
            $month_name = __('jul');
        }
        if ($start_month == '8') {
            $month_name = __('aug');
        }
        if ($start_month == '9') {
            $month_name = __('sep');
        }
        if ($start_month == '10') {
            $month_name = __('oct');
        }
        if ($start_month == '11') {
            $month_name = __('nov');
        }
        if ($start_month == '12') {
            $month_name = __('dec');
        }
        $short_year = substr($start_year, 2);
        $twelve_months[$month_name . "&nbsp;" . $short_year] = $nr_statistics;
        $start_month++;
    }
    $mc = new maxChart($twelve_months);
    $this_month = date("n");
    if (CMS_SPECIFIC == "Joomla") {
        // make the graph scrollable
        echo '<div style="width:100%;height:230px;overflow:auto;">';
        echo '<div style="height:210px;width:1000px;overflow:visible;">';
    }
    if ($statistics_screen == 'visitors') {
        $mc->displayChart(__('Visitors'), 1, 700, 200, false, $this_month);
    } else {
        $mc->displayChart(__('Visited families in the past 12 months'), 1, 700, 200, false, $this_month);
    }
    if (CMS_SPECIFIC == "Joomla") {
        echo '</div>';
        echo '</div>';
    }
}