Beispiel #1
0
:</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 ($dev_id && $typ == 'r') {
        $report = new ReportUserTime($dev_id, $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();
    } elseif ($dev_id) {
        ?>
		<img src="usertime_graph.php?<?php 
        echo "start={$start}&end={$end}&dev_id={$dev_id}&type={$type}";
        ?>
" width="640" height="480">
		<p>
		<?php 
    }
}
}
// 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';
$graph->title->Set("Time Report " . $arr[$type] . " (" . date('m/d/Y', $start) . "-" . date('m/d/Y', $end) . ")");
$graph->subtitle->Set($sys_name);
// Create the tracker open plot
//$data  =& $report->getData();
//$labels =& $report->labels;
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();