3 * GForge Survey Facility
5 * Portions 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
29 By Tim Perdue, Sourceforge, 11/99
32 function survey_header($params) {
33 global $group_id,$is_admin_page,$HTML,$sys_use_survey;
35 if (!$sys_use_survey) {
39 $params['toptab']='surveys';
40 $params['group']=$group_id;
42 if ($project =& group_get_object($group_id)){
43 if (!$project->usesSurvey()) {
44 exit_error(_('Error'), _('This Group Has Turned Off Surveys.'));
47 site_project_header($params);
49 if ($is_admin_page && $group_id) {
61 '/survey/?group_id='.$group_id,
62 '/survey/admin/?group_id='.$group_id,
63 '/survey/admin/add_survey.php?group_id='.$group_id,
64 '/survey/admin/edit_survey.php?group_id='.$group_id,
65 '/survey/admin/add_question.php?group_id='.$group_id,
66 '/survey/admin/show_questions.php?group_id='.$group_id,
67 '/survey/admin/show_results.php?group_id='.$group_id
71 if (session_loggedin()) {
72 $perm =& $project->getPermission(session_get_user());
73 if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
80 '/survey/admin/?group_id='.$group_id
86 }// end if (valid group id)
89 function survey_footer($params) {
90 site_project_footer($params);
95 // c-file-style: "bsd"