X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fframetester.php;h=6bf21086fcb7c664995396f67341579e50fdf74a;hb=10492182b811dfcc6279bc43f99c49f847e326a4;hp=ef0af221055c67e0e0d3972c95d2bab58de8f534;hpb=72288d31358f8061513f8d3d61a1f9e7feb44e50;p=mailer.git diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index ef0af22105..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'; @@ -74,53 +73,55 @@ if (REQUEST_ISSET_GET('order')) { } } // 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 = getConfig('URL'); - // Decode URL if set in GET parameters - if (REQUEST_ISSET_GET('url')) $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('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) - { + if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame'); + switch ($frame) { case '': - switch ($mode) - { + switch ($mode) { case 'member': // Build frameset - define('__ORDER_VALUE', bigintval(REQUEST_GET('order'))); - define('__URL_VALUE' , DEREFERER($url)); - LOAD_TEMPLATE('member_order_frametester'); + $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'); + $content['url'] = generateDerefererUrl($url); + loadTemplate('guest_frametester', false, $content); break; - } + } // END - switch break; - case 'test_top': - LOAD_TEMPLATE('admin_settings_saved', false, '