-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
61 lines (45 loc) · 1.42 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: index.php,v 1.6 2004/01/13 13:15:26 helix Exp $
require('pre.php');
require('vote_function.php');
require('../survey/survey_utils.php');
if ($group_id) {
survey_header(array('title'=>'Survey'));
Function ShowResultsGroupSurveys($result) {
global $group_id;
$rows = db_numrows($result);
$cols = db_numfields($result);
$title_arr=array();
$title_arr[]='Survey ID';
$title_arr[]='Survey Title';
echo html_build_list_table_top ($title_arr);
for($j=0; $j<$rows; $j++) {
echo "<tr BGCOLOR=\"". html_get_alt_row_color($j) ."\">\n";
echo "<TD><A HREF=\"survey.php?group_id=$group_id&survey_id=".db_result($result,$j,"survey_id")."\">".
sprintf("%06d",db_result($result,$j,"survey_id"))."</A></TD>";
for ($i=1; $i<$cols; $i++) {
printf("<TD WIDTH=\"99%%\">%s</TD>\n",db_result($result,$j,$i));
}
echo "</tr>";
}
echo "</table>"; //</TD></TR></TABLE>");
}
$sql="SELECT survey_id,survey_title FROM surveys WHERE group_id='$group_id' AND is_active='1'";
$result=db_query($sql);
if (!$result || db_numrows($result) < 1) {
echo "<H2>This Group Has No Active Surveys</H2>";
echo db_error();
} else {
echo "<H2>Surveys for ".group_getname($group_id)."</H2>";
ShowResultsGroupSurveys($result);
}
survey_footer(array());
} else {
exit_no_group();
}
?>