Example #1
0
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
switch ($_GET['action']) {
    case 'banner':
        $banner_query = smn_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . (int) $_GET['goto'] . "'");
        if (smn_db_num_rows($banner_query)) {
            $banner = smn_db_fetch_array($banner_query);
            smn_update_banner_click_count($_GET['goto']);
            smn_redirect($banner['banners_url']);
        }
        break;
    case 'url':
        // systemsmanager begin - Dec 1, 2005 security patch
        /*
              if (isset($_GET['goto']) && smn_not_null($_GET['goto'])) {
                smn_redirect('http://' . $_GET['goto']);
              }
        */
        if (isset($_GET['goto']) && smn_not_null($_GET['goto'])) {
            $check_query = smn_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . smn_db_input($_GET['goto']) . "' limit 1");
            if (smn_db_num_rows($check_query)) {
                smn_redirect('http://' . $_GET['goto']);
            }
Example #2
0
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
require 'includes/application_top.php';
switch ($HTTP_GET_VARS['action']) {
    case 'banner':
        $banner_query = smn_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . (int) $HTTP_GET_VARS['goto'] . "'");
        if (smn_db_num_rows($banner_query)) {
            $banner = smn_db_fetch_array($banner_query);
            smn_update_banner_click_count($HTTP_GET_VARS['goto']);
            smn_redirect($banner['banners_url']);
        }
        break;
    case 'url':
        // systemsmanager begin - Dec 1, 2005 security patch
        /*
              if (isset($HTTP_GET_VARS['goto']) && smn_not_null($HTTP_GET_VARS['goto'])) {
                smn_redirect('http://' . $HTTP_GET_VARS['goto']);
              }
        */
        if (isset($HTTP_GET_VARS['goto']) && smn_not_null($HTTP_GET_VARS['goto'])) {
            $check_query = smn_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . smn_db_input($HTTP_GET_VARS['goto']) . "' limit 1");
            if (smn_db_num_rows($check_query)) {
                smn_redirect('http://' . $HTTP_GET_VARS['goto']);
            }