/** * Update a banner, gets the input from the "edit" form */ function updateBanner() { global $options_url; $banner = array(); $banner["banner_id"] = $_REQUEST["banner_id"]; $banner["banner_description"] = $_REQUEST["banner_description"]; $banner["banner_html"] = $_REQUEST["banner_html"]; $banner["banner_zones"] = $_REQUEST["banner_zones"]; $banner["banner_active"] = $_REQUEST["banner_active"]; $banner["banner_weight"] = $_REQUEST["banner_weight"]; $banner["banner_maxviews"] = $_REQUEST["banner_maxviews"]; if (get_magic_quotes_gpc()) { foreach ($banner as $key => $value) { $banner[$key] = stripslashes($value); } } $bannersManager = new Banners(); $banners = $bannersManager->updateBanner($banner); echo '<div id="message" class="updated fade"><p>Banner updated</p></div>'; }