Jump to content
xt:Commerce Community Forum

Bannerfunktion - Keine Weiterleitung


wolkenlos5

Recommended Posts

hallo!

habe mal testhalber einen banner inkludiert und mit einer url versehen. der bannder wird richtig angezeigt - klicke ich jedoch auf den banner kommt folgende fehlermeldung:

Fatal error: Call to undefined function: xtc_update_banner_click_count() in /home/di009vne/www/home/xtcommerce/redirect.php on line 25

f?r hilfe w?re ich dankbar

lg

wolkenlos5 :lupe:

Link to comment
Share on other sites

hallo!

subba - funktioniert; w?re toll, wenn die ge?nderte redirect.php in das downloadarchiv inkludiert werden k?nnte... ich denke es werden auch andere auf das problem stossen.

hier der ge?nderte code:

<?php

/* -----------------------------------------------------------------------------------------

$Id: redirect.php,v 1.1 2003/09/06 21:38:27 fanta2k Exp $

XT-Commerce - community made shopping

http://www.xt-commerce.com

Copyright ? 2003 XT-Commerce

-----------------------------------------------------------------------------------------

based on:

? 2000-2001 The Exchange Project (earlier name of osCommerce)

? 2002-2003 osCommerce(redirect.php,v 1.9 2003/02/13); www.oscommerce.com

? 2003 nextcommerce (redirect.php,v 1.7 2003/08/17); www.nextcommerce.org

Released under the GNU General Public License

---------------------------------------------------------------------------------------*/

include( 'includes/application_top.php');

switch ($_GET['action']) {

case 'banner':

$banner_query = xtc_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . $_GET['goto'] . "'");

if (xtc_db_num_rows($banner_query)) {

$banner = xtc_db_fetch_array($banner_query);

require_once(DIR_FS_INC . 'xtc_update_banner_click_count.inc.php');

xtc_update_banner_click_count($_GET['goto']);

xtc_redirect($banner['banners_url']);

} else {

xtc_redirect(xtc_href_link(FILENAME_DEFAULT));

}

break;

case 'url':

if (isset($_GET['goto'])) {

xtc_redirect('http://' . $_GET['goto']);

} else {

xtc_redirect(xtc_href_link(FILENAME_DEFAULT));

}

break;

case 'manufacturer':

if (isset($_GET['manufacturers_id'])) {

$manufacturer_query = xtc_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and languages_id = '" . $_SESSION['languages_id'] . "'");

if (!xtc_db_num_rows($manufacturer_query)) {

// no url exists for the selected language, lets use the default language then

$manufacturer_query = xtc_db_query("select mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_LANGUAGES . " l where mi.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" . DEFAULT_LANGUAGE . "'");

if (!xtc_db_num_rows($manufacturer_query)) {

// no url exists, return to the site

xtc_redirect(xtc_href_link(FILENAME_DEFAULT));

} else {

$manufacturer = xtc_db_fetch_array($manufacturer_query);

xtc_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and languages_id = '" . $manufacturer['languages_id'] . "'");

}

} else {

// url exists in selected language

$manufacturer = xtc_db_fetch_array($manufacturer_query);

xtc_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and languages_id = '" . $_SESSION['languages_id'] . "'");

}

xtc_redirect($manufacturer['manufacturers_url']);

} else {

xtc_redirect(xtc_href_link(FILENAME_DEFAULT));

}

break;

default:

xtc_redirect(xtc_href_link(FILENAME_DEFAULT));

break;

}

?>

<file: redircet.php>

lg

wolkenlos5

:dafuer:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...