2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2009 */
6 /* Adaptive Technology Resource Centre / Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
15 define(AT_INCLUDE_PATH, '../../../include/');
16 include(AT_INCLUDE_PATH.'vitals.inc.php');
17 include(AT_JB_INCLUDE.'classes/Job.class.php');
18 $_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
20 admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD);
23 * Add the submenu on this page so that user can go back to the listing.
24 * Reason why this is not included in module.php is because we don't want the
25 * 'view_post' submenu to show on job_board/index.php
27 $_pages[AT_JB_BASENAME.'index_admin.php']['children'] = array(AT_JB_BASENAME.'admin/view_post.php');
29 $jid = intval($_REQUEST['jid']);
31 $job_post = $job->getJob($jid);
33 if($_GET['action']=='delete'){
34 $hidden_vars['jid'] = $jid;
35 $job_post = $job->getJob($jid);
36 $msg->addConfirm(array('DELETE', $job_post['title']), $hidden_vars);
39 if (isset($_POST['submit_no'])) {
40 $msg->addFeedback('CANCELLED');
41 header('Location: ../index_admin.php');
43 } else if (isset($_POST['submit_yes'])) {
44 $job->removeJob($jid);
45 $msg->addFeedback('JB_POST_DELETED');
46 header('Location: ../index_admin.php');
50 include(AT_INCLUDE_PATH.'header.inc.php');
52 $savant->assign('job_obj', $job);
53 $savant->assign('job_post', $job_post);
54 $savant->display('jb_view_post.tmpl.php');
55 include(AT_INCLUDE_PATH.'footer.inc.php');