} break; case "BannerDelete2": $bid = isset($_POST['bid']) ? intval($_POST['bid']) : 0; if ($bid <= 0 || !xoops_confirm_validate()) { redirect_header("admin.php?fct=banners&op=BannersAdmin#top"); } $db =& Database::getInstance(); $sql = sprintf("DELETE FROM %s WHERE bid = %u", $db->prefix("banner"), $bid); $db->query($sql); redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 1, _AM_DBUPDATED); break; case "BannerEdit": $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0; if ($bid > 0) { BannerEdit($bid); } break; case "BannerChange": $bid = isset($_POST['bid']) ? intval($_POST['bid']) : 0; $cid = isset($_POST['cid']) ? intval($_POST['cid']) : 0; if ($cid <= 0 || $bid <= 0 || !XoopsMultiTokenHandler::quickValidate('banners_BannerChange')) { redirect_header("admin.php?fct=banners&op=BannersAdmin#top"); } $imageurl = isset($_POST['imageurl']) ? trim($_POST['imageurl']) : ''; $clickurl = isset($_POST['clickurl']) ? trim($_POST['clickurl']) : ''; $imptotal = isset($_POST['imptotal']) ? intval($_POST['imptotal']) : 0; $impadded = isset($_POST['impadded']) ? intval($_POST['impadded']) : 0; $htmlbanner = isset($_POST['htmlbanner']) ? intval($_POST['htmlbanner']) : 0; $htmlcode = isset($_POST['htmlcode']) ? trim($_POST['htmlcode']) : ''; $db =& Database::getInstance();
case 'BannerDelete': if ($bid > 0) {BannerDelete($bid);} break; case 'BannerDelete2': if ($bid <= 0 | !icms::$security->check()) { redirect_header('admin.php?fct=banners&op=BannersAdmin#top', 3, implode('<br />', icms::$security->getErrors())); } $db =& icms_db_Factory::instance(); $sql = sprintf('DELETE FROM %s WHERE bid = %u', $db->prefix('banner'), $bid); $db->query($sql); redirect_header('admin.php?fct=banners&op=BannersAdmin#top', 1, _AM_DBUPDATED); break; case 'BannerEdit': if ($bid > 0) {BannerEdit($bid);} break; case 'BannerChange': if (($cid <= 0 || $bid <= 0) | !icms::$security->check()) { redirect_header('admin.php?fct=banners&op=BannersAdmin#top', 3, implode('<br />', icms::$security->getErrors())); } $db =& icms_db_Factory::instance(); $sql = sprintf("UPDATE %s SET cid = '%d', imptotal = '%d', imageurl = %s, clickurl = %s, htmlbanner = '%d', htmlcode = %s WHERE bid = '%d'", $db->prefix('banner'), $cid,