<?php require 'includes/application_top.php'; $type = isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type'] : ''; $banner_extension = tep_banner_image_extension(); // check if the graphs directory exists $dir_ok = false; if (function_exists('imagecreate') && tep_not_null($banner_extension)) { if (is_dir(DIR_WS_IMAGES . 'graphs')) { if (is_writeable(DIR_WS_IMAGES . 'graphs')) { $dir_ok = true; } else { $messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error'); } } else { $messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error'); } } $banner_query = tep_db_query("select banners_title from " . TABLE_BANNERS . " where banners_id = '" . (int) $HTTP_GET_VARS['bID'] . "'"); $banner = tep_db_fetch_array($banner_query); $years_array = array(); $years_query = tep_db_query("select distinct year(banners_history_date) as banner_year from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int) $HTTP_GET_VARS['bID'] . "'"); while ($years = tep_db_fetch_array($years_query)) { $years_array[] = array('id' => $years['banner_year'], 'text' => $years['banner_year']); } $months_array = array(); for ($i = 1; $i < 13; $i++) { $months_array[] = array('id' => $i, 'text' => strftime('%B', mktime(0, 0, 0, $i))); } $type_array = array(array('id' => 'daily', 'text' => STATISTICS_TYPE_DAILY), array('id' => 'monthly', 'text' => STATISTICS_TYPE_MONTHLY), array('id' => 'yearly', 'text' => STATISTICS_TYPE_YEARLY)); ?>
<?php /* $Id$ osCmax e-Commerce http://www.oscmax.com Copyright 2000 - 2011 osCmax Released under the GNU General Public License */ require 'includes/application_top.php'; $affiliate_banner_extension = tep_banner_image_extension(); if ($_GET['action']) { switch ($_GET['action']) { case 'setaffiliate_flag': if ($_GET['affiliate_flag'] == '0' || $_GET['affiliate_flag'] == '1') { tep_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'); } tep_redirect(tep_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'selected_box=affiliate&page=' . $_GET['page'] . '&abID=' . $_GET['abID'])); break; case 'insert': case 'update': $affiliate_banners_id = tep_db_prepare_input($_POST['affiliate_banners_id']); $affiliate_banners_title = tep_db_prepare_input($_POST['affiliate_banners_title']); $affiliate_products_id = tep_db_prepare_input($_POST['affiliate_products_id']); // Added Category Banners