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 /***********************************************************************/
14 $_user_location='public';
15 define(AT_INCLUDE_PATH, '../../../include/');
16 include(AT_INCLUDE_PATH.'vitals.inc.php');
17 include(AT_JB_INCLUDE.'classes/Job.class.php');
18 include(AT_JB_INCLUDE.'classes/Employer.class.php');
19 $_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
21 if (!Employer::authenticate()){
22 $msg->addError('ACCESS_DENIED');
23 header('Location: ../index.php');
28 * Add the submenu on this page so that user can go back to the listing.
29 * Reason why this is not included in module.php is because we don't want the
30 * 'view_post' submenu to show on job_board/index.php
32 $_pages[AT_JB_BASENAME.'employer/home.php']['children'] = array(AT_JB_BASENAME.'employer/view_post.php');
34 $jid = intval($_REQUEST['jid']);
36 $job_post = $job->getJob($jid);
38 if($_GET['action']=='delete'){
39 $hidden_vars['jid'] = $jid;
40 $job_post = $job->getJob($jid);
41 $msg->addConfirm(array('DELETE', $job_post['title']), $hidden_vars);
44 if (isset($_POST['submit_no'])) {
45 $msg->addFeedback('CANCELLED');
46 header('Location: home.php');
48 } else if (isset($_POST['submit_yes'])) {
49 $job->removeJob($jid);
50 $msg->addFeedback('JB_POST_DELETED');
51 header('Location: home.php');
55 include(AT_INCLUDE_PATH.'header.inc.php');
57 echo '<div class="pageinator_box">';
58 $savant->display('employer/jb_employer_header.tmpl.php');
60 $savant->assign('job_obj', $job);
61 $savant->assign('job_post', $job_post);
62 $savant->display('jb_view_post.tmpl.php');
63 include(AT_INCLUDE_PATH.'footer.inc.php');