source: contrib/ProjectManager/ganttchart.php @ 3594

Revision 3594, 1.4 KB checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado o módulo ProjectManager? para a comunidade

  • Property svn:executable set to *
Line 
1<?php
2/**
3 * ProjectManager - Gantchart creation
4 *
5 * As ganttcharts contain an image-map and the image, we save the image as a temporary file.
6 * This for performance reasons, it saves a second creation / script-run.
7 * This script reads and output the temporary file/image and unlinks it after.
8 * If the temp. image is not found, it creates a new one.
9 * It can be used standalone, eg. from SiteMgr.
10 *
11 * @link http://www.egroupware.org
12 * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
13 * @package projectmanager
14 * @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
15 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
16 * @version $Id: ganttchart.php 22355 2006-08-26 16:30:45Z ralfbecker $
17 */
18
19error_reporting(E_ALL & ~E_NOTICE);
20
21$tmp = $GLOBALS['phpgw_info']['server']['temp_dir'];
22if (!$tmp || !is_dir($tmp) || !is_writable($tmp))
23{
24        @unlink($tmp = tempnam('','test'));     // get the systems temp-dir
25        $tmp = dirname($tmp);
26}
27if (isset($_GET['img']) && is_readable($ganttchart = $tmp.'/'.basename($_GET['img'])))
28{
29        header('Content-type: image/png');
30        readfile($ganttchart);
31        @unlink($ganttchart);
32        exit;
33}
34
35$GLOBALS['phpgw_info'] = array(
36        'flags' => array(
37                'currentapp'    => 'projectmanager',
38                'noheader'              => True,
39                'nonavbar'              => True
40));
41include('../header.inc.php');
42
43ExecMethod('projectmanager.ganttchart.create');
44
45$GLOBALS['phpgw']->common->phpgw_exit();
Note: See TracBrowser for help on using the repository browser.