Skip to content

Commit

Permalink
Some formatting changes
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@3094 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jul 19, 2007
1 parent d614358 commit b7a9978
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 56 deletions.
4 changes: 2 additions & 2 deletions admin/browse.php
Expand Up @@ -302,7 +302,7 @@
$browseoutput .= "</table>\n"
."<table width='99%' align='center'>\n"
."\t<tr>\n"
."\t\t<td $singleborderstyle bgcolor='#EEEEEE' align='center'>\n";
."\t\t<td bgcolor='#EEEEEE' align='center'>\n";
// if (isset($_POST['sql']) && $_POST['sql']) {$browseoutput .= "\t\t\t<input type='submit' value='Close Window' onclick=\"window.close();\" />\n";}
$browseoutput .= "\t\t</td>\n"
."\t</tr>\n"
Expand All @@ -320,7 +320,7 @@
{
$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<td align='center'>\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"
Expand Down
4 changes: 2 additions & 2 deletions admin/dumpquestion.php
Expand Up @@ -56,8 +56,8 @@
echo "<br />\n";
echo "<table width='350' align='center' style='border: 1px solid #555555' cellpadding='1' cellspacing='0'>\n";
echo "\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>".$clang->gT("Export Question")."</strong></td></tr>\n";
echo "\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n";
echo "$setfont<br /><strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n".$clang->gT("No QID has been provided. Cannot dump question.")."<br />\n";
echo "\t<tr bgcolor='#CCCCCC'><td align='center'>\n";
echo "<br /><strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n".$clang->gT("No QID has been provided. Cannot dump question.")."<br />\n";
echo "<br /><input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\">\n";
echo "\t</td></tr>\n";
echo "</table>\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/dumpsurvey.php
Expand Up @@ -63,7 +63,7 @@
."\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>"
.$clang->gT("Export Survey")."</strong></td></tr>\n"
."\t<tr><td align='center'>\n"
."$setfont<br /><strong><font color='red'>"
."<br /><strong><font color='red'>"
.$clang->gT("Error")."</font></strong><br />\n"
.$clang->gT("No SID has been provided. Cannot dump survey")."<br />\n"
."<br /><input type='submit' value='"
Expand Down
6 changes: 3 additions & 3 deletions admin/exportresults.php
Expand Up @@ -147,7 +147,7 @@
.$clang->gT("Questions")."</strong></font></td></tr>\n"
."\t<tr>\n"
."\t\t<td>\n"
."\t\t\t$setfont<input type='radio' class='radiobtn' name='style' value='abrev' id='headabbrev'>"
."\t\t\t<input type='radio' class='radiobtn' name='style' value='abrev' id='headabbrev'>"
."<font size='1'><label for='headabbrev'>"
.$clang->gT("Abbreviated headings")."</label><br />\n"
."\t\t\t<input type='radio' class='radiobtn' checked name='style' value='full' id='headfull'>"
Expand All @@ -166,7 +166,7 @@
.$clang->gT("Answers")."</strong></font></font></td></tr>\n"
."\t<tr>\n"
."\t\t<td>\n"
."\t\t\t$setfont<input type='radio' class='radiobtn' name='answers' value='short' id='ansabbrev'>"
."\t\t\t<input type='radio' class='radiobtn' name='answers' value='short' id='ansabbrev'>"
."<font size='1'><label for='ansabbrev'>"
.$clang->gT("Answer Codes")."</label><br />\n"
."\t\t\t<input type='radio' class='radiobtn' checked name='answers' value='long' id='ansfull'>"
Expand All @@ -178,7 +178,7 @@
.$clang->gT("Format")."</strong></font></td></tr>\n"
."\t<tr>\n"
."\t\t<td>\n"
."\t\t\t$setfont<input type='radio' class='radiobtn' name='type' value='doc' id='worddoc' onclick='document.getElementById(\"ansfull\").checked=true;document.getElementById(\"ansabbrev\").disabled=true;'>"
."\t\t\t<input type='radio' class='radiobtn' name='type' value='doc' id='worddoc' onclick='document.getElementById(\"ansfull\").checked=true;document.getElementById(\"ansabbrev\").disabled=true;'>"
."<font size='1'><label for='worddoc'>"
.$clang->gT("Microsoft Word (Latin charset)")."</label><br />\n"
."\t\t\t<input type='radio' class='radiobtn' name='type' value='xls' checked id='exceldoc' onclick='document.getElementById(\"ansabbrev\").disabled=false;'>"
Expand Down
2 changes: 1 addition & 1 deletion admin/http_importsurvey.php
Expand Up @@ -50,7 +50,7 @@
if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path))
{
$importsurvey .= "<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n";
$importsurvey .= $clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/temp folder.")."<br /><br />\n";
$importsurvey .= $clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/tmp folder folder.")."<br /><br />\n";
$importsurvey .= "</font></td></tr></table>\n";
return;
}
Expand Down
2 changes: 1 addition & 1 deletion admin/importgroup.php
Expand Up @@ -50,7 +50,7 @@
if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path))
{
$importgroup .= "<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n";
$importgroup .= $clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/temp folder.")."<br /><br />\n";
$importgroup .= $clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/tmp folder folder.")."<br /><br />\n";
$importgroup .= "<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\">\n";
$importgroup .= "</td></tr></table>\n";
return;
Expand Down
2 changes: 1 addition & 1 deletion admin/importlabel.php
Expand Up @@ -50,7 +50,7 @@
if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path))
{
$importlabeloutput .= "<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n";
$importlabeloutput .= $clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/temp folder.")."<br /><br />\n";
$importlabeloutput .= $clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/tmp folder folder.")."<br /><br />\n";
$importlabeloutput .= "<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\">\n";
$importlabeloutput .= "</td></tr></table><br />&nbsp;\n";
return;
Expand Down
4 changes: 2 additions & 2 deletions admin/importquestion.php
Expand Up @@ -43,14 +43,14 @@
."<table width='350' align='center' style='border: 1px solid #555555' cellpadding='1' cellspacing='0'>\n"
."\t<tr bgcolor='#555555'><td colspan='2' height='4'><font size='1' face='verdana' color='white'><strong>"
.$clang->gT("Import Question")."</strong></td></tr>\n"
."\t<tr bgcolor='#CCCCCC'><td align='center'>$setfont\n";
."\t<tr bgcolor='#CCCCCC'><td align='center'>\n";

$the_full_file_path = $tempdir . "/" . $_FILES['the_file']['name'];

if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path))
{
$importquestion .= "<strong><font color='red'>".$clang->gT("Error")."</font></strong><br />\n"
.$clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/temp folder.")."<br /><br />\n"
.$clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your /admin/tmp folder folder.")."<br /><br />\n"
."<input type='submit' value='"
.$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_top')\">\n"
."</td></tr></table>\n";
Expand Down
4 changes: 2 additions & 2 deletions admin/listcolumn.php
Expand Up @@ -78,10 +78,10 @@
echo "</td></tr>\n";
while ($row=$result->FetchRow())
{
echo "<tr><td valign='top' align='center' >$setfont"
echo "<tr><td valign='top' align='center' >"
. "<a href='$scriptname?action=browse&sid=$surveyid&subaction=id&id=".$row['id']."' target='home'>"
. $row['id']."</a></td>"
. "<td valign='top'>$setfont".$row[$column]."</td></tr>\n";
. "<td valign='top'>".$row[$column]."</td></tr>\n";
}
echo "</table>\n";
echo "</body></html>";
Expand Down
74 changes: 36 additions & 38 deletions admin/statistics.php
Expand Up @@ -96,7 +96,6 @@ function show(element) {
//-->
</script>\n";

//$statisticsoutput .= "<table width='99%' align='center' style='margin: 5px; border: 1px solid #555555' cellpadding='1' cellspacing='0'>\n"
$statisticsoutput .= "<table width='99%' class='menubar' cellpadding='1' cellspacing='0'>\n"
."\t<tr><td colspan='2' height='4'><font size='1'><strong>".$clang->gT("Quick Statistics")."</strong></font></td></tr>\n";
//Get the menubar
Expand Down Expand Up @@ -162,7 +161,7 @@ function show(element) {
$statisticsoutput .= "\t\t\t\t\t=<br />
<input type='text' name='$myfield4' value='";
if (isset($_POST[$myfield4])) {$statisticsoutput .= $_POST[$myfield4];}
$statisticsoutput .= "' /><br /></font></font></td>\n";
$statisticsoutput .= "' /><br /></font></td>\n";
$allfields[]=$myfield2;
$allfields[]=$myfield3;
$allfields[]=$myfield4;
Expand All @@ -180,15 +179,13 @@ function show(element) {
."\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='";
if (isset($_POST[$myfield3])) {$statisticsoutput .= $_POST[$myfield3];}
$statisticsoutput .= "' ".substr(2, 0, -13) ."; width:80' /><br />\n"
$statisticsoutput .= "' /><br />\n"
."\t\t\t\t\t&nbsp;&nbsp;".$clang->gT("OR between").":<br />\n"
."\t\t\t\t\t<input name='$myfield4' value='";
if (isset($_POST[$myfield4])) {$statisticsoutput .= $_POST[$myfield4];}
$statisticsoutput .= "' type='text' ".substr(2, 0, -13)
."; width:65' /> ".$clang->gT("and")." <input name='$myfield5' value='";
$statisticsoutput .= "' type='text' /> ".$clang->gT("and")." <input name='$myfield5' value='";
if (isset($_POST[$myfield5])) {$statisticsoutput .= $_POST[$myfield5];}
$statisticsoutput .= "' type='text' ".substr(2, 0, -13)
."; width:65' /></font></font>\n";
$statisticsoutput .= "' type='text' /></font></td>\n";
$allfields[]=$myfield2;
$allfields[]=$myfield3;
$allfields[]=$myfield4;
Expand All @@ -205,7 +202,7 @@ function show(element) {
if ($currentgroup)
{
//if we've already drawn a table for a group, and we're changing - close off table
$statisticsoutput .= "\n\t\t\t\t</td></tr>\n\t\t\t</table>\n";
$statisticsoutput .= "\n\t\t\t\t<!-- --></tr>\n\t\t\t</table></td></tr>\n";
}
$statisticsoutput .= "\t\t<tr><td align='center' class='settingcaption'>\n"
."\t\t<font size='1' face='verdana'><strong>$flt[4]</strong> (".$clang->gT("Group")." $flt[1])</font></td></tr>\n\t\t"
Expand Down Expand Up @@ -284,7 +281,7 @@ function show(element) {
case "S": // Short free text
$myfield2="T$myfield";
$statisticsoutput .= "\t\t\t\t<td align='center' valign='top'>"
."<strong>$flt[3]</strong></font>";
."<strong>$flt[3]</strong>";
$statisticsoutput .= "<input type='checkbox' class='checkboxbtn' name='summary[]' value='$myfield2'";
if (isset($_POST['summary']) && (array_search("T{$surveyid}X{$flt[1]}X{$flt[0]}", $_POST['summary']) !== FALSE))
{$statisticsoutput .= " checked='checked'";}
Expand Down Expand Up @@ -329,7 +326,7 @@ function show(element) {
."; width:65' /> ".$clang->gT("and")." <input name='$myfield5' value='";
if (isset($_POST[$myfield5])) {$statisticsoutput .= $_POST[$myfield5];}
$statisticsoutput .= "' type='text' ".substr(2, 0, -13)
."; width:65' /></font></font>\n";
."; width:65' /></font>\n";
break;
case "5": // 5 point choice
for ($i=1; $i<=5; $i++)
Expand Down Expand Up @@ -430,7 +427,7 @@ function show(element) {
if (isset($_POST[$myfield2]) && $_POST[$myfield2] == $i) {$statisticsoutput .= " selected";}
$statisticsoutput .= ">$i</option>\n";
}
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</font></td>\n";
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</td>\n";
$counter2++;
$allfields[]=$myfield2;
}
Expand Down Expand Up @@ -466,7 +463,7 @@ function show(element) {
."\t\t\t\t\t<option value='N'";
if (isset($_POST[$myfield2]) && is_array($_POST[$myfield2]) && in_array("N", $_POST[$myfield2])) {$statisticsoutput .= " selected";}
$statisticsoutput .= ">".$clang->gT("No")."</option>\n"
."\t\t\t\t</select>\n\t\t\t\t</font></td>\n";
."\t\t\t\t</select>\n\t\t\t\t</td>\n";
$counter2++;
$allfields[]=$myfield2;
}
Expand Down Expand Up @@ -501,7 +498,7 @@ function show(element) {
."\t\t\t\t\t<option value='D'";
if (isset($_POST[$myfield]) && is_array($_POST[$myfield2]) && in_array("D", $_POST[$myfield2])) {$statisticsoutput .= " selected";}
$statisticsoutput .= ">".$clang->gT("Decrease")."</option>\n"
."\t\t\t\t</select>\n\t\t\t\t</font></td>\n";
."\t\t\t\t</select>\n\t\t\t\t</td>\n";
$counter2++;
$allfields[]=$myfield2;
}
Expand Down Expand Up @@ -537,7 +534,7 @@ function show(element) {
if (isset($_POST[$myfield2]) && is_array($_POST[$myfield2]) && in_array($frow['code'], $_POST[$myfield2])) {$statisticsoutput .= " selected";}
$statisticsoutput .= ">{$frow['title']}</option>\n";
}
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</font></td>\n";
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</td>\n";
$counter2++;
$allfields[]=$myfield2;
}
Expand Down Expand Up @@ -589,6 +586,7 @@ function show(element) {
unset($answers);
break;
case "X": //This is a boilerplate question and it has no business in this script
$statisticsoutput .= "\t\t\t\t<td></td>";
break;
case "W":
case "Z":
Expand All @@ -610,8 +608,9 @@ 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></td>\n";
$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</td>\n";
break;

default:
$query = "SELECT code, answer FROM ".db_table_name("answers")." WHERE qid='$flt[0]' AND language='{$language}' ORDER BY sortorder, answer";
$result = db_execute_num($query) or die("Couldn't get answers!<br />$query<br />".$connect->ErrorMsg());
Expand All @@ -621,15 +620,14 @@ 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></td>\n";

$statisticsoutput .= "\t\t\t\t</select>\n\t\t\t\t</td>\n";
break;
}
$currentgroup=$flt[1];
if (!isset($counter)) {$counter=0;}
$counter++;
}
$statisticsoutput .= "\n\t\t\t\t</td></tr>\n";
$statisticsoutput .= "\n\t\t\t\t</tr>\n";
if (isset($allfields))
{
$allfield=implode("|", $allfields);
Expand All @@ -656,7 +654,7 @@ function show(element) {
."\t\t\t\t<tr><td align='center'>".$clang->gT("Filter incomplete answers:")."<select name='filterinc'>\n"
."\t\t\t\t\t<<option value='filter' $selecthide>".$clang->gT("Enable")."</option>\n"
."\t\t\t\t\t<option value='show' $selectshow>".$clang->gT("Disable")."</option>\n"
."\t\t\t\t</select></font></td></tr>\n"
."\t\t\t\t</select></td></tr>\n"
."\t\t<tr><td align='center'>\n\t\t\t<br />\n"
."\t\t\t<input type='submit' value='".$clang->gT("View Stats")."' />\n"
."\t\t\t<input type='button' value='".$clang->gT("Clear")."' onclick=\"window.open('$scriptname?action=statistics&amp;sid=$surveyid', '_top')\" />\n"
Expand Down Expand Up @@ -881,11 +879,11 @@ function show(element) {
// 3: Present results including option to view those rows
$statisticsoutput .= "<br />\n<table align='center' width='95%' border='1' "
."cellpadding='2' cellspacing='0' >\n"
."\t<tr><td colspan='2' align='center'><strong><font color='#'>"
.$clang->gT("Results")."</font></font></strong></td></tr>\n"
."\t<tr><td colspan='2' align='center'><strong>"
.$clang->gT("Results")."</strong></td></tr>\n"
."\t<tr><td colspan='2' align='center'>"
.""
."<strong>".$clang->gT("No of records in this query").": $results </strong></font></font><br />\n\t\t"
."<strong>".$clang->gT("No of records in this query").": $results </strong><br />\n\t\t"
.$clang->gT("Total records in survey").": $total<br />\n";
if ($total)
{
Expand Down Expand Up @@ -1073,11 +1071,11 @@ function show(element) {
$statisticsoutput .= "<br />\n<table align='center' width='95%' border='1' cellpadding='2' cellspacing='0' >\n"
."\t<tr><td colspan='2' align='center'><strong>".$clang->gT("Field Summary for")." $qtitle:</strong>"
."</td></tr>\n"
."\t<tr><td colspan='2' align='center'><strong>$qquestion</font></font></strong></td></tr>\n"
."\t<tr><td colspan='2' align='center'><strong>$qquestion</strong></td></tr>\n"
."\t<tr>\n\t\t<td width='50%' align='center' ><strong>"
.$clang->gT("Calculation")."</strong></font></font></td>\n"
.$clang->gT("Calculation")."</strong></td>\n"
."\t\t<td width='50%' align='center' ><strong>"
.$clang->gT("Result")."</strong></font></font></td>\n"
.$clang->gT("Result")."</strong></td>\n"
."\t</tr>\n";
$fieldname=substr($rt, 1, strlen($rt));
$query = "SELECT STDDEV(`$fieldname`) as stdev";
Expand Down Expand Up @@ -1198,23 +1196,23 @@ function show(element) {
foreach ($showem as $shw)
{
$statisticsoutput .= "\t<tr>\n"
."\t\t<td align='center' >$shw[0]</font></font></td>\n"
."\t\t<td align='center' >$shw[1]</font></font></td>\n"
."\t\t<td align='center' >$shw[0]</td>\n"
."\t\t<td align='center' >$shw[1]</td>\n"
."\t</tr>\n";
}
$statisticsoutput .= "\t<tr>\n"
."\t\t<td colspan='3' align='center' bgcolor='#EEEEEE'>\n"
."\t\t\t<font size='1'>".$clang->gT("Null values are ignored in calculations")."<br />\n"
."\t\t\t".$clang->gT("Q1 and Q3 calculated using")." <a href='http://mathforum.org/library/drmath/view/60969.html' target='_blank'>".$clang->gT("minitab method")."</a>"
."</font></font>\n"
."</font>\n"
."\t\t</td>\n"
."\t</tr>\n</table>\n";
unset($showem);
}
else
{
$statisticsoutput .= "\t<tr>\n"
."\t\t<td align='center' colspan='3'>Not enough values for calculation</font></font></td>\n"
."\t\t<td align='center' colspan='3'>Not enough values for calculation</td>\n"
."\t</tr>\n</table>\n";

}
Expand Down Expand Up @@ -1366,17 +1364,17 @@ function show(element) {
if (isset($alist) && $alist) //Make sure there really is an answerlist, and if so:
{
$statisticsoutput .= "<table width='95%' align='center' border='1' cellpadding='2' cellspacing='0' class='statisticstable'>\n"
."\t<tr><td colspan='3' align='center'><strong><font color='#'>"
.$clang->gT("Field Summary for")." $qtitle:</font></font></strong>"
."\t<tr><td colspan='3' align='center'><strong>"
.$clang->gT("Field Summary for")." $qtitle:</strong>"
."</td></tr>\n"
."\t<tr><td colspan='3' align='center'><strong>"
."$qquestion</font></font></strong></td></tr>\n"
."$qquestion</strong></td></tr>\n"
."\t<tr>\n\t\t<td width='50%' align='center' >"
."<strong>".$clang->gT("Answer")."</strong></font></font></td>\n"
."<strong>".$clang->gT("Answer")."</strong></td>\n"
."\t\t<td width='25%' align='center' >"
."<strong>".$clang->gT("Count")."</strong></font></font></td>\n"
."<strong>".$clang->gT("Count")."</strong></td>\n"
."\t\t<td width='25%' align='center' >"
."<strong>".$clang->gT("Percentage")."</strong></font></font></td>\n"
."<strong>".$clang->gT("Percentage")."</strong></td>\n"
."\t</tr>\n";
foreach ($alist as $al)
{
Expand Down Expand Up @@ -1441,10 +1439,10 @@ function show(element) {
{$fname="$al[1] ($al[0])";}
$statisticsoutput .= "\t<tr>\n\t\t<td width='50%' align='center' >"
."$fname\n"
."\t\t</font></font></td>\n"
."\t\t<td width='25%' align='center' >$row[0]</font></font>\n";
."\t\t</td>\n"
."\t\t<td width='25%' align='center' >$row[0]\n";
if ($results > 0) {$vp=sprintf("%01.2f", ($row[0]/$results)*100)."%";} else {$vp="N/A";}
$statisticsoutput .= "\t\t</td><td width='25%' align='center' >$vp</font></font>"
$statisticsoutput .= "\t\t</td><td width='25%' align='center' >$vp"
."\t\t</td>\n\t</tr>\n";
if ($results > 0)
{
Expand Down

0 comments on commit b7a9978

Please sign in to comment.