]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/chk_login.php
branched
[mailer.git] / 0.2.1 / inc / modules / chk_login.php
diff --git a/0.2.1/inc/modules/chk_login.php b/0.2.1/inc/modules/chk_login.php
deleted file mode 100644 (file)
index 9be4517..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 11/26/2003 *
- * ===============                              Last change: 02/27/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : chk_login.php                                    *
- * -------------------------------------------------------------------- *
- * Short description : Check if user has logged in (delay)              *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Pruefen ob die Login-Cookies gesetzt sind        *
- * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * 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);
-}
-
-OPEN_TABLE("500", "guest_login_header dashed", "center");
-
-OUTPUT_HTML ("<BR><STRONG>".VALIDATING_LOGIN."</STRONG><BR>");
-
-if (!empty($GLOBALS['userid']) && !empty($_COOKIE['u_hash']) && !empty($_COOKIE['lifetime']))
-{
-       // Get theme from profile
-       $result = SQL_QUERY_ESC("SELECT curr_theme FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
-        array($GLOBALS['userid']), __FILE__, __LINE__);
-       list($NewTheme) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
-
-       // Change to new theme
-       @setcookie("mxchange_theme", $NewTheme, (time() + 60*60*24*365), COOKIE_PATH);
-       $_COOKIE['mxchange_theme'] = $NewTheme;
-
-       $bonus = false;
-       die("<pre>".print_r($CONFIG, true)."</pre>");
-       if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1")) {
-               // Update last login
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
-SET last_login=UNIX_TIMESTAMP()
-WHERE userid=%d AND last_login < (UNIX_TIMESTAMP() - %d)
-LIMIT 1", array($GLOBALS['userid'], $CONFIG['login_timeout']),
- __FILE__, __LINE__);
-               if (SQL_AFFECTEDROWS($link) == 1) $bonus = true;
-       }
-       if (($bonus) && ($_GET['mode'] == "bonus") && (EXT_IS_ACTIVE("bonus")))         {
-               // Output message with added points
-               OUTPUT_HTML("<FONT class=\"tiny\">
-  ".BONUS_LOGIN_BONUS_ADDED_1."
-  <STRONG>".TRANSLATE_COMMA($CONFIG['login_bonus'])." ".POINTS."</STRONG>
-  ".BONUS_LOGIN_BONUS_ADDED_2."
-</FONT>");
-       }
-        elseif (EXT_IS_ACTIVE("bonus"))
-       {
-               // No login bonus added!
-               OUTPUT_HTML("<FONT class=\"member_failed\">".BONUS_LOGIN_BONUS_NOT_ADDED."</FONT>");
-       }
-
-       // Redirect to member area
-       LOAD_TEMPLATE("member_login_js");
-}
- else
-{
-       // Login failed!
-       LOAD_TEMPLATE("login_failed_js");
-}
-
-// Close table
-CLOSE_TABLE();
-
-//
-?>