inc/install-inc.php -text
inc/js/.htaccess -text
inc/js/js- -text
+inc/js/js-cookies_disabled.php -text
inc/js/js-jquery.php -text
inc/js/js-order_send.php -text
inc/js/js-surfbar_member_book.php -text
templates/de/html/install/install_page5.tpl -text
templates/de/html/install/install_welcome.tpl -text
templates/de/html/js/.htaccess -text
+templates/de/html/js/js_cookies_disabled.tpl -text
templates/de/html/js/js_jquery.tpl -text
templates/de/html/js/js_order_send.tpl -text
templates/de/html/js/js_surfbar_member_book.tpl -text
addCode('BEG_SAME_AS_OWN' , 0x021);
addCode('UNHANDLED_STATUS' , 0x022);
addCode('MODULE_MEM_ONLY' , 0x023);
+addCode('ID_GUEST' , 0x024);
// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
setConfigEntry('SERVER_URL', 'http://www.mxchange.org');
// By default we have no extension installed, so 'false' is assumed
$replacer = 'false';
- // Is the extension installed?
- if (isExtensionActive($matches[4][$key])) {
+ // Is the extension installed or code provided?
+ if ($cmd == 'code') {
+ // Code asked for
+ $replacer = getCode($matches[4][$key]);
+ } elseif (isExtensionActive($matches[4][$key])) {
// Construct call-back function name
$functionName = 'getExtension' . ucfirst(strtolower($cmd));
// Prepare eval() command
$eval = '$ret = "' . compileCode(smartAddSlashes($ret)) . '";';
+ } elseif (substr($template, 0, 3) == 'js_') {
+ // JavaScripts don't like entities
+ $eval = '$ret = decodeEntities("' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '");';
} else {
// Prepare eval() command
$eval = '$ret = "' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '";';
$errorCode = getCode('UNKNOWN_STATUS');
// Generate constant name
- $constantName = sprintf("ID_%s", $status);
+ $codeName = sprintf("ID_%s", $status);
// Is the constant there?
- if (isCodeSet($constantName)) {
+ if (isCodeSet($codeName)) {
// Then get it!
- $errorCode = getCode($constantName);
+ $errorCode = getCode($codeName);
} else {
// Unknown status
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error status %s detected.", $status));
case getCode('WRONG_ID') : $message = getMessage('LOGIN_WRONG_ID'); break;
case getCode('ID_LOCKED') : $message = getMessage('LOGIN_ID_LOCKED'); break;
case getCode('ID_UNCONFIRMED') : $message = getMessage('LOGIN_ID_UNCONFIRMED'); break;
+ case getCode('ID_GUEST') : $message = getMessage('LOGIN_ID_GUEST'); break;
case getCode('NO_COOKIES') : $message = getMessage('LOGIN_NO_COOKIES'); break;
case getCode('COOKIES_DISABLED') : $message = getMessage('LOGIN_NO_COOKIES'); break;
case getCode('BEG_SAME_AS_OWN') : $message = getMessage('BEG_SAME_UID_AS_OWN'); break;
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 11/05/2009 *
+ * =============== Last change: 11/05/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : js-cookies_disabled.php *
+ * -------------------------------------------------------------------- *
+ * Short description : JavaScript tag for cookies disabled *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : JavaScript-Tag fuer Cookies-Disabled *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1109 $ *
+ * $Date:: 2009-07-31 18:30:33 +0200 (Fri, 31 Jul 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: quix0r $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * 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 *
+ * 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 (!defined('__SECURITY')) {
+ die();
+} elseif (!isExtensionActive('sql_patches')) {
+ return;
+}
+
+// Load template
+loadTemplate('js_cookies_disabled');
+
+// [EOF]
+?>
'LOGIN_WRONG_PASS' => "Falsches Passwort eingegben.",
'LOGIN_WRONG_ID' => "Es wurde kein Account unter Ihren eingegebenen Logindaten gefunden.",
'LOGIN_ID_LOCKED' => "Ihr Account wurde gesperrt.",
- 'LOGIN_ID_UNCONFIRMED' => "Bitte bestätigen Sie erst Ihre Email-Adresse!<br />Haben Sie den Bestätigungslink verloren? Links im Menü können Sie ihn erneut anfordern.",
+ 'LOGIN_ID_UNCONFIRMED' => "Bitte bestätigen Sie erst Ihre Email-Adresse! Haben Sie den Bestätigungslink verloren? Links im Menü unter "Bestätigungslink" können Sie ihn erneut anfordern.",
+ 'LOGIN_ID_GUEST' => "Es ist etwas beim Anmelden schief gelaufen. Dies sollte nicht vorkommen. status=guest",
'LOGIN_NO_COOKIES' => "Sie haben in Ihrem Browser entweder die Cookies ausgeschaltet, oder die Sicherheitsstufe ist zu hoch eingestellt.",
'GUEST_REG_POINTS_1' => "Für Ihre Anmeldung haben wir Ihnen als Willkommensgutschrift",
'GUEST_REG_POINTS_2' => "{?POINTS?} gutgeschrieben. Sie können bereits jetzt schon Mails an die anderen Mitglieder verschicken - solange Empfänger auch erreichbar sind.",
'ADMIN_DOUBLER_LIST_WAITING_ALL' => "Alle wartenden {?POINTS?}-Auszahlungen",
'ADMIN_DOUBLER_LIST_WAITING_DIRECT' => "Wartende Direkt-Auszahlungen",
'ADMIN_DOUBLER_LIST_WAITING_REF' => "Wartende Referal-Auszahlungen",
-
'DOUBLER_TITLE' => "Verdoppler",
- 'DOUBLER_ENTER_LOGIN_DATA' => "Geben Sie hier Ihre Zugangsdaten ein:",
+ 'DOUBLER_ENTER_LOGIN_DATA' => "Geben Sie hier Ihre Zugangsdaten ein",
'DOUBLER_NOTE_FOR_PASSWORD' => "Das Passwort wird nicht gespeichert.",
'DOUBLER_ENTER_POINTS' => "{?POINTS?} zum Verdoppeln",
'DOUBLER_NOW' => "Verdoppeln.",
// Initial message part
$message = "<strong>{--VALIDATING_LOGIN--}</strong>";
+// Is the member id and u_hash set?
if (isMemberIdSet() && (isSessionVariableSet('u_hash'))) {
// Is 'theme' installed and activated?
if (isExtensionActive('theme')) {
$userid = getMemberId();
} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent())) {
// Set userid and crypt password when login data was submitted
- if ((isExtensionActive('nickname')) && (isNicknameOrUserid(postRequestElement('id')))) {
+ if (isNicknameUsed(postRequestElement('id'))) {
// Nickname entered
$userid = SQL_ESCAPE(postRequestElement('id'));
} else {
$ret = true;
} else {
// Maybe got locked etc.
- //* DEBUG: */ print(__LINE__."!!!<br />");
+ logDebugMessage(__FUNCTION__, __LINE__, 'status=' . getUserData('status'));
destroyMemberSession();
}
} else {
// Cookie data is invalid!
- //* DEBUG: */ print(__LINE__."***<br />");
destroyMemberSession();
}
} else {
// Cookie data is invalid!
- //* DEBUG: */ print(__LINE__."///<br />");
destroyMemberSession();
}
$var = trim(SQL_ESCAPE($var)); $value = trim($value);
// Is the session variable set?
- if ((''.$value.'' == '') && (isSessionVariableSet($var))) {
+ if (('' . $value . '' == '') && (isSessionVariableSet($var))) {
// Remove the session
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UNSET:".$var.'='.getSession($var));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UNSET:' . $var . '=' . getSession($var));
unset($GLOBALS['_SESSION'][$var]);
return session_unregister($var);
- } elseif (("".$value."" != '') && (!isSessionVariableSet($var))) {
+ } elseif (('' . $value . '' != '') && (!isSessionVariableSet($var))) {
// Set session
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "SET:".$var.'='.$value);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SET:' . $var . '=' . $value);
$GLOBALS['_SESSION'][$var] = $value;
return session_register($var);
} elseif (!empty($value)) {
// Update session
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UPDATE:".$var.'='.$value);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UPDATE:' . $var . '=' . $value);
$GLOBALS['_SESSION'][$var] = $value;
return true;
}
// Ignored (but valid)
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "IGNORED:".$var.'='.$value);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'IGNORED:' . $var . '=' . $value);
return true;
}
if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
// Init the user
- $GLOBALS['user_data'][getCurrentUserId()]['status'] = 'GUEST';
+ $GLOBALS['user_data'][getCurrentUserId()] = array();
}
// Getter for user data
</tr>
<tr>
<td width="260" align="right" height="25">
- {--DOUBLER_ENTER_LOGIN--}: </td>
+ {--DOUBLER_ENTER_LOGIN_DATA--}: </td>
<td width="260"><input type="text" name="userid"
class="guest_normal" size="10" maxlength="255"></td>
</tr>
--- /dev/null
+function Loader() {
+ document.location.href = '{?URL?}/modules.php?module=index&what=login&code={%code=COOKIES_DISABLED%}';
+}
+
+window.setTimeout("Loader()", 2000);
-<script type="text/javascript">
-<!--
-function Loader() {
- document.location.href = "{?URL?}/modules.php?module=index&what=login&code={--CODE_COOKIES_DISABLED--}";
-}
-
-window.setTimeout("Loader()", 2000);
-//-->
-</script>
+<script type="text/javascript"
+ src="{?URL?}/js.php?js=cookies_disabled{%version=sql_patches%}"></script>
-<SCRIPT type="text/javascript">
+<script type="text/javascript">
<!--
function Loader()
{
window.setTimeout("Loader()", 2000);
//-->
-</SCRIPT>
+</script>