Enterprise3.01 > Redirect.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Enterprise3.01

Download:
enterprise3.01.zip

Category:
E Commerce

Archive Content:

Content:

Admin

Admin > Htmlarea

Admin > Htmlarea > Images

Admin > Htmlarea > Popups

Admin > Htmlarea > Popups > File

Admin > Htmlarea > Popups > File > Icons

Admin > Htmlarea > Popups > File > Images

Admin > Images

Admin > Images > Categories

Admin > Images > Graphs

Admin > Images > Icons

Admin > Includes

Admin > Includes > Boxes

Admin > Includes > Classes

Admin > Includes > Functions

Admin > Includes > Graphs

Admin > Includes > Javascript

Admin > Includes > Javascript > SpiffyCal

Admin > Includes > Javascript > SpiffyCal > Images

Admin > Includes > Languages

Admin > Includes > Languages > English

Admin > Includes > Languages > English > CVS

Admin > Includes > Languages > English > Images > Buttons

Admin > Includes > Languages > English > Images > Buttons > CVS

Admin > Includes > Languages > English > Images > Copy Of Buttons

Admin > Includes > Languages > English > Images > Copy Of Buttons > CVS

Admin > Includes > Languages > English > Images > CVS

Admin > Includes > Languages > English > Modules > Newsletters

Admin > Includes > Languages > Espanol

Admin > Includes > Languages > Espanol > CVS

Admin > Includes > Languages > Espanol > Images > Buttons

Admin > Includes > Languages > Espanol > Images > Buttons > CVS

Admin > Includes > Languages > Espanol > Images > CVS

Admin > Includes > Languages > Espanol > Modules > Newsletters

Admin > Includes > Languages > German

Admin > Includes > Languages > German > CVS

Admin > Includes > Languages > German > Images > Buttons

Admin > Includes > Languages > German > Images > Buttons > CVS

Admin > Includes > Languages > German > Images > CVS

Admin > Includes > Languages > German > Modules > Newsletters

Admin > Includes > Local

Admin > Includes > Modules > Newsletters

Admin > Live Support

Admin > Live Support > Blue

Admin > Live Support > Green

Admin > Live Support > Red

Admin > Live Support > White

Admin > Live Support > Yellow

Download

Images

Images > Banners

Images > Default

Images > Icons

Images > Infobox

Images > Mail

Includes

Includes > Boxes

Includes > Classes

Includes > Color Schemes > 1

Includes > Color Schemes > 10

Includes > Color Schemes > 11

Includes > Color Schemes > 12

Includes > Color Schemes > 2

Includes > Color Schemes > 3

Includes > Color Schemes > 4

Includes > Color Schemes > 5

Includes > Color Schemes > 6

Includes > Color Schemes > 7

Includes > Color Schemes > 8

Includes > Color Schemes > 9

Includes > Functions

Includes > Javascript

Includes > Languages

Includes > Languages > English

Includes > Languages > English > CVS

Includes > Languages > English > Images

Includes > Languages > English > Images > Buttons

Includes > Languages > English > Images > Buttons > CVS

Includes > Languages > English > Images > CVS

Includes > Languages > English > Modules > Order Total

Includes > Languages > English > Modules > Payment

Includes > Languages > English > Modules > Shipping

Includes > Languages > Espanol

Includes > Languages > Espanol > CVS

Includes > Languages > Espanol > Images

Includes > Languages > Espanol > Images > Buttons

Includes > Languages > Espanol > Images > Buttons > CVS

Includes > Languages > Espanol > Images > CVS

Includes > Languages > Espanol > Modules > Order Total

Includes > Languages > Espanol > Modules > Payment

Includes > Languages > Espanol > Modules > Shipping

Includes > Languages > French

Includes > Languages > French > Images > Buttons

Includes > Languages > French > Modules > Payment

Includes > Languages > German

Includes > Languages > German > CVS

Includes > Languages > German > Images

Includes > Languages > German > Images > Buttons

Includes > Languages > German > Images > Buttons > CVS

Includes > Languages > German > Images > CVS

Includes > Languages > German > Modules > Order Total

Includes > Languages > German > Modules > Payment

Includes > Languages > German > Modules > Shipping

Includes > Local

Includes > Modules

Includes > Modules > Order Total

Includes > Modules > Payment

Includes > Modules > Shipping

Install

Install > Images

Install > Images > Layout

Install > Includes

Install > Includes > Functions

Install > Templates

Install > Templates > Main Page

Install > Templates > Pages

Live Support

Live Support > Blue

Live Support > Green

Live Support > Red

Live Support > White

Live Support > Yellow

Members

Members > Cashhub

Members > Cashhub > Images

Members > User

Members > User > Test Dir

Templates

Templates > Content

Redirect.php:


<?php
/*
  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  Enterprise Shopping Cart
  http://www.enterprisecart.com

  Copyright (c) 2004 Enterprise Shopping Cart Software.  Portions Copyright (c) 2001-2004 osCommerce: http://www.oscommerce.com

  Released under the GNU General Public License
*/

  
require('includes/application_top.php');

  switch (
$HTTP_GET_VARS['action']) {
    case 
'banner':
      
$banner_query escs_db_query("select banners_url from " TABLE_BANNERS " where banners_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");
      if (
escs_db_num_rows($banner_query)) {
        
$banner escs_db_fetch_array($banner_query);
        
escs_update_banner_click_count($HTTP_GET_VARS['goto']);

        
escs_redirect($banner['banners_url']);
      }
      break;

    case 
'url':
      if (isset(
$HTTP_GET_VARS['goto']) && escs_not_null($HTTP_GET_VARS['goto'])) {
        
escs_redirect('http://' $HTTP_GET_VARS['goto']);
      }
      break;

    case 
'manufacturer':
      if (isset(
$HTTP_GET_VARS['manufacturers_id']) && escs_not_null($HTTP_GET_VARS['manufacturers_id'])) {
        
$manufacturer_query escs_db_query("select manufacturers_url from " TABLE_MANUFACTURERS_INFO " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id "'");
        if (
escs_db_num_rows($manufacturer_query)) {
// url exists in selected language
          
$manufacturer escs_db_fetch_array($manufacturer_query);

          if (
escs_not_null($manufacturer['manufacturers_url'])) {
            
escs_db_query("update " TABLE_MANUFACTURERS_INFO " set url_clicked = url_clicked+1,  date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id "'");

            
escs_redirect($manufacturer['manufacturers_url']);
          }
        } else {
// no url exists for the selected language,  lets use the default language then
          
$manufacturer_query escs_db_query("select mi.languages_id,  mi.manufacturers_url from " TABLE_MANUFACTURERS_INFO " mi,  " TABLE_LANGUAGES " l where mi.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" DEFAULT_LANGUAGE "'");
          if (
escs_db_num_rows($manufacturer_query)) {
            
$manufacturer escs_db_fetch_array($manufacturer_query);

            if (
escs_not_null($manufacturer['manufacturers_url'])) {
              
escs_db_query("update " TABLE_MANUFACTURERS_INFO " set url_clicked = url_clicked+1,  date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$manufacturer['languages_id'] . "'");

              
escs_redirect($manufacturer['manufacturers_url']);
            }
          }
        }
      }
      break;
  }

  
escs_redirect(escs_href_link(FILENAME_DEFAULT));
?>



Other E Commerce Scripts:

WebMaster Resources Home

©RingsWorld.com