5 * Copyright 1999-2001 (c) VA Linux Systems
6 * The rest Copyright 2002-2004 (c) GForge Team
9 * This file is part of GForge.
11 * GForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * GForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with GForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 require_once('../env.inc.php');
27 require_once $gfwww.'include/pre.php';
28 require_once $gfwww.'people/people_utils.php';
30 if (!$sys_use_people) {
34 $group_id = getIntFromRequest('group_id');
35 $job_id = getStringFromRequest('job_id');
37 if ($group_id && $job_id) {
40 Fill in the info to create a job
43 //for security, include group_id
44 $result=db_query_params("SELECT groups.group_name,people_job_category.name AS category_name,
45 people_job_status.name AS status_name,people_job.title,
46 people_job.description,people_job.post_date,users.user_name,users.user_id
47 FROM people_job,groups,people_job_status,people_job_category,users
48 WHERE people_job_category.category_id=people_job.category_id
49 AND people_job_status.status_id=people_job.status_id
50 AND users.user_id=people_job.created_by
51 AND groups.group_id=people_job.group_id
52 AND people_job.job_id=$1 AND people_job.group_id=$2",
53 array($job_id, $group_id));
54 if (!$result || db_numrows($result) < 1) {
55 people_header(array('title'=>_('View a Job')));
57 $feedback .= _('POSTING fetch FAILED');
58 echo '<h2>'._('No such posting for this project').'</h2>';
61 people_header(array('title'=>_('View a Job')));
63 // <h2>'. db_result($result,0,'category_name') .' wanted for '. db_result($result,0,'group_name') .'</h2>
66 <table border="0" width="100%">
68 <strong>'. db_result($result,0,'title') .'</strong>
72 <strong>'._('Contact Info').'<br />
73 '.util_make_link ('/sendmessage.php?touser='. db_result($result,0,'user_id') .'&subject='. urlencode( 'RE: '.db_result($result,0,'title')), db_result($result,0,'user_name')) .'</strong>
75 <strong>'._('Status').'</strong><br />
76 '. db_result($result,0,'status_name') .'
80 <strong>'._('Open Date').'</strong><br />
81 '. date(_('Y-m-d H:i'),db_result($result,0,'post_date')) .'
83 <strong>'._('For project').'<br />
84 '.util_make_link ('/project/?group_id='. $group_id, db_result($result,0,'group_name')) .'</strong>
88 <strong>'._('Long Description').'</strong><p>
89 '. nl2br(db_result($result,0,'description')) .'</p>
92 <h2>'._('Required Skills').'</h2>';
94 //now show the list of desired skills
95 echo people_show_job_inventory($job_id).'</td></tr></table>';
98 people_footer(array());
102 Not logged in or insufficient privileges
107 exit_error(_('Error'),_('Posting ID not found'));
113 // c-file-style: "bsd"