Skip to content

Commit

Permalink
-Fixed a help window showing up when opening the browse windows from …
Browse files Browse the repository at this point in the history
…statistics

-More xhtml  fixes

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2676 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Apr 1, 2007
1 parent d32dc80 commit 19a9702
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
22 changes: 11 additions & 11 deletions admin/browse.php
Expand Up @@ -71,7 +71,7 @@
."<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n"
. $clang->gT("The defined surveyor database does not exist")."<br />\n"
. $clang->gT("Either your selected database has not yet been created or there is a problem accessing it.")."<br /><br />\n"
."<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\"><br />\n"
."<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br />\n"
."</td></tr></table>\n"
."</body>\n</html>";
return;
Expand All @@ -84,7 +84,7 @@
."<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n"
. $clang->gT("You have not selected a survey to browse.")."<br /><br />\n"
."<input type='submit' value='"
. $clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\"><br />\n"
. $clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br />\n"
."</td></tr></table>\n";
return;
}
Expand Down Expand Up @@ -122,7 +122,7 @@
."\t<tr><td align='center'>\n"
."<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n"
. $clang->gT("There is no matching survey.")." ($surveyid)<br /><br />\n"
."<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\"><br />\n"
."<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br />\n"
."</td></tr></table>\n"
."</body>\n</html>";
return;
Expand Down Expand Up @@ -305,14 +305,14 @@
{$browseoutput .= "$surveyoptions";} //don't show options when called from another script with a filter on
else
{
$browseoutput .= "\n<table width='100%' align='center' border='0' bgcolor='#EFEFEF'>\n"
$browseoutput .= "\n<tr><td><table width='100%' align='center' border='0' bgcolor='#EFEFEF'>\n"
."\t<tr>\n"
."\t\t<td align='center' $singleborderstyle>$setfont\n"
."\t\t\t".$clang->gT("Showing Filtered Results")."<br />\n"
."\t\t\t&nbsp;[<a href=\"javascript:window.close()\">".$clang->gT("Close")."</a>]"
."\t\t</font></td>\n"
."\t</tr>\n"
."</table>\n";
."</table></td></tr>\n";

}
$browseoutput .= "</table>\n";
Expand Down Expand Up @@ -528,15 +528,15 @@
."\t\t<td align='right'>\n"
."\t\t<form action='$scriptname?action=browse' method='post'><font size='1' face='verdana'>\n"
."\t\t\t<img src='$imagefiles/blank.gif' width='31' height='20' border='0' hspace='0' align='right' alt='' />\n"
."\t\t\t".$clang->gT("Records Displayed:")."<input type='text' size='4' value='$dtcount2' name='limit'>\n"
."\t\t\t".$clang->gT("Starting From:")."<input type='text' size='4' value='$start' name='start'>\n"
."\t\t\t<input type='submit' value='".$clang->gT("Show")."'>\n"
."\t\t\t".$clang->gT("Records Displayed:")."<input type='text' size='4' value='$dtcount2' name='limit' />\n"
."\t\t\t".$clang->gT("Starting From:")."<input type='text' size='4' value='$start' name='start' />\n"
."\t\t\t<input type='submit' value='".$clang->gT("Show")."' />\n"
."\t\t</font>\n"
."\t\t<input type='hidden' name='sid' value='$surveyid'>\n"
."\t\t<input type='hidden' name='action' value='all'>\n");
."\t\t<input type='hidden' name='sid' value='$surveyid' />\n"
."\t\t<input type='hidden' name='action' value='all' />\n");
if (isset($_POST['sql']))
{
$browseoutput .= "\t\t<input type='hidden' name='sql' value='".html_escape($_POST['sql'])."'>\n";
$browseoutput .= "\t\t<input type='hidden' name='sql' value='".html_escape($_POST['sql'])."' />\n";
}
$browseoutput .= "\t\t</form></td>\n"
."\t</tr>\n"
Expand Down
34 changes: 17 additions & 17 deletions admin/statistics.php
Expand Up @@ -186,7 +186,7 @@ function show(element) {
$allfields[]=$myfield4;
$allfields[]=$myfield5;
}
$statisticsoutput .= "</td></tr></table>";
$statisticsoutput .= "</tr></table></td></tr>";

// 2: Get answers for each question
if (!isset($currentgroup)) {$currentgroup="";}
Expand Down Expand Up @@ -219,7 +219,7 @@ function show(element) {
if (isset($_POST['summary']) && (array_search("{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE || array_search("M{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE || array_search("N{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE))
{$statisticsoutput .= " checked='checked'";}
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\"".str_replace("\"", "`", $flt[5])."\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext."')\"></strong>"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\"".str_replace("\"", "`", $flt[5])."\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext."')\" /></strong>"
."<br />\n";
if ($flt[2] == "N") {$statisticsoutput .= "</font>";}
if ($flt[2] != "N") {$statisticsoutput .= "\t\t\t\t<select name='";}
Expand Down Expand Up @@ -247,7 +247,7 @@ function show(element) {
."&nbsp;<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])
." [$flt[1]]\" onclick=\"alert('".$clang->gT("Question","js").": ".FlattenText($row[1])." "
."')\">"
."')\" />"
."<br />\n"
."\t\t\t\t\t<font size='1'>".$clang->gT("Responses Containing").":</font><br />\n"
."\t\t\t\t\t<input type='text' name='$myfield2' value='";
Expand All @@ -272,7 +272,7 @@ function show(element) {
."&nbsp;<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])." \" "
."onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext." "
."')\">"
."')\" />"
."<br />\n"
."\t\t\t\t\t<font size='1'>".$clang->gT("Responses Containing").":</font><br />\n"
."\t\t\t\t\t<textarea name='$myfield2' rows='3' cols='80'>";
Expand All @@ -291,7 +291,7 @@ function show(element) {
."&nbsp;<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])
." [$flt[1]]\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext." "
."')\">"
."')\" />"
."<br />\n"
."\t\t\t\t\t<font size='1'>".$clang->gT("Responses Containing").":</font><br />\n"
."\t\t\t\t\t<input type='text' name='$myfield2' value='";
Expand Down Expand Up @@ -321,7 +321,7 @@ function show(element) {
."&nbsp;<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])
." \" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext." "
."')\">"
."')\" />"
."<br />\n"
."\t\t\t\t\t<font size='1'>".$clang->gT("Date (YYYY-MM-DD) equals").":<br />\n"
."\t\t\t\t\t<input name='$myfield3' type='text' value='";
Expand Down Expand Up @@ -382,7 +382,7 @@ function show(element) {
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])." [$row[1]]\" onclick=\"alert('".$clang->gT("Question","js").": "
.$niceqtext." ".str_replace("'", "`", $row[1])."')\">"
.$niceqtext." ".str_replace("'", "`", $row[1])."')\" />"
."<br />\n"
."\t\t\t\t<select name='{$surveyid}X{$flt[1]}X{$flt[0]}{$row[0]}[]' multiple='multiple'>\n";
for ($i=1; $i<=5; $i++)
Expand Down Expand Up @@ -420,7 +420,7 @@ function show(element) {
.str_replace("\"", "`", $flt[5])
." [$row[1]]\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext." "
.str_replace("'", "`", $row[1])
."')\">"
."')\" />"
."<br />\n"
."\t\t\t\t<select name='{$surveyid}X{$flt[1]}X{$flt[0]}{$row[0]}[]' multiple='multiple'>\n";
for ($i=1; $i<=10; $i++)
Expand Down Expand Up @@ -456,7 +456,7 @@ function show(element) {
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])." [$row[1]]\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext." "
.str_replace("'", "`", $row[1])."')\">"
.str_replace("'", "`", $row[1])."')\" />"
."<br />\n"
."\t\t\t\t<select name='{$surveyid}X{$flt[1]}X{$flt[0]}{$row[0]}[]' multiple='multiple'>\n"
."\t\t\t\t\t<option value='Y'";
Expand Down Expand Up @@ -493,7 +493,7 @@ function show(element) {
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])." [$row[1]]\" onclick=\"alert('".$clang->gT("Question","js")
.": ".$niceqtext." ".str_replace("'", "`", $row[1])."')\">"
.": ".$niceqtext." ".str_replace("'", "`", $row[1])."')\" />"
."<br />\n"
."\t\t\t\t<select name='{$surveyid}X{$flt[1]}X{$flt[0]}{$row[0]}[]' multiple='multiple'>\n"
."\t\t\t\t\t<option value='I'";
Expand Down Expand Up @@ -531,7 +531,7 @@ function show(element) {
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])." [$row[1]]\" onclick=\"alert('".$clang->gT("Question","js")
.": ".$niceqtext." ".str_replace("'", "`", $row[1])."')\">"
.": ".$niceqtext." ".str_replace("'", "`", $row[1])."')\" />"
."<br />\n";
$fquery = "SELECT * FROM ".db_table_name("labels")." WHERE lid={$flt[6]} AND language='{$language}' ORDER BY sortorder, code";
//$statisticsoutput .= $fquery;
Expand Down Expand Up @@ -574,7 +574,7 @@ function show(element) {
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\""
.str_replace("\"", "`", $flt[5])." [$row[1]]\" onclick=\"alert('".$clang->gT("Question","js")
.": ".$niceqtext." ".str_replace("'", "`", $row[1])."')\">"
.": ".$niceqtext." ".str_replace("'", "`", $row[1])."')\" />"
."<br />\n"
."\t\t\t\t<select name='{$surveyid}X{$flt[1]}X{$flt[0]}{$i}[]' multiple='multiple'>\n";
foreach ($answers as $ans)
Expand Down Expand Up @@ -606,7 +606,7 @@ function show(element) {
if (isset($_POST['summary']) && (array_search("{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE || array_search("M{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE || array_search("N{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE))
{$statisticsoutput .= " checked='checked'";}
$statisticsoutput .= " />&nbsp;"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\"".str_replace("\"", "`", $flt[5])."\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext."')\"></strong>"
."<img src='$imagefiles/speaker.png' align='bottom' alt=\"".str_replace("\"", "`", $flt[5])."\" onclick=\"alert('".$clang->gT("Question","js").": ".$niceqtext."')\" /></strong>"
."<br />\n";
$statisticsoutput .= "\t\t\t\t<select name='{$surveyid}X{$flt[1]}X{$flt[0]}[]' multiple='multiple'>\n";
$allfields[]=$myfield;
Expand All @@ -618,7 +618,7 @@ function show(element) {
if (isset($_POST[$myfield]) && is_array($_POST[$myfield]) && in_array($row[0], $_POST[$myfield])) {$statisticsoutput .= " selected";}
$statisticsoutput .= ">$row[1]</option>\n";
} // while
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</font>\n";
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</font></td>\n";
break;
default:
$query = "SELECT code, answer FROM ".db_table_name("answers")." WHERE qid='$flt[0]' AND language='{$language}' ORDER BY sortorder, answer";
Expand All @@ -629,15 +629,15 @@ function show(element) {
if (isset($_POST[$myfield]) && is_array($_POST[$myfield]) && in_array($row[0], $_POST[$myfield])) {$statisticsoutput .= " selected";}
$statisticsoutput .= ">$row[1]</option>\n";
}
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</font>\n";
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</font></td>\n";

break;
}
$currentgroup=$flt[1];
if (!isset($counter)) {$counter=0;}
$counter++;
}
$statisticsoutput .= "\n\t\t\t\t</tr>\n";
$statisticsoutput .= "\n\t\t\t\t</td></tr>\n";
if (isset($allfields))
{
$allfield=implode("|", $allfields);
Expand Down Expand Up @@ -875,7 +875,7 @@ function show(element) {
."\t\t\t<input type='hidden' name='sid' value='$surveyid' />\n"
."\t\t\t<input type='hidden' name='sql' value=\"$sql\" />\n"
."\t\t\t<input type='hidden' name='subaction' value='all' />\n"
."\t\t</form>\n"
."\t\t</form></td>\n"
."\t\t<td width='50%'><form action='$scriptname?action=exportresults' method='post' target='_blank'>\n"
."\t\t<input type='submit' value='".$clang->gT("Export")."' />\n"
."\t\t\t<input type='hidden' name='sid' value='$surveyid' />\n"
Expand Down

0 comments on commit 19a9702

Please sign in to comment.