case "BlocksDelete": BlocksDelete($bid, $ok); break; case "BlockOrder": BlockOrder($weightrep, $weight, $bidrep, $bidori); break; case "HeadlinesDel": HeadlinesDel($hid, $ok); break; case "HeadlinesAdd": HeadlinesAdd($xsitename, $headlinesurl); break; case "HeadlinesSave": HeadlinesSave($hid, $xsitename, $headlinesurl); break; case "HeadlinesAdmin": HeadlinesAdmin(); break; case "HeadlinesEdit": HeadlinesEdit($hid); break; case "fixweight": fixweight(); break; case "block_show": block_show($bid); break; } } else { echo "Access Denied"; }
die('Access Denied'); } $pagetitle .= ' ' . _BC_DELIM . ' ' . _BLOCKSADMIN; require_once CORE_PATH . 'nbbcode.php'; if (isset($_GET['change'])) { $bid = intval($_GET['change']); list($active) = $db->sql_ufetchrow('SELECT active FROM ' . $prefix . "_blocks WHERE bid={$bid}", SQL_NUM); if (is_numeric($active)) { $active = intval(!$active); $result = $db->sql_query('UPDATE ' . $prefix . '_blocks SET active=\'' . $active . '\' WHERE bid=' . $bid); Cache::array_delete('blocks_list'); } URL::redirect(URL::admin('blocks')); } else { if (isset($_GET['show'])) { block_show(intval($_GET['show'])); } else { if (isset($_GET['edit'])) { BlocksEdit(intval($_GET['edit'])); } else { if (isset($_GET['del'])) { $bid = intval($_GET['del']); list($bposition, $weight, $title) = $db->sql_ufetchrow('SELECT bposition, weight, title from ' . $prefix . '_blocks where bid=' . $bid, SQL_NUM); if (!isset($bposition) || isset($_POST['cancel'])) { URL::redirect(URL::admin()); } if (isset($_POST['confirm'])) { $db->sql_uquery('UPDATE ' . $prefix . '_blocks SET weight=weight-1 WHERE bposition=\'' . $bposition . '\' AND weight>' . $weight); $db->sql_uquery('DELETE FROM ' . $prefix . '_blocks WHERE bid=' . $bid); $db->sql_uquery('DELETE FROM ' . $prefix . '_blocks_custom WHERE bid=' . $bid); Cache::array_delete('blocks_list');