]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/frametester.php
win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / frametester.php
index 0372b945d196c00a49939b912d99cc40d19f2df2..1be7dd9d339a344e3af421af4f2f601334359f5c 100644 (file)
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 10/24/2003 *\r
- * ===============                              Last change: 06/30/2004 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : frametester.php                                  *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Test your website against frame killers          *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Testet die Mitgliedsseite gegen Frame-Killer     *\r
- * -------------------------------------------------------------------- *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *\r
- * For more information visit: http://www.mxchange.org                  *\r
- *                                                                      *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or    *\r
- * (at your option) any later version.                                  *\r
- *                                                                      *\r
- * This program is distributed in the hope that it will be useful,      *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *\r
- * GNU General Public License for more details.                         *\r
- *                                                                      *\r
- * You should have received a copy of the GNU General Public License    *\r
- * along with this program; if not, write to the Free Software          *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *\r
- * MA  02110-1301  USA                                                  *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))\r
-{\r
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
-       require($INC);\r
-}\r
-\r
-$MODE = "guest";\r
-\r
-if (!empty($_GET['order']))\r
-{\r
-       // Order number placed, is he also logged in?\r
-       if(IS_LOGGED_IN())\r
-       {\r
-               // Ok, test passed... :)\r
-               $result = SQL_QUERY_ESC("SELECT subject, url FROM "._MYSQL_PREFIX."_pool WHERE id=%d AND sender=%d AND data_type='TEMP' LIMIT 1",\r
-                array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);\r
-\r
-               // Finally is the entry valid?\r
-               if (SQL_NUMROWS($result) == 1)\r
-               {\r
-                       // Load subject and URL (but forwhat do we need the subject line here???\r
-                       list($sub, $url) = SQL_FETCHROW($result);\r
-\r
-                       // This fixes a white page\r
-                       $_POST['url'] = $url;\r
-\r
-                       // Update his login data\r
-                       UPDATE_LOGIN_DATA();\r
-                       $MODE = "member";\r
-               }\r
-                else\r
-               {\r
-                       // Matching line not found!\r
-                       LOAD_URL(URL."/modules.php?module=index&amp;what=login");\r
-               }\r
-\r
-               // Free memory\r
-               SQL_FREERESULT($result);\r
-       }\r
-        else\r
-       {\r
-               // He is no longer logged in\r
-               LOAD_URL(URL."/modules.php?module=index&amp;what=login");\r
-       }\r
-}\r
-\r
-if ((!empty($_POST['url'])) || (!empty($_GET['url'])) || (!empty($_GET['frame'])))\r
-{\r
-       $url = URL;\r
-       if (!empty($_POST['url'])) $url = $_POST['url'];\r
-       if (!empty($_GET['url']))  $url = base64_decode(urldecode(COMPILE_CODE($_GET['url'])));\r
-       switch ($_GET['frame'])\r
-       {\r
-       case "":\r
-               switch ($MODE)\r
-               {\r
-               case "member":\r
-                       // Build frameset\r
-                       define('__ORDER_VALUE', bigintval($_GET['order']));\r
-                       define('__URL_VALUE'  , DEREFERER($url));\r
-                       LOAD_TEMPLATE("member_order_frametester");\r
-                       break;\r
-\r
-               case "guest":\r
-                       define('__URL_VALUE'  , DEREFERER($url));\r
-                       LOAD_TEMPLATE("guest_frametester");\r
-                       break;\r
-               }\r
-               break;\r
-\r
-       case "test_top":\r
-               OUTPUT_HTML ("<STRONG class=\"guest_done\">".GUEST_FRAMETESTER_TOP."</SPAN>");\r
-               break;\r
-\r
-       case "back": // Back buttom\r
-               LOAD_TEMPLATE("member_order_back", false, $_GET['order']);\r
-               break;\r
-\r
-       case "send": // Send mail away\r
-               LOAD_TEMPLATE("member_order_send", false, $_GET['order']);\r
-               break;\r
-       }\r
-}\r
- else\r
-{\r
-       // Go away...\r
-       LOAD_URL(URL."/modules.php?module=login");\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/24/2003 *
+ * ===============                              Last change: 06/30/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : frametester.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Test your website against frame killers          *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Testet die Mitgliedsseite gegen Frame-Killer     *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
+{
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+$MODE = "guest";
+
+if (!empty($_GET['order']))
+{
+       // Order number placed, is he also logged in?
+       if(IS_LOGGED_IN())
+       {
+               // Ok, test passed... :)
+               $result = SQL_QUERY_ESC("SELECT subject, url FROM "._MYSQL_PREFIX."_pool WHERE id=%d AND sender=%d AND data_type='TEMP' LIMIT 1",
+                array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
+
+               // Finally is the entry valid?
+               if (SQL_NUMROWS($result) == 1)
+               {
+                       // Load subject and URL (but forwhat do we need the subject line here???
+                       list($sub, $url) = SQL_FETCHROW($result);
+
+                       // This fixes a white page
+                       $_POST['url'] = $url;
+
+                       // Update his login data
+                       UPDATE_LOGIN_DATA();
+                       $MODE = "member";
+               }
+                else
+               {
+                       // Matching line not found!
+                       LOAD_URL(URL."/modules.php?module=index&amp;what=login");
+               }
+
+               // Free memory
+               SQL_FREERESULT($result);
+       }
+        else
+       {
+               // He is no longer logged in
+               LOAD_URL(URL."/modules.php?module=index&amp;what=login");
+       }
+}
+
+if ((!empty($_POST['url'])) || (!empty($_GET['url'])) || (!empty($_GET['frame'])))
+{
+       $url = URL;
+       if (!empty($_POST['url'])) $url = $_POST['url'];
+       if (!empty($_GET['url']))  $url = base64_decode(urldecode(COMPILE_CODE($_GET['url'])));
+       switch ($_GET['frame'])
+       {
+       case "":
+               switch ($MODE)
+               {
+               case "member":
+                       // Build frameset
+                       define('__ORDER_VALUE', bigintval($_GET['order']));
+                       define('__URL_VALUE'  , DEREFERER($url));
+                       LOAD_TEMPLATE("member_order_frametester");
+                       break;
+
+               case "guest":
+                       define('__URL_VALUE'  , DEREFERER($url));
+                       LOAD_TEMPLATE("guest_frametester");
+                       break;
+               }
+               break;
+
+       case "test_top":
+               OUTPUT_HTML ("<STRONG class=\"guest_done\">".GUEST_FRAMETESTER_TOP."</SPAN>");
+               break;
+
+       case "back": // Back buttom
+               LOAD_TEMPLATE("member_order_back", false, $_GET['order']);
+               break;
+
+       case "send": // Send mail away
+               LOAD_TEMPLATE("member_order_send", false, $_GET['order']);
+               break;
+       }
+}
+ else
+{
+       // Go away...
+       LOAD_URL(URL."/modules.php?module=login");
+}
+//
+?>