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 $_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
22 $categories = $job->getCategories();
23 $subscribed = $job->getSubscribedCategories($_SESSION['member_id']);
26 if (isset($_POST['submit'])){
27 $token = sha1($_SESSION['member_id'].$_SESSION['token']);
28 //validate if this is a post from the user himself but not anyone else.
29 if ($_POST['token'] != $token){
31 header('Location: index.php');
34 $job->subscribeCategories($_SESSION['member_id'], $_POST['jb_subscribe_categories']);
35 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
36 header('Location: subscribe.php');
41 include(AT_INCLUDE_PATH.'header.inc.php');
42 $savant->assign('categories', $categories);
43 $savant->assign('job_obj', $job);
44 $savant->assign('subscribed', $subscribed);
45 $savant->display('jb_subscribe.tmpl.php');
46 include(AT_INCLUDE_PATH.'footer.inc.php');