X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=view.php;h=512dea701941ed626af238ab30b449b63ae0df5c;hp=afbdbff05c90de6af1963240ddeb478cc71a73f8;hb=ed91696103e27286d50d5dcd9e6b6a6184dd3f16;hpb=985a07b9c904d97b1d18af161457435212c7abdc diff --git a/view.php b/view.php index afbdbff05c..512dea7019 100644 --- a/view.php +++ b/view.php @@ -48,36 +48,8 @@ $GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -if ((isGetRequestElementSet('user')) && (isGetRequestElementSet('banner'))) { - // For later things... ;-) - $result = SQL_QUERY_ESC("SELECT `url` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); - - // Is there the banner? - if (SQL_NUMROWS($result) == 1) { - // Load the URL - $data = SQL_FETCHARRAY($result); - - // Update counter - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); - - // Set header and ... - setContentType('image/' . substr($data['url'], -3, 3)); - - // Redirect - redirectToUrl($data['url'], FALSE); - } else { - // @TODO No banner found, output some default banner - logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestElement('banner')) . ' not dound.'); - } - - // Free memory - SQL_FREERESULT($result); -} else { - // Do nothing for now - redirectToUrl('modules.php?module=index'); -} +// Run filter chain +runFilterChain('handle_view_php'); // Shutdown doShutdown();