Skip to content

Commit

Permalink
Cleaned up coding (with notice warnings turned on), added isset check…
Browse files Browse the repository at this point in the history
…ing.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@776 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Nov 18, 2003
1 parent 554d74c commit 37afad6
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 50 deletions.
6 changes: 3 additions & 3 deletions admin/browse.php
Expand Up @@ -124,7 +124,7 @@
{
//SHOW HEADER
echo "\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><b>"._BROWSERESPONSES.": <font color='silver'>$surveyname</b></td></tr>\n";
if (!$_POST['sql']) {echo "$surveyoptions";} // Don't show options if coming from tokens script
if (!isset($_POST['sql']) || !$_POST['sql']) {echo "$surveyoptions";} // Don't show options if coming from tokens script
echo "</table>\n"
."<table height='1'><tr><td></td></tr></table>\n";

Expand Down Expand Up @@ -196,7 +196,7 @@
$nfncount = count($fnames)-1;
//SHOW INDIVIDUAL RECORD
$idquery = "SELECT * FROM $surveytable WHERE ";
if ($_POST['sql'])
if (isset($_POST['sql']) && $_POST['sql'])
{
if (get_magic_quotes_gpc) {$idquery .= stripslashes($_POST['sql']);}
else {$idquery .= "{$_POST['sql']}";}
Expand Down Expand Up @@ -246,7 +246,7 @@
."<table width='99%' align='center'>\n"
."\t<tr>\n"
."\t\t<td $singleborderstyle bgcolor='#EEEEEE' align='center'>\n";
if ($_POST['sql']) {echo "\t\t\t<input type='submit' $btstyle value='Close Window' onClick=\"window.close();\" />\n";}
if (isset($_POST['sql']) && $_POST['sql']) {echo "\t\t\t<input type='submit' $btstyle value='Close Window' onClick=\"window.close();\" />\n";}
echo "\t\t</td>\n"
."\t</tr>\n"
."</table>\n";
Expand Down

0 comments on commit 37afad6

Please sign in to comment.