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 require (AT_INCLUDE_PATH.'vitals.inc.php');
17 include(AT_JB_INCLUDE.'classes/Job.class.php');
18 include(AT_JB_INCLUDE.'classes/Employer.class.php');
20 admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD);
24 $page = intval($_GET['p']);
25 $page = ($page==0)?1:$page;
26 $all_job_posts = $job->getAllJobs($_GET['col'], $_GET['order'], true);
30 $offset = ($page - 1) * AT_JB_ROWS_PER_PAGE;
34 $current_job_posts = array_slice($all_job_posts, $offset, AT_JB_ROWS_PER_PAGE);
37 if ($_GET['order']==''){
41 $order = ($_GET['order']=='ASC')?'DESC':'ASC';
42 $page_string = 'col='.$_GET['col'].SEP.'order='.$_GET['order'];
45 include(AT_INCLUDE_PATH.'header.inc.php');
46 echo '<div class="pageinator_box">';
47 print_paginator($page, sizeof($all_job_posts), $page_string, AT_JB_ROWS_PER_PAGE);
49 $savant->assign('job_obj', $job);
50 $savant->assign('job_posts', $current_job_posts);
51 $savant->display('admin/jb_index.tmpl.php');
52 print_paginator($page, sizeof($all_job_posts), $page_string, AT_JB_ROWS_PER_PAGE);
53 include(AT_INCLUDE_PATH.'footer.inc.php');