X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fframetester.php;h=6bf21086fcb7c664995396f67341579e50fdf74a;hb=10492182b811dfcc6279bc43f99c49f847e326a4;hp=80e829565226a8a54125e90a22836e87a747a304;hpb=a84b517e5ce0d1601ca09082aad89f9b673bc202;p=mailer.git diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 80e8295652..6bf21086fc 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if $mode = 'guest'; -if (REQUEST_ISSET_GET(('order'))) { +if (isGetRequestElementSet('order')) { // Order number placed, is he also logged in? - if (IS_MEMBER()) { + if (isMember()) { // Ok, test passed... :) - $result = SQL_QUERY_ESC("SELECT subject, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND sender=%s AND data_type='TEMP' LIMIT 1", - array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `subject`, `url` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s AND `data_type`='TEMP' LIMIT 1", + array(bigintval(getRequestElement('order')), getUserId()), __FILE__, __LINE__); // Finally is the entry valid? if (SQL_NUMROWS($result) == 1) { @@ -57,7 +56,7 @@ if (REQUEST_ISSET_GET(('order'))) { list($sub, $url) = SQL_FETCHROW($result); // This fixes a white page - REQUEST_SET_POST('url', $url); + setRequestPostElement('url', $url); // Mode is member $mode = 'member'; @@ -72,55 +71,57 @@ if (REQUEST_ISSET_GET(('order'))) { // He is no longer logged in redirectToUrl('modules.php?module=index&what=login'); } -} +} // END - if -if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_ISSET_GET(('frame')))) { +if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGetRequestElementSet('frame'))) { // Default URL is ours - $url = constant('URL'); - - // Decode URL if set in GET parameters - if (REQUEST_ISSET_GET(('url'))) $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url'))))); + $url = getConfig('URL'); - // Use URL from POST data if set - if (REQUEST_ISSET_POST(('url'))) $url = REQUEST_POST('url'); + // Use URL from POST or GET data if set + if (isPostRequestElementSet('url')) { + // POST data comes first + $url = postRequestElement('url'); + } elseif (isGetRequestElementSet('url')) { + // Then GET data + $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); + } // Add missing element $frame = ''; - if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame')); - switch ($frame) - { - case '': - switch ($mode) - { - case 'member': - // Build frameset - define('__ORDER_VALUE', bigintval(REQUEST_GET('order'))); - define('__URL_VALUE' , DEREFERER($url)); - LOAD_TEMPLATE('member_order_frametester'); - break; + if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame'); + switch ($frame) { + case '': + switch ($mode) { + case 'member': + // Build frameset + $content['order'] = bigintval(getRequestElement('order')); + $content['url'] = generateDerefererUrl($url); + loadTemplate('member_order_frametester', false, $content); + break; - case 'guest': - define('__URL_VALUE' , DEREFERER($url)); - LOAD_TEMPLATE('guest_frametester'); + case 'guest': + $content['url'] = generateDerefererUrl($url); + loadTemplate('guest_frametester', false, $content); + break; + } // END - switch break; - } - break; - case 'test_top': - LOAD_TEMPLATE('admin_settings_saved', false, '