<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
/********************************************************/
/* NSN Banner Ads                                       */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
    redirect_url("../../".$admin_file.".php");
    die();
}
$bid = $db->XMFnum($bid);
$chng_imageurl = baclear_text($chng_imageurl);
$chng_clickurl = baclear_text($chng_clickurl);
$chng_alttext = baclear_text($chng_alttext);
$imgurl = baclear_text($chng_imageurl);
$imptotal = $imptotal + $chng_imptotal;
if(!get_magic_quotes_runtime()) {
  $chng_imageurl = addslashes($chng_imageurl);
  $chng_clickurl = addslashes($chng_clickurl);
  $chng_alttext = addslashes($chng_alttext);
  $imgurl = addslashes($imgurl);
}
$db->sql_query("UPDATE `".TABLE_NSNBA_BANNERS."` SET `cid`='$chng_cid', `imptotal`='$imptotal', `imageurl`='$imgurl', `clickurl`='$chng_clickurl', `alttext`='$chng_alttext', `code`='$chng_code', `flash`='$chng_flash', `height`='$chng_height', `width`='$chng_width', `datestr`='$strdate', `dateend`='$enddate', `pid`='$chng_pid', `active`='$chng_status' WHERE `bid`='$bid'");
redirect_url("".$admin_file.".php?op=BAImage&active=$chng_status");