Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug #820: Statistics-Screen: Error Message on Prev/Next-Button,…
… if the Response-ID is not available

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2786 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Apr 23, 2007
1 parent 72f755c commit 89c08e7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions admin/browse.php
Expand Up @@ -237,6 +237,7 @@
$nfncount = count($fnames)-1;
//SHOW INDIVIDUAL RECORD
$idquery = "SELECT * FROM $surveytable WHERE ";
if ($id<1) {$id=1;}
if (isset($_POST['sql']) && $_POST['sql'])
{
if (get_magic_quotes_gpc()) {$idquery .= stripslashes($_POST['sql']);}
Expand All @@ -246,17 +247,20 @@
$idresult = db_execute_assoc($idquery) or die ("Couldn't get entry<br />\n$idquery<br />\n".$connect->ErrorMsg());
while ($idrow = $idresult->FetchRow()) {$id=$idrow['id']; $rlangauge=$idrow['startlanguage'];}
$next=$id+1;
$last=$id-1;
$last=$id-1;
$browseoutput .= "<table width='99%' align='center' style='border: 1px solid #555555' cellpadding='1' cellspacing='0'>\n"
."\t<tr bgcolor='#555555'>\n"
."\t\t<td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>"
. $clang->gT("View Response").":</strong> $id</font></td></tr>\n"
."\t<tr bgcolor='#999999'><td colspan='2'>\n"
."\t\t\t<img src='$imagefiles/blank.gif' width='31' height='20' border='0' hspace='0' align='left' alt='' />\n"
."\t\t\t<img src='$imagefiles/seperator.gif' border='0' hspace='0' align='left' alt='' />\n"
."\t\t\t<a href='$scriptname?action=dataentry&amp;subaction=edit&amp;id=$id&amp;sid=$surveyid&amp;language=$rlangauge&amp;surveytable=$surveytable'" .
."\t\t\t<img src='$imagefiles/seperator.gif' border='0' hspace='0' align='left' alt='' />\n";
if (isset($rlangauge))
{
$browseoutput .="\t\t\t<a href='$scriptname?action=dataentry&amp;subaction=edit&amp;id=$id&amp;sid=$surveyid&amp;language=$rlangauge&amp;surveytable=$surveytable'" .
"onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Edit this entry", "js")."')\">" .
"<img align='left' src='$imagefiles/edit.png' title='' alt='' /></a>\n";
}
if ($sumrows5['delete_survey'])
{
$browseoutput .= "\t\t\t<a href='$scriptname?action=dataentry&amp;subaction=delete&amp;id=$id&amp;sid=$surveyid&amp;surveytable=$surveytable'" .
Expand Down

0 comments on commit 89c08e7

Please sign in to comment.