function job_board_news() { global $db; $news = array(); $job = new Job(); $result = $job->getAllJobs('created_date', 'desc'); if (is_array($result)) { foreach ($result as $row) { $title = htmlentities_utf8($row['title']); $news[] = array('time' => $row['revised_date'], 'object' => $row, 'thumb' => AT_JB_BASENAME . 'images/jb_icon_tiny.png', 'link' => '<span title="' . strip_tags($title) . '"><a href="' . AT_JB_BASENAME . 'view_post.php?jid=' . $row['id'] . '">' . $title . "</a></span>"); } } return $news; }
/* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ // $Id$ $_user_location = 'public'; define(AT_INCLUDE_PATH, '../../include/'); include AT_INCLUDE_PATH . 'vitals.inc.php'; include AT_JB_INCLUDE . 'classes/Job.class.php'; include AT_JB_INCLUDE . 'classes/Employer.class.php'; $_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet //initialize $job = new Job(); $page = intval($_GET['p']); $page = $page == 0 ? 1 : $page; $all_job_posts = $job->getAllJobs($_GET['col'], $_GET['order']); $bookmark_posts = $job->getBookmarkJobs(); //handle order if ($_GET['order'] == '') { $order = 'DESC'; } else { //flip the ordre $order = $_GET['order'] == 'ASC' ? 'DESC' : 'ASC'; $page_string = 'col=' . $_GET['col'] . SEP . 'order=' . $_GET['order']; } //handle search if (isset($_GET['jb_submit'])) { $search_input['general'] = trim($_GET['jb_search_general']); // $search_input['title'] = trim($_GET['jb_search_title']); // $search_input['email'] = $_GET['jb_search_email']; // $search_input['description'] = trim($_GET['jb_search_description']);
/* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /***********************************************************************/ // $Id$ if (!defined('AT_INCLUDE_PATH')) { exit; } include AT_JB_INCLUDE . 'classes/Job.class.php'; global $db; //init $link_limit = 3; $cnt = 0; $job = new Job(); $result = $job->getAllJobs('created_date', 'desc'); if (is_array($result)) { foreach ($result as $row) { if ($cnt >= $link_limit) { break; } $cnt++; $title = htmlentities_utf8($row['title']); $list[] = '<span title="' . strip_tags($title) . '">' . '<a href="' . $_base_path . 'mods/job_board/view_post.php?jid=' . $row['id'] . '">' . $title . '</a></span>'; } return $list; } else { return 0; }
public function getJobList() { $data = \Input::has('data') ? \Input::get('data') : []; $jsonData = []; $model = \Job::getAllJobs($data); try { if ($model) { foreach ($model as $mData) { if ($mCompany = $mData->company) { $mData->company_name = $mCompany->name; } if ($mAgency = $mData->agency) { $mData->agency_name = $mAgency->name; } else { $mData->agency_name = "<label class='label label-danger'>Not an agency job</label>"; } if ($mData->is_active) { $mData->is_active = "<label class='label label-success'>Active</label>"; } else { $mData->is_active = "<label class='label label-danger'>Not Active</label>"; } $mData->removeLink = route('admin.job.remove') . '?i=' . $mData->id; array_push($jsonData, $mData); } } return \Response::json($jsonData); } catch (\Exception $e) { return $e->getMessage(); } }