require("inc/libs/security_functions.php");
// Init "action" and "what"
-global $what, $action;
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+$GLOBALS['what'] = "";
+$GLOBALS['action'] = "";
// Tell everyone we are in this module
-$GLOBALS['module'] = "mailid"; $CSS = 0;
+$GLOBALS['module'] = "mailid";
+$GLOBALS['output_mode'] = 0;
// Load the required file(s)
require("inc/config.php");
// Is the extension active
if (!EXT_IS_ACTIVE("mailid", true)) {
// Is not activated/installed yet!
- addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"));
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
} // END - if
// Secure all data
define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
// Only when user extension = v0.1.2: Update mails-confirmed counter
+ // @TODO Rewrite these blocks to filter
if (GET_EXT_VERSION("user") >= "0.1.2") {
// Update counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
break;
case "confirm":
- if ($code > 0)
- {
+ if ($code > 0) {
// Export data into constants for the template
define('_CODE_VALUE', $code);
define('_UID_VALUE' , $url_uid );
define('_TYPE_VALUE', $type);
define('_DATA_VALUE', $DATA);
define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
- if (getConfig('code_length') > 0)
- {
+ if (getConfig('code_length') > 0) {
// Generate Code
define('_IMAGE_CODE', IMG_CODE($code, $type, $DATA, $url_uid));
$templ = "mailid_enter_code";
- }
- else
- {
+ } else {
// Disabled code
define('__GFX_CODE', $img_code);
$templ = "mailid_confirm_buttom";
// Load template
LOAD_TEMPLATE("mailid_timer");
break;
- }
+ } // END - switch
+ } else {
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
}
- else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (6)</div>");
+ } else {
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>");
}
- else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (5)</div>");
+ } else {
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>");
}
- else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (4)</div>");
} else {
SQL_FREERESULT($result);
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (3)</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>");
}
} else {
SQL_FREERESULT($result);
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (2)</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>");
}
} else {
SQL_FREERESULT($result);
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (1)</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>");
}
// Insert footer if no image