Skip to content

Commit

Permalink
Updated to recognise and handle flexible labels by column question ty…
Browse files Browse the repository at this point in the history
…pe ("H")

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@997 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Apr 24, 2004
1 parent 2389673 commit b42d79e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/browse.php
Expand Up @@ -155,7 +155,7 @@
$field = "{$fnrow['sid']}X{$fnrow['gid']}X{$fnrow['qid']}";
$ftitle = "Grp{$fnrow['gid']}Qst{$fnrow['title']}";
$fquestion = $fnrow['question'];
if ($fnrow['type'] == "Q" || $fnrow['type'] == "M" || $fnrow['type'] == "A" || $fnrow['type'] == "B" || $fnrow['type'] == "C" || $fnrow['type'] == "E" || $fnrow['type'] == "F" || $fnrow['type'] == "P")
if ($fnrow['type'] == "Q" || $fnrow['type'] == "M" || $fnrow['type'] == "A" || $fnrow['type'] == "B" || $fnrow['type'] == "C" || $fnrow['type'] == "E" || $fnrow['type'] == "F" || $fnrow['type'] == "H" || $fnrow['type'] == "P")
{
$fnrquery = "SELECT * FROM {$dbprefix}answers WHERE qid={$fnrow['qid']} ORDER BY sortorder, answer";
$fnrresult = mysql_query($fnrquery);
Expand Down Expand Up @@ -298,7 +298,7 @@
}
foreach ($fnrows as $fnrow)
{
if ($fnrow['type'] != "Q" && $fnrow['type'] != "M" && $fnrow['type'] != "A" && $fnrow['type'] != "B" && $fnrow['type'] != "C" && $fnrow['type'] != "E" && $fnrow['type'] != "F" && $fnrow['type'] != "P" && $fnrow['type'] != "O" && $fnrow['type'] != "R")
if ($fnrow['type'] != "Q" && $fnrow['type'] != "M" && $fnrow['type'] != "A" && $fnrow['type'] != "B" && $fnrow['type'] != "C" && $fnrow['type'] != "E" && $fnrow['type'] != "F" && $fnrow['type'] != "H" && $fnrow['type'] != "P" && $fnrow['type'] != "O" && $fnrow['type'] != "R")
{
$field = "{$fnrow['sid']}X{$fnrow['gid']}X{$fnrow['qid']}";
$ftitle = "Grp{$fnrow['gid']}Qst{$fnrow['title']}";
Expand Down
5 changes: 3 additions & 2 deletions admin/dataentry.php
Expand Up @@ -114,7 +114,7 @@

while ($irow = mysql_fetch_array($iresult))
{
if ($irow['type'] != "M" && $irow['type'] != "A" && $irow['type'] != "B" && $irow['type'] != "C" && $irow['type'] != "E" && $irow['type'] != "F" && $irow['type'] != "P" && $irow['type'] != "O" && $irow['type'] != "R" && $irow['type'] != "Q")
if ($irow['type'] != "M" && $irow['type'] != "A" && $irow['type'] != "B" && $irow['type'] != "C" && $irow['type'] != "E" && $irow['type'] != "F" && $irow['type'] != "H" && $irow['type'] != "P" && $irow['type'] != "O" && $irow['type'] != "R" && $irow['type'] != "Q")
{
$fieldname = "{$irow['sid']}X{$irow['gid']}X{$irow['qid']}";
$col_name .= "`$fieldname`, \n";
Expand Down Expand Up @@ -315,7 +315,7 @@
$field = "{$fnrow['sid']}X{$fnrow['gid']}X{$fnrow['qid']}";
$ftitle = "Grp{$fnrow['gid']}Qst{$fnrow['title']}";
$fquestion = $fnrow['question'];
if ($fnrow['type'] == "M" || $fnrow['type'] == "A" || $fnrow['type'] == "B" || $fnrow['type'] == "C" || $fnrow['type'] == "E" || $fnrow['type'] == "F" || $fnrow['type'] == "P" || $fnrow['type'] == "Q")
if ($fnrow['type'] == "M" || $fnrow['type'] == "A" || $fnrow['type'] == "B" || $fnrow['type'] == "C" || $fnrow['type'] == "E" || $fnrow['type'] == "F" || $fnrow['type'] == "H" || $fnrow['type'] == "P" || $fnrow['type'] == "Q")
{
$fnrquery = "SELECT * FROM {$dbprefix}answers WHERE qid={$fnrow['qid']} ORDER BY sortorder, answer";
$fnrresult = mysql_query($fnrquery);
Expand Down Expand Up @@ -831,6 +831,7 @@
echo "</table>\n";
break;
case "F": //ARRAY (Flexible Labels)
case "H":
echo "<table>\n";
$thisqid=$fnames[$i][7];
while (isset($fnames[$i][7]) && $fnames[$i][7] == $thisqid)
Expand Down

0 comments on commit b42d79e

Please sign in to comment.