changed git call from https to git readonly
[atutor.git] / mods / job_board / view_post.php
1 <?php
2 /***********************************************************************/
3 /* ATutor                                                                                                                          */
4 /***********************************************************************/
5 /* Copyright (c) 2002-2009                                                                                         */
6 /* Adaptive Technology Resource Centre / Inclusive Design Institute        */
7 /* http://atutor.ca                                                                                                        */
8 /*                                                                                                                                         */
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 /***********************************************************************/
13 // $Id$
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 $_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
19
20 /* 
21  * Add the submenu on this page so that user can go back to the listing.
22  * Reason why this is not included in module.php is because we don't want the 
23  * 'view_post' submenu to show on job_board/index.php
24  */
25 $_pages[AT_JB_BASENAME.'index.php']['children'] = array(AT_JB_BASENAME.'view_post.php');
26
27 $jid = intval($_REQUEST['jid']);
28 $job = new Job();
29 $job_post = $job->getJob($jid);
30
31 //handle add to cart event
32 if ($_GET['action']=='add_to_cart'){
33         $job->addToJobCart($_SESSION['member_id'], $jid);
34 } elseif ($_GET['action']=='remove_from_cart'){
35         $job->removeFromJobCart($_SESSION['member_id'], $jid);
36 }
37
38 include(AT_INCLUDE_PATH.'header.inc.php');
39 $savant->assign('job_obj', $job);
40 $savant->assign('job_post', $job_post);
41 $savant->display('jb_view_post.tmpl.php');
42 include(AT_INCLUDE_PATH.'footer.inc.php'); 
43 ?>