mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 08:52:45 +00:00
Use table_begin() and table_end() for info table
This commit is contained in:
parent
e2997eb9d9
commit
e4de92b925
@ -273,8 +273,10 @@ class Page {
|
|||||||
echo '<table class="table table-striped table-bordered table-condensed">';
|
echo '<table class="table table-striped table-bordered table-condensed">';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function table_end() {
|
public function table_end($clicky = true) {
|
||||||
echo '</table>';
|
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>";
|
echo "<script type=\"text/javascript\">$('tr').click(function(){window.location=$(this).find('a').attr('href');}).hover(function(){\$(this).toggleClass('hover');});</script>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
4
info.php
4
info.php
@ -150,8 +150,8 @@ if ($st->execute(array($id))) {
|
|||||||
<div class="row" style="margin-bottom:60px;">
|
<div class="row" style="margin-bottom:60px;">
|
||||||
<?php $page->print_page_header(); ?>
|
<?php $page->print_page_header(); ?>
|
||||||
<div style="text-align: center;" class="col-lg-12">
|
<div style="text-align: center;" class="col-lg-12">
|
||||||
<table class="table table-striped table-bordered table-condensed">
|
|
||||||
<?php
|
<?php
|
||||||
|
$page->table_begin();
|
||||||
$map = $info->basic_info($row, $player_name);
|
$map = $info->basic_info($row, $player_name);
|
||||||
$permanent_val = $info->page->permanent[$type];
|
$permanent_val = $info->page->permanent[$type];
|
||||||
foreach ($map as $key => $val) {
|
foreach ($map as $key => $val) {
|
||||||
@ -160,8 +160,8 @@ if ($st->execute(array($id))) {
|
|||||||
}
|
}
|
||||||
echo "<tr><td>$key</td><td>$val</td></tr>";
|
echo "<tr><td>$key</td><td>$val</td></tr>";
|
||||||
}
|
}
|
||||||
|
$page->table_end(false);
|
||||||
?>
|
?>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user