Use table_begin() and table_end() for info table

This commit is contained in:
ruan 2015-09-10 17:14:51 +02:00
parent e2997eb9d9
commit e4de92b925
2 changed files with 6 additions and 4 deletions

View File

@ -273,8 +273,10 @@ class Page {
echo '<table class="table table-striped table-bordered table-condensed">';
}
public function table_end() {
public function table_end($clicky = true) {
echo '</table>';
if ($clicky) {
echo "<script type=\"text/javascript\">$('tr').click(function(){window.location=$(this).find('a').attr('href');}).hover(function(){\$(this).toggleClass('hover');});</script>";
}
}
}

View File

@ -150,8 +150,8 @@ if ($st->execute(array($id))) {
<div class="row" style="margin-bottom:60px;">
<?php $page->print_page_header(); ?>
<div style="text-align: center;" class="col-lg-12">
<table class="table table-striped table-bordered table-condensed">
<?php
$page->table_begin();
$map = $info->basic_info($row, $player_name);
$permanent_val = $info->page->permanent[$type];
foreach ($map as $key => $val) {
@ -160,8 +160,8 @@ if ($st->execute(array($id))) {
}
echo "<tr><td>$key</td><td>$val</td></tr>";
}
$page->table_end(false);
?>
</table>
</div>
</div>
<?php