Skip to content

Commit

Permalink
Fixed extra table cells at the end of a row in action=all. Changed me…
Browse files Browse the repository at this point in the history
…thod used to calculate $fncount by removed increments on $fncount++ and replacing with $fncount = count(fnname).

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@137 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
James Richards committed Mar 24, 2003
1 parent bd8be1e commit 2a63e72
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions admin/browse.php
Expand Up @@ -265,7 +265,6 @@
$ftitle .= "[comment]";
$fquestion .= " (comment)";
$fnames[] = array("$field", "$ftitle", "$fquestion", "{$fnrow['gid']}");
$fncount++;
}
else
{
Expand All @@ -278,25 +277,22 @@
$ftitle = "Grp{$fnrow['gid']}Qst{$fnrow['title']}Opt{$i2row['code']}";
if ($i2row['other'] == "Y") {$otherexists = "Y";}
$fnames[] = array("$field", "$ftitle", "{$fnrow['question']}<br />\n[{$i2row['answer']}]", "{$fnrow['gid']}");
if ($fnrow['type'] == "P") {$fnames[] = array("$field"."comment", "$ftitle", "{$fnrow['question']}<br />\n[{$i2row['answer']}]<br />\n[Comment]", "{$fnrow['gid']}"); $fncount++;}
$fncount++;
if ($fnrow['type'] == "P") {$fnames[] = array("$field"."comment", "$ftitle", "{$fnrow['question']}<br />\n[{$i2row['answer']}]<br />\n[Comment]", "{$fnrow['gid']}");}
}
if ($otherexists == "Y")
{
$field = "{$fnrow['sid']}X{$fnrow['gid']}X{$fnrow['qid']}"."other";
$ftitle = "Grp{$fnrow['gid']}Qst{$fnrow['title']}OptOther";
$fnames[] = array("$field", "$ftitle", "{$fnrow['question']}<br />\n[Other]", "{$fnrow['gid']}");
$fncount++;
if ($fnrow['type'] == "P")
{
$fnames[] = array("$field"."comment", "$ftitle"."Comment", "{$fnrow['question']}<br />\n[Other]<br />\n[Comment]", "{$fnrow['gid']}");
$fncount++;
}
}

}
}
//echo "$field | $ftitle | $fquestion<br />\n";
}
$fncount = count($fnames);

//NOW LETS CREATE A TABLE WITH THOSE HEADINGS
if ($fncount < 10) {$cellwidth = "10%";} else {$cellwidth = "100";}
Expand Down Expand Up @@ -364,7 +360,7 @@
$i++;
}

for ($i; $i<=$fncount; $i++)
for ($i; $i<$fncount; $i++)
{
echo "\t\t<td align='center'><font size='1'>";
echo htmlspecialchars($dtrow[$fnames[$i][0]]);
Expand Down

0 comments on commit 2a63e72

Please sign in to comment.