function block_show($bid) { global $prefix, $db, $admin_file; include "header.php"; GraphicAdmin(); title("" . _BLOCKSADMIN . ""); OpenTable(); echo "<br><center>"; $bid = intval($bid); $row = $db->sql_fetchrow($db->sql_query("select bid, bkey, title, content, url, active, bposition, blockfile from " . $prefix . "_blocks where bid='{$bid}'")); $bid = intval($row['bid']); $bkey = filter($row['bkey'], "nohtml"); $title = filter($row['title'], "nohtml"); $content = filter($row['content']); $url = filter($row['url'], "nohtml"); $active = intval($row['active']); $bposition = filter($row['bposition'], "nohtml"); $blockfile = filter($row['blockfile'], "nohtml"); if ($bkey == "main") { mainblock(); } elseif ($bkey == "admin") { adminblock(); } elseif ($bkey == "modules") { modules_block(); } elseif ($bkey == "category") { category(); } elseif ($bkey == "userbox") { userblock(); } elseif (empty($bkey)) { if (empty($url)) { if (empty($blockfile)) { if ($bposition == "c") { themecenterbox($title, $content); } else { themesidebox($title, $content); } } else { if ($bposition == "c") { blockfileinc($title, $blockfile, 1); } else { blockfileinc($title, $blockfile); } } } else { headlines($bid); } } echo "</center>"; CloseTable(); echo "<br>"; OpenTable(); if ($active == 1) { $act_chg = _DEACTIVATE; } elseif ($active == 0) { $act_chg = _ACTIVATE; } echo "<center><font class=\"option\"><b>" . _BLOCKSADMIN . ": " . _FUNCTIONS . "</b></font><br><br>" . "[ <a href=\"" . $admin_file . ".php?op=ChangeStatus&bid={$bid}\">{$act_chg}</a> | <a href=\"" . $admin_file . ".php?op=BlocksEdit&bid={$bid}\">" . _EDIT . "</a> | "; if (empty($bkey)) { echo "<a href=\"" . $admin_file . ".php?op=BlocksDelete&bid={$bid}\">" . _DELETE . "</a> | "; } else { echo "" . _DELETE . " | "; } echo "<a href=\"" . $admin_file . ".php?op=BlocksAdmin\">" . _BLOCKSADMIN . "</a> ]</center>"; CloseTable(); include "footer.php"; }
function block_show($bid) { global $prefix, $db; include "header.php"; GraphicAdmin(); title("" . _BLOCKSADMIN . ""); OpenTable2(); $bid = intval($bid); $row = $db->sql_fetchrow($db->sql_query("select bid, bkey, title, content, url, bposition, blockfile from " . $prefix . "_blocks where bid='{$bid}'")); $bid = intval($row['bid']); $bkey = $row['bkey']; $title = $row['title']; $content = $row['content']; $url = $row['url']; $bposition = $row['bposition']; $blockfile = $row['blockfile']; if ($bkey == main) { mainblock(); } elseif ($bkey == admin) { adminblock(); } elseif ($bkey == modules) { modules_block(); } elseif ($bkey == category) { category(); } elseif ($bkey == userbox) { userblock(); } elseif ($bkey == "") { if ($url == "") { if ($blockfile == "") { if ($bposition == "c") { themecenterbox($title, $content); } else { themesidebox($title, $content); } } else { if ($bposition == "c") { blockfileinc($title, $blockfile, 1); } else { blockfileinc($title, $blockfile); } } } else { headlines($bid); } } CloseTable2(); echo "<br>"; OpenTable(); echo "<center><font class=\"option\"><b>" . _BLOCKSADMIN . ": " . _FUNCTIONS . "</b></font><br><br>" . "[ <a href=\"admin.php?op=ChangeStatus&bid={$bid}\">" . _ACTIVATE . "</a> | <a href=\"admin.php?op=BlocksEdit&bid={$bid}\">" . _EDIT . "</a> | "; if ($bkey == "") { echo "<a href=\"admin.php?op=BlocksDelete&bid={$bid}\">" . _DELETE . "</a> | "; } else { echo "" . _DELETE . " | "; } echo "<a href=\"admin.php?op=BlocksAdmin\">" . _BLOCKSADMIN . "</a> ]</center>"; CloseTable(); include "footer.php"; }