예제 #1
0
            $graph->setFrame(true, 'red', 2);
            $background->Add($graph, 0, 7 * ($height + $space) + 2 * $xUserTickWidth + $xGroupTickWidth);
            if (!empty($_REQUEST['galleryId'])) {
                $logslib->insert_image($_REQUEST['galleryId'], $graph, $ext, $title, $period);
            }
        } else {
            $renderer = new GD_GRenderer($widthGroup, $height, $ext);
            $graph = new $graphType();
            $graph->setData($series);
            $graph->setTitle($title);
            $graph->draw($renderer);
            imagecopy($background->gd, $renderer->gd, 0, 7 * ($height + $space), 0, 0, $renderer->width, $renderer->height);
        }
    }
    if ($prefs['feature_jpgraph'] == 'y') {
        $background->Stroke();
    } else {
        ob_start();
        $background->httpOutput("graph.{$ext}");
        $content = ob_get_contents();
        ob_end_flush();
    }
    die;
} elseif ($prefs['feature_jpgraph'] == 'y') {
    $smarty->assign('bgcolors', array('white', 'gray', 'silver', 'ivory', 'whitesmoke', 'beige', 'darkgrey'));
    //get_strings tra('white'), tra('gray'), tra('silver'), tra('ivory'), tra('whitesmoke'), tra('beige'),tra('darkgrey')
    $smarty->assign('defaultBgcolor', 'whitesmoke');
    $smarty->assign('defaultLegendBgcolor', 'white');
    $imagegallib = TikiLib::lib('imagegal');
    $galleries = $imagegallib->list_galleries(0, -1, 'name_asc', $user, '');
    $smarty->assign('galleries', $galleries['data']);