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 //TODO: If not authenticated with user login, quit.
22 if (!Employer::authenticate()){
23 $msg->addError('ACCESS_DENIED');
24 header('Location: ../index.php');
30 $page = intval($_GET['p']);
31 $page = ($page==0)?1:$page;
32 $all_job_posts = $job->getMyJobs($_GET['col'], $_GET['order']);
36 $offset = ($page - 1) * AT_JB_ROWS_PER_PAGE;
40 if (sizeof($all_job_posts) > 0){
41 $current_job_posts = array_slice($all_job_posts, $offset, AT_JB_ROWS_PER_PAGE);
45 if ($_GET['order']==''){
49 $order = ($_GET['order']=='ASC')?'DESC':'ASC';
50 $page_string = 'col='.$_GET['col'].SEP.'order='.$_GET['order'];
53 include(AT_INCLUDE_PATH.'header.inc.php');
54 echo '<div class="pageinator_box">';
55 $savant->display('employer/jb_employer_header.tmpl.php');
56 print_paginator($page, sizeof($all_job_posts), $page_string, AT_JB_ROWS_PER_PAGE);
58 $savant->assign('job_obj', $job);
59 $savant->assign('job_posts', $current_job_posts);
60 $savant->display('employer/jb_home.tmpl.php');
61 print_paginator($page, sizeof($all_job_posts), $page_string, AT_JB_ROWS_PER_PAGE);
62 include(AT_INCLUDE_PATH.'footer.inc.php');