Exemplo n.º 1
0
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   --------------------------------------------------------------
   based on:
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(banner_manager.php,v 1.70 2003/03/22); www.oscommerce.com
   (c) 2003         nextcommerce (banner_manager.php,v 1.9 2003/08/18); www.nextcommerce.org
   (c) 2004	 xt:Commerce (banner_manager.php,v 1.9 2003/08/18); xt-commerce.com

   Released under the GNU General Public License
   --------------------------------------------------------------*/
require 'includes/application_top.php';
$banner_extension = vam_banner_image_extension();
if ($_GET['action']) {
    switch ($_GET['action']) {
        case 'setflag':
            if ($_GET['flag'] == '0' || $_GET['flag'] == '1') {
                vam_set_banner_status($_GET['bID'], $_GET['flag']);
                $messageStack->add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success');
            } else {
                $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');
            }
            vam_redirect(vam_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . (int) $_GET['bID']));
            break;
        case 'insert':
        case 'update':
            $banners_id = vam_db_prepare_input($_POST['banners_id']);
            $banners_title = vam_db_prepare_input($_POST['banners_title']);
   -----------------------------------------------------------------------------
   based on:
   (c) 2003 OSC-Affiliate (affiliate_banners.php, v 1.6 2003/07/12);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
$affiliate_banner_extension = vam_banner_image_extension();
if ($_GET['action']) {
    switch ($_GET['action']) {
        case 'setaffiliate_flag':
            if ($_GET['affiliate_flag'] == '0' || $_GET['affiliate_flag'] == '1') {
                vam_set_banner_status($_GET['abID'], $_GET['affiliate_flag']);
                $messageStack->add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success');
            } else {
                $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');
            }
            vam_redirect(vam_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $_GET['abID']));
            break;
        case 'insert':
        case 'update':
            $affiliate_banners_id = vam_db_prepare_input($_POST['affiliate_banners_id']);
            $affiliate_banners_title = vam_db_prepare_input($_POST['affiliate_banners_title']);