5 * Copyright 1999-2001 (c) VA Linux Systems
6 * The rest Copyright 2002-2004 (c) GForge Team
11 * This file is part of GForge.
13 * GForge is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * GForge is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with GForge; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 require_once('../env.inc.php');
29 require_once('pre.php');
30 require_once('www/people/people_utils.php');
32 if (!$sys_use_people) {
36 $group_id = getIntFromRequest('group_id');
37 $job_id = getStringFromRequest('job_id');
39 if ($group_id && $job_id) {
42 Fill in the info to create a job
45 //for security, include group_id
46 $sql="SELECT groups.group_name,people_job_category.name AS category_name,".
47 "people_job_status.name AS status_name,people_job.title,".
48 "people_job.description,people_job.post_date,users.user_name,users.user_id ".
49 "FROM people_job,groups,people_job_status,people_job_category,users ".
50 "WHERE people_job_category.category_id=people_job.category_id ".
51 "AND people_job_status.status_id=people_job.status_id ".
52 "AND users.user_id=people_job.created_by ".
53 "AND groups.group_id=people_job.group_id ".
54 "AND people_job.job_id='$job_id' AND people_job.group_id='$group_id'";
55 $result=db_query($sql);
56 if (!$result || db_numrows($result) < 1) {
57 people_header(array('title'=>_('View a Job')));
59 $feedback .= _('POSTING fetch FAILED');
60 echo '<h2>'._('No such posting for this project').'</h2>';
63 people_header(array('title'=>_('View a Job')));
65 // <h2>'. db_result($result,0,'category_name') .' wanted for '. db_result($result,0,'group_name') .'</h2>
68 <table border="0" width="100%">
70 <strong>'. db_result($result,0,'title') .'</strong>
74 <strong>'._('Contact Info').'<br />
75 <a href="'.$GLOBALS['sys_urlprefix'].'/sendmessage.php?touser='. db_result($result,0,'user_id') .'&subject='. urlencode( 'RE: '.db_result($result,0,'title')) .'">'. db_result($result,0,'user_name') .'</a></strong>
77 <strong>'._('Status').'</strong><br />
78 '. db_result($result,0,'status_name') .'
82 <strong>'._('Open Date').'</strong><br />
83 '. date(_('Y-m-d H:i'),db_result($result,0,'post_date')) .'
85 <strong>'._('For project').'<br />
86 <a href="'.$GLOBALS['sys_urlprefix'].'/project/?group_id='. $group_id .'">'. db_result($result,0,'group_name') .'</a></strong>
90 <strong>'._('Long Description').'</strong><p>
91 '. nl2br(db_result($result,0,'description')) .'</p>
94 <h2>'._('Required Skills').'</h2>';
96 //now show the list of desired skills
97 echo people_show_job_inventory($job_id).'</td></tr></table>';
100 people_footer(array());
104 Not logged in or insufficient privileges
109 exit_error(_('Error'),_('Posting ID not found'));
115 // c-file-style: "bsd"