<?PHP /*-----------------------------------------------------------------------** --------------------------------------------------------------------------- IPM (Incyte Project Manager) PHP based project tracking tool Copyright (c) 2001 by phlux 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., 675 Mass Ave, Cambridge, MA 02139, USA. --------------------------------------------------------------------------- **-----------------------------------------------------------------------*/ /*----------------------------------------------------------- MAIN SWITCH -----------------------------------------------------------*/ // This switch is used in place of a complex "IF" arrangement. // $op is set to different values throughout IPM, the switch // determines what function to run when $op is set to one of // the following values. include "functions.php"; if ($op != "loginaction" && !isauthenticated()) { login(); return; } switch($op) { case "login": login(); break; case "loginaction": loginaction($username, $password); break; case "logout": logout(); break; case "mytasks": mytasks(); break; case "addtask": addtask($id, $name); break; case "addtaskaction": addtaskaction($id, $name, $title, $hours, $description, $person, $notify, $billable, $parent_id); break; case "edittask": edittask($task_id); break; case "edittaskaction": edittaskaction($task_id, $id, $title, $hours, $description, $person, $billable, $parent_id); break; case "confirmdeletetask": confirmdeletetask($task_id); break; case "deletetask": deletetask($task_id); break; case "addproject": addproject(); break; case "addprojectaction": addprojectaction($name, $startmonth, $startday, $startyear, $endmonth, $endday, $endyear, $comments); break; case "confirmprojectdelete": confirmprojectdelete($id); break; case "editproject": editproject($id); break; case "editprojectaction": editprojectaction($id, $name, $startmonth, $startday, $startyear, $endmonth, $endday, $endyear, $comments); break; case "deleteproject": deleteproject($id); break; case "completeproject": completeproject($id); break; case "reactivateproject": reactivateproject($id); break; case "listprojects": listprojects(); break; case "completedlist": completedlist(); break; case "projectdetail": projectdetail($id); break; case "projectsummary": projectsummary($id); break; case "addcomment": addcomment($task_id); break; case "addcommentaction": addcommentaction($task_id, $comment); break; case "editcomment": editcomment($comment_id, $task_id); break; case "editcommentaction": editcommentaction($comment_id, $comment, $task_id); break; case "deletecomment": deletecomment($comment_id, $task_id); break; case "deletecommentaction": deletecommentaction($comment_id, $task_id); break; default: mytasks(); break; } // That's all, folks ?>