* * This file is part of GForge. * * GForge 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; either version 2 of the License, or * (at your option) any later version. * * GForge is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GForge; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once '../env.inc.php'; require_once $gfwww . 'include/pre.php'; require_once $gfwww . 'people/people_utils.php'; if (!$sys_use_people) { exit_disabled(); } $group_id = getIntFromRequest('group_id'); $job_id = getStringFromRequest('job_id'); people_header(array('title' => _('Help Wanted Latest Posts'))); echo '<p>'; $sql = "SELECT people_job.group_id,people_job.job_id,groups.group_name,groups.unix_group_name,people_job.title,people_job.post_date,people_job_category.name AS category_name " . "FROM people_job,people_job_category,groups " . "WHERE people_job.group_id=groups.group_id " . "AND people_job.category_id=people_job_category.category_id " . "AND people_job.status_id=1 " . "ORDER BY post_date DESC"; $result = db_query($sql, 30); echo people_show_job_list($result) . '</p>'; people_footer(array());
echo '<H3>Projects looking for ' . people_get_category_name($category_id) . '</H3> <P> Click job titles for more detailed descriptions. <P>'; echo people_show_category_jobs($category_id); } else { echo ' <H3>Projects Needing Help</H3> The ' . $GLOBALS['sys_default_name'] . ' Project Help Wanted board is for non-commercial, project volunteer openings. Commercial use is prohibited. <P> Project listings remain live for two weeks, or until closed by the poster, whichever comes first. (Project administrators may always re-post expired openings.) <P> Browse through the category menu to find projects looking for your help. <P> If you\'re a project admin, log in and submit help wanted requests through your project administration page. <P> To suggest new job categories, submit a request via the support manager. <P>'; echo people_show_category_table(); echo '<h4>Last posts</h4>'; $sql = "SELECT people_job.group_id,people_job.job_id,groups.group_name,groups.unix_group_name,people_job.title,people_job.date,people_job_category.name AS category_name " . "FROM people_job,people_job_category,groups " . "WHERE people_job.group_id=groups.group_id " . "AND people_job.category_id=people_job_category.category_id " . "AND people_job.status_id=1 " . "ORDER BY date DESC"; $result = db_query($sql, 5); echo people_show_job_list($result); echo '<p><a href="helpwanted-latest.php">[more latest posts]</a></p>'; } } people_footer(array());
function people_show_category_jobs($category_id) { //show open jobs for this category $sql = "SELECT people_job.group_id,people_job.job_id,groups.unix_group_name,groups.group_name,people_job.title,people_job.date,people_job_category.name AS category_name " . "FROM people_job,people_job_category,groups " . "WHERE people_job.category_id='{$category_id}' " . "AND people_job.group_id=groups.group_id " . "AND people_job.category_id=people_job_category.category_id " . "AND people_job.status_id=1 ORDER BY date DESC"; $result = db_query($sql); return people_show_job_list($result); }