[Fusionforge-commits] r11075 - in trunk/src/www/survey: . admin

Marc-Etienne VARGENAU vargenau at libremir.placard.fr.eu.org
Tue Oct 19 21:16:43 CEST 2010


Author: vargenau
Date: 2010-10-19 21:16:43 +0200 (Tue, 19 Oct 2010)
New Revision: 11075

Removed:
   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/survey_utils.php
   trunk/src/www/survey/survey_utils.php
Modified:
   trunk/src/www/survey/admin/show_questions.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/privacy.php
Log:
Remove dead code

Deleted: trunk/src/www/survey/admin/add_question.php
===================================================================
--- trunk/src/www/survey/admin/add_question.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/add_question.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -1,98 +0,0 @@
-<?php
-/**
- * FusionForge Survey Facility
- *
- * 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.
- *
- * 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
- */
-
-require_once('../../env.inc.php');
-require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'survey/survey_utils.php';
-$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')) {
-	echo '<div class="error">'._('Permission denied').'</div>';
-	survey_footer(array());
-	exit;
-}
-
-if (getStringFromRequest('post_changes')) {
-	$question = getStringFromRequest('question');
-	$question_type = getStringFromRequest('question_type');
-
-	$result = db_query_params ('INSERT INTO survey_questions (group_id,question,question_type) VALUES ($1,$2,$3)',
-				   array ($group_id,
-						htmlspecialchars($question),
-					  $question_type));
-	if ($result) {
-		$feedback .= _('Question Added');
-	} else {
-		$error_msg .= _('Error inserting question');
-	}
-}
-
-?>
-<script type="text/javascript">
-<!--
-var timerID2 = null;
-
-function show_questions() {
-	newWindow = open("","occursDialog","height=600,width=500,scrollbars=yes,resizable=yes");
-	newWindow.location=('show_questions.php?group_id=<?php echo $group_id; ?>');
-}
-
-// -->
-</script>
-
-<p>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
-<input type="hidden" name="post_changes" value="Y" />
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-<?php echo _('Question') ?>:<br />
-<input type="text" name="question" value="" size="60" maxlength="150" />
-<p>
-
-<?php echo _('Question type') ?>:<br />
-<?php
-
-$result = db_query_params ('SELECT * from survey_question_types',
-			   array ());
-echo html_build_select_box($result,'question_type','xzxz',false);
-
-?>
-</p>
-
-<p><input type="submit" name="submit" value="<?php echo _('Add This Question.'); ?>" /></p>
-</form>
-
-<form>
-<input type="button" name="none" value="<?php echo _('Show Existing Questions.'); ?>" onclick="show_questions()" />
-</form>
-
-<?php
-
-survey_footer(array());
-
-?>

Deleted: trunk/src/www/survey/admin/add_survey.php
===================================================================
--- trunk/src/www/survey/admin/add_survey.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/add_survey.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -1,117 +0,0 @@
-<?php
-/**
- * Survey Facility
- *
- * 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.
- *
- * 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
- */
-
-require_once('../../env.inc.php');
-require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'survey/survey_utils.php';
-require_once $gfwww.'survey/admin/survey_utils.php';
-$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')) {
-	echo '<div class="error">'. _('Permission denied').'</div>';
-	survey_footer(array());
-	exit;
-}
-
-if (getStringFromRequest('post_changes')) {
-	$survey_title = getStringFromRequest('survey_title');
-	$survey_questions = getStringFromRequest('survey_questions');
-
-	if (!$survey_title) {
-		$feedback .= _('Title required');
-	} else {
-		$result = db_query_params ('INSERT INTO surveys (survey_title,group_id,survey_questions) VALUES ($1,$2,$3)',
-					   array (htmlspecialchars($survey_title),
-						  $group_id,
-						  $survey_questions));
-		if ($result) {
-			$feedback .= _('Question inserted');
-		} else {
-			$error_msg .= _('Question insert failed');
-		}
-	}
-}
-
-?>
-<script type="text/javascript">
-<!--
-var timerID2 = null;
-
-function show_questions() {
-        newWindow = open("","occursDialog","height=600,width=500,scrollbars=yes,resizable=yes");
-        newWindow.location=('show_questions.php?group_id=<?php echo $group_id; ?>');
-}
-
-// -->
-</script>
-
-
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
-
-<strong><?php echo _('Name Of Survey:') ?></strong><?php echo utils_requiredField(); ?>
-<br />
-<input type="text" name="survey_title" value="" size="60" maxlength="150" /><p>
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-<input type="hidden" name="post_changes" value="y" />
-<?php echo _('List question numbers, in desired order, separated by commas. <strong>Refer to your list of questions</strong> so you can view the question id\'s. Do <strong>not</strong> include spaces or end your list with a comma. <br />Ex: 1,2,3,4,5,6,7'); ?>
-<br /><input type="text" name="survey_questions" value="" length="90" maxlength="1500" /></p>
-<p><strong><?php echo _('Is Active?') ?></strong>
-<br /><input type="radio" name="is_active" value="1" checked="checked" /> <?php echo _('Yes'); ?>
-<br /><input type="radio" name="is_active" value="0" /> <?php echo _('No'); ?></p>
-<p>
-<input type="submit" name="SUBMIT" value="<?php echo _('Add this Survey'); ?>" /></p>
-</form></p>
-
-<?php
-/*
-	Select this survey from the database
-*/
-
-$result = db_query_params ('SELECT * FROM surveys WHERE group_id=$1',
-			   array ($group_id));
-$numrows=db_numrows($result);
-?>
-<form>
-<input type="button" name="none" value="<?php echo _('Show Existing Questions'); ?>" onclick="show_questions()" />
-</form>
-
-<p>&nbsp;</p>
-<h2><?php echo ngettext('Existing Survey', 'Existing Surveys', $numrows) ?></h2>
-<p>&nbsp;</p>
-<?php
-ShowResultsEditSurvey($result);
-
-survey_footer(array());
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Deleted: trunk/src/www/survey/admin/edit_question.php
===================================================================
--- trunk/src/www/survey/admin/edit_question.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/edit_question.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -1,127 +0,0 @@
-<?php
-/**
- * Survey Facility
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2008-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
- */
-
-require_once('../../env.inc.php');
-require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'survey/survey_utils.php';
-
-$is_admin_page='y';
-$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')) {
-	echo '<div class="error">' ._('Permission denied'). '</div>';
-	survey_footer(array());
-	exit;
-}
-
-if (getStringFromRequest('post_changes')) {
-	$question = getStringFromRequest('question');
-	$question_type = getStringFromRequest('question_type');
-	$question_id = getIntFromRequest('question_id');
-
-	$result = db_query_params ('UPDATE survey_questions SET question=$1, question_type=$2 where question_id=$3 AND group_id=$4',
-				   array (htmlspecialchars($question),
-					  $question_type,
-					  $question_id,
-					  $group_id));
-        if (db_affected_rows($result) < 1) {
-                $error_msg .= _('Update Failed');
-        } else {
-                $feedback .= _('Update Successful');
-        }
-}
-
-$result = db_query_params ('SELECT * FROM survey_questions WHERE question_id=$1 AND group_id=$2',
-			   array ($question_id,
-				  $group_id));
-
-if ($result) {
-	$question=db_result($result, 0, "question");
-	$question_type=db_result($result, 0, "question_type");
-} else {
-	$error_msg .= _('Error finding question');
-}
-
-?>
-<script type="text/javascript">
-<!--
-var timerID2 = null;
-
-function show_questions() {
-	newWindow = open("","occursDialog","height=600,width=500,scrollbars=yes,resizable=yes");
-	newWindow.location=('show_questions.php?group_id=<?php echo $group_id; ?>');
-}
-
-// -->
-</script>
-
-<h2><?php echo _('Editing Question'); ?> #<?php echo $question_id; ?></h2>
-
-<div class="warning"><?php echo _('WARNING! It is a bad idea to change a question after responses to it have been submitted'); ?></div>
-
-<p><?php echo _('If you change a question after responses have been posted, your results pages may be misleading'); ?>.</p>
-
-<p>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
-<input type="hidden" name="post_changes" value="Y" />
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>"/>
-<input type="hidden" name="question_id" value="<?php echo $question_id; ?>" />
-
-<?php echo _('Question'); ?>:
-<br />
-<input type="text" name="question" value="<?php echo $question; ?>" size="60" maxlength="150" />
-
-<p><?php echo _('Question type'); ?>:
-<br />
-<?php
-
-$result = db_query_params ('SELECT * FROM survey_question_types',
-			   array ());
-echo html_build_select_box($result,'question_type',$question_type,false);
-
-?>
-</p>
-
-<p><input type="submit" name="submit" value="<?php echo _('Submit Changes'); ?>" /></p>
-</form>
-
-<form>
-<input type="button" name="none" value="<?php echo _('Show Existing Questions'); ?>" onclick="show_questions()" />
-</form>
-
-<?php
-
-survey_footer(array());
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Deleted: trunk/src/www/survey/admin/edit_survey.php
===================================================================
--- trunk/src/www/survey/admin/edit_survey.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/edit_survey.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -1,157 +0,0 @@
-<?php
-/**
- * Survey Facility
- *
- * 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.
- *
- * 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
- */
-
-require_once('../../env.inc.php');
-require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'survey/survey_utils.php';
-require_once $gfwww.'survey/admin/survey_utils.php';
-
-$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')) {
-	echo '<div class="error">'._('Permission denied').'</div>';
-	survey_footer(array());
-	exit;
-}
-
-if (getStringFromRequest('post_changes')) {
-	$survey_title = $survey_title;
-	$survey_questions = $survey_questions;
-	$is_active = $is_active;
-
-	if (!isset($survey_title) || $survey_title == "")
-	{
-		$error_msg .= _('Update Failed: Survey Title Required');
-	}
-	elseif (!isset($survey_questions) || $survey_questions == "")
-	{
-		$error_msg .= _('Update Failed: Survey Questions Required');
-	}
-	if (!isset($survey_id) || !isset($group_id) || $survey_id == "" || $group_id == "")
-	{
-		$error_msg .= _('Update Failed: Missing Data');
-	}
-	else
-	{
-		if ($is_active) {
-			$is_active = 1;
-		} else {
-			$is_active = 0;
-		}
-		$result = db_query_params ('UPDATE surveys SET survey_title=$1, survey_questions=$2, is_active=$3
-WHERE survey_id=$4 AND group_id=$5',
-					   array (htmlspecialchars($survey_title),
-						  $survey_questions,
-						  $is_active,
-						  $survey_id,
-						  $group_id));
-		if (db_affected_rows($result) < 1) {
-			$error_msg .= _('Update Failed: ').db_error();
-		} else {
-			$feedback .= _('Update Successful');
-		}
-	}
-}
-
-/*
-	Get this survey out of the DB
-*/
-if ($survey_id) {
-	$result = db_query_params ('SELECT * FROM surveys WHERE survey_id=$1 AND group_id=$2',
-				   array ($survey_id,
-					  $group_id));
-	$survey_title=db_result($result, 0, "survey_title");
-	$survey_questions=db_result($result, 0, "survey_questions");
-	$is_active=db_result($result, 0, "is_active");
-}
-?>
-<script type="text/javascript">
-<!--
-var timerID2 = null;
-
-function show_questions() {
-        newWindow = open("","occursDialog","height=600,width=500,scrollbars=yes,resizable=yes");
-        newWindow.location=('show_questions.php?group_id=<?php echo $group_id; ?>');
-}
-
-// -->
-</script>
-
-<span class="warning"><?php echo _('WARNING! It is a bad idea to edit a survey after responses have been posted'); ?></span>
-
-<p><?php echo _('If you change a survey after you already have responses, your results pages could be misleading or messed up'); ?>.</p>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-<input type="hidden" name="post_changes" value="y" />
-<strong><?php echo _('Name of Survey'); ?>:</strong>
-<br />
-<input type="hidden" name="survey_id" value="<?php echo $survey_id; ?>" />
-<input type="text" name="survey_title" value="<?php echo $survey_title; ?>" size="60" maxlength="150" />
-<p>
-<strong><?php echo _('Questions'); ?>:</strong>
-<br />
-<?php echo _('List question numbers, in desired order, separated by commas. <strong>Refer to your list of questions</strong> so you can view	the question id\'s. Do <strong>not</strong> include spaces or end your list with a comma.<br /> Ex: 1,2,3,4,5,6,7'); ?>
-<br /><input type="text" name="survey_questions" value="<?php echo $survey_questions; ?>" length="90" maxlength="1500" /></p>
-<p>
-<strong><?php echo _('Is Active'); ?></strong>
-<br /><input type="radio" name="is_active" value="1"<?php if ($is_active=='1') { echo ' checked="checked"'; } ?> /> <?php echo _('Yes'); ?>
-<br /><input type="radio" name="is_active" value="0"<?php if ($is_active=='0') { echo ' checked="checked"'; } ?> /> <?php echo _('No'); ?></p>
-<p>
-<input type="submit" name="submit" value="<?php echo _('Submit Changes'); ?>"></p>
-</form>
-
-<?php
-
-
-/*
-	Select all surveys from the database
-*/
-$result = db_query_params ('SELECT * FROM surveys WHERE group_id=$1',
-			   array ($group_id));
-$numrows=db_numrows($result);
-
-?>
-
-<form>
-<input type="button" name="none" value="<?php echo _('Show Existing Questions'); ?>" onclick="show_questions()" />
-</form>
-<p>&nbsp;</p>
-<h2><?php echo ngettext('Existing Survey', 'Existing Surveys', $numrows) ?></h2>
-<?php
-
-ShowResultsEditSurvey($result);
-
-survey_footer(array());
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Modified: trunk/src/www/survey/admin/show_questions.php
===================================================================
--- trunk/src/www/survey/admin/show_questions.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/show_questions.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -26,7 +26,6 @@
 
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'survey/survey_utils.php';
 
 $is_admin_page='y';
 $group_id = getIntFromRequest('group_id');

Modified: trunk/src/www/survey/admin/show_results_aggregate.php
===================================================================
--- trunk/src/www/survey/admin/show_results_aggregate.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/show_results_aggregate.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -26,7 +26,6 @@
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/HTML_Graphs.php';
-require_once $gfwww.'survey/survey_utils.php';
 
 $is_admin_page='y';
 $group_id = getIntFromRequest('group_id');

Modified: trunk/src/www/survey/admin/show_results_comments.php
===================================================================
--- trunk/src/www/survey/admin/show_results_comments.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/show_results_comments.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -26,7 +26,6 @@
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/HTML_Graphs.php';
-require_once $gfwww.'survey/survey_utils.php';
 
 $is_admin_page='y';
 $group_id = getIntFromRequest('group_id');

Modified: trunk/src/www/survey/admin/show_results_csv.php
===================================================================
--- trunk/src/www/survey/admin/show_results_csv.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/show_results_csv.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -26,7 +26,6 @@
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/HTML_Graphs.php';
-require_once $gfwww.'survey/survey_utils.php';
 
 $group_id = getIntFromRequest('group_id');
 $survey_id = getIntFromRequest('survey_id');

Modified: trunk/src/www/survey/admin/show_results_individual.php
===================================================================
--- trunk/src/www/survey/admin/show_results_individual.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/show_results_individual.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -26,7 +26,6 @@
 
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'survey/survey_utils.php';
 
 $is_admin_page='y';
 $group_id = getIntFromRequest('group_id');

Deleted: trunk/src/www/survey/admin/survey_utils.php
===================================================================
--- trunk/src/www/survey/admin/survey_utils.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/admin/survey_utils.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -1,60 +0,0 @@
-<?php
-/**
- * Survey Facility
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2002-2004 (c) GForge 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
- */
-
-Function  ShowResultsEditSurvey($result) {
-	global $group_id;
-	$rows  =  db_NumRows($result);
-	$cols  =  db_NumFields($result);
-	echo "<h3>". sprintf(ngettext('%1$s survey found', '%1$s surveys found', $rows), $rows)."</h3>";
-
-	if ($rows > 0) {
-		echo "<table border=\"0\">\n";
-
-		/*  Create  the  headers  */
-		echo "<tr class=\"tableheading\">\n";
-		for ($i  =  0;  $i  <  $cols;  $i++)  {
-			echo "<th>".db_fieldname($result,$i)."</th>\n";
-		}
-		echo "</tr>";
-		for($j  =  0;  $j  <  $rows;  $j++)  {
-
-			echo "<tr class=\".$HTML->boxGetAltRowStyle($j)\">\n";
-			echo "<td><a href=\"edit_survey.php?group_id=$group_id&amp;survey_id=".db_result($result,$j,0)."\">".db_result($result,$j,0)."</a></td>";
-			for ($i = 1; $i < $cols; $i++)  {
-				echo "<td>".db_result($result,$j,$i)."</td>\n";
-			}
-
-			echo "</tr>";
-		}
-		echo "</table>"; 
-	}
-}
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Modified: trunk/src/www/survey/privacy.php
===================================================================
--- trunk/src/www/survey/privacy.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/privacy.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -26,7 +26,6 @@
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/vote_function.php';
-require_once $gfwww.'survey/survey_utils.php';
 
 echo $HTML->header(array('title'=>_('Survey Privacy')));
 

Deleted: trunk/src/www/survey/survey_utils.php
===================================================================
--- trunk/src/www/survey/survey_utils.php	2010-10-19 19:14:02 UTC (rev 11074)
+++ trunk/src/www/survey/survey_utils.php	2010-10-19 19:16:43 UTC (rev 11075)
@@ -1,90 +0,0 @@
-<?php
-/**
- * FusionForge Survey Facility
- *
- * Portions Copyright 1999-2001 (c) VA Linux Systems, Tim Perdue
- * Copyright 2002-2004 (c) GForge Team
- * Copyright 2010 (c) Franck Villaume
- * 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
- */
-
-
-function survey_header($params) {
-	global $group_id,$is_admin_page,$HTML;
-
-	if (!forge_get_config('use_survey')) {
-		exit_disabled();
-	}
-
-	$params['toptab']='surveys';
-	$params['group']=$group_id;
-
-	if ($project = group_get_object($group_id)){
-		if (!$project->usesSurvey()) {
-			exit_disabled();
-		}
-		
-		site_project_header($params);
-		
-		if ($is_admin_page && $group_id) {
-			echo ($HTML->subMenu(
-				array(
-					_('Surveys'),
-					_('Admin'),
-					_('Add Survey'),
-					_('Edit Survey'),
-					_('Add Questions'),
-					_('Edit Questions'),
-					_('Show Results')
-				),
-				array(
-					'/survey/?group_id='.$group_id,
-					'/survey/admin/?group_id='.$group_id,
-					'/survey/admin/add_survey.php?group_id='.$group_id,
-					'/survey/admin/edit_survey.php?group_id='.$group_id,
-					'/survey/admin/add_question.php?group_id='.$group_id,
-					'/survey/admin/show_questions.php?group_id='.$group_id,
-					'/survey/admin/show_results.php?group_id='.$group_id
-				)
-			));
-		} else {
-			if (forge_check_perm ('project_admin', $group_id)) {
-				echo ($HTML->subMenu(
-					      array(
-						      _('Admin')
-						      ),
-					      array(
-						      '/survey/admin/?group_id='.$group_id
-						      )
-					      ));
-			}
-		}
-	}// end if (valid group id)
-}
-
-function survey_footer($params) {
-	site_project_footer($params);
-}
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>




More information about the Fusionforge-commits mailing list