X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mailid_top.php;h=71983620c52892289f18ed8e81b6ee6b1754a5b5;hb=5416425ec8fa510a5addb246bdf7a6cd316a911f;hp=1c9405aa35e33954a29f2f39ba1002091c8cabf8;hpb=5bdeaf8b452206598b6c6cd4f941145b11a0eccc;p=mailer.git diff --git a/mailid_top.php b/mailid_top.php index 1c9405aa35..71983620c5 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -32,7 +32,7 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require_once("inc/libs/security_functions.php"); +require("inc/libs/security_functions.php"); // Init "action" and "what" global $what, $action; @@ -48,7 +48,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // 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 @@ -62,7 +62,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // 01 1 12 2 2 21 1 22 10 if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { // No image? Then output header - if ($mode != "img") require_once(PATH."inc/header.php"); + if ($mode != "img") LOAD_INC_ONCE("inc/header.php"); // Maybe he wants to confirm an email? if ($url_mid > 0) { @@ -202,6 +202,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { 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", @@ -225,7 +226,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { $template = "mailid_points_done"; // Right code entered add points and remove entry - if (($ref_pay > 0) && (getConfig('allow_direct_pay') == "N")) { + if (($ref_pay > 0) && (getConfig('allow_direct_pay') != "Y")) { // Don't add points over the referal system $locked = true; $template = "mailid_points_locked"; @@ -285,22 +286,18 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { 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"; @@ -325,30 +322,33 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Load template LOAD_TEMPLATE("mailid_timer"); break; - } + } // END - switch + } else { + LOAD_TEMPLATE("admin_settings_saved", false, "
{--MAIL_ALREADY_CONFIRMED--} (6)
"); } - else LOAD_TEMPLATE("admin_settings_saved", false, "
".MAIL_ALREADY_CONFIRMED." (6)
"); + } else { + LOAD_TEMPLATE("admin_settings_saved", false, "
{--MAIL_ALREADY_CONFIRMED--} (5)
"); } - else LOAD_TEMPLATE("admin_settings_saved", false, "
".MAIL_ALREADY_CONFIRMED." (5)
"); + } else { + LOAD_TEMPLATE("admin_settings_saved", false, "
{--MAIL_ALREADY_CONFIRMED--} (4)
"); } - else LOAD_TEMPLATE("admin_settings_saved", false, "
".MAIL_ALREADY_CONFIRMED." (4)
"); } else { SQL_FREERESULT($result); - LOAD_TEMPLATE("admin_settings_saved", false, "
".MAIL_ALREADY_CONFIRMED." (3)
"); + LOAD_TEMPLATE("admin_settings_saved", false, "
{--MAIL_ALREADY_CONFIRMED--} (3)
"); } } else { SQL_FREERESULT($result); - LOAD_TEMPLATE("admin_settings_saved", false, "
".MAIL_ALREADY_CONFIRMED." (2)
"); + LOAD_TEMPLATE("admin_settings_saved", false, "
{--MAIL_ALREADY_CONFIRMED--} (2)
"); } } else { SQL_FREERESULT($result); - LOAD_TEMPLATE("admin_settings_saved", false, "
".MAIL_ALREADY_CONFIRMED." (1)
"); + LOAD_TEMPLATE("admin_settings_saved", false, "
{--MAIL_ALREADY_CONFIRMED--} (1)
"); } // Insert footer if no image if ($mode != "img") { // Write footer - require_once(PATH."inc/footer.php"); + LOAD_INC_ONCE("inc/footer.php"); } // END - if } } elseif ($mode != "img") {