Example #1
0
            }
            $record[2] = (int) preg_replace("/[^0-9]/", "", $record[2]);
            $nameList[$record[0]][$i] = array($record[1], $record[2]);
        }
    }
    fclose($fh);
}
//Make bar graphs for the names
foreach ($nameList as $_name => $data) {
    $amounts = array();
    $labels = array();
    foreach ($data as $year => $val) {
        $amounts[] = $val[0];
        $labels[] = $year;
    }
    $nameList[$_name]['graph'] = makeGraph($amounts, $labels);
}
?>


<html>

	<head>
		<title>::Baby Names::</title>
		<link rel='stylesheet' href='style.css' />
	</head>

	<body>

	<h1 align="left" style="margin:10px;color:#fff">
		::Baby Names::
Example #2
0
        /*
        if(!array_key_exists($reportName, $reports)){         // If the report name is not in the acceptable names array
        redirect_header(XHELP_BASE_URL .'/report.php', 3, _XHELP_MSG_NO_REPORT_LOAD);
        }
        */
        runReport($reportName);
        break;
    case 'graph':
        if (!isset($_GET['name']) && $_GET['name'] == '') {
            redirect_header(XHELP_BASE_URL . '/report.php', 3, _XHELP_MSG_NO_REPORT);
        }
        $reportName = $_REQUEST['name'];
        /*if(!array_key_exists($reportName, $reports)){         // If the report name is not in the acceptable names array
          redirect_header(XHELP_BASE_URL .'/report.php', 3, _XHELP_MSG_NO_REPORT_LOAD);
          }*/
        makeGraph($reportName);
        break;
    default:
        // Display list of reports
        $reports = xhelpReportFactory::getReports();
        $rptNames = array();
        foreach ($reports as $rpt => $obj) {
            $rptNames[] = $rpt;
        }
        displayReports();
        break;
}
function displayReports()
{
    global $xoopsOption, $xoopsTpl, $xoopsConfig, $xoopsUser;
    $xoopsOption['template_main'] = 'xhelp_report.html';
Example #3
0
        $roster->tpl->assign_block_vars('top10w', array('NAME' => $rowb['Member'], 'TOTALXP' => $rowb['WeeklyXP'], 'TOTALRANK' => $wx));
        $wx++;
    }
}
_renderxpBar($gxp[0], $gxp[1], 'normal');
_renderxpBar($gxpc[0], $gxpc[1], 'rested');
// Make the bar graphs
$graph = '';
if ($addon['config']['graph_level_display'] == 1) {
    $graph .= makeGraph('level', $addon['config']['graph_level_level'], $addon['config']['graph_level_style']);
}
if ($addon['config']['graph_class_display'] == 1) {
    $graph .= makeGraph('class', $addon['config']['graph_class_level'], $addon['config']['graph_class_style']);
}
if ($addon['config']['graph_rank_display'] == 1) {
    $graph .= makeGraph('rank', $addon['config']['graph_rank_level'], $addon['config']['graph_rank_style']);
}
$git = '';
if ($roster->auth->getAuthorized($addon['config']['git_access'])) {
    $git = $guild_info_text;
}
$roster->tpl->assign_vars(array('L_MEMBER_ACHIEVEMENTS' => $roster->locale->act['NEWS_FILTER']['2'], 'TITLE' => '', 'NEXT' => '', 'LEVEL' => $roster->data['guild_level'], 'INFO' => $git, 'GRAPH' => $graph));
$select_tab = isset($_GET['t']) ? $_GET['t'] : 'profile';
$roster->tpl->assign_block_vars('gtabs', array('NAME' => $roster->locale->act['guildinfo'], 'BLOCKID' => 'profile', 'SELECTED' => $select_tab == 'profile' ? true : false));
foreach ($roster->locale->act['NEWS_FILTER'] as $id => $name) {
    //echo $id.' - '.$name.' --<br>';
    $roster->tpl->assign_block_vars('gtabs', array('NAME' => $name, 'BLOCKID' => 'ginfo' . $id, 'SELECTED' => $select_tab == 'profile' ? true : false));
    $query = "SELECT * FROM `" . $roster->db->table('news', $addon['basename']) . "`" . " WHERE `guild_id` = '" . $roster->data['guild_id'] . "'" . " AND `Typpe` = '" . ($id - 1) . "'" . " ORDER BY `Date` DESC;";
    $result = $roster->db->query($query);
    $return_string = '';
    if ($roster->db->num_rows($result) > 0) {
Example #4
0
            unlink($filename);
            print "Removed {$filename}";
        }
        print "\n";
    }
    print "\n";
    $f = substr($receiver, 6) . ".lock";
    if (file_exists($f)) {
        unlink($f);
        print "Removed {$f}";
    }
}
print "</pre>";
// Make Graphs
$myarray = getFreezers($datafile);
$rec_count = count($myarray);
print "Making graphs...";
$j = 0;
foreach ($myarray as $receiver => $array_of_freezers) {
    $j++;
    $result = makeGraph($receiver, $array_of_freezers, $graphname, $j);
}
print "Done.\n";
print "</pre>";
?>
<center>
<a href="freezers_m.php" class="green_btn_class">Go to Freezer Graphs</a>
</center>

</body></html>
                                $title = ucwords(str_replace("_", " ", $statistic . ' for ' . ($time_delimit == 'date_range' ? $start_date . ' through ' . $end_date : $time_delimit)));
                            }
                            // end if (!empty($call_results))
                        } else {
                            if ($statistic == 'evaluations_by_dept') {
                                $call_result = $time_delimit == 'date_range' ? returnEvaluationsByDept($time_delimit, $start_date, $end_date) : returnEvaluationsByDept($time_delimit);
                                $num_results = sizeOf($call_result);
                                if (!empty($call_result)) {
                                    $x_data = array();
                                    $y_data = array();
                                    for ($i = 0; $i < $num_results; $i++) {
                                        $x_data[] = $call_result[$i]['dept'];
                                        $y_data[] = $call_result[$i]['callcount'];
                                    }
                                    // end for
                                    $title = ucwords(str_replace("_", " ", $statistic . ' for ' . ($time_delimit == 'date_range' ? $start_date . ' through ' . $end_date : $time_delimit)));
                                }
                                // end if (!empty($call_results))
                            }
                        }
                    }
                }
            }
        }
    }
}
if (strcmp($graph_type, "csv") == 0) {
    makeGraph($x_data, $y_data, $num_results, $title, "csv");
} else {
    makeGraph($x_data, $y_data, $num_results, $title, "bar");
}