2 /************************************************************************
3 * Mailer v0.2.1-FINAL 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 - 2009 by Roland Haeder *
21 * Copyright (c) 2009, 2010 by Mailer Developer Team *
22 * For more information visit: http://www.mxchange.org *
24 * This program is free software; you can redistribute it and/or modify *
25 * it under the terms of the GNU General Public License as published by *
26 * the Free Software Foundation; either version 2 of the License, or *
27 * (at your option) any later version. *
29 * This program is distributed in the hope that it will be useful, *
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
32 * GNU General Public License for more details. *
34 * You should have received a copy of the GNU General Public License *
35 * along with this program; if not, write to the Free Software *
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
38 ************************************************************************/
40 // Some security stuff...
41 if (!defined('__SECURITY')) {
47 if (isGetRequestParameterSet('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(getRequestParameter('order')), getMemberId()), __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 setPostRequestParameter('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 ((isPostRequestParameterSet('url')) || (isGetRequestParameterSet('url')) || (isGetRequestParameterSet('frame'))) {
78 // Default URL is ours
79 $url = getConfig('URL');
81 // Use URL from POST or GET data if set
82 if (isPostRequestParameterSet('url')) {
83 // POST data comes first
84 $url = postRequestParameter('url');
85 } elseif (isGetRequestParameterSet('url')) {
87 $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestParameter('url')))));
90 // Add missing element
92 if (isGetRequestParameterSet('frame')) $frame = getRequestParameter('frame');
98 $content['order'] = bigintval(getRequestParameter('order'));
99 $content['url'] = generateDerefererUrl($url);
100 loadTemplate('member_order_frametester', false, $content);
104 $content['url'] = generateDerefererUrl($url);
105 loadTemplate('guest_frametester', false, $content);
111 loadTemplate('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
114 case 'back': // Back buttom
115 loadTemplate('member_order_back', false, getRequestParameter('order'));
118 case 'send': // Send mail away
119 loadTemplate('member_order_send', false, getRequestParameter('order'));
124 redirectToUrl('modules.php?module=login');