2 /************************************************************************
3 * MXChange v0.2.1 Start: 10/24/2003 *
4 * =============== Last change: 06/30/2004 *
6 * -------------------------------------------------------------------- *
7 * File : frametester.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Test your website against frame killers *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Testet die Mitgliedsseite gegen Frame-Killer *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2008 by Roland Haeder *
21 * For more information visit: http://www.mxchange.org *
23 * This program is free software; you can redistribute it and/or modify *
24 * it under the terms of the GNU General Public License as published by *
25 * the Free Software Foundation; either version 2 of the License, or *
26 * (at your option) any later version. *
28 * This program is distributed in the hope that it will be useful, *
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
31 * GNU General Public License for more details. *
33 * You should have received a copy of the GNU General Public License *
34 * along with this program; if not, write to the Free Software *
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
37 ************************************************************************/
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
41 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
47 if (REQUEST_ISSET_GET(('order'))) {
48 // Order number placed, is he also logged in?
50 // Ok, test passed... :)
51 $result = SQL_QUERY_ESC("SELECT subject, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
52 array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
54 // Finally is the entry valid?
55 if (SQL_NUMROWS($result) == 1) {
56 // Load subject and URL (but forwhat do we need the subject line here???
57 list($sub, $url) = SQL_FETCHROW($result);
59 // This fixes a white page
60 REQUEST_SET_POST('url', $url);
65 // Matching line not found!
66 redirectToUrl('modules.php?module=index&what=login');
70 SQL_FREERESULT($result);
72 // He is no longer logged in
73 redirectToUrl('modules.php?module=index&what=login');
77 if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_ISSET_GET(('frame')))) {
78 // Default URL is ours
79 $url = constant('URL');
81 // Decode URL if set in GET parameters
82 if (REQUEST_ISSET_GET(('url'))) $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url')))));
84 // Use URL from POST data if set
85 if (REQUEST_ISSET_POST(('url'))) $url = REQUEST_POST('url');
87 // Add missing element
89 if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame'));
97 define('__ORDER_VALUE', bigintval(REQUEST_GET('order')));
98 define('__URL_VALUE' , DEREFERER($url));
99 LOAD_TEMPLATE('member_order_frametester');
103 define('__URL_VALUE' , DEREFERER($url));
104 LOAD_TEMPLATE('guest_frametester');
110 LOAD_TEMPLATE('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
113 case 'back': // Back buttom
114 LOAD_TEMPLATE('member_order_back', false, REQUEST_GET('order'));
117 case 'send': // Send mail away
118 LOAD_TEMPLATE('member_order_send', false, REQUEST_GET('order'));
123 redirectToUrl('modules.php?module=login');