sqlsafe($_GET['pId']); $getTasks = $db->select('select id , name ,progress, start_date , end_date ,status_id ' . 'from tasks_info where project_id = '.$projectId.''); if(is_array($getTasks )){ $g = new BURAK_Gantt(); // set grid type $g->setGrid($config['gantType']); // set Gantt colors $g->setColor("group","000000"); $g->setColor("progress","660000"); for($i=0;$iaddTask($getTasks[$i]['id'],$getTasks[$i]['start_date'],$getTasks[$i]['end_date'],$getTasks[$i]['progress'],$getTasks[$i]['name']); } $getRelationShip = $db->select('select * from tasks_relations where project_id='.$projectId.''); for($i=0;$iaddRelation($getRelationShip[$i]['task_id_1'],$getRelationShip[$i]['task_id_2'],$getRelationShip[$i]['relation']); } $g->outputGantt(ABSPATH.'/cache/gantt.jpg'); $getData = $db->select('select id , name from projects_info where id='.$projectId.''); $skin = new skin(); $skin->assign('config',$config); $skin->assign('project',$getData[0]); $skin->assign('showMenu','1'); $skin->assign('incFile','site/projects/gantt.tpl'); $skin->display('site/index.tpl'); }else{ header('location: module.php?act=load&modload=projects&file=projects&error=512'); } exit; } ?>