Skip to content

Commit

Permalink
moved away from echo and more inline php
Browse files Browse the repository at this point in the history
  • Loading branch information
benthemonkey committed May 3, 2014
1 parent d9cfca5 commit ad9083e
Showing 1 changed file with 21 additions and 30 deletions.
51 changes: 21 additions & 30 deletions table.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,10 @@
<div class="filter dropdown fix-top">
<a class="btn btn-default" data-toggle="dropdown" href="#">Quarter <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<?php
$indent = "\t\t\t\t\t\t\t";

echo $indent . '<li><a href="./table.php">' . $quarters[0]['quarter'] . "</a></li>\n";

for($i=1; $i<count($quarters); $i++){
echo $indent . '<li><a href="./table.php?all=1&qtr=' . $quarters[$i]['qtr'] . '">' . $quarters[$i]['quarter'] . "</a></li>\n";
}
?>
<li><a href="./table.php"><?= $quarters[0]['quarter'] ?></a></li>
<?php for($i=1; $i<count($quarters); $i++){ ?>
<li><a href="./table.php?all=1&qtr=<?= $quarters[$i]['qtr'] ?>"><?= $quarters[$i]['quarter'] ?></a></li>
<?php } ?>
</ul>
</div>
<a href="#stats" class="btn btn-default show-stats fix-top" data-toggle="modal">Stats</a>
Expand All @@ -115,29 +110,25 @@
<tr>
<th class="nameHeader"><div><div></div></div><span>Name</span></th>
<th style="display:none;"></th>
<?php
$indent = "\t\t\t\t\t\t\t";

for($i=0; $i<count($points_table['events']); $i++){
echo $indent . "<th class=\"eventHeader\">\n" .
$indent . "\t<div class=\"slantedHeader\">\n" .
$indent . "\t\t<span>" . substr($points_table['events'][$i]['event_name'],0,-11) . "</span>\n" .
$indent . "\t</div>\n" .
$indent . "\t<div class=\"sort-icon\"></div>\n" .
$indent . "</th>\n";
}
<?php for($i=0; $i<count($points_table['events']); $i++){ ?>
<th class="eventHeader">
<div class="slantedHeader">
<span><?= substr($points_table['events'][$i]['event_name'],0,-11) ?></span>
</div>
<div class="sort-icon"></div>
</th>
<?php }

$totalsColumns = array("Events Total", "Helper Points", "IM Sports", "Standing Committees", "Other", "Total");
$totalsColumns = array("Events Total", "Helper Points", "IM Sports", "Standing Committees", "Other", "Total");

for($i=0; $i<count($totalsColumns); $i++){
echo $indent . "<th class=\"totalsHeader\">\n" .
$indent . "\t<div class=\"slantedHeader\">\n" .
$indent . "\t\t<span>" . $totalsColumns[$i] . "</span>\n" .
$indent . "\t</div>\n" .
$indent . "\t<div class=\"sort-icon\"></div>\n" .
$indent . "</th>\n";
}
?>
for($i=0; $i<count($totalsColumns); $i++){ ?>
<th class="totalsHeader">
<div class="slantedHeader">
<span><?= $totalsColumns[$i] ?></span>
</div>
<div class="sort-icon"></div>
</th>
<?php } ?>
<th class="endHeader">
<div class="slantedHeader"></div>
<div class="sort-icon"></div>
Expand Down

0 comments on commit ad9083e

Please sign in to comment.