Location: PHPKode > projects > Internet Task Management System > itms_mysql_build_0111/menu.php
<?php

/*
 * ITMS ValleyData source file version 1.0 May 11, 2001
 *
 * Defines the content and look of the menu
 *
 *
 * Internet Task Management System: An online system used for recording information about and assigning tasks and processes.
 * Copyright (C) 2001  ValleyData Programming Group
 *
 * 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
 *
 * See file named "gpl.txt" included with source code or
 * visit http://www.gnu.org/copyleft/gpl.txt on the internet.
 */
include("config.php");

$SUB_CAT = "";
/*
$PAGE = strrchr($PHP_SELF, "/");
$PAGE = strtok($PAGE, "?");
$PAGE = substr($PAGE, 1);
*/
//determines the category we are in
if(stristr($PAGE, "task") || $PAGE == "index.php")
{
    $SUB_CAT = "task";
}
if(stristr($PAGE, "process"))
{
    $SUB_CAT = "process";
}

print("<table width=\"$LOGO_WIDTH_HEADER\">");

if($PAGE == "index.php")
    print("<tr><td class=\"menu_selected\" colspan=\"2\">Pending Tasks</td></tr>\n");
else
    print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"index.php\">Pending Tasks</a></td></tr>\n");

if($PAGE == "task.php")
    print("<tr><td class=\"menu_selected\" colspan=\"2\">Tasks</td></tr>\n");
else
    print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"task.php\">Tasks</a></td></tr>\n");

if($PAGE == "task_assign.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Assign Task</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"task_assign.php\">Assign Task</a></td></tr>\n");

if($PAGE == "task_create.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Create Task</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"task_create.php\">Create Task</a></td></tr>\n");

if($PAGE == "task_edit.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Edit Task</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"task_edit.php\">Edit Task</a></td></tr>\n");

if($PAGE == "task_delete.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Delete Task</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"task_delete.php\">Delete Task</a></td></tr>\n");

if($PAGE == "process.php")
    print("<tr><td class=\"menu_selected\" colspan=\"2\">Processes</td></tr>\n");
else
    print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"process.php\">Processes</a></td></tr>\n");

if($PAGE == "process_assign.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Assign Process</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"process_assign.php\">Assign Process</a></td></tr>\n");

if($PAGE == "process_create.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Create Process</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"process_create.php\">Create Process</a></td></tr>\n");

if($PAGE == "process_edit.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Edit Process</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"process_edit.php\">Edit Process</a></td></tr>\n");

if($PAGE == "process_delete.php")
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu_selected\">Delete Process</td></tr>\n");
else
	print("<tr><td>&nbsp;&nbsp;</td><td class=\"menu-sub\"><a href=\"process_delete.php\">Delete Process</a></td></tr>\n");

if($PAGE == "myprefs.php")
    print("<tr><td class=\"menu_selected\" colspan=\"2\">My Preferences</td></tr>\n");
else
    print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"myprefs.php\">My Preferences</a></td></tr>\n");

if($isAdmin)
{
    if($PAGE == "user_mgt.php")
        print("<tr><td class=\"menu_selected\" colspan=\"2\">User Management</td></tr>\n");
    else
        print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"user_mgt.php\">User Management</a></td></tr>\n");
    if($PAGE == "group_mgt.php")
        print("<tr><td class=\"menu_selected\" colspan=\"2\">Group Management</td></tr>\n");
    else
        print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"group_mgt.php\">Group Management</a></td></tr>\n");
    if($PAGE == "user_tasks_reassign.php")
        print("<tr><td class=\"menu_selected\" colspan=\"2\">Reassign Tasks</td></tr>\n");
    else
        print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"user_tasks_reassign.php\">Reassign Tasks</a></td></tr>\n");
}//end ifAdmin

if($PAGE == "logout.php")
    print("<tr><td class=\"menu_selected\" colspan=\"2\">Logout</td></tr>\n");
else
    print("<tr><td class=\"menu-category\" colspan=\"2\"><a href=\"logout.php\">Logout</a></td></tr>\n");


?>

</table>

Return current item: Internet Task Management System