diff --git a/class/UI/Intern_MenuUI.php b/class/UI/Intern_MenuUI.php index 8051a273..dd376d2d 100644 --- a/class/UI/Intern_MenuUI.php +++ b/class/UI/Intern_MenuUI.php @@ -18,6 +18,10 @@ public static function display() { $auth = Current_User::getAuthorization(); $tags['LOGOUT'] = "Logout"; + if(Current_User::allow('intern')){ + $tags['DEITY'] = 'Admin Options'; + $tags['EXAMPLE_LINK'] = PHPWS_Text::secureLink('Example form','intern',array('action' => 'example_form')); + } if(Current_User::allow('intern', 'edit_major')){ $tags['DEITY'] = 'Admin Options'; $tags['EDIT_MAJORS_LINK'] = PHPWS_Text::secureLink('Edit Majors','intern',array('action' => MAJOR_EDIT)); diff --git a/index.php b/index.php index 3d703605..0a4c4e9d 100644 --- a/index.php +++ b/index.php @@ -53,6 +53,12 @@ // Show requested page. switch ($req) { + case 'example_form': + header('Content-type: application/pdf'); + readfile(PHPWS_SOURCE_DIR . 'mod/intern/pdf/Internship_Example.pdf'); + exit(); + break; + case 'edit_internship': PHPWS_Core::initModClass('intern', 'UI/InternshipUI.php'); $content = InternshipUI::display(); @@ -215,7 +221,7 @@ $state = new State($_GET['abbr']); $state->setActive(true); $state->save(); - exit(); + exit(); break; case 'remove_state': if (!Current_User::allow('intern', 'edit_state')) { @@ -225,7 +231,7 @@ $state = new State($_GET['abbr']); $state->setActive(false); $state->save(); - exit(); + exit(); break; case STATE_EDIT: if (!Current_User::allow('intern', 'edit_state')) { @@ -240,7 +246,7 @@ PHPWS_Core::initModClass('intern', 'Department.php'); if (isset($_REQUEST['add'])) { if (isset($_REQUEST['all'])) { - // Add user in REQUEST to all departments + // Add user in REQUEST to all departments Admin::addAll($_REQUEST['username']); } else { // Add user in REQUEST to administrator list for the department in REQUEST. @@ -288,7 +294,7 @@ NQ::close(); PHPWS_Core::goBack(); break; - + case 'unapprove': if (!Current_User::isDeity()) { Current_User::disallow(); diff --git a/pdf/Internship_Example.pdf b/pdf/Internship_Example.pdf new file mode 100644 index 00000000..311a8a22 Binary files /dev/null and b/pdf/Internship_Example.pdf differ diff --git a/templates/menu.tpl b/templates/menu.tpl index 5183e42d..f57cd750 100644 --- a/templates/menu.tpl +++ b/templates/menu.tpl @@ -12,6 +12,7 @@
Admin Options: