array(REQUEST_GET('uid')), __FILE__, __LINE__);
} else {
// Nickname entered but nickname is not active
- $msg = constant('CODE_EXTENSION_PROBLEM');
+ $msg = getCode('EXTENSION_PROBLEM');
$uid = -1;
}
} else {
array(REQUEST_GET('uid')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Locked account
- $msg = constant('CODE_ACCOUNT_LOCKED');
+ $msg = getCode('ACCOUNT_LOCKED');
} else {
// Invalid nickname! (404)
- $msg = constant('CODE_USER_404');
+ $msg = getCode('USER_404');
}
// Free memory
SQL_FREERESULT($result);
} elseif ($uid == getConfig('beg_uid')) {
// Webmaster's ID cannot beg for points!
- $msg = constant('CODE_BEG_SAME_AS_OWN');
+ $msg = getCode('BEG_SAME_AS_OWN');
}
// Reload to index module
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 02/28/2009 *
+ * =============== Last change: 02/28/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : code-functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for handling status codes *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Funktionen zum Umgang mit Status-Funktionen *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 856 $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: stelzi $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * 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 (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
+ require($INC);
+}
+
+// Adds a code key/value pair to $GLOBALS
+function addCode ($key, $value) {
+ $GLOBALS['status_codes'][$key] = $value;
+}
+
+// Gets a code from the $GLOBALS registry or triggers an error if not found
+function getCode ($key) {
+ // Is the key set?
+ if (!isCodeSet($key)) {
+ // Abort here
+ trigger_error(sprintf("%s[%s:] Code %s is not set.",
+ __FUNCTION__,
+ __LINE__,
+ $key
+ ));
+ } // END - if
+
+ // Return it
+ return $GLOBALS['status_codes'][$key];
+}
+
+// Checks wether a specified status code is set
+function isCodeSet ($key) {
+ // Simply use isset()
+ return (isset($GLOBALS['status_codes'][$key]));
+}
+
+// [EOF]
+?>
} // END - if
// System-wide return codes
-define('CODE_WRONG_PASS' , 0x001);
-define('CODE_WRONG_ID' , 0x002);
-define('CODE_ID_LOCKED' , 0x003);
-define('CODE_ID_UNCONFIRMED' , 0x004);
-define('CODE_UNKNOWN_STATUS' , 0x005);
-define('CODE_NO_COOKIES' , 0x006);
-define('CODE_CNTR_FAILED' , 0x008);
-define('CODE_LOGOUT_DONE' , 0x008);
-define('CODE_LOGOUT_FAILED' , 0x009);
-define('CODE_URL_TLOCK' , 0x00a);
-define('CODE_URL_FOUND' , 0x00b);
-define('CODE_OVERLENGTH' , 0x00c);
-define('CODE_SUBJ_URL' , 0x00d);
-define('CODE_BLIST_URL' , 0x00e);
-define('CODE_NO_RECS_LEFT' , 0x00f);
-define('CODE_INVALID_TAGS' , 0x010);
-define('CODE_MORE_POINTS' , 0x011);
-define('CODE_COOKIES_DISABLED' , 0x012);
-define('CODE_DATA_INVALID' , 0x013);
-define('CODE_POSSIBLE_INVALID' , 0x014);
-define('CODE_ACCOUNT_LOCKED' , 0x015);
-define('CODE_USER_404' , 0x016);
-define('CODE_STATS_404' , 0x017);
-define('CODE_ALREADY_CONFIRMED', 0x018);
-define('CODE_ERROR_MAILID' , 0x019);
-define('CODE_EXTENSION_PROBLEM', 0x01a);
-define('CODE_MORE_RECEIVERS1' , 0x01b);
-define('CODE_MORE_RECEIVERS2' , 0x01c);
-define('CODE_MORE_RECEIVERS3' , 0x01d);
-define('CODE_INVALID_URL' , 0x01e);
-define('CODE_MENU_NOT_VALID' , 0x01f);
-define('CODE_LOGIN_FAILED' , 0x020);
-define('CODE_BEG_SAME_AS_OWN' , 0x021);
-define('CODE_UNHANDLED_STATUS' , 0x022);
+addCode('WRONG_PASS' , 0x001);
+addCode('WRONG_ID' , 0x002);
+addCode('ID_LOCKED' , 0x003);
+addCode('ID_UNCONFIRMED' , 0x004);
+addCode('UNKNOWN_STATUS' , 0x005);
+addCode('NO_COOKIES' , 0x006);
+addCode('CNTR_FAILED' , 0x008);
+addCode('LOGOUT_DONE' , 0x008);
+addCode('LOGOUT_FAILED' , 0x009);
+addCode('URL_TLOCK' , 0x00a);
+addCode('URL_FOUND' , 0x00b);
+addCode('OVERLENGTH' , 0x00c);
+addCode('SUBJ_URL' , 0x00d);
+addCode('BLIST_URL' , 0x00e);
+addCode('NO_RECS_LEFT' , 0x00f);
+addCode('INVALID_TAGS' , 0x010);
+addCode('MORE_POINTS' , 0x011);
+addCode('COOKIES_DISABLED' , 0x012);
+addCode('DATA_INVALID' , 0x013);
+addCode('POSSIBLE_INVALID' , 0x014);
+addCode('ACCOUNT_LOCKED' , 0x015);
+addCode('USER_404' , 0x016);
+addCode('STATS_404' , 0x017);
+addCode('ALREADY_CONFIRMED', 0x018);
+addCode('ERROR_MAILID' , 0x019);
+addCode('EXTENSION_PROBLEM', 0x01a);
+addCode('MORE_RECEIVERS1' , 0x01b);
+addCode('MORE_RECEIVERS2' , 0x01c);
+addCode('MORE_RECEIVERS3' , 0x01d);
+addCode('INVALID_URL' , 0x01e);
+addCode('MENU_NOT_VALID' , 0x01f);
+addCode('LOGIN_FAILED' , 0x020);
+addCode('BEG_SAME_AS_OWN' , 0x021);
+addCode('UNHANDLED_STATUS' , 0x022);
// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
define('SERVER_URL', "http://www.mxchange.org");
// Generates an error code from given account status
function GEN_ERROR_CODE_FROM_ACCOUNT_STATUS ($status) {
// Default error code if unknown account status
- $ERROR = constant('CODE_UNKNOWN_STATUS');
+ $ERROR = getCode('UNKNOWN_STATUS');
// Generate constant name
- $constantName = sprintf("CODE_ID_%s", $status);
+ $constantName = sprintf("ID_%s", $status);
// Is the constant there?
- if (defined($constantName)) {
+ if (isCodeSet($constantName)) {
// Then get it!
- $ERROR = constant($constantName);
+ $ERROR = getCode($constantName);
} else {
// Unknown status
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown error status %s detected.", $status));
function convertCodeToMessage ($code) {
$msg = "";
switch ($code) {
- case constant('CODE_LOGOUT_DONE') : $msg = getMessage('LOGOUT_DONE'); break;
- case constant('CODE_LOGOUT_FAILED') : $msg = "<span class=\"guest_failed\">{--LOGOUT_FAILED--}</span>"; break;
- case constant('CODE_DATA_INVALID') : $msg = getMessage('MAIL_DATA_INVALID'); break;
- case constant('CODE_POSSIBLE_INVALID') : $msg = getMessage('MAIL_POSSIBLE_INVALID'); break;
- case constant('CODE_ACCOUNT_LOCKED') : $msg = getMessage('MEMBER_ACCOUNT_LOCKED_UNC'); break;
- case constant('CODE_USER_404') : $msg = getMessage('USER_NOT_FOUND'); break;
- case constant('CODE_STATS_404') : $msg = getMessage('MAIL_STATS_404'); break;
- case constant('CODE_ALREADY_CONFIRMED'): $msg = getMessage('MAIL_ALREADY_CONFIRMED'); break;
-
- case constant('CODE_ERROR_MAILID'):
+ case getCode('LOGOUT_DONE') : $msg = getMessage('LOGOUT_DONE'); break;
+ case getCode('LOGOUT_FAILED') : $msg = "<span class=\"guest_failed\">{--LOGOUT_FAILED--}</span>"; break;
+ case getCode('DATA_INVALID') : $msg = getMessage('MAIL_DATA_INVALID'); break;
+ case getCode('POSSIBLE_INVALID') : $msg = getMessage('MAIL_POSSIBLE_INVALID'); break;
+ case getCode('ACCOUNT_LOCKED') : $msg = getMessage('MEMBER_ACCOUNT_LOCKED_UNC'); break;
+ case getCode('USER_404') : $msg = getMessage('USER_NOT_FOUND'); break;
+ case getCode('STATS_404') : $msg = getMessage('MAIL_STATS_404'); break;
+ case getCode('ALREADY_CONFIRMED'): $msg = getMessage('MAIL_ALREADY_CONFIRMED'); break;
+
+ case getCode('ERROR_MAILID'):
if (EXT_IS_ACTIVE($ext, true)) {
$msg = getMessage('ERROR_CONFIRMING_MAIL');
} else {
}
break;
- case constant('CODE_EXTENSION_PROBLEM'):
+ case getCode('EXTENSION_PROBLEM'):
if (REQUEST_ISSET_GET(('ext'))) {
$msg = sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), REQUEST_GET(('ext')));
} else {
}
break;
- case constant('CODE_COOKIES_DISABLED') : $msg = getMessage('LOGIN_NO_COOKIES'); break;
- case constant('CODE_BEG_SAME_AS_OWN') : $msg = getMessage('BEG_SAME_UID_AS_OWN'); break;
- case constant('CODE_LOGIN_FAILED') : $msg = getMessage('LOGIN_FAILED_GENERAL'); break;
+ case getCode('COOKIES_DISABLED') : $msg = getMessage('LOGIN_NO_COOKIES'); break;
+ case getCode('BEG_SAME_AS_OWN') : $msg = getMessage('BEG_SAME_UID_AS_OWN'); break;
+ case getCode('LOGIN_FAILED') : $msg = getMessage('LOGIN_FAILED_GENERAL'); break;
default : $msg = sprintf(getMessage('UNKNOWN_MAILID_CODE'), $code); break;
} // END - switch
// Is the extension uninstalled/inactive?
if (!EXT_IS_ACTIVE($ext_name)) {
// Redirect to index
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=".$ext_name);
+ LOAD_URL("modules.php?module=index&msg=".getCode('EXTENSION_PROBLEM')."&ext=".$ext_name);
} // END - if
}
}
} else {
// Cannot update counter!
- $URL = "modules.php?module=index&what=login&login=".constant('CODE_CNTR_FAILED');
+ $URL = "modules.php?module=index&what=login&login=".getCode('CNTR_FAILED');
}
} else {
// Cookies not setable!
- $URL = "modules.php?module=index&what=login&login=".constant('CODE_NO_COOKIES');
+ $URL = "modules.php?module=index&what=login&login=".getCode('NO_COOKIES');
}
} elseif (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
// Update failture counter
array($uid), __FUNCTION__, __LINE__);
// Wrong password!
- $URL = "modules.php?module=index&what=login&login=".constant('CODE_WRONG_PASS');
+ $URL = "modules.php?module=index&what=login&login=".getCode('WRONG_PASS');
}
} elseif ((($probe_nickname) && (!empty($uid2))) || ($uid2 == $uid)) {
// Other account status?
$ERROR = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
} else {
// ID not found!
- $ERROR = constant('CODE_WRONG_ID');
+ $ERROR = getCode('WRONG_ID');
}
// Construct URL
$URL = "modules.php?module=index&what=login&login=".$ERROR;
} else {
// ID not found!
- $URL = "modules.php?module=index&what=login&login=".constant('CODE_WRONG_ID');
+ $URL = "modules.php?module=index&what=login&login=".getCode('WRONG_ID');
}
// Return URL
} else {
// Userid not set!
DEBUG_LOG(__FUNCTION__, __LINE__, "Userid is not set! BUG!");
- $ERROR = constant('CODE_WRONG_ID');
+ $ERROR = getCode('WRONG_ID');
}
// Any entry found?
$URL = "modules.php?module=login";
} elseif ((IS_FORM_SENT()) && ("".$uid."" != "".REQUEST_POST('id')."")) {
// Invalid input (no nickname extension installed but nickname entered)
- $ERROR = constant('CODE_EXTENSION_PROBLEM');
+ $ERROR = getCode('EXTENSION_PROBLEM');
} elseif (IS_FORM_SENT()) {
// Try the login (see inc/libs/user_functions.php)
$URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password'));
<span class=\"guest_failed\">";
switch ($ERROR) {
- case constant('CODE_WRONG_PASS'):
+ case getCode('WRONG_PASS'):
$MSG .= getMessage('LOGIN_WRONG_PASS');
break;
- case constant('CODE_WRONG_ID'):
+ case getCode('WRONG_ID'):
$MSG .= getMessage('LOGIN_WRONG_ID');
break;
- case constant('CODE_ID_LOCKED'):
+ case getCode('ID_LOCKED'):
$MSG .= getMessage('LOGIN_ID_LOCKED');
break;
- case constant('CODE_ID_UNCONFIRMED'):
+ case getCode('ID_UNCONFIRMED'):
$MSG .= getMessage('LOGIN_ID_UNCONFIRMED');
break;
- case constant('CODE_NO_COOKIES'):
+ case getCode('NO_COOKIES'):
$MSG .= getMessage('LOGIN_NO_COOKIES');
break;
- case constant('CODE_EXTENSION_PROBLEM'):
+ case getCode('EXTENSION_PROBLEM'):
if (IS_ADMIN()) {
$MSG .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname");
} else {
set_session("mxchange_theme", "");
// Logout completed
- $URL .= constant('CODE_LOGOUT_DONE');
+ $URL .= getCode('LOGOUT_DONE');
} else {
// Cannot logout! :-(
- $URL .= constant('CODE_LOGOUT_FAILED');
+ $URL .= getCode('LOGOUT_FAILED');
}
// Load the URL
// Test submitted text against some filters (length, URLs in text etc.)
if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) {
// URL found!
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_URL_FOUND');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('URL_FOUND');
} // END - if
// Remove new-line and carriage-return characters
// Text length within allowed length?
if (strlen($TEST) > getConfig('max_tlength')) {
// Text is too long!
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_OVERLENGTH');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('OVERLENGTH');
} // END - if
} // END - if
REQUEST_SET_POST('subject', str_replace("\\", "[nl]", substr(REQUEST_POST('subject'), 0, 200)));
if ((strpos(strtolower(REQUEST_POST('subject')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) {
// URL in subject found
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_SUBJ_URL');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('SUBJ_URL');
} // END - if
} // END - if
list($blist) = SQL_FETCHROW($result);
// Create redirect-URL
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_BLIST_URL')."&blist=".$blist;
+ $URL = "modules.php?module=login&what=order&msg=".getCode('BLIST_URL')."&blist=".$blist;
} // END - if
// Free result
// Enougth receivers entered?
if ((REQUEST_POST('receiver') < getConfig('order_min')) && (!IS_ADMIN())) {
// Less than allowed receivers entered!
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_RECEIVERS3');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS3');
} // END - if
// Validate URL
if (!VALIDATE_URL(REQUEST_POST('url'))) {
// URL is invalid!
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_INVALID_URL');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_URL');
} // END - if
// Probe for HTML extension
REQUEST_SET_POST('text', HTML_CHECK_TAGS(REQUEST_POST('text')));
// Maybe invalid tags found?
- if (!REQUEST_ISSET_POST(('text'))) $URL = "modules.php?module=login&what=order&msg=".constant('CODE_INVALID_TAGS')."&id=".$id;
+ if (!REQUEST_ISSET_POST(('text'))) $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_TAGS')."&id=".$id;
} else {
// Remove any HTML code
REQUEST_SET_POST('text', str_replace("<", "{OPEN_HTML}", str_replace(">", "{CLOSE_HTML}", REQUEST_POST('text'))));
}
} elseif (!IS_ADMIN()) {
// He has already sent a mail within a specific time
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_URL_TLOCK')."&id=".$id;
+ $URL = "modules.php?module=login&what=order&msg=".getCode('URL_TLOCK')."&id=".$id;
}
// Still no error?
$URL = "modules.php?module=frametester&order=".$id."";
} elseif ($MAX_SEND == 0) {
// Not enougth receivers found which can receive mails
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_RECEIVERS2');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS2');
} else {
// No enougth points left!
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_POINTS');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_POINTS');
}
} else {
// Ordered more mails than he can send in this category
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_NO_RECS_LEFT');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('NO_RECS_LEFT');
}
}
} elseif (REQUEST_POST('receiver') == "0") {
// Not enougth receivers selected
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_RECEIVERS1');
+ $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS1');
} elseif (($ALLOWED == 0) && (getConfig('order_max_full') == "ORDER")) {
// No more mail orders allowed
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
$MSG = "";
switch (REQUEST_GET('msg'))
{
- case constant('CODE_URL_TLOCK'):
+ case getCode('URL_TLOCK'):
$result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1",
array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
{--MEMBER_LAST_TLOCK--}: ".$LORDER;
break;
- case constant('CODE_OVERLENGTH'):
+ case getCode('OVERLENGTH'):
$MSG = getMessage('MEMBER_TEXT_OVERLENGTH');
break;
- case constant('CODE_URL_FOUND'):
+ case getCode('URL_FOUND'):
$MSG = getMessage('MEMBER_TEXT_CONTAINS_URL');
break;
- case constant('CODE_SUBJ_URL'):
+ case getCode('SUBJ_URL'):
$MSG = getMessage('MEMBER_SUBJ_CONTAINS_URL');
break;
- case constant('CODE_BLIST_URL'):
+ case getCode('BLIST_URL'):
$MSG = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".MAKE_DATETIME(REQUEST_GET('blist'), "0");
break;
- case constant('CODE_NO_RECS_LEFT'):
+ case getCode('NO_RECS_LEFT'):
$MSG = getMessage('MEMBER_SELECTED_MORE_RECS');
break;
- case constant('CODE_INVALID_TAGS'):
+ case getCode('INVALID_TAGS'):
$MSG = getMessage('MEMBER_HTML_INVALID_TAGS');
break;
- case constant('CODE_MORE_POINTS'):
+ case getCode('MORE_POINTS'):
$MSG = getMessage('MEMBER_MORE_POINTS_NEEDED');
break;
- case constant('CODE_MORE_RECEIVERS1'):
+ case getCode('MORE_RECEIVERS1'):
$MSG = getMessage('MEMBER_ENTER_MORE_RECEIVERS');
break;
- case constant('CODE_MORE_RECEIVERS2'):
+ case getCode('MORE_RECEIVERS2'):
$MSG = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND');
break;
- case constant('CODE_MORE_RECEIVERS3'):
+ case getCode('MORE_RECEIVERS3'):
$MSG = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
break;
- case constant('CODE_INVALID_URL'):
+ case getCode('INVALID_URL'):
$MSG = getMessage('MEMBER_ENTER_INVALID_URL');
break;
require("inc/functions.php");
// Load more function libraries or includes
-foreach (array('request-functions', 'session-functions', 'config-functions', 'filters', 'mysql-manager', 'extensions', 'db/lib', 'handler', 'hooks') as $lib) {
+foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'filters', 'mysql-manager', 'extensions', 'db/lib', 'handler', 'hooks') as $lib) {
// Load special functions
LOAD_INC_ONCE(sprintf("inc/%s.php", $lib));
} // END - foreach
// is the menu action valid?
if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) {
- return getMessage('CODE_MENU_NOT_VALID');
+ return getCode('MENU_NOT_VALID');
} // END - if
// Non-admin shall not see all menus
// Load template
LOAD_TEMPLATE("mailid_frames");
} else {
- $msg = constant('CODE_DATA_INVALID');
+ $msg = getCode('DATA_INVALID');
}
} else {
- $msg = constant('CODE_POSSIBLE_INVALID');
+ $msg = getCode('POSSIBLE_INVALID');
}
} else {
- $msg = constant('CODE_ACCOUNT_LOCKED');
+ $msg = getCode('ACCOUNT_LOCKED');
}
} else {
SQL_FREERESULT($result);
- $msg = constant('CODE_USER_404');
+ $msg = getCode('USER_404');
}
} else {
SQL_FREERESULT($result);
- $msg = constant('CODE_STATS_404');
+ $msg = getCode('STATS_404');
}
} else {
SQL_FREERESULT($result);
- $msg = constant('CODE_ALREADY_CONFIRMED');
+ $msg = getCode('ALREADY_CONFIRMED');
}
} else {
// Nothing entered
- $msg = constant('CODE_ERROR_MAILID');
+ $msg = getCode('ERROR_MAILID');
}
// Error code is set?
default:
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect')));
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_UNKNOWN_STATUS')."&ext=mailid");
+ LOAD_URL("modules.php?module=index&msg=".getCode('UNKNOWN_STATUS')."&ext=mailid");
break;
}
} else {