Skip to content

Commit

Permalink
Modified to work with output from statistics script. Note bug seems t…
Browse files Browse the repository at this point in the history
…o exist when exporting abbreviated responses.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@39 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Mar 16, 2003
1 parent b8bff85 commit 99f45b9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions admin/export.php
Expand Up @@ -47,7 +47,9 @@
echo "<table width='350' align='center'>\n";
echo "\t<tr>\n";
echo "\t\t<td align='center'>\n";
echo "\t\t\t$setfont<b>Export Data</b>\n";
echo "\t\t\t$setfont<b>Export Data";
if ($sql) {echo " from Statistics Filter";}
echo "</b>\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "\t<form action='export.php' method='post'>\n";
Expand Down Expand Up @@ -80,6 +82,7 @@
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "\t<input type='hidden' name='sid' value='$sid'>\n";
if ($sql) {echo "\t<input type='hidden' name='sql' value=\"".stripcslashes($sql)."\">\n";}
echo "\t</form>\n";
echo "\t<tr>\n";
echo "\t\t<td align=\"center\">\n";
Expand Down Expand Up @@ -181,7 +184,14 @@
$legitqs[] = $lw[0];
}
$surveytable = "survey_{$sid}";
$dquery = "SELECT * FROM $surveytable ORDER BY id";
if ($sql)
{
$dquery = "SELECT * FROM $surveytable WHERE ".stripcslashes($sql)." ORDER BY id";
}
else
{
$dquery = "SELECT * FROM $surveytable ORDER BY id";
}
$dresult = mysql_query($dquery);
$fieldcount = mysql_num_fields($dresult);
while ($drow = mysql_fetch_array($dresult))
Expand Down

0 comments on commit 99f45b9

Please sign in to comment.