3 * FusionForge Survey Facility
5 * Portions Copyright 1999-2001 (c) VA Linux Systems
6 * The rest Copyright 2002-2004 (c) GForge Team
7 * http://fusionforge.org/
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 require_once('../env.inc.php');
26 require_once $gfcommon.'include/pre.php';
27 require_once $gfcommon.'survey/Survey.class.php';
28 require_once $gfwww.'survey/include/SurveyHTML.class.php';
30 $group_id = getIntFromRequest('group_id');
31 $survey_id = getIntFromRequest('survey_id');
33 /* We need a group_id */
38 $g = group_get_object($group_id);
39 if (!$g || !is_object($g) || $g->isError()) {
43 // Check to make sure they're logged in.
44 if (!session_loggedin()) {
48 $sh = new SurveyHtml();
49 $s = new Survey($g, $survey_id);
51 $title = sprintf(_('Vote for Survey: %1$s'), $s->getTitle());
52 $sh->header(array('title'=>$title));
55 echo '<div class="error">'._('For some reason, the Project ID or Survey ID did not make it to this page').'</div>';
57 plugin_hook ("blocks", "survey_".$s->getTitle());
58 echo($sh->showSurveyForm($s));