<?php
// $Header: /home/CVS/rps/itpm/itpm_gantts_wrapper.php,v 1.20 2008/09/27 21:49:00 yoxel Exp $
/*
* ----START-LICENCE----
* Copyright 2002-2008 Yoxel Systems, Santa Clara, CA, USA (hide@address.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
* -----END-LICENCE-----
*/
require_once('../includes/db.inc');
$hide_header=TRUE;
$on_resize_str="save_geom('geomGANTTS')";
include_once('includes/header.inc');
//_warning_buffer();
if(defined('YXL_GANTT_USE_JPGRAPH') && !$jpgraph)
_quit_error('For GANTTS charts you will have to install jpgraph.');
if(!isset($_GET['state']))
_quit_error('Improper use of the script: state.');
$state=$_GET['state'];
if(!isset($_GET['proj_id']))
_quit_error('Improper use of the script: proj_id.');
$proj_id=$_GET['proj_id'];
if($state=='plan'){
require_once('includes/itpm/itp.inc');
$pp=new ITPlan($proj_id,FALSE);
$wcal=&$pp->wcal;
$pp->init(date("m/j/Y",time()+SECS_IN_DAY));
}elseif($state=='implement'){
require_once('includes/itpm/itpt.inc');
$pp=new ITPlanTracker($proj_id,FALSE);;
$pp->init();
}else
_quit_error('No charting available in this project state.');
if(defined('YXL_GANTT_USE_JPGRAPH'))
require_once('includes/project/gantts_wrapper_inc.php');
else
require_once('includes/project/gantt_gwt_inc.php');
include_once('includes/footer.inc');
?>