X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fframetester.php;h=6bf21086fcb7c664995396f67341579e50fdf74a;hb=10492182b811dfcc6279bc43f99c49f847e326a4;hp=2c3a21c3b45a1f79aaf01bc2026959c316232d74;hpb=21a24662ddc70624c27c607e3904aab23e893898;p=mailer.git diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 2c3a21c3b4..6bf21086fc 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -10,14 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Testet die Mitgliedsseite gegen Frame-Killer * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * 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"; +$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')), $GLOBALS['userid']), __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,70 +56,72 @@ 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"; + $mode = 'member'; } else { // Matching line not found! - LOAD_URL("modules.php?module=index&what=login"); + redirectToUrl('modules.php?module=index&what=login'); } // Free memory SQL_FREERESULT($result); } else { // He is no longer logged in - LOAD_URL("modules.php?module=index&what=login"); + 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; + $frame = ''; + 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, "