echo $report->getErrorMessage(); exit; } // XXX ogi: Isn't it $type? if (!isset($datatype)) { $datatype = 1; } if (!$start) { $start = mktime(0, 0, 0, date('m'), 1, date('Y')); } if (!$end) { $end = time(); } else { $end--; } // Create the graph. These two calls are always required $graph = new PieGraph(640, 480, "auto"); //$graph->SetMargin(50,10,35,50); $arr['tasks'] = 'By Task'; $arr['category'] = 'By Category'; $arr['subproject'] = 'By Subproject'; $arr['user'] = '******'; $graph->title->Set("Time Report " . $arr[$type] . " (" . date('m/d/Y', $start) . "-" . date('m/d/Y', $end) . ")"); $graph->subtitle->Set($sys_name); report_pie_arr($report->labels, $report->getData()); $p1 = new PiePlot3D($pie_vals); $p1->ExplodeSlice(0); $p1->SetLegends($pie_labels); $graph->Add($p1); // Display the graph $graph->Stroke();
:</strong><br /><?php echo report_months_box($report, 'end', $end); ?> </td> <td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?> "></td> </tr></table> </form> <p> <?php if ($typ == 'r') { $report = new ReportSiteTime($type, $start, $end); $labels = $report->labels; $data = $report->getData(); echo $HTML->listTableTop(array(_('Type'), _('Time'))); for ($i = 0; $i < count($labels); $i++) { echo '<tr ' . $HTML->boxGetAltRowStyle($i) . '>' . '<td>' . $labels[$i] . '</td><td>' . $data[$i] . '</td></tr>'; } echo $HTML->listTableBottom(); } else { ?> <img src="sitetime_graph.php?<?php echo "start={$start}&end={$end}&type={$type}"; ?> " width="640" height="480"> <?php } echo report_footer(); // Local Variables: