Skip to content

Commit

Permalink
dev Removed some old table layout and fixed some XHTML issues
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8089 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Dec 6, 2009
1 parent da3a015 commit 2b12f78
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 87 deletions.
51 changes: 21 additions & 30 deletions admin/activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,13 @@
//IF ANY OF THE CHECKS FAILED, PRESENT THIS SCREEN
if ((isset($failedcheck) && $failedcheck) || (isset($failedgroupcheck) && $failedgroupcheck))
{
$activateoutput .= "<br />\n<table bgcolor='#FFFFFF' width='500' align='center' style='border: 1px solid #555555' cellpadding='6' cellspacing='0'>\n";
$activateoutput .= "<tr bgcolor='#555555'><td height='4'><font size='1' face='verdana' color='white'><strong>".$clang->gT("Activate Survey")." ($surveyid)</strong></font></td></tr>\n";
$activateoutput .= "\t<tr>\n";
$activateoutput .= "<td align='center' bgcolor='#ffeeee'>\n";
$activateoutput .= "\t<font color='red'><strong>".$clang->gT("Error")."</strong><br />\n";
$activateoutput .= "\t".$clang->gT("Survey does not pass consistency check")."</font>\n";
$activateoutput .= "</td>\n";
$activateoutput .= "\t</tr>\n";
$activateoutput .= "\t<tr>\n";
$activateoutput .= "<td>\n";
$activateoutput .= "\t<strong>".$clang->gT("The following problems have been found:")."</strong><br />\n";
$activateoutput .= "\t<ul>\n";
$activateoutput .= "<br />\n<div class='messagebox'>\n";
$activateoutput .= "<div class='header'>".$clang->gT("Activate Survey")." ($surveyid)</div>\n";
$activateoutput .= "<div class='warningheader'>\n".$clang->gT("Error")."<br />\n";
$activateoutput .= $clang->gT("Survey does not pass consistency check")."</div>\n";
$activateoutput .= "<p>\n";
$activateoutput .= "<strong>".$clang->gT("The following problems have been found:")."</strong><br />\n";
$activateoutput .= "<ul>\n";
if (isset($failedcheck) && $failedcheck)
{
foreach ($failedcheck as $fc)
Expand All @@ -252,11 +247,9 @@
$activateoutput .= "\t\t\t\t<li> Group gid-{$fg[0]} (\"<a href='$scriptname?sid=$surveyid&amp;gid=$fg[0]'>{$fg[1]}</a>\"){$fg[2]}</li>\n";
}
}
$activateoutput .= "\t\t\t</ul>\n";
$activateoutput .= "\t\t\t".$clang->gT("The survey cannot be activated until these problems have been resolved.")."\n";
$activateoutput .= "\t\t</td>\n";
$activateoutput .= "\t</tr>\n";
$activateoutput .= "</table><br />&nbsp;\n";
$activateoutput .= "</ul>\n";
$activateoutput .= $clang->gT("The survey cannot be activated until these problems have been resolved.")."\n";
$activateoutput .= "</div><br />&nbsp;\n";

return;
}
Expand Down Expand Up @@ -528,15 +521,13 @@
$execresult=$dict->ExecuteSQLArray($sqlarray,1);
if ($execresult==0 || $execresult==1)
{
$activateoutput .= "<br />\n<table width='350' align='center' style='border: 1px solid #555555' cellpadding='1' cellspacing='0'>\n" .
"<tr bgcolor='#555555'><td height='4'><font size='1' face='verdana' color='white'><strong>".$clang->gT("Activate Survey")." ($surveyid)</strong></font></td></tr>\n" .
"<tr><td>\n" .
"<font color='red'>".$clang->gT("Survey could not be actived.")."</font><br />\n" .
"<center><a href='$scriptname?sid={$postsid}'>".$clang->gT("Main Admin Screen")."</a></center>\n" .
"DB ".$clang->gT("Error").":<br />\n<font color='red'>" . $connect->ErrorMsg() . "</font>\n" .
"<pre>$createsurvey</pre>\n" .
"</td></tr></table></br>&nbsp;\n" .
"</body>\n</html>";
$activateoutput .= "<br />\n<div class='messagebox'>\n" .
"<div class='header'>".$clang->gT("Activate Survey")." ($surveyid)</div>\n" .
"<div class='warningheader'>".$clang->gT("Survey could not be actived.")."</div>\n" .
"<p>" .
$clang->gT("Database error:")."\n <font color='red'>" . $connect->ErrorMsg() . "</font>\n" .
"<pre>$createsurvey</pre>\n
<a href='$scriptname?sid={$postsid}'>".$clang->gT("Main Admin Screen")."</a>\n</div>" ;
}
if ($execresult != 0 && $execresult !=1)
{
Expand All @@ -561,9 +552,9 @@
}
}

$activateoutput .= "<br />\n<table class='alertbox'>\n";
$activateoutput .= "<tr><td height='4'><strong>".$clang->gT("Activate Survey")." ($surveyid)</td></tr>\n";
$activateoutput .= "<tr><td align='center'><font class='successtitle'>".$clang->gT("Survey has been activated. Results table has been successfully created.")."</font><br /><br />\n";
$activateoutput .= "<br />\n<div class='messagebox'>\n";
$activateoutput .= "<div class='header'>".$clang->gT("Activate Survey")." ($surveyid)</div>\n";
$activateoutput .= "<div class='successheader'>".$clang->gT("Survey has been activated. Results table has been successfully created.")."</div><br /><br />\n";

$acquery = "UPDATE {$dbprefix}surveys SET active='Y' WHERE sid=".returnglobal('sid');
$acresult = $connect->Execute($acquery);
Expand All @@ -587,7 +578,7 @@
$activateoutput .= "<input type='submit' value='".$clang->gT("Switch to closed-access mode")."' onclick=\"".get2post("$scriptname?action=tokens&amp;sid={$postsid}&amp;createtable=Y")."\" />\n";
$activateoutput .= "<input type='submit' value='".$clang->gT("No, thanks.")."' onclick=\"".get2post("$scriptname?sid={$postsid}")."\" />\n";
}
$activateoutput .= "</font></font></td></tr></table><br />&nbsp;\n";
$activateoutput .= "</div><br />&nbsp;\n";
}

}
Expand Down
17 changes: 8 additions & 9 deletions admin/browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@
}
else
{
$browseoutput .= '<tr><td>'.$surveyoptions;
$browseoutput .= $surveyoptions;
$num_total_answers=0;
$num_completed_answers=0;
$gnquery = "SELECT count(id) FROM $surveytable";
Expand All @@ -779,13 +779,12 @@

while ($gnrow=$gnresult->FetchRow()) {$num_total_answers=$gnrow[0];}
while ($gnrow2=$gnresult2->FetchRow()) {$num_completed_answers=$gnrow2[0];}
$browseoutput .= "<table width='100%' border='0'>\n"
."\t<tr><td align='center'>".sprintf($clang->gT("%d responses for this survey"), $num_total_answers)." ("
.sprintf($clang->gT("%d full responses"), $num_completed_answers).", "
.sprintf($clang->gT("%d responses not completely filled out"), $num_total_answers-$num_completed_answers).")"
."\t</td></tr>\n"
."</table></table>\n";
$browseoutput .= "<div class='header'>".$clang->gT("Response summary")."</div>"
."<p><table class='statisticssummary'>\n"
."<tfoot><tr><th>".$clang->gT("Total responses:")."</th><td>".$num_total_answers."</td></tr></tfoot>"
."\t<tbody>"
."<tr><th>".$clang->gT("Full responses:")."</th><td>".$num_completed_answers."</td></tr>"
."<tr><th>".$clang->gT("Incomplete responses:")."</th><td>".($num_total_answers-$num_completed_answers)."</td></tr></tbody>"
."</table>";

}

?>
18 changes: 6 additions & 12 deletions admin/deactivate.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,11 @@

$deactivatequery = "UPDATE {$dbprefix}surveys SET active='N' WHERE sid=$surveyid";
$deactivateresult = $connect->Execute($deactivatequery) or die ("Couldn't deactivate because:<br />".htmlspecialchars($connect->ErrorMsg())."<br /><br /><a href='$scriptname?sid={$postsid}'>Admin</a>");
$deactivateoutput .= "<br />\n<table class='alertbox'>\n";
$deactivateoutput .= "<tr ><td height='4'><strong>".$clang->gT("Deactivate Survey")." ($surveyid)</strong></td></tr>\n";
$deactivateoutput .= "\t<tr>\n";
$deactivateoutput .= "<td align='center'>\n";
$deactivateoutput .= "\t<strong>".$clang->gT("Survey Has Been Deactivated")."\n";
$deactivateoutput .= "</strong></td>\n";
$deactivateoutput .= "\t</tr>\n";
$deactivateoutput .= "\t<tr>\n";
$deactivateoutput .= "<td>\n";
$deactivateoutput .= "<br />\n<div class='messagebox'>\n";
$deactivateoutput .= "<div class='header'>".$clang->gT("Deactivate Survey")." ($surveyid)</div>\n";
$deactivateoutput .= "\t<div class='successheader'>".$clang->gT("Survey Has Been Deactivated")."\n";
$deactivateoutput .= "</div>\n";
$deactivateoutput .= "\t<p>\n";
$deactivateoutput .= "\t".$clang->gT("The responses table has been renamed to: ")." $newtable.\n";
$deactivateoutput .= "\t".$clang->gT("The responses to this survey are no longer available using LimeSurvey.")."\n";
$deactivateoutput .= "\t<p>".$clang->gT("You should note the name of this table in case you need to access this information later.")."</p>\n";
Expand All @@ -124,9 +120,7 @@
$deactivateoutput .= "\t".$clang->gT("The tokens table associated with this survey has been renamed to: ")." $tnewtable.\n";
}
$deactivateoutput .= "\t<p>".$clang->gT("Note: If you deactivated this survey in error, it is possible to restore this data easily if you do not make any changes to the survey structure. See the LimeSurvey documentation for further details")."</p>";
$deactivateoutput .= "</td>\n";
$deactivateoutput .= "\t</tr>\n";
$deactivateoutput .= "</table><br/>&nbsp;\n";
$deactivateoutput .= "</div><br/>&nbsp;\n";
}

?>
3 changes: 1 addition & 2 deletions admin/globalsettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ function globalsettingsdisplay()
{
$js_adminheader_includes[]='scripts/globalsettings.js';
// header
$editsurvey = "<table width='100%' border='0'>\n\t<tr><td colspan='4' class='settingcaption'>"
. "\t\t".$clang->gT("Global settings")."</td></tr></table>\n";
$editsurvey = "<div class='header'>".$clang->gT("Global settings")."</div>\n";


// beginning TABs section
Expand Down
53 changes: 19 additions & 34 deletions admin/labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
}


$labelsoutput= "<table width='100%' border='0' >\n"
."\t<tr>\n"
."\t<td>\n"
."\t\t<div class='menubar'>\n"
$labelsoutput= "<div class='menubar'>\n"
."\t\t<div class='menubar-title'>\n"
."\t\t<strong>".$clang->gT("Label Sets Administration")."</strong>\n"
."\t\t</div>\n"
Expand Down Expand Up @@ -196,7 +193,7 @@
."<input name='translinksfields' id='translinksfields' type='checkbox' checked='checked' />\n"
."</li></ul>\n"
."<p><input type='submit' value='".$clang->gT("Import Label Set")."' />\n"
."<input type='hidden' name='action' value='importlabels' /></td>\n"
."<input type='hidden' name='action' value='importlabels' />\n"
."</form></div>\n";
}
$labelsoutput.= "</div>\n";
Expand Down Expand Up @@ -236,7 +233,7 @@
."\t<a href='admin.php?action=editlabelset&amp;lid=$lid' title=\"".$clang->gTview("Edit label set")."\" >" .
"<img name='EditLabelsetButton' src='$imagefiles/edit.png' alt='".$clang->gT("Edit label set")."' align='left' /></a>"
."\t<a href='#' title='".$clang->gTview("Delete label set")."' >"
."<img src='$imagefiles/delete.png' border='0' alt='".$clang->gT("Delete label set")."' align='left' onclick=\"if (confirm('".$clang->gT("Are you sure?","js")."')) {".get2post("admin.php?action=deletelabelset&amp;lid=$lid")."}\" /></a>\n"
."<img src='$imagefiles/delete.png' border='0' alt='".$clang->gT("Delete label set")."' align='left' onclick=\"if (confirm('".$clang->gT("Do you really want to delete this label set?","js")."')) {".get2post("admin.php?action=deletelabelset&amp;lid=$lid")."}\" /></a>\n"
."\t<img src='$imagefiles/seperator.gif' border='0' hspace='0' align='left' alt='' />\n"
."\t<a href='admin.php?action=dumplabel&amp;lid=$lid' title=\"".$clang->gTview("Export Label Set")."\" >" .
"<img src='$imagefiles/exportcsv.png' alt='".$clang->gT("Export Label Set")."' align='left' /></a>"
Expand Down Expand Up @@ -266,13 +263,7 @@
$msorow=$maxresult->FetchRow();
$maxsortorder=$msorow['maxsortorder']+1;

$labelsoutput.= "\t<table width='100%'>\n"
."<tr>\n"
."\t<td colspan='4' class='header'><strong>\n"
.$clang->gT("Labels")
."\t</strong></td>\n"
."</tr>\n"
."\t<tr><td colspan='4'>\n";
$labelsoutput.= "\t<div class='header'>".$clang->gT("Labels")."\t</div>\n";
$labelsoutput.= "<div class='tab-pane' id='tab-pane-labels-{$lid}'>"
."<form method='post' action='admin.php' onsubmit=\"return codeCheck('code_',$maxsortorder,'".$clang->gT("Error: You are trying to use duplicate label codes.",'js')."');\">\n"
."<input type='hidden' name='sortorder' value='{$row['sortorder']}' />\n"
Expand Down Expand Up @@ -346,7 +337,7 @@
if ($first)
{
$labelsoutput.= "\t<input type='text' id='assessmentvalue_{$row['sortorder']}' style='text-align: right;' name='assessmentvalue_{$row['sortorder']}' maxlength='5' size='6' value=\"{$row['assessment_value']}\" "
." onkeypress=\" if(event.keyCode==13) {if (event && event.preventDefault) event.preventDefault(); document.getElementById('saveallbtn_$lslanguage').click(); return false;} return goodchars(event,'1234567890-')\" />";
." onkeypress=\"if(event.keyCode==13) {if (event && event.preventDefault) event.preventDefault(); document.getElementById('saveallbtn_$lslanguage').click(); return false;} return goodchars(event,'1234567890-')\" />";
}
else
{
Expand Down Expand Up @@ -391,7 +382,7 @@
."\t</td>\n"
."<td style='text-align:center;'>"
."<input style='text-align:right;' type='text' maxlength='5' name='insertassessmentvalue' size='6' id='insertassessmentvalue' value='0' "
."onkeypress=\" if(event.keyCode==13) {if (event && event.preventDefault) event.preventDefault(); document.getElementById('addnewlabelbtn').click(); return false;} return goodchars(event,'1234567890-')\" />"
."onkeypress=\"if(event.keyCode==13) {if (event && event.preventDefault) event.preventDefault(); document.getElementById('addnewlabelbtn').click(); return false;} return goodchars(event,'1234567890-')\" />"
."\t</td>\n"
."\t<td>\n"
."\t<input type='text' maxlength='3000' name='inserttitle' size='80' onkeypress=\"return catchenter(event,'addnewlabelbtn');\"/>\n"
Expand Down Expand Up @@ -430,16 +421,14 @@
}
else
{
$labelsoutput .= "<tr>\n"
."\t<td colspan='4'><center>\n"
."<font color='red' size='1'><i><strong>"
$labelsoutput .= "<p>\n"
."<span style='color:#ff0000; font-size:10px'><strong>"
.$clang->gT("Warning")."</strong>: ".$clang->gT("You cannot change codes, add or delete entries in this label set because it is being used by an active survey.")."</i></font><br />\n";
if ($totaluse > 0)
{
foreach ($qidarray as $qd) {$labelsoutput.= "[<a href='".$qd['url']."'>".$qd['title']."</a>] ";}
}
$labelsoutput .= "\t</center></td>\n"
."</tr>\n";
$labelsoutput .= "\t</span>\n";
}
unset($_SESSION['nextlabelcode']);
$first=false;
Expand Down Expand Up @@ -488,22 +477,18 @@


// Here starts the hidden Fix Sort order form
$labelsoutput.= "</td></tr>\n";
if ($totaluse > 0 && $activeuse == 0) //If there are surveys using this labelset, but none are active warn about modifying
{
$labelsoutput.= "<tr>\n"
."\t<td colspan='4' align='center'>\n"
."<font color='red' size='1'><i><strong>"
.$clang->gT("Warning")."</strong>: ".$clang->gT("Some surveys currently use this label set. Modifying the codes, adding or deleting entries to this label set may produce undesired results in other surveys.")."</i><br />";
foreach ($qidarray as $qd) {$labelsoutput.= "[<a href='".$qd['url']."'>".$qd['title']."</a>] ";}
$labelsoutput.= "</font>\n"
."\t</td>\n"
."</tr>\n";
}
$labelsoutput.= "\t</table>\n";

if ($totaluse > 0 && $activeuse == 0) //If there are surveys using this labelset, but none are active warn about modifying
{
$labelsoutput.= "<p>\n"
."<font color='red' size='1'><i><strong>"
.$clang->gT("Warning")."</strong>: ".$clang->gT("Some surveys currently use this label set. Modifying the codes, adding or deleting entries to this label set may produce undesired results in other surveys.")."</i><br />";
foreach ($qidarray as $qd) {$labelsoutput.= "[<a href='".$qd['url']."'>".$qd['title']."</a>] ";}
$labelsoutput.= "</font>\n";
}
$labelsoutput.="</td></tr></table>";

}
}
else
{
$action = "labels";
Expand Down

0 comments on commit 2b12f78

Please sign in to comment.