= 1) { $rv[$i ] = "E"; $rv[$i+1] = "Week View"; if ($get_par_append === FALSE) $rv[$i+2] = "schedweekview.php"; else $rv[$i+2] = "schedweekview.php?" . $get_par_append; $i += 3; } // //Scheduling month view is only appropriate at menu level 2 and above. if ($menulevel >= 2) { $rv[$i ] = "E"; $rv[$i+1] = "Month View"; if ($get_par_append === FALSE) $rv[$i+2] = "schedmonthview.php"; else $rv[$i+2] = "schedmonthview.php?" . $get_par_append; $i += 3; } // //The heading "Queries" is only appropriate when a user is logged in. if ($userinfo !== FALSE) { $rv[$i ] = "H"; $rv[$i+1] = "Queries"; $rv[$i+2] = ""; $i += 3; // //Showing "My Reservations" is only appropriate when a user is logged in. $rv[$i ] = "E"; $rv[$i+1] = "Show My Reservations"; if ($get_par_append === FALSE) $rv[$i+2] = "myresshow.php"; else $rv[$i+2] = "myresshow.php?" . $get_par_append; $i += 3; } // //Utilities should be shown if the user is cleared to view the users list, clear to //edit resources, to view the log entries, or to view the database statistics and //if the menu level is 2. // if ( ($userinfo !== FALSE) && ( (PERM_get_val_from_string($userinfo["perm"], "canviewuserslist" ) !== FALSE) || (PERM_get_val_from_string($userinfo["perm"], "canvieweditresources" ) !== FALSE) || (PERM_get_val_from_string($userinfo["perm"], "canviewlogentries" ) !== FALSE) || (PERM_get_val_from_string($userinfo["perm"], "canviewdbstats" ) !== FALSE) ) && ($menulevel >= 2) ) { $rv[$i ] = "H"; $rv[$i+1] = "Utilities"; $rv[$i+2] = ""; $i += 3; //Display the view/edit active users option if the permission string says it is OK. if (PERM_get_val_from_string($userinfo["perm"], "canviewuserslist") !== FALSE) { $rv[$i ] = "E"; $rv[$i+1] = "View/Edit Active Users"; $rv[$i+2] = "userlistactive.php"; $i += 3; } //Display the view/edit inactive users option if the permission string says it is OK. if (PERM_get_val_from_string($userinfo["perm"], "canviewuserslist") !== FALSE) { $rv[$i ] = "E"; $rv[$i+1] = "View/Edit Inactive Users"; $rv[$i+2] = "userlistinactive.php"; $i += 3; } //Display the view/edit resources option if the permission string says it is OK. if (PERM_get_val_from_string($userinfo["perm"], "canvieweditresources") !== FALSE) { $rv[$i ] = "E"; $rv[$i+1] = "View/Edit Resources"; $rv[$i+2] = "resourcelist.php"; $i += 3; } //Display the logview option if the permission string says it is OK. if (PERM_get_val_from_string($userinfo["perm"], "canviewlogentries") !== FALSE) { $rv[$i ] = "E"; $rv[$i+1] = "View Resource Scheduler Log"; if ($get_par_append === FALSE) $rv[$i+2] = "viewresschedlog.php"; else $rv[$i+2] = "viewresschedlog.php?" . $get_par_append; $i += 3; } //Display the database view option if the permission string says it is OK. if (PERM_get_val_from_string($userinfo["perm"], "canviewdbstats") !== FALSE) { $rv[$i ] = "E"; $rv[$i+1] = "View Database Statistics"; if ($get_par_append === FALSE) $rv[$i+2] = "viewdbstats.php"; else $rv[$i+2] = "viewdbstats.php?" . $get_par_append; $i += 3; } } // //The self-administration heading applies only when a user is logged in and the //menu level is 2 or greater. // if (($userinfo !== FALSE) && ($menulevel >= 2)) { $rv[$i ] = "H"; $rv[$i+1] = "Self-Administration"; $rv[$i+2] = ""; $i += 3; } // //The password change applies only when a user is logged in and when the //menu level >= 1. // if (($userinfo !== FALSE) && ($menulevel >= 2)) { $rv[$i ] = "E"; $rv[$i+1] = "Change Password"; if ($get_par_append === FALSE) $rv[$i+2] = "userpwchange.php"; else $rv[$i+2] = "userpwchange.php?" . $get_par_append; $i += 3; } // //The change personal information only applies when a user is //logged in and the menu level >= 1. // if (($userinfo !== FALSE) && ($menulevel >= 2)) { $rv[$i ] = "E"; $rv[$i+1] = "Change Personal Information"; if ($get_par_append === FALSE) $rv[$i+2] = "userpersinfochange.php"; else $rv[$i+2] = "userpersinfochange.php?" . $get_par_append; $i += 3; } // //Menus heading is only appropriate when a user is logged in and at the day view //scheduler. if (($userinfo !== FALSE) && ($scriptname_in == "index.php")) { $rv[$i ] = "H"; $rv[$i+1] = "Menus"; $rv[$i+2] = ""; $i += 3; // //Showing "More Options" is appropriate only when options level is 1 or less. if ($menulevel <= 1) { $rv[$i ] = "E"; $rv[$i+1] = "Show More Options"; if ($get_par_append === FALSE) $rv[$i+2] = "index.php?menulvladjst=u"; else $rv[$i+2] = "index.php?" . "menulvladjst=u&" . $get_par_append; $i += 3; } //Showing "Fewer Options" is appropriate only when options level is 1 or more. if ($menulevel >= 1) { $rv[$i ] = "E"; $rv[$i+1] = "Show Fewer Options"; if ($get_par_append === FALSE) $rv[$i+2] = "index.php?menulvladjst=d"; else $rv[$i+2] = "index.php?" . "menulvladjst=d&" . $get_par_append; $i += 3; } } // //Session administration heading and subheadings are only appropriate when a user is logged in, and //should only be performed from the dayview page. if ($userinfo !== FALSE) { $rv[$i ] = "H"; $rv[$i+1] = "Session Administration"; $rv[$i+2] = ""; $i += 3; // //Showing "Logout" is appropriate only when user logged in. $rv[$i ] = "E"; $rv[$i+1] = "Logout"; if ($get_par_append === FALSE) $rv[$i+2] = "index.php?logout=1"; else $rv[$i+2] = "index.php?" . "logout=1&" . $get_par_append; $i += 3; } // return($rv); } // //-------------------------------------------------------------------------------------------------------------- //End of $RCSfile: menu.inc,v $. //-------------------------------------------------------------------------------------------------------------- ?>