mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
align right columns with counted total
This commit is contained in:
@@ -135,14 +135,15 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
|
|||||||
foreach ($fields as $e)
|
foreach ($fields as $e)
|
||||||
{
|
{
|
||||||
print "<td>";
|
print "<td>";
|
||||||
if (isset($row[$e])) print $row[$e];
|
if (isset($row[$e])) {
|
||||||
print "</td>";
|
if ($total && in_array($e,$total)) {
|
||||||
if ($total && in_array($e,$total))
|
if (!isset($tot[$e])) $tot[$e] = 0;
|
||||||
{
|
$tot[$e] += $row[$e];
|
||||||
if (!isset($tot[$e]))
|
print "<span class=\"pull-right\">" . $row[$e] . "</span>";
|
||||||
$tot[$e] = 0;
|
}
|
||||||
$tot[$e] += $row[$e];
|
else print $row[$e];
|
||||||
}
|
}
|
||||||
|
print "</td>";
|
||||||
}
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
@@ -151,7 +152,7 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
|
|||||||
print "</tbody><tfoot><tr>";
|
print "</tbody><tfoot><tr>";
|
||||||
foreach ($fields as $e)
|
foreach ($fields as $e)
|
||||||
{
|
{
|
||||||
print "<td><b>";
|
print "<td><b class=\"pull-right\">";
|
||||||
if (in_array($e,$total))
|
if (in_array($e,$total))
|
||||||
print $tot[$e];
|
print $tot[$e];
|
||||||
print "</b></td>";
|
print "</b></td>";
|
||||||
|
|||||||
Reference in New Issue
Block a user