diff options
Diffstat (limited to 'includes/functions.php')
-rw-r--r-- | includes/functions.php | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/includes/functions.php b/includes/functions.php index f0fe60e..bc169ff 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -301,10 +301,10 @@ if(!defined("CALLED_FROM_ADMIN")) * Begins a Bayonet site table. * @return */ - function OpenTable() + function OpenTable($width = "100%") { //width="100%" is important. Otherwise all of our tables will be text width. - echo "<table width=\"100%\" align=\"center\" class=\"cleartable\">\n"; + echo "<table width=\"{$width}\" align=\"center\" class=\"cleartable\">\n"; } /** @@ -314,7 +314,7 @@ if(!defined("CALLED_FROM_ADMIN")) */ function CloseTable() { - //echo "</table>"; + echo "</table>"; } /** @@ -412,6 +412,19 @@ function ReportHack($message) CloseTable(); } +/** + * PageRedirect() + * + * performs an http redirect + * + * @param $delay + * @param $link + */ +function PageRedirect($delay, $link) +{ + echo "<meta http-equiv=\"Refresh\" content=\"{$delay};url={$link}\">"; +} + /** * array_dump() @@ -588,11 +601,8 @@ function GetBlocks($position = BLOCK_LEFT) $result = $db->Query("SELECT * FROM `bayonet_blocks` ORDER BY weight, position"); //$result = mysql_query("SELECT * FROM bayonet_blocks ORDER BY weight, position"); - while(($row = $db->Fetch($result))!==false) - { - $blocks[] = $row; - } - $db->Free($result); + $blocks = $db->Fetch($result); + $blocks[] = $row; foreach($blocks as $block) { |