13 $userNode = eZUser::currentUser()->contentObject()->mainNode();
19 $host =
$ini->variable(
'DatabaseSettings',
'Server');
26 $db = ezcDbFactory::create(
"mysql://{$user}:{$passwd}@{$host}/{$dbname}" );
32 $nodes[
" ".$category[
'result']->attribute(
'name')][] = $child->attribute(
'node_id');
36 foreach(
$nodes as $k=>$n) {
38 $q =
$db->createSelectQuery();
41 ->from(
'ipediatre_visits')
42 ->where(
$q->expr->in(
'node_id', $n))
51 $graph =
new ezcGraphPieChart();
53 if ($Params[
'type'] !=
'svg')
55 $graph->driver =
new ezcGraphGdDriver();
56 $graph->options->font =
'design/standard/fonts/arial.ttf';
59 $graph->legend->position = ezcGraph::RIGHT;
60 $graph->options->label =
'';
61 $graph->legend->portraitSize = .25;
85 $graph->data[
'Access statistics'] =
new ezcGraphArrayDataSet(
$nodes);
87 $graph->renderToOutput(450,200);
89 }
catch(Exception $e) {
91 header(
"Content-Type: image/png");
92 $im = @imagecreate(1, 1);
93 $background_color = imagecolorallocate($im, 0, 0, 0);
97 eZExecution::cleanExit();