[Fusionforge-commits] r10682 - in trunk/src/www/survey: . admin include
Franck VILLAUME
nerville at libremir.placard.fr.eu.org
Sat Sep 25 11:56:19 CEST 2010
Author: nerville
Date: 2010-09-25 11:56:19 +0200 (Sat, 25 Sep 2010)
New Revision: 10682
Modified:
trunk/src/www/survey/admin/add_question.php
trunk/src/www/survey/admin/add_survey.php
trunk/src/www/survey/admin/edit_question.php
trunk/src/www/survey/admin/edit_survey.php
trunk/src/www/survey/admin/graphs.php
trunk/src/www/survey/admin/index.php
trunk/src/www/survey/admin/question.php
trunk/src/www/survey/admin/show_questions.php
trunk/src/www/survey/admin/show_results.php
trunk/src/www/survey/admin/show_results_aggregate.php
trunk/src/www/survey/admin/show_results_comments.php
trunk/src/www/survey/admin/show_results_csv.php
trunk/src/www/survey/admin/show_results_individual.php
trunk/src/www/survey/admin/survey.php
trunk/src/www/survey/admin/survey_utils.php
trunk/src/www/survey/include/SurveyHTML.class.php
trunk/src/www/survey/index.php
trunk/src/www/survey/privacy.php
trunk/src/www/survey/rating_resp.php
trunk/src/www/survey/survey_resp.php
trunk/src/www/survey/survey_utils.php
Log:
exit functions migration
Modified: trunk/src/www/survey/admin/add_question.php
===================================================================
--- trunk/src/www/survey/admin/add_question.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/add_question.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -2,9 +2,10 @@
/**
* FusionForge Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
*
* This file is part of FusionForge.
*
@@ -29,9 +30,9 @@
$is_admin_page='y';
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
-survey_header(array('title'=>_('Add A Question')));
if (!session_loggedin() || !user_ismember($group_id,'A')) {
+ survey_header(array('title'=>_('Add A Question')));
echo '<div class="error">'._('Permission denied').'</div>';
survey_footer(array());
exit;
@@ -48,10 +49,12 @@
if ($result) {
$feedback .= _('Question Added');
} else {
- $feedback .= _('Error inserting question');
+ $error_msg .= _('Error inserting question');
}
}
+survey_header(array('title'=>_('Add A Question')));
+
?>
<script type="text/javascript">
<!--
Modified: trunk/src/www/survey/admin/add_survey.php
===================================================================
--- trunk/src/www/survey/admin/add_survey.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/add_survey.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,26 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -30,9 +31,9 @@
$is_admin_page='y';
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
-survey_header(array('title'=>_('Add a Survey')));
if (!session_loggedin() || !user_ismember($group_id,'A')) {
+ survey_header(array('title'=>_('Add a Survey')));
echo '<div class="error">'. _('Permission denied').'</div>';
survey_footer(array());
exit;
@@ -52,11 +53,13 @@
if ($result) {
$feedback .= _('Question inserted');
} else {
- $feedback .= _('Question insert failed');
+ $error_msg .= _('Question insert failed');
}
}
}
+survey_header(array('title'=>_('Add a Survey')));
+
?>
<script type="text/javascript">
<!--
Modified: trunk/src/www/survey/admin/edit_question.php
===================================================================
--- trunk/src/www/survey/admin/edit_question.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/edit_question.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,9 +1,9 @@
<?php
/**
- * FusionForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
* Copyright 2008-2010 (c) FusionForge Team
* http://fusionforge.org/
*
@@ -32,9 +32,9 @@
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
-survey_header(array('title'=>_('Edit A Question')));
if (!session_loggedin() || !user_ismember($group_id,'A')) {
+ survey_header(array('title'=>_('Edit A Question')));
echo '<div class="error">' ._('Permission denied'). '</div>';
survey_footer(array());
exit;
@@ -51,7 +51,7 @@
$question_id,
$group_id));
if (db_affected_rows($result) < 1) {
- $feedback .= _('Update Failed');
+ $error_msg .= _('Update Failed');
} else {
$feedback .= _('Update Successful');
}
@@ -65,9 +65,11 @@
$question=db_result($result, 0, "question");
$question_type=db_result($result, 0, "question_type");
} else {
- $feedback .= _('Error finding question');
+ $error_msg .= _('Error finding question');
}
+survey_header(array('title'=>_('Edit A Question')));
+
?>
<script type="text/javascript">
<!--
Modified: trunk/src/www/survey/admin/edit_survey.php
===================================================================
--- trunk/src/www/survey/admin/edit_survey.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/edit_survey.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,26 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -31,9 +32,9 @@
$is_admin_page='y';
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
-survey_header(array('title'=>_('Edit A Survey')));
if (!session_loggedin() || !user_ismember($group_id,'A')) {
+ survey_header(array('title'=>_('Edit A Survey')));
echo '<div class="error">'._('Permission denied').'</div>';
survey_footer(array());
exit;
@@ -46,15 +47,15 @@
if (!isset($survey_title) || $survey_title == "")
{
- $feedback .= _('Update Failed: Survey Title Required');
+ $error_msg .= _('Update Failed: Survey Title Required');
}
elseif (!isset($survey_questions) || $survey_questions == "")
{
- $feedback .= _('Update Failed: Survey Questions Required');
+ $error_msg .= _('Update Failed: Survey Questions Required');
}
if (!isset($survey_id) || !isset($group_id) || $survey_id == "" || $group_id == "")
{
- $feedback .= _('Update Failed: Missing Data');
+ $error_msg .= _('Update Failed: Missing Data');
}
else
{
@@ -71,14 +72,15 @@
$survey_id,
$group_id));
if (db_affected_rows($result) < 1) {
- $feedback .= _('Update Failed');
- echo db_error();
+ $error_msg .= _('Update Failed: ').db_error();
} else {
$feedback .= _('Update Successful');
}
}
}
+survey_header(array('title'=>_('Edit A Survey')));
+
/*
Get this survey out of the DB
*/
Modified: trunk/src/www/survey/admin/graphs.php
===================================================================
--- trunk/src/www/survey/admin/graphs.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/graphs.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,7 +1,7 @@
<?php
/**
* FusionForge Survey HTML Facility
- * General Graph showing module for Survey
+ * General Graph showing module for Survey
*
* Copyright 2010 (c) FusionForge Team
* http://fusionforge.org/
@@ -42,7 +42,7 @@
// Check if we have jpgraph
if (!file_exists(forge_get_config('jpgraph_path').'/jpgraph.php')) {
//# TODO: Need to show the message as a image file
- exit_error(_('Package JPGraph not installed'),'home');
+ exit_error(_('Package JPGraph not installed'),'surveys');
}
// Read jPGraph libraries.
Modified: trunk/src/www/survey/admin/index.php
===================================================================
--- trunk/src/www/survey/admin/index.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/index.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,8 +1,8 @@
<?php
/**
- * FusionForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2002-2004 (c) GForge Team
* Copyright 2010 (c) Franck Villaume
* http://fusionforge.org/
@@ -32,7 +32,6 @@
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
$sh = new SurveyHtml();
-$sh->header(array('title'=>_('Survey Administration')));
if (!$group_id) {
exit_no_group();
@@ -41,19 +40,20 @@
if (!$group || !is_object($group)) {
exit_no_group();
} elseif ($group->isError()) {
- exit_error($group->getErrorMessage(),'home');
+ exit_error($group->getErrorMessage(),'surveys');
}
-echo '<h1>'._('Survey Administration').'</h1>';
if (!session_loggedin()) {
exit_not_logged_in();
}
if ( !user_ismember($group_id,'A')) {
- exit_permission_denied(_('You are not a Project admin'),'home');
+ exit_permission_denied(_('You are not a Project admin'),'surveys');
}
+$sh->header(array('title'=>_('Survey Administration')));
+echo '<h1>'._('Survey Administration').'</h1>';
?>
<p>
Modified: trunk/src/www/survey/admin/question.php
===================================================================
--- trunk/src/www/survey/admin/question.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/question.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,9 +1,9 @@
<?php
/**
- * FusionForge Survey Facility: Question handle program
+ * Survey Facility: Question handle program
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
* Copyright 2008-2010 (c) FusionForge Team
* http://fusionforge.org/
*
@@ -92,8 +92,8 @@
/* Error */
if ( $sq->isError()) {
- $msg = $sq->getErrorMessage();
- form_release_key(getStringFromRequest("form_key"));
+ $msg = $sq->getErrorMessage();
+ form_release_key(getStringFromRequest("form_key"));
echo '<div class="error">' .$msg ."</div>";
} else {
echo '<div class="feedback">' .$msg ."</div>";
Modified: trunk/src/www/survey/admin/show_questions.php
===================================================================
--- trunk/src/www/survey/admin/show_questions.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/show_questions.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,26 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -86,7 +87,7 @@
ShowResultsEditQuestion($result);
-$HTML->footer(array());
+survey_footer(array());
// Local Variables:
// mode: php
Modified: trunk/src/www/survey/admin/show_results.php
===================================================================
--- trunk/src/www/survey/admin/show_results.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/show_results.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/admin/show_results_aggregate.php
===================================================================
--- trunk/src/www/survey/admin/show_results_aggregate.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/show_results_aggregate.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/admin/show_results_comments.php
===================================================================
--- trunk/src/www/survey/admin/show_results_comments.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/show_results_comments.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/admin/show_results_csv.php
===================================================================
--- trunk/src/www/survey/admin/show_results_csv.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/show_results_csv.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/admin/show_results_individual.php
===================================================================
--- trunk/src/www/survey/admin/show_results_individual.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/show_results_individual.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/admin/survey.php
===================================================================
--- trunk/src/www/survey/admin/survey.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/survey.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,14 +1,28 @@
<?php
+/**
+ * Survey Facility: Question handle program
+ *
+ * Copyright 2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge 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.
+ *
+ * FusionForge 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 FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
-/**
- *
- * GForge Survey Facility: Question handle program
- *
- * Copyright 2004 (c) GForge
- * http://gforge.org
- *
- *
- */
require_once('../../env.inc.php');
require_once $gfcommon.'include/pre.php';
require_once $gfcommon.'survey/Survey.class.php';
@@ -43,7 +57,7 @@
if (getStringFromRequest('post')=="Y") {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
- exit_form_double_submit();
+ exit_form_double_submit('surveys');
}
$survey_title = getStringFromRequest('survey_title');
$to_add = getStringFromRequest('to_add');
@@ -70,7 +84,7 @@
/* Error on previous transactions? */
if ($s->isError()) {
- $feedback = $s->getErrorMessage();
+ $error_msg = $s->getErrorMessage();
form_release_key(getStringFromRequest("form_key"));
}
Modified: trunk/src/www/survey/admin/survey_utils.php
===================================================================
--- trunk/src/www/survey/admin/survey_utils.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/admin/survey_utils.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/include/SurveyHTML.class.php
===================================================================
--- trunk/src/www/survey/include/SurveyHTML.class.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/include/SurveyHTML.class.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -46,7 +46,7 @@
global $group_id,$is_admin_page,$HTML;
if (!forge_get_config('use_survey')) {
- exit_disabled('home');
+ exit_disabled();
}
$params['toptab']='surveys';
@@ -54,7 +54,7 @@
if ($project =& group_get_object($group_id)){
if (!$project->usesSurvey()) {
- exit_disabled('home');
+ exit_disabled();
}
site_project_header($params);
Modified: trunk/src/www/survey/index.php
===================================================================
--- trunk/src/www/survey/index.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/index.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require_once('../env.inc.php');
Modified: trunk/src/www/survey/privacy.php
===================================================================
--- trunk/src/www/survey/privacy.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/privacy.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Modified: trunk/src/www/survey/rating_resp.php
===================================================================
--- trunk/src/www/survey/rating_resp.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/rating_resp.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -27,10 +27,9 @@
require_once('../env.inc.php');
require_once $gfcommon.'include/pre.php';
-$HTML->header(array('title'=>_('Voting')));
if (!session_loggedin()) {
- echo '<div class="error">'._('You must be logged in to vote')."</div>";
+ exit_not_logged_in();
} else {
$vote_on_id = getIntFromRequest('vote_on_id');
$response = getStringFromRequest('response');
@@ -42,6 +41,7 @@
1=project
2=release
*/
+ $HTML->header(array('title'=>_('Voting')));
$toss = db_query_params ('DELETE FROM survey_rating_response WHERE user_id=$1 AND type=$2 AND id=$3',
array(user_getid(),
$flag,
@@ -54,17 +54,15 @@
$response,
time()));
if (!$result) {
- $feedback .= _('ERROR');
- echo "<h1>"._('Error in insert')."</h1>";
- echo db_error();
+ $error_msg .= _('Error in insert').db_error();
+ session_redirect('/&error_msg='.urlencode($error_msg));
} else {
$feedback .= _('Vote registered');
- echo "<h2>"._('Vote registered')."</h2>";
- echo "<a href=\"javascript:history.back()\"><strong>"._('Click to return to previous page')."</strong></a>
-<p>"._('If you vote again, your old vote will be erased.')."</p>";
+ $warning_msg .= _('If you vote again, your old vote will be erased.');
+ session_redirect('/&feedback='.urlencode($feedback).'&warning_msg='.urlencode($warning_msg));
}
} else {
- echo "<h1>"._('ERROR!!! MISSING PARAMS')."</h1>";
+ exit_missing_param('',array(_('Vote ID'),_('Response'),_('Flag')),'survey');
}
}
$HTML->footer(array());
Modified: trunk/src/www/survey/survey_resp.php
===================================================================
--- trunk/src/www/survey/survey_resp.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/survey_resp.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -1,25 +1,26 @@
<?php
/**
- * GForge Survey Facility
+ * Survey Facility
*
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
*
- * This file is part of GForge.
+ * This file is part of FusionForge.
*
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge 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,
+ * FusionForge 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
+ * along with FusionForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -53,12 +54,7 @@
}
if (!session_loggedin()) {
- /*
- Tell them they need to be logged in
- */
- echo '<div class="error">'._('You have to be logged in to participate in surveys.')."</div>";
- $sh->footer(array());
- exit;
+ exit_not_logged_in();
}
?>
Modified: trunk/src/www/survey/survey_utils.php
===================================================================
--- trunk/src/www/survey/survey_utils.php 2010-09-25 08:42:08 UTC (rev 10681)
+++ trunk/src/www/survey/survey_utils.php 2010-09-25 09:56:19 UTC (rev 10682)
@@ -29,7 +29,7 @@
global $group_id,$is_admin_page,$HTML;
if (!forge_get_config('use_survey')) {
- exit_disabled('home');
+ exit_disabled();
}
$params['toptab']='surveys';
@@ -37,7 +37,7 @@
if ($project =& group_get_object($group_id)){
if (!$project->usesSurvey()) {
- exit_disabled('home');
+ exit_disabled();
}
site_project_header($params);
More information about the Fusionforge-commits
mailing list