From: Roland Häder Date: Mon, 7 Feb 2011 15:46:01 +0000 (+0000) Subject: New wrapper functions introduced, TODOs.txt updated X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db0c6702086eea2c44d0aae1702dc2e77a0afc4e;p=mailer.git New wrapper functions introduced, TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index e8f26e225c..aa7d5a56f1 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -48,9 +48,9 @@ ./inc/functions.php:1600: // @TODO Are these convertions still required? ./inc/functions.php:1618:// @TODO Rewrite this function to use readFromFile() and writeToFile() ./inc/functions.php:181:// @TODO Rewrite this to an extension 'smtp' -./inc/functions.php:2191: // @TODO Find a way to cache this -./inc/functions.php:2292: // @TODO This is still very static, rewrite it somehow -./inc/functions.php:2472: // @TODO Rename column data_type to e.g. mail_status +./inc/functions.php:2200: // @TODO Find a way to cache this +./inc/functions.php:2301: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:2481: // @TODO Rename column data_type to e.g. mail_status ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter ./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInInclude(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); ./inc/language/de.php:1083: // @TODO Rewrite these two constants @@ -197,7 +197,7 @@ ./inc/template-functions.php:604: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates ./inc/wrapper-functions.php:130:// @TODO Implement $compress ./inc/wrapper-functions.php:137:// @TODO Implement $decompress -./inc/wrapper-functions.php:489:// @TODO Do some more sanity check here +./inc/wrapper-functions.php:507:// @TODO Do some more sanity check here ./mailid.php:139: // @TODO Rewrite this to a filter ./mailid.php:96: // @TODO Rewrite this to a filter ./mailid_top.php:103: // @TODO Rewrite this to a filter diff --git a/doubler.php b/doubler.php index c812709927..403009eb18 100644 --- a/doubler.php +++ b/doubler.php @@ -78,7 +78,7 @@ if (isFormSent()) { // Is the data valid? if (!isUserDataValid()) { // Output message that the userid is not okay - loadTemplate('admin_settings_saved', false, '{--DOUBLER_USERID_INVALID--}'); + displayMessage('{--DOUBLER_USERID_INVALID--}'); } // END - if // Remove any dots and unwanted chars from the points diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 432bc96d07..56f624b44b 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -800,7 +800,7 @@ function addExtensionVerboseSqlTable ($title = '', $dashed = '', $switch = false $OUT = loadTemplate('admin_extension_sql_table', true, $content); } else { // No addional SQL commands to run - $OUT = loadTemplate('admin_settings_saved', true, '{--ADMIN_NO_ADDITIONAL_SQLS--}'); + $OUT = displayMessage('{--ADMIN_NO_ADDITIONAL_SQLS--}', true); } } // END - if diff --git a/inc/functions.php b/inc/functions.php index 1c748c4455..bf192a5fb7 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1523,13 +1523,13 @@ function getMessageFromErrorCode ($code) { $content['timestamp'] = generateDateTime($content['timestamp'], 1); // Calculate hours... - $content['hours'] = round(getConfig('url_tlock') / 60 / 60); + $content['hours'] = round(getUrlTlock() / 60 / 60); // Minutes... - $content['minutes'] = round((getConfig('url_tlock') - $content['hours'] * 60 * 60) / 60); + $content['minutes'] = round((getUrlTlock() - $content['hours'] * 60 * 60) / 60); // And seconds - $content['seconds'] = round(getConfig('url_tlock') - $content['hours'] * 60 * 60 - $content['minutes'] * 60); + $content['seconds'] = round(getUrlTlock() - $content['hours'] * 60 * 60 - $content['minutes'] * 60); // Finally contruct the message $message = loadTemplate('tlock_message', true, $content); @@ -1921,11 +1921,11 @@ function addNewBonusMail ($data, $mode = '', $output = true) { // Mail inserted into bonus pool if ($output === true) { - loadTemplate('admin_settings_saved', false, '{--ADMIN_BONUS_SEND--}'); + displayMessage('{--ADMIN_BONUS_SEND--}'); } // END - if } elseif ($output === true) { // More entered than can be reached! - loadTemplate('admin_settings_saved', false, '{--ADMIN_MORE_SELECTED--}'); + displayMessage('{--ADMIN_MORE_SELECTED--}'); } else { // Debug log logDebugMessage(__FUNCTION__, __LINE__, 'cat=' . $data['cat'] . ',receiver=' . $data['receiver'] . ',data=' . base64_encode(serialize($data)) . ' More selected, than available!'); diff --git a/inc/install-functions.php b/inc/install-functions.php index f712a9aac9..c1375178da 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -104,7 +104,7 @@ function getInstallerContent () { $content = $GLOBALS['install_content']; } else { // Nothing found, this needs fixing - $content = loadTemplate('admin_settings_saved', true, '{--INSTALLER_CONTENT_404--}'); + $content = displayMessage('{--INSTALLER_CONTENT_404--}', true); } // Return content diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index fad8a524ed..1175558a7e 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -281,7 +281,7 @@ LIMIT 1", // Display message if (!empty($message)) { - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // Remove cache file @@ -365,7 +365,7 @@ function adminsDeleteAdminAccount ($postData) { loadTemplate('admin_delete_admins', false, $OUT); } else { // Cannot delete last account! - loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_CANNOT_DELETE_LAST--}'); + displayMessage('{--ADMIN_ADMINS_CANNOT_DELETE_LAST--}'); } } diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index eb37398877..fab47f84f7 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -112,7 +112,7 @@ LIMIT %s", // List no entries $OUT = ' - ' . loadTemplate('admin_settings_saved', true, $message) . ' + ' . displayMessage($message, true) . ' '; } diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index a938ec8140..326c48b3dc 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -977,7 +977,7 @@ function doAdminNetworkProcessChangeNetwork () { // Do we have updates? if ($updated > 0) { // Updates done - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_UPDATED', $updated)); + displayMessage(getMaskedMessage('ADMIN_NETWORK_UPDATED', $updated)); } else { // Nothing changed loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_NOTHING_CHANGED--}'); @@ -1004,7 +1004,7 @@ function doAdminNetworkProcessRemoveNetwork () { // Do we have removes? if ($removed > 0) { // Removals done - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REMOVED', $removed)); + displayMessage(getMaskedMessage('ADMIN_NETWORK_REMOVED', $removed)); } else { // Nothing removed loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_NOTHING_REMOVED--}'); @@ -1097,7 +1097,7 @@ function doAdminNetworkProcessChangeNetworkType () { // Do we have updates? if ($updated > 0) { // Updates done - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_UPDATED', $updated)); + displayMessage(getMaskedMessage('ADMIN_NETWORK_TYPES_UPDATED', $updated)); } else { // Nothing changed loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_TYPES_NOTHING_CHANGED--}'); @@ -1148,7 +1148,7 @@ function doAdminNetworkProcessChangeNetworkParam () { // Do we have updates? if ($updated > 0) { // Updates done - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_UPDATED', $updated)); + displayMessage(getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_UPDATED', $updated)); } else { // Nothing changed loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_CHANGED--}'); @@ -1175,7 +1175,7 @@ function doAdminNetworkProcessRemoveNetworkType () { // Do we have removes? if ($removed > 0) { // Removals done - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_REMOVED', $removed)); + displayMessage(getMaskedMessage('ADMIN_NETWORK_TYPES_REMOVED', $removed)); } else { // Nothing removed loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_TYPES_NOTHING_REMOVED--}'); @@ -1202,7 +1202,7 @@ function doAdminNetworkProcessRemoveNetworkParam () { // Do we have removes? if ($removed > 0) { // Removals done - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED', $removed)); + displayMessage(getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED', $removed)); } else { // Nothing removed loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_REMOVED--}'); diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 4a0ddb570c..9153021f77 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -109,7 +109,7 @@ function registerGenerateCategoryTable ($mode, $return=false) { SQL_FREERESULT($result); } else { // No categories setted up so far... - $OUT .= loadTemplate('admin_settings_saved', true, '{--NO_CATEGORIES_VISIBLE--}'); + $OUT .= displayMessage('{--NO_CATEGORIES_VISIBLE--}', true); } if ($return === true) { @@ -375,7 +375,7 @@ function doRegistration () { // Did this work? if ($userid == '0') { // Something bad happened! - loadTemplate('admin_settings_saved', false, '{--USER_NOT_REGISTERED--}'); + displayMessage('{--USER_NOT_REGISTERED--}'); // Stop here return; diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 69f3c15341..b84281d787 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -209,7 +209,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray=array(), } else { // Error detected $message = getMessageFromIndexedArray('{--SPONSOR_DATA_NOT_SAVED--}', 'failed', $messageArray); - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // Always return the status @@ -311,7 +311,7 @@ ORDER BY $OUT .= loadTemplate('sponsor_action', true, $content); } else { // No sub menus active - $OUT .= loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_SUB_MENUS_ACTIVE--}'); + $OUT .= displayMessage('{--SPONSOR_NO_SUB_MENUS_ACTIVE--}', true); } // Free memory @@ -319,7 +319,7 @@ ORDER BY } // END - while } else { // No main menus active - $OUT .= loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}'); + $OUT .= displayMessage('{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}', true); } // Free memory @@ -341,7 +341,7 @@ function addSponsorContent ($what) { loadIncludeOnce($INC); } else { // File not found - $GLOBALS['sponsor_output'] .= loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_CONTENT_404', $what)); + $GLOBALS['sponsor_output'] .= displayMessage(getMaskedMessage('SPONSOR_CONTENT_404', $what), true); } // Return content diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index c405600bdc..fa1dbf2336 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -457,7 +457,7 @@ function doNewUserPassword ($email, $userid) { sendEmail($userid, '{--GUEST_NEW_PASSWORD--}', $message); // Output note to user - loadTemplate('admin_settings_saved', false, '{--GUEST_NEW_PASSWORD_SEND--}'); + displayMessage('{--GUEST_NEW_PASSWORD_SEND--}'); } else { // Account is locked or unconfirmed $errorCode = generateErrorCodeFromUserStatus($status); @@ -467,7 +467,7 @@ function doNewUserPassword ($email, $userid) { } } else { // id or email is wrong - loadTemplate('admin_settings_saved', false, '{--GUEST_WRONG_ID_EMAIL--}'); + displayMessage('{--GUEST_WRONG_ID_EMAIL--}'); } // Return the error code @@ -646,7 +646,7 @@ LIMIT 1", } // Load template - loadTemplate('admin_settings_saved', false, $content['message']); + displayMessage($content['message']); } // Does resend the user's confirmation link for given email address @@ -673,7 +673,7 @@ function doResendUserConfirmationLink ($email) { } // END - if // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // Get a message (somewhat translation) from user status for confirmation link. diff --git a/inc/load_config.php b/inc/load_config.php index 88bdeb7f7d..9cce5eac41 100644 --- a/inc/load_config.php +++ b/inc/load_config.php @@ -94,7 +94,7 @@ if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallation } } elseif ((!isInstalling()) && (!isInstallationPhase()) && (empty($GLOBALS['mysql']['password'])) && (getConfig('WARN_NO_PASS') == 'Y')) { // No database password entered - loadTemplate('admin_settings_saved', false, '
{--MAILER_WARNING--}:
{--WARN_NULL_PASSWORD--}'); + displayMessage('
{--MAILER_WARNING--}:
{--WARN_NULL_PASSWORD--}'); } // [EOF] diff --git a/inc/modules/admin.php b/inc/modules/admin.php index ad48308d35..9068e4536a 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -173,7 +173,7 @@ if (!isAdminRegistered()) { } // END - if // Output message in seperate template - loadTemplate('admin_settings_saved', false, '{--ADMIN_ACCOUNT_NOT_REGISTERED_YET--}'); + displayMessage('{--ADMIN_ACCOUNT_NOT_REGISTERED_YET--}'); // Load register template loadTemplate('admin_reg_form', false, $content); @@ -182,7 +182,7 @@ if (!isAdminRegistered()) { // Is the form submitted? if ((isPostRequestParameterSet('send_link')) && (isPostRequestParameterSet('email'))) { // Output result - loadTemplate('admin_settings_saved', false, sendAdminPasswordResetLink(postRequestParameter('email'))); + displayMessage(sendAdminPasswordResetLink(postRequestParameter('email'))); } elseif (isGetRequestParameterSet('hash')) { // Output form for hash validation loadTemplate('admin_validate_reset_hash_form', false, getRequestParameter('hash')); @@ -202,7 +202,7 @@ if (!isAdminRegistered()) { loadTemplate('admin_reset_password_form', false, $content); } else { // Cannot validate the login data and hash - loadTemplate('admin_settings_saved', false, '{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED--}'); + displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED--}'); } } elseif ((isPostRequestParameterSet('reset_pass')) && (isPostRequestParameterSet('hash')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('pass1')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) { // Okay, we shall the admin password here. So first revalidate the hash @@ -211,7 +211,7 @@ if (!isAdminRegistered()) { loadTemplate('admin_reset_password_done', false, doResetAdminPassword(postRequestParameter('login'), postRequestParameter('pass1'))); } else { // Validation failed - loadTemplate('admin_settings_saved', false, '{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2--}'); + displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2--}'); } } else { // Output reset password form @@ -228,7 +228,7 @@ if (!isAdminRegistered()) { // Registration of first admin is done if (getRequestParameter('register') == 'done') { // Regisration done! - loadTemplate('admin_settings_saved', false, '{--ADMIN_REGISTER_DONE--}'); + displayMessage('{--ADMIN_REGISTER_DONE--}'); } // END - if } // END - if @@ -417,13 +417,13 @@ if (!isAdminRegistered()) { case '404': // Administrator login not found setPostRequestParameter('ok', $ret); - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_ACCOUNT_404', getCurrentAdminId())); + displayMessage(getMaskedMessage('ADMIN_ACCOUNT_404', getCurrentAdminId())); destroyAdminSession(); break; case 'password': // Wrong password setPostRequestParameter('ok', $ret); - loadTemplate('admin_settings_saved', false, '{--WRONG_PASS--}'); + displayMessage('{--WRONG_PASS--}'); destroyAdminSession(); break; diff --git a/inc/modules/admin/action-task.php b/inc/modules/admin/action-task.php index 0177bf1a87..6998ed2788 100644 --- a/inc/modules/admin/action-task.php +++ b/inc/modules/admin/action-task.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('task')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('task')); + displayMessage(generateExtensionInactiveNotInstalledMessage('task')); return; } // END - if diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index f5a70264af..1d19c8f09a 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -576,7 +576,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement rebuildCache('config', 'config'); // Settings saved, so display message? - if ($displayMessage === true) loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + if ($displayMessage === true) displayMessage('{--SETTINGS_SAVED--}'); // Return affected rows return $affected; @@ -727,10 +727,10 @@ function adminChangeActivationStatus ($IDs, $table, $row, $idRow = 'id') { } // END - foreach // Output status - loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $count, count($IDs))); + displayMessage(sprintf(getMessage('ADMIN_STATUS_CHANGED'), $count, count($IDs))); } else { // Nothing selected! - loadTemplate('admin_settings_saved', false, '{--ADMIN_NOTHING_SELECTED_CHANGE--}'); + displayMessage('{--ADMIN_NOTHING_SELECTED_CHANGE--}'); } } @@ -961,10 +961,10 @@ function adminDeleteEntriesConfirm ($IDs, $table, $columns = array(), $filterFun // Was this fine? if (SQL_AFFECTEDROWS() == count($IDs)) { // All deleted - loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_ENTRIES_REMOVED--}'); + displayMessage('{--ADMIN_ALL_ENTRIES_REMOVED--}'); } else { // Some are still there :( - loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs))); + displayMessage(sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs))); } } else { // List for deletion confirmation @@ -1050,10 +1050,10 @@ function adminEditEntriesConfirm ($IDs, $table, $columns = array(), $filterFunct // Was this fine? if ($affected == count($IDs)) { // All deleted - loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_ENTRIES_EDITED--}'); + displayMessage('{--ADMIN_ALL_ENTRIES_EDITED--}'); } else { // Some are still there :( - loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs))); + displayMessage(sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs))); } } else { // List for editing @@ -1352,7 +1352,7 @@ function doVerifyExpertSettings () { // Output message for other status than ask/agreed if (($return != 'ask') && ($return != 'agreed')) { // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_EXPERT_SETTINGS_STATUS_' . strtoupper($return) . '--}'); + displayMessage('{--ADMIN_EXPERT_SETTINGS_STATUS_' . strtoupper($return) . '--}'); } // END - if // Return status @@ -1484,13 +1484,13 @@ function adminProcessMenuEditForm ($type, $subMenu) { default: // Unexpected action logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNKNOWN_OKAY', postRequestParameter('ok'))); + displayMessage(getMaskedMessage('ADMIN_UNKNOWN_OKAY', postRequestParameter('ok'))); break; } // END - switch } // END - foreach // Load template - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + displayMessage('{--SETTINGS_SAVED--}'); } // Handle weightning diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 1fe4ddca42..caa0096616 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -205,7 +205,7 @@ LIMIT 1", // Is this non-productive? if (isExtensionProductive() === false) { // Issue warning - $taskData['text'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('ADMIN_EXTENSION_IS_NON_PRODUCTIVE', $ext_name)) . $taskData['text']; + $taskData['text'] = displayMessage(getMaskedMessage('ADMIN_EXTENSION_IS_NON_PRODUCTIVE', $ext_name), true) . $taskData['text']; } // END - if // Set current extension name diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 54edc1b33b..b33752ae4b 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -82,7 +82,7 @@ if (getRequestParameter('userid') == 'all') { SQL_FREERESULT($result_main); // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_POINTS_ADDED--}'); + displayMessage('{--ADMIN_ALL_POINTS_ADDED--}'); } else { // Display form add points loadTemplate('admin_add_points_all'); @@ -107,7 +107,7 @@ if (getRequestParameter('userid') == 'all') { $message = loadEmailTemplate('add-points', $content, bigintval(getRequestParameter('userid'))); sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_ADD_SUBJECT--}', $message); - loadTemplate('admin_settings_saved', false, '{--ADMIN_POINTS_ADDED--}'); + displayMessage('{--ADMIN_POINTS_ADDED--}'); } else { // Prepare content $content['userid'] = bigintval(getRequestParameter('userid')); diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index f7ef95f333..22bfb3beae 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -76,14 +76,14 @@ VALUES (%s,'%s','%s','%s',%s,%s,'%s','%s','%s')", redirectToUrl('modules.php?module=admin&what=config_rallye_prices&rallye='.$id); } else { // Problem detected... - loadTemplate('admin_settings_saved', false, '{--RALLYE_PROBLEM_CREATE--}'); + displayMessage('{--RALLYE_PROBLEM_CREATE--}'); } } else { // Free memory SQL_FREERESULT($result); // Overlapping detected - loadTemplate('admin_settings_saved', false, '{--RALLYE_OVERLAP_TIMES--}'); + displayMessage('{--RALLYE_OVERLAP_TIMES--}'); } } // END - if diff --git a/inc/modules/admin/what-add_sponsor.php b/inc/modules/admin/what-add_sponsor.php index 73ac1ff90f..d7ee7717c2 100644 --- a/inc/modules/admin/what-add_sponsor.php +++ b/inc/modules/admin/what-add_sponsor.php @@ -51,7 +51,7 @@ if (isFormSent()) { ); // Save sponsor in database - loadTemplate('admin_settings_saved', false, doProcessSponsorFormRequest($messageArray)); + displayMessage(doProcessSponsorFormRequest($messageArray)); } else { // Output form loadTemplate('admin_add_sponsor'); diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index 28871d13e3..ba88edb47d 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -58,10 +58,10 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('url'))) { // Then add this URL if (SURFBAR_ADMIN_ADD_URL($postData['url'], $postData['limit'], $postData['reload'])) { // URL was added - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_URL_ADDED--}'); + displayMessage('{--ADMIN_SURFBAR_URL_ADDED--}'); } else { // Not added - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_URL_NOT_ADDED--}'); + displayMessage('{--ADMIN_SURFBAR_URL_NOT_ADDED--}'); } } // END - if diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index c996df5270..812d82357d 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -183,10 +183,10 @@ if (!isFormSent()) { ), __FILE__, __LINE__ ); } - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + displayMessage('{--SETTINGS_SAVED--}'); } else { // Is demo login! - loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}'); + displayMessage('{--SETTINGS_NOT_SAVED--}'); } // [EOF] diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 3bd588daa4..e2db9fd343 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -166,7 +166,7 @@ LIMIT 1", } // Load template - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + displayMessage('{--SETTINGS_SAVED--}'); break; case 'delete': // Delete menu @@ -176,12 +176,12 @@ LIMIT 1", } // END - foreach // Load template - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + displayMessage('{--SETTINGS_SAVED--}'); break; default: // Unexpected action logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNKNOWN_OKAY', postRequestParameter('ok'))); + displayMessage(getMaskedMessage('ADMIN_UNKNOWN_OKAY', postRequestParameter('ok'))); break; } } else { @@ -234,7 +234,7 @@ LIMIT 1", loadTemplate('admin_edit_admin_menu', false, $content); } else { // Menu entries are missing... (???) - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MENUS_FOUND--}'); + displayMessage('{--ADMIN_NO_MENUS_FOUND--}'); } } diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index dfe1265959..07055e416c 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -56,7 +56,7 @@ if (isFormSent('add')) { $FORM = false; // Admin login saved - loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ADD_DONE--}'); + displayMessage('{--ADMIN_ADMINS_ADD_DONE--}'); // Run filter chain runFilterChain('post_admin_added', postRequestArray()); diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index ef8283a88a..b4783cadbf 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -59,7 +59,7 @@ if ((isFormSent()) && (isGetRequestParameterSet('admin'))) { } // Mail / message dropped - loadTemplate('admin_settings_saved', false, '{--ADMINS_ADMIN_CONTACTED--}'); + displayMessage('{--ADMINS_ADMIN_CONTACTED--}'); } elseif (isGetRequestParameterSet('admin')) { // Load contact form template $content['admin'] = getRequestParameter('admin'); @@ -76,7 +76,7 @@ if ((isFormSent()) && (isGetRequestParameterSet('admin'))) { loadTemplate('admin_admins_contct_form', false, $content); } else { // Please select an admin! - loadTemplate('admin_settings_saved', false, '{--ADMINS_SELECT_ADMIN--}'); + displayMessage('{--ADMINS_SELECT_ADMIN--}'); } // [EOF] diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 8fe0f649e4..ca5ff34a7a 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -98,7 +98,7 @@ if (isFormSent('edit')) { loadTemplate('admin_admins_mails_edit', false, $rows); } else { // Nothing selected - loadTemplate('admin_settings_saved', false, '{--ADMINS_NO_MAIL_CHECKED--}'); + displayMessage('{--ADMINS_NO_MAIL_CHECKED--}'); } } else { // Load all assigned mails @@ -178,7 +178,7 @@ ORDER BY loadTemplate('admin_admins_mails_list', false, $OUT); } else { // No entries found - loadTemplate('admin_settings_saved', false, '{--ADMINS_MAILS_NO_ENTRIES--}'); + displayMessage('{--ADMINS_MAILS_NO_ENTRIES--}'); } } diff --git a/inc/modules/admin/what-cache_stats.php b/inc/modules/admin/what-cache_stats.php index dbfc9d5587..324e2f0270 100644 --- a/inc/modules/admin/what-cache_stats.php +++ b/inc/modules/admin/what-cache_stats.php @@ -55,7 +55,7 @@ if (ifStatsAreEnabled()) { loadTemplate('admin_cache_stats', false, $content); } else { // Deactivated, which is good for performance - loadTemplate('admin_settings_saved', false, '{--ADMIN_CACHE_DB_STATS_DEACTIVATED--}'); + displayMessage('{--ADMIN_CACHE_DB_STATS_DEACTIVATED--}'); } // [EOF] diff --git a/inc/modules/admin/what-chk_regs.php b/inc/modules/admin/what-chk_regs.php index b2ccd46992..2237a90812 100644 --- a/inc/modules/admin/what-chk_regs.php +++ b/inc/modules/admin/what-chk_regs.php @@ -77,7 +77,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_chk_reg', false, $OUT); } else { // No registrations left - or all has confirmed their email address... :-) - loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_CONFIRMED_EMAIL--}'); + displayMessage('{--ADMIN_ALL_CONFIRMED_EMAIL--}'); } // Free memory diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 74845c013b..0dce8b6a8e 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -101,7 +101,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { } // END - if // Entries changed - loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ENTRIES_CHANGED--}'); + displayMessage('{--ADMIN_ADMINS_ENTRIES_CHANGED--}'); } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete ACLs $OUT = ''; @@ -135,7 +135,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { } // END - if // Entries deleted - loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ENTRIES_DELETED--}'); + displayMessage('{--ADMIN_ADMINS_ENTRIES_DELETED--}'); } elseif (isFormSent('add')) { // Check if everything is fine... $mode = getAdminDefaultAcl(bigintval(postRequestParameter('admin_id'))); @@ -191,7 +191,7 @@ VALUES ('%s','%s','%s','%s')", } // Display message - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } else { // List all ACLs $result_acls = SQL_QUERY('SELECT `id`, `admin_id`, `action_menu`, `what_menu`, `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` ORDER BY `admin_id` ASC, `id` ASC', __FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index dec8982086..a81bf8c1d6 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -69,7 +69,7 @@ if (isFormSent('add')) { SQL_FREERESULT($result); // Display message - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } elseif ((isFormSent()) && (isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))) { // Change or delete categories... $TEXT = ''; @@ -107,7 +107,7 @@ if (isFormSent('add')) { if (isset($TEXT)) { // Display message - loadTemplate('admin_settings_saved', false, $TEXT); + displayMessage($TEXT); } // END - if } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete categories diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index edd6953f53..ce0007636b 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -64,7 +64,7 @@ if (isPostRequestParameterSet('add_max')) { SQL_FREERESULT($result); // Display message - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } elseif ((isFormSent()) && (isGetRequestParameterSet('do'))) { // Change or delete entries... $TEXT = ''; @@ -94,7 +94,7 @@ if (isPostRequestParameterSet('add_max')) { if (isset($TEXT)) { // Display message - loadTemplate('admin_settings_saved', false, $TEXT); + displayMessage($TEXT); } // END - if } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete entries diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index 8c01688042..c025ddcbb7 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -54,7 +54,7 @@ switch ($sub) { adminSaveSettingsFromPostData(); // Display continue link - loadTemplate('admin_settings_saved', false, '{--ADMIN_CONTINUE_TO_CONFIG--}'); + displayMessage('{--ADMIN_CONTINUE_TO_CONFIG--}'); } else { // Prepare data for the template $content = array_fill(-1, 60, ''); diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index d582c3bc95..354fa37f7c 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -76,7 +76,7 @@ if (isFormSent('edit')) { loadTemplate('admin_edit_mods', false, $OUT); } else { // Nothing selected - loadTemplate('admin_settings_saved', false, '{--ADMIN_MODS_NOTHING_SELECTED--}'); + displayMessage('{--ADMIN_MODS_NOTHING_SELECTED--}'); // Remove maybe confusing data unsetPostRequestParameter('edit'); @@ -112,7 +112,7 @@ if (isFormSent('edit')) { } // END - if // Entries updated - loadTemplate('admin_settings_saved', false, '{--ADMIN_MODS_CHANGED--}'); + displayMessage('{--ADMIN_MODS_CHANGED--}'); } if (!ifPostContainsSelections()) { diff --git a/inc/modules/admin/what-config_networks.php b/inc/modules/admin/what-config_networks.php index 44d87c3a6f..ccf242dded 100644 --- a/inc/modules/admin/what-config_networks.php +++ b/inc/modules/admin/what-config_networks.php @@ -87,7 +87,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_network_config', false, $OUT); } else { // Please setup some networks first - loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_DATA_MISSING--}'); + displayMessage('{--ADMIN_NETWORK_DATA_MISSING--}'); } // Free result SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index e0f12db2ab..f013cb1ac1 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('other')) { // Missing extension! - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('other')); + displayMessage(generateExtensionInactiveNotInstalledMessage('other')); return; } // END - if @@ -78,11 +78,11 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Time selection boxes - $content['online_timeout'] = createTimeSelections(getConfig('online_timeout'), 'ip_timeout' , 'ms'); - $content['url_tlock'] = createTimeSelections(getConfig('url_tlock') , 'url_tlock' , 'WDh'); - $content['profile_lock'] = createTimeSelections(getConfig('profile_lock') , 'profile_lock' , 'WDh'); - $content['profile_update'] = createTimeSelections(getConfig('profile_update'), 'profile_update' , 'YM'); - $content['profile_reupdate'] = createTimeSelections(getConfig('resend_profile_update') , 'resend_profile_update', 'MWD'); + $content['online_timeout'] = createTimeSelections(getOnlineTimeout() , 'ip_timeout' , 'ms'); + $content['url_tlock'] = createTimeSelections(getUrlTlock() , 'url_tlock' , 'WDh'); + $content['profile_lock'] = createTimeSelections(getProfileLock() , 'profile_lock' , 'WDh'); + $content['profile_update'] = createTimeSelections(getProfileUpdate() , 'profile_update' , 'YM'); + $content['profile_reupdate'] = createTimeSelections(getResendProfileUpdate(), 'resend_profile_update', 'MWD'); // Prepare more Y/N selections foreach (array('show_points_unconfirmed','show_timings','youre_here','member_menu','guest_menu','order_multi_page','autosend_active','send_prof_update','admin_notify','display_debug_sqls','stats_enabled') as $entry) { diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 2f9885d10a..d3b77e7d5c 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -180,7 +180,7 @@ LIMIT 1", if (!empty($message)) { // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // Payout types @@ -209,10 +209,10 @@ if ((!SQL_HASZERONUMS($result_type)) && ($display)) { // Does your members request payouts? if ((!SQL_HASZERONUMS($result_mem)) && ($display)) { // Members has requested payouts - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_LIST_REQUESTS--}'); + displayMessage('{--ADMIN_PAYOUT_LIST_REQUESTS--}'); } elseif ($display) { // No member requests so far - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_NO_MEMBER_REQUESTS--}'); + displayMessage('{--ADMIN_PAYOUT_NO_MEMBER_REQUESTS--}'); } // Free result diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 9564ac37ae..3ef48975ae 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -162,7 +162,7 @@ WHERE // Shall we display a message? if (!empty($message)) { // When do so... - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if } elseif (getRequestParameter('sub') == 'settings') { // Setup some settings like direct pay and so on diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index fff48f3ac4..f8f5bbb1e9 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -60,7 +60,7 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Failed to test the API! - loadTemplate('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE()); + displayMessage(GET_PRIMERA_ERROR_MESSAGE()); } } else { // Load template diff --git a/inc/modules/admin/what-config_proxy.php b/inc/modules/admin/what-config_proxy.php index c86f72872a..be45921667 100644 --- a/inc/modules/admin/what-config_proxy.php +++ b/inc/modules/admin/what-config_proxy.php @@ -50,7 +50,7 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Invalid! - loadTemplate('admin_settings_saved', false, '{--ADMIN_PROXY_SETTINGS_INVALID--}'); + displayMessage('{--ADMIN_PROXY_SETTINGS_INVALID--}'); } } else { // Load template diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index baf1ab9ed2..fb49ad8711 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -64,13 +64,13 @@ if (isGetRequestParameterSet('rallye')) { postRequestParameter('points'), postRequestParameter('info') ), __FILE__, __LINE__); - loadTemplate('admin_settings_saved', false, '{--RALLYE_PRICE_LEVEL_SAVED--}'); + displayMessage('{--RALLYE_PRICE_LEVEL_SAVED--}'); } else { // Free memory SQL_FREERESULT($result); // Price level found - loadTemplate('admin_settings_saved', false, '{--RALLYE_PRICE_ALREADY_FOUND--}'); + displayMessage('{--RALLYE_PRICE_ALREADY_FOUND--}'); } } } elseif (isFormSent('remove')) { @@ -83,9 +83,9 @@ if (isGetRequestParameterSet('rallye')) { } // END - foreach // Output message - loadTemplate('admin_settings_saved', false, '{--RALLYE_ENTRIES_DELETED--}'); + displayMessage('{--RALLYE_ENTRIES_DELETED--}'); } else { - loadTemplate('admin_settings_saved', false, '{--RALLYE_ENTRIES_NOT_DELETED--}'); + displayMessage('{--RALLYE_ENTRIES_NOT_DELETED--}'); } } elseif (isFormSent('change')) { // Change entries @@ -114,7 +114,7 @@ LIMIT 1", } // Output message - loadTemplate('admin_settings_saved', false, '{--RALLYE_ENTRIES_CHANGED--}'); + displayMessage('{--RALLYE_ENTRIES_CHANGED--}'); } if (isFormSent('edit')) { @@ -147,7 +147,7 @@ LIMIT 1", } else { // Nothing selected $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } } elseif (isFormSent('delete')) { // Check if at last one line is selected @@ -174,7 +174,7 @@ LIMIT 1", } else { // Nothing selected $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } } else { // a rallye was selected, so check if there are already prices assigned... @@ -244,7 +244,7 @@ ORDER BY loadTemplate('admin_list_rallye_prices', false, $OUT); } else { // No rallyes setup so far - loadTemplate('admin_settings_saved', false, '{--RALLYE_NO_RALLYES_SETUP--}'); + displayMessage('{--RALLYE_NO_RALLYES_SETUP--}'); } } diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index e4a6b22fc6..4307aa33b6 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -59,7 +59,7 @@ if (isFormSent()) { } // END - foreach // Output message for updated entries - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_REGISTER_CHANGES_SAVED', $count)); + displayMessage(getMaskedMessage('ADMIN_REGISTER_CHANGES_SAVED', $count)); } // END - if // List all register values diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index ebdc3db2bf..37c010d4ab 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -50,7 +50,7 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Invalid! - loadTemplate('admin_settings_saved', false, '{--ADMIN_SESSION_SAVE_PATH_INVALID--}'); + displayMessage('{--ADMIN_SESSION_SAVE_PATH_INVALID--}'); } } else { // Load template diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 4775e14fad..7d5a3ece21 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -62,7 +62,7 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Failed to test the API! - loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); + displayMessage(GET_WERNIS_ERROR_MESSAGE()); } } else { // Prepare data for template output diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index af30365445..c874ba2a4a 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('yoomedia')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('yoomedia')); + displayMessage(generateExtensionInactiveNotInstalledMessage('yoomedia')); return; } // END - if @@ -56,7 +56,7 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Config not saved - loadTemplate('admin_settings_saved', false, '{--ADMIN_CONFIG_YOOMEDIA_TEST_FAILED--}'); + displayMessage('{--ADMIN_CONFIG_YOOMEDIA_TEST_FAILED--}'); } } else { // Erotic selection diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index a032f9a8c3..a6d57eddf3 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -99,7 +99,7 @@ LIMIT 1", // Shall we pay the points back to the user? if ($totalPoints == 0) { // No points repayed! - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_POINTS_REPAYED--}'); + displayMessage('{--ADMIN_NO_POINTS_REPAYED--}'); } elseif (getConfig('repay_deleted_mails') != 'SHRED') { //* DEBUG: */ debugOutput($stats_id . ':' . $totalPoints . '/' . $links . '/' . $content['price']); // Shall we payback to user or jackpot? @@ -115,18 +115,18 @@ LIMIT 1", // Output message if (getConfig('repay_deleted_mails') == 'REPAY') { // Repayed - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_REPAYED', + displayMessage(getMaskedMessage('ADMIN_POINTS_REPAYED', '{%pipe,translateComma=' . $totalPoints . '%}' )); } else { // To jackpot - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_TO_JACKPOT', + displayMessage(getMaskedMessage('ADMIN_POINTS_TO_JACKPOT', '{%pipe,translateComma=' . $totalPoints . '%}' )); } } else { // Points shredded! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_SHREDDED', '{%pipe,translateComma=' . $totalPoints . '%}')); + displayMessage(getMaskedMessage('ADMIN_POINTS_SHREDDED', '{%pipe,translateComma=' . $totalPoints . '%}')); } // Remove links from DB @@ -135,7 +135,7 @@ LIMIT 1", $count += SQL_AFFECTEDROWS(); // Load template for link - loadTemplate('admin_settings_saved', false, '{--ADMIN_REMOVE_STATS_ENTRY--}'); + displayMessage('{--ADMIN_REMOVE_STATS_ENTRY--}'); } // END - if // Free the result @@ -150,7 +150,7 @@ LIMIT 1", outputHtml(getMaskedMessage('ADMIN_DELETED_MAILS_COUNT', $count)); } else { // Mail already deleted! - loadTemplate('admin_settings_saved', false, '{--ADMIN_NORMAL_MAIL_ALREADY_DELETED--}'); + displayMessage('{--ADMIN_NORMAL_MAIL_ALREADY_DELETED--}'); } // Free result @@ -161,7 +161,7 @@ LIMIT 1", array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_USER_STATS_REMOVED--}'); + displayMessage('{--ADMIN_USER_STATS_REMOVED--}'); } elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) { // Load data from bonus mail $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", @@ -194,7 +194,7 @@ LIMIT 1", loadTemplate('admin_delete_email_bonus', false, $content); } else { // Mail already deleted! - loadTemplate('admin_settings_saved', false, '{--ADMIN_BONUS_MAIL_ALREADY_DELETED--}'); + displayMessage('{--ADMIN_BONUS_MAIL_ALREADY_DELETED--}'); } // Free result @@ -228,14 +228,14 @@ LIMIT 1", loadTemplate('admin_delete_email_notify', false, $content); } else { // Mail already deleted! - loadTemplate('admin_settings_saved', false, '{--ADMIN_NOTIFY_MAIL_ALREADY_DELETED--}'); + displayMessage('{--ADMIN_NOTIFY_MAIL_ALREADY_DELETED--}'); } // Free result SQL_FREERESULT($result); } else { // No mail orders fond - loadTemplate('admin_settings_saved', false, '{--ADMIN_WRONG_CALL--}'); + displayMessage('{--ADMIN_WRONG_CALL--}'); } // [EOF] diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index 302999f7e5..2c8ae73b55 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -89,7 +89,7 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Free result SQL_FREERESULT($result); } // END - foreach - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_HOLIDAY_MULTI_DELETE', $count)); + displayMessage(getMaskedMessage('ADMIN_HOLIDAY_MULTI_DELETE', $count)); } elseif (isGetRequestParameterSet('userid')) { // Set default message $message = '{--ADMIN_HOLIDAY_SINGLE_404--}'; @@ -126,7 +126,7 @@ LIMIT 1", array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); SQL_FREERESULT($result_load); // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } else { // Add member selection box addMemberSelectionBox(); diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index 8001fc0bec..25521563b1 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -69,7 +69,7 @@ if (isGetRequestParameterSet('id')) { array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Output message - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_DELETED', bigintval(getRequestParameter('id')))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_DELETED', bigintval(getRequestParameter('id')))); } elseif (isPostRequestParameterSet('no')) { // Do not delete him... redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(getRequestParameter('id'))); @@ -85,14 +85,14 @@ if (isGetRequestParameterSet('id')) { } } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } // Free result SQL_FREERESULT($result); } else { // Not called by what-list_sponsor.php - loadTemplate('admin_settings_saved', false, '{--ADMIN_CALL_NOT_DIRECTLY--}'); + displayMessage('{--ADMIN_CALL_NOT_DIRECTLY--}'); } // [EOF] diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index f794865357..756aa130f2 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -91,7 +91,7 @@ if (!SQL_HASZERONUMS($result)) { // Nothing for in and out $OUT = ' - ' . loadTemplate('admin_settings_saved', true, '{--TRANSFER_NO_INOUT_TRANSFERS--}') . ' + ' . displayMessage('{--TRANSFER_NO_INOUT_TRANSFERS--}', true) . ' '; } diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 969baaf08e..2f84947b9e 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -51,7 +51,7 @@ if ((isFormSent()) || ((isFormSent('delete')) && (isPostRequestParameterSet('rea deleteUserAccount(getRequestParameter('userid'), postRequestParameter('reason')); // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_DELETE_COMPLETED--}'); + displayMessage('{--ADMIN_DELETE_COMPLETED--}'); } else { // Account does not exists! loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid')))); diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 383782306f..7147fc88de 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -103,7 +103,7 @@ LIMIT 1", } // Display message - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } else { // There are mail orders available $OUT = ''; @@ -120,7 +120,7 @@ LIMIT 1", } } else { // No mail orders left in pool - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MAILS_IN_POOL--}'); + displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); } // [EOF] diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index a31c5c2e2d..d4e519a238 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -162,7 +162,7 @@ LIMIT 1", if (!empty($message)) { // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if } elseif (isFileReadable(sprintf("%stemplates/%s/html/admin/%s.tpl", getPath(), getLanguage(), $TPL))) { // Create mailto link @@ -172,18 +172,18 @@ LIMIT 1", loadTemplate($TPL, false, $content); } else { // Template not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestParameter('mode'))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestParameter('mode'))); } } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } // Free result SQL_FREERESULT($result_main); } else { // Not called by what-list_sponsor.php - loadTemplate('admin_settings_saved', false, '{--ADMIN_CALL_NOT_DIRECTLY--}'); + displayMessage('{--ADMIN_CALL_NOT_DIRECTLY--}'); } // [EOF] diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 16f0f75f2c..bb2904d744 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -116,7 +116,7 @@ LIMIT 1", } // Load template - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } else { // Load entry $content = SQL_FETCHARRAY($result_main); diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 7343f0e40d..d6338d6fe1 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -115,7 +115,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_email_archiv', false, $content); } else { // No mail orders fond - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MAILS_IN_POOL--}'); + displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); } // Free memory diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 97e547a81e..182525c71a 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -46,7 +46,7 @@ addYouAreHereLink('admin', __FILE__); // Is 'sql_patches' updated? if (!isExtensionInstalledAndNewer('sql_patches', '0.7.4')) { // No, abort here - loadTemplate('admin_settings_saved', false, generateExtensionOutdatedMessage('sql_patches', '0.7.4')); + displayMessage(generateExtensionOutdatedMessage('sql_patches', '0.7.4')); return false; } // END - if @@ -229,7 +229,7 @@ if ((isExtensionActive('bonus')) && (empty($WHO))) { if ($MAIL === false) { // No mail orders fond - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MAILS_IN_POOL--}'); + displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); } // END - if // [EOF] diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index bfba5b7929..95ab938514 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -58,7 +58,7 @@ if (isGetRequestParameterSet('reg_ext')) { // Shall we keep the extension always active? if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)] == 'Y') && ($ext_active == 'Y')) { // Keep this extension active! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($ext_id))); + displayMessage(getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($ext_id))); } else { // Deactivation is default $active = 'N'; @@ -242,7 +242,7 @@ if (isGetRequestParameterSet('reg_ext')) { $do = 'demo'; } elseif (isGetRequestParameterSet('registered')) { // Extensions changed - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTERED', getExtensionName(getRequestParameter('registered')))); + displayMessage(getMaskedMessage('ADMIN_EXTENSION_REGISTERED', getExtensionName(getRequestParameter('registered')))); // Show next link if (isExtensionActive('task')) { @@ -258,13 +258,13 @@ if (isGetRequestParameterSet('reg_ext')) { } } elseif (isGetRequestParameterSet('changed')) { // Extensions changed - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_CHANGED', bigintval(getRequestParameter('changed')))); + displayMessage(getMaskedMessage('ADMIN_EXTENSION_CHANGED', bigintval(getRequestParameter('changed')))); } elseif (isGetRequestParameterSet('edited')) { // Extensions changed - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_EDITED', bigintval(getRequestParameter('edited')))); + displayMessage(getMaskedMessage('ADMIN_EXTENSION_EDITED', bigintval(getRequestParameter('edited')))); } elseif (isGetRequestParameterSet('removed')) { // Extensions changed - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSIONS_REMOVED', bigintval(getRequestParameter('removed')))); + displayMessage(getMaskedMessage('ADMIN_EXTENSIONS_REMOVED', bigintval(getRequestParameter('removed')))); } // Shall we display active/inactive extensions? @@ -319,7 +319,7 @@ ORDER BY loadTemplate('admin_extensions', false, $OUT); } else { // No extensions are registered - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_EXTENSION_REGISTERED--}'); + displayMessage('{--ADMIN_NO_EXTENSION_REGISTERED--}'); } break; @@ -356,7 +356,7 @@ ORDER BY redirectToUrl('modules.php?module=admin&what=extensions&registered=' . getExtensionId($ext_name)); } else { // Errors detected! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_NOT_REGISTERED', $ext_name)); + displayMessage(getMaskedMessage('ADMIN_EXTENSION_NOT_REGISTERED', $ext_name)); } // Do we need to update cache file? @@ -370,30 +370,30 @@ ORDER BY } // END - if } elseif (isExtensionInstalled($ext_name)) { // Notify the admin that we have a problem here... - loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ALREADY--}'); + displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ALREADY--}'); } else { // Notify the admin that we have a problem here... - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTRATION_FAILED_404', $ext_name)); + displayMessage(getMaskedMessage('ADMIN_EXTENSION_REGISTRATION_FAILED_404', $ext_name)); } } else { // Motify the admin that we have a problem here... - loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_DEPRECATED--}'); + displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_DEPRECATED--}'); } } else { // Extension was not found in task management - loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ID_404--}'); + displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ID_404--}'); } } elseif ($numTasks == '0') { // No longer assigned or old task - loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ASSIGED--}'); + displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ASSIGED--}'); } else { // id is invalid - loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_INVALID--}'); + displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_INVALID--}'); } break; case 'demo': - loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}'); + displayMessage('{--SETTINGS_NOT_SAVED--}'); break; } // END - switch diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 20c957f187..33da7e1b78 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -200,10 +200,10 @@ ORDER BY `sort` ASC", postRequestParameter('active'), ), __FILE__, __LINE__); } - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + displayMessage('{--SETTINGS_SAVED--}'); } else { // Demo mode! - loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}'); + displayMessage('{--SETTINGS_NOT_SAVED--}'); } // [EOF] diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index 5465448686..eded88276c 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -242,7 +242,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() loadTemplate('admin_edit_guest_menu', false, $content); } else { // Menu entries are missing... (???) - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MENUS_FOUND--}'); + displayMessage('{--ADMIN_NO_MENUS_FOUND--}'); } } diff --git a/inc/modules/admin/what-list_autopurge.php b/inc/modules/admin/what-list_autopurge.php index b6b1952ccb..1aa19ca73b 100644 --- a/inc/modules/admin/what-list_autopurge.php +++ b/inc/modules/admin/what-list_autopurge.php @@ -94,7 +94,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_autopurge', false, $content); } else { // All members are active or you don't have any registered - loadTemplate('admin_settings_saved', false, '{--ADMIN_AUTOPURGE_ALL_ACTIVE--}'); + displayMessage('{--ADMIN_AUTOPURGE_ALL_ACTIVE--}'); } // [EOF] diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 4c5b0c112e..1097f84ce5 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -180,7 +180,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_bank_package', false, $OUT); } else { // No packages found - loadTemplate('admin_settings_saved', false, '{--ADMIN_BANK_NO_PACKAGES_FOUND--}'); + displayMessage('{--ADMIN_BANK_NO_PACKAGES_FOUND--}'); } // Free the result diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 32f99a1d22..f349aee801 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -50,7 +50,7 @@ if (isBegRallyeEnabled()) { $curr = getMonth() - 1; if (strlen($curr) == 1) $curr = '0' . $curr; updateConfiguration('last_month', $curr); - loadTemplate('admin_settings_saved', false, '{--ADMIN_BEG_WITHDRAW_PREPARED--}'); + displayMessage('{--ADMIN_BEG_WITHDRAW_PREPARED--}'); } // END - if // Autopurge installed? @@ -113,25 +113,25 @@ ORDER BY $content['withdraw_form'] = loadTemplate('admin_list_beg_form', true); } else { // Display message "no manual withdraw possible" - $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, '{--ADMIN_BEG_ALREADY_WITHDRAW--}'); + $content['withdraw_form'] = displayMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}', true); } // Prepare constant for timemark if (isExtensionActive('autopurge')) { $content['autopurge_timeout'] = generateDateTime(time() - getApInactiveSince(), 2); } else { - $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, generateExtensionInactiveNotInstalledMessage('autopurge')); + $content['autopurge_timeout'] = displayMessage(generateExtensionInactiveNotInstalledMessage('autopurge'), true); } // Load final template loadTemplate('admin_list_beg', false, $content); } else { // No one has joined the begging rallye... - loadTemplate('admin_settings_saved', false, '{--ADMIN_BEG_NO_RALLYE--}'); + displayMessage('{--ADMIN_BEG_NO_RALLYE--}'); } } else { // Rallye deactivated - loadTemplate('admin_settings_saved', false, '{--ADMIN_BEG_RALLYE_DEACTIVATED--}'); + displayMessage('{--ADMIN_BEG_RALLYE_DEACTIVATED--}'); } // [EOF] diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index cf13775287..0667f2b89c 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -50,7 +50,7 @@ if (isBonusRallyeActive()) { $curr = getMonth() - 1; if (strlen($curr) == 1) $curr = '0' . $curr; updateConfiguration('last_month', $curr); - loadTemplate('admin_settings_saved', false, '{--ADMIN_BONUS_WITHDRAW_PREPARED--}'); + displayMessage('{--ADMIN_BONUS_WITHDRAW_PREPARED--}'); } // END - if if (isExtensionInstalledAndNewer('bonus', '0.6.9')) { @@ -140,11 +140,11 @@ ORDER BY loadTemplate('admin_list_bonus', false, $content); } else { // No one has become an "activity bonus"... - loadTemplate('admin_settings_saved', false, '{--ADMIN_BONUS_NO_ACTIVE_RALLYE--}'); + displayMessage('{--ADMIN_BONUS_NO_ACTIVE_RALLYE--}'); } } else { // Aktive-Rallye not activated - loadTemplate('admin_settings_saved', false, '{--ADMIN_BONUS_RALLYE_DEACTIVATED--}'); + displayMessage('{--ADMIN_BONUS_RALLYE_DEACTIVATED--}'); } // [EOF] diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index 049e32fe16..d7881b9e51 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -97,7 +97,7 @@ if (isGetRequestParameterSet('userid')) { } } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', $content['userid'])); + displayMessage(getMaskedMessage('ADMIN_MEMBER_404', $content['userid'])); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 5f1dbc3334..05fe8420bd 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -68,7 +68,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest } // Display message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } elseif ((isFormSent('change')) && (isPostRequestParameterSet('id'))) { // Change all status adminChangeActivationStatus(postRequestParameter('id'), 'countries', 'is_active'); @@ -162,7 +162,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest runFilterChain('run_sqls'); // Display message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // Load currenty setup country codes to list diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 3f1d2ff689..a3883d9fb9 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -81,7 +81,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_holiday', false, $OUT); } else { // No holiday requests found - loadTemplate('admin_settings_saved', false, '{--ADMIN_HOLIDAY_NOTHING_FOUND--}'); + displayMessage('{--ADMIN_HOLIDAY_NOTHING_FOUND--}'); } // [EOF] diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index cd43aebdab..31a456a678 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('mailid')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mailid')); + displayMessage(generateExtensionInactiveNotInstalledMessage('mailid')); return; } // END - if @@ -76,7 +76,7 @@ if (isGetRequestParameterSet('userid')) { sendEmail(getUserData('email'), '{--ADMIN_DELETE_LINK_SUBJECT--}', $message); // Display message - loadTemplate('admin_settings_saved', false, '{--ADMIN_LINKS_DELETED--}'); + displayMessage('{--ADMIN_LINKS_DELETED--}'); } else { // Init variables $OUT = ''; @@ -161,11 +161,11 @@ if (isGetRequestParameterSet('userid')) { } } else { // No mails left to confirm - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_LINKS', bigintval(getRequestParameter('userid')))); + displayMessage(getMaskedMessage('ADMIN_MEMBER_LINKS', bigintval(getRequestParameter('userid')))); } } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid')))); + displayMessage(getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid')))); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_network_api_translation.php b/inc/modules/admin/what-list_network_api_translation.php index c66ad3d8a3..c83030e9fa 100644 --- a/inc/modules/admin/what-list_network_api_translation.php +++ b/inc/modules/admin/what-list_network_api_translation.php @@ -82,7 +82,7 @@ if (isGetRequestParameterSet('network')) { $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id')); // Display message - loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE--}'); + displayMessage('{--ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE--}'); } // END - if // Load all advert codes for given network @@ -123,7 +123,7 @@ ORDER BY loadTemplate('admin_list_network_api_translation', false, $OUT); } else { // No entries found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_API_TRANSLATION_404', $networkData['network_title'])); + displayMessage(getMaskedMessage('ADMIN_NETWORK_API_TRANSLATION_404', $networkData['network_title'])); } // Free result diff --git a/inc/modules/admin/what-list_network_params.php b/inc/modules/admin/what-list_network_params.php index f17f6cc7e7..99b2f1e578 100644 --- a/inc/modules/admin/what-list_network_params.php +++ b/inc/modules/admin/what-list_network_params.php @@ -80,7 +80,7 @@ if (isGetRequestParameterSet('network')) { $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id')); // Display message - loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE--}'); + displayMessage('{--ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE--}'); } // END - if // Load all advert types for given network @@ -121,7 +121,7 @@ ORDER BY loadTemplate('admin_list_network_params', false, $OUT); } else { // No entries found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_404', $networkData['network_title'])); + displayMessage(getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_404', $networkData['network_title'])); } // Free result diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index f2a25bc6e7..65580e0cf9 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -99,7 +99,7 @@ ORDER BY loadTemplate('admin_list_network_types', false, $OUT); } else { // No entries found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_404', $networkData['network_title'])); + displayMessage(getMaskedMessage('ADMIN_NETWORK_TYPES_404', $networkData['network_title'])); } // Free result diff --git a/inc/modules/admin/what-list_networks.php b/inc/modules/admin/what-list_networks.php index bf469c701d..3b533b0774 100644 --- a/inc/modules/admin/what-list_networks.php +++ b/inc/modules/admin/what-list_networks.php @@ -82,7 +82,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_networks', false, $OUT); } else { // Display a message that there are sponsor networks supported, yet - loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_NONE_SUPPORTED--}'); + displayMessage('{--ADMIN_NETWORK_NONE_SUPPORTED--}'); } // Free result diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index d7363b5087..73ef864cd1 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -67,7 +67,7 @@ ORDER BY $result_max = SQL_QUERY($SQL2, __FILE__, __LINE__); } else { // Bonus extension required! - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bonus')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bonus')); } // Create limitation line @@ -109,7 +109,7 @@ if ((isExtensionActive('bonus')) && (!SQL_HASZERONUMS($result_max)) && (!empty($ } } elseif ((SQL_NUMROWS($result_max) === 0) && (is_resource($result_max))) { // No notifications found - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_NOTIFICATIONS--}'); + displayMessage('{--ADMIN_NO_NOTIFICATIONS--}'); } // [EOF] diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 504dc1a075..593c030a52 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -60,7 +60,7 @@ if (isGetRequestParameterSet('pid')) { if (empty($taskId)) $taskId = '0'; } elseif ((empty($userid)) || ($userid == '0')) { // Cannot obtain member id! - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}'); + displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}'); } else { // Get task id from URL $taskId = getRequestParameter('task'); @@ -143,10 +143,10 @@ LIMIT 1", // Output message if ($data['allow_url'] == 'Y') { // Banner / Textlink request - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_BANNER_ACCEPTED_NOTIFIED--}'); + displayMessage('{--ADMIN_PAYOUT_BANNER_ACCEPTED_NOTIFIED--}'); } else { // Normal request - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_ACCEPTED_NOTIFIED--}'); + displayMessage('{--ADMIN_PAYOUT_ACCEPTED_NOTIFIED--}'); } // Finally send mail @@ -187,7 +187,7 @@ LIMIT 1", $message = loadEmailTemplate('member_payout_rejected', postRequestParameter('text'), $userid); // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_REJECTED_NOTIFIED--}'); + displayMessage('{--ADMIN_PAYOUT_REJECTED_NOTIFIED--}'); // Finally send mail sendEmail(getUserData('email'), '{--MEMBER_PAYOUT_REJECTED_SUBJECT--}', $message); @@ -204,11 +204,11 @@ LIMIT 1", } } else { // Cannot load user data - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_USERDATA--}'); + displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_USERDATA--}'); } } elseif ((empty($taskId)) || ($taskId == '0')) { // Failed loading task id - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_TASK_ID--}'); + displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_TASK_ID--}'); } } else { if (getRequestParameter('do') == 'delete') { @@ -272,7 +272,7 @@ ORDER BY loadTemplate('admin_list_payouts', false, $OUT); } else { // No payout requests are sent so far - loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_NO_REQUESTS_FOUND--}'); + displayMessage('{--ADMIN_PAYOUT_NO_REQUESTS_FOUND--}'); } } diff --git a/inc/modules/admin/what-list_primera.php b/inc/modules/admin/what-list_primera.php index cd6038d5db..41e2389394 100644 --- a/inc/modules/admin/what-list_primera.php +++ b/inc/modules/admin/what-list_primera.php @@ -72,7 +72,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_primera_main', false, $OUT); } else { // Nothing to display! - loadTemplate('admin_settings_saved', false, '{--ADMIN_PRIMERA_NO_TRANSFERS--}'); + displayMessage('{--ADMIN_PRIMERA_NO_TRANSFERS--}'); } // Free the result diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index f6a25db6ec..8820788241 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -224,7 +224,7 @@ LIMIT 1", loadTemplate('admin_edit_rallyes', false, $OUT); } else { // Nothing selected to edit - loadTemplate('admin_settings_saved', false, '{--RALLYE_NO_RALLYES_SELECTED--}'); + displayMessage('{--RALLYE_NO_RALLYES_SELECTED--}'); } } elseif ((getRequestParameter('sub') == 'users') && (getRequestParameter('rallye') > 0)) { // List users and their refs before start and current @@ -283,7 +283,7 @@ ORDER BY loadTemplate('admin_list_rallye_usr', false, $content); } else { // No entries found? - loadTemplate('admin_settings_saved', false, '{--RALLYE_ADMIN_USERS_404--}'); + displayMessage('{--RALLYE_ADMIN_USERS_404--}'); } } else { // Start listing rallyes @@ -384,7 +384,7 @@ ORDER BY loadTemplate('admin_list_rallyes', false, $content); } else { // No rallyes setup so far - loadTemplate('admin_settings_saved', false, '{--RALLYE_NO_RALLYES_SETUP--}'); + displayMessage('{--RALLYE_NO_RALLYES_SETUP--}'); } } diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index c7d0b36617..7bd4b1b515 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -60,7 +60,7 @@ if (isGetRequestParameterSet('userid')) { $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); // Output info message - loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestParameter('userid')), $menge, $menge_lck)); + displayMessage(sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestParameter('userid')), $menge, $menge_lck)); // Load all referal levels $result_levels = SQL_QUERY("SELECT @@ -180,17 +180,17 @@ ORDER BY } } elseif (isExtensionActive('refback')) { // No levels found, very bad! - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_REFERAL_LEVELS--}'); + displayMessage('{--ADMIN_NO_REFERAL_LEVELS--}'); } else { // No refs made so far - loadTemplate('admin_settings_saved', false, '{--USER_REFERAL_404--}'); + displayMessage('{--USER_REFERAL_404--}'); } // Free result SQL_FREERESULT($result_levels); } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid'))); + displayMessage(getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid'))); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 1c006bdaae..b762286c09 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -85,7 +85,7 @@ WHERE loadTemplate('admin_list_sponsor_details', false, $content); } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } // Free result @@ -119,11 +119,11 @@ ORDER BY SQL_FREERESULT($result); } else { // No refs made so far - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestParameter('refid')) . '')); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestParameter('refid')) . '')); } } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('refid')))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('refid')))); } } else { // List all sponsors @@ -159,7 +159,7 @@ ORDER BY loadTemplate('admin_list_sponsor', false, $OUT); } else { // No sponsors registered so far - loadTemplate('admin_settings_saved', false, '{--ADMIN_SPONSOR_NONE_REGISTERED--}'); + displayMessage('{--ADMIN_SPONSOR_NONE_REGISTERED--}'); } } diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index f3bd967949..7da0139c83 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -105,7 +105,7 @@ LIMIT 1", if (!empty($message)) { // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if } @@ -134,7 +134,7 @@ if (isFormSent('add')) { SQL_FREERESULT($result); // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } elseif ((isFormSent('edit')) || (isFormSent('delete'))) { // Load all data $OUT = ''; @@ -195,7 +195,7 @@ ORDER BY $content['list_out'] = loadTemplate('admin_list_sponsor_pay', true, $OUT); } else { // Noting setup so far! - $content['list_out'] = loadTemplate('admin_settings_saved', true, '{--ADMIN_SPONSOR_NO_PAYTYPES--}'); + $content['list_out'] = displayMessage('{--ADMIN_SPONSOR_NO_PAYTYPES--}', true); } // Free memory diff --git a/inc/modules/admin/what-list_sponsor_pays.php b/inc/modules/admin/what-list_sponsor_pays.php index dbe212688d..89e2a39d76 100644 --- a/inc/modules/admin/what-list_sponsor_pays.php +++ b/inc/modules/admin/what-list_sponsor_pays.php @@ -53,11 +53,11 @@ if (isGetRequestParameterSet('id')) { SQL_FREERESULT($result); } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } } else { // Not called by what-list_sponsor.php - loadTemplate('admin_settings_saved', false, '{--ADMIN_CALL_NOT_DIRECTLY--}'); + displayMessage('{--ADMIN_CALL_NOT_DIRECTLY--}'); } // [EOF] diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index 6bf2789f32..195a01acb5 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -80,7 +80,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_surfbar_actions', false, $OUT); } else { // No entries found, very bad! - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_ACTIONS--}'); + displayMessage('{--ADMIN_SURFBAR_NO_ACTIONS--}'); } // Free result diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 0852fc1d5b..ba8a6daa2f 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -49,7 +49,7 @@ $show = true; // Check for 'url_id' element if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('url_id')) || (!is_array(postRequestParameter('url_id'))) || (count(postRequestParameter('url_id')) == 0))) { // Not found so output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_SELECTIONS--}'); + displayMessage('{--ADMIN_SURFBAR_NO_SELECTIONS--}'); // Abort here return; @@ -213,7 +213,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_surfbar_urls', false, $OUT); } else { // No URLs in surfbar - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_URLS_FOUND--}'); + displayMessage('{--ADMIN_SURFBAR_NO_URLS_FOUND--}'); } // Free result diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index fa00387bac..29e6a73c96 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('task')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('task')); + displayMessage(generateExtensionInactiveNotInstalledMessage('task')); return; } // END - if @@ -78,7 +78,7 @@ switch (getRequestParameter('type')) { default: // Unknown type logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestParameter('type'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_TASK_UNKNOWN_MODE', getRequestParameter('type'))); + displayMessage(getMaskedMessage('ADMIN_TASK_UNKNOWN_MODE', getRequestParameter('type'))); break; } // END - switch diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index 2234084d6e..a3773aa3eb 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -71,7 +71,7 @@ if (!SQL_HASZERONUMS($result)) { // Nothing for in and out $OUT = ' - ' . loadTemplate('admin_settings_saved', true, '{--TRANSFER_NO_INOUT_TRANSFERS--}') . ' + ' . displayMessage('{--TRANSFER_NO_INOUT_TRANSFERS--}', true) . ' '; } diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 420a0852c4..5370e111dd 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('mailid')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mailid')); + displayMessage(generateExtensionInactiveNotInstalledMessage('mailid')); return; } // END - if @@ -97,7 +97,7 @@ LIMIT 1", $listed = true; $DATA = $ID; $mailType = 'bonusid'; } else { // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus - loadTemplate('admin_settings_saved', false, '{--ADMIN_CALL_NOT_DIRECTLY--}'); + displayMessage('{--ADMIN_CALL_NOT_DIRECTLY--}'); } // Shall I display links or not? @@ -170,7 +170,7 @@ LIMIT %s", $OUT = loadTemplate('admin_list_unconfirmed_list', true, $OUT); } else { // All links are confirmed... strange, you shall normally not get a link to this place in this scenario... hmmm. - $OUT = loadTemplate('admin_settings_saved', true, '{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}'); + $OUT = displayMessage('{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}', true); } // Prepare content @@ -188,17 +188,17 @@ LIMIT %s", // Data in pool or in user_stats not found, so let's find out where data is missing if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', true) == 1) { // pool table - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNCONFIRMED_POOL_MISSING', $ID)); + displayMessage(getMaskedMessage('ADMIN_UNCONFIRMED_POOL_MISSING', $ID)); } elseif (countSumTotalData(bigintval($ID), 'user_stats', 'id', 'pool_id', true) == 1) { // user_stats table - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNCONFIRMED_STATS_MISSING', $ID)); + displayMessage(getMaskedMessage('ADMIN_UNCONFIRMED_STATS_MISSING', $ID)); } else { // both or link is invalid - loadTemplate('admin_settings_saved', false, '{--ADMIN_UNCONFIRMED_INVALID_LINK--}'); + displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}'); } } elseif (isGetRequestParameterSet('bid')) { // Data in bonus table not found - loadTemplate('admin_settings_saved', false, '{--ADMIN_UNCONFIRMED_INVALID_LINK--}'); + displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}'); } // Free result diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index ecc63f1688..dc797f59ad 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); if ((!isExtensionInstalled('user')) || (!isExtensionActive('user'))) { // Missing extension! - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); + displayMessage(generateExtensionInactiveNotInstalledMessage('user')); return; } // END - if @@ -171,7 +171,7 @@ LIMIT 1", loadTemplate('admin_user_details', false, $content); } else { // Account does not exist! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', $userid)); + displayMessage(getMaskedMessage('ADMIN_MEMBER_404', $userid)); } // Free the result @@ -223,7 +223,7 @@ LIMIT 1", // Calculate page count (0.5 fixes a bug with page count) if (getConfig('user_limit') == '0') { setConfigEntry('user_limit', 100); - loadTemplate('admin_settings_saved', false, '{--EXTENSION_WARNING_USER_LIMIT--}'); + displayMessage('{--EXTENSION_WARNING_USER_LIMIT--}'); } // END - if // Activate the extension please! @@ -331,7 +331,7 @@ LIMIT 1", loadTemplate('admin_list_user', false, $content); } else { // No one as registered so far! :-( - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_NONE_REGISTERED--}'); + displayMessage('{--ADMIN_NO_NONE_REGISTERED--}'); } // Free memory diff --git a/inc/modules/admin/what-list_wernis.php b/inc/modules/admin/what-list_wernis.php index 9527b59d96..5d2d33ecd7 100644 --- a/inc/modules/admin/what-list_wernis.php +++ b/inc/modules/admin/what-list_wernis.php @@ -72,7 +72,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_list_wernis_main', false, $OUT); } else { // Nothing to display! - loadTemplate('admin_settings_saved', false, '{--ADMIN_WERNIS_NO_TRANSFERS--}'); + displayMessage('{--ADMIN_WERNIS_NO_TRANSFERS--}'); } // Free the result diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index e8e39f1787..d7e2c5244f 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -43,10 +43,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('yoomedia')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('yoomedia')); + displayMessage(generateExtensionInactiveNotInstalledMessage('yoomedia')); return; } elseif (!isExtensionActive('bonus')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bonus')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bonus')); return; } @@ -69,7 +69,7 @@ if (isFormSent()) { // Enougth queries left? if (getConfig('yoomedia_requests_remain') == '0') { // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_YOOMEDIA_REQUESTS_DEPLETED--}'); + displayMessage('{--ADMIN_YOOMEDIA_REQUESTS_DEPLETED--}'); // Abort here! return false; @@ -81,7 +81,7 @@ $result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS(); // Sanity-check on result array if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) { // Invalid result - loadTemplate('admin_settings_saved', false, '{--ADMIN_YOOMEDIA_INVALID_RESULT--}'); + displayMessage('{--ADMIN_YOOMEDIA_INVALID_RESULT--}'); return false; } elseif (count($result[0]) < 7) { // Error received so prepare error code diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 0aedbe82b9..00b2e2560a 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -119,7 +119,7 @@ if (isGetRequestParameterSet('id')) { if (!empty($message)) { // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // [EOF] diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index 4512a62c17..46c8d6a996 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -161,7 +161,7 @@ LIMIT 1", if (!empty($message)) { loadTemplate('admin_settings_unsaved', false, $message); } else { - loadTemplate('admin_settings_saved', false, '{--ADMIN_USER_UPDATED--}'); + displayMessage('{--ADMIN_USER_UPDATED--}'); } } } else { diff --git a/inc/modules/admin/what-logs.php b/inc/modules/admin/what-logs.php index e9799d53b1..285e3ce60d 100644 --- a/inc/modules/admin/what-logs.php +++ b/inc/modules/admin/what-logs.php @@ -74,7 +74,7 @@ if (isGetRequestParameterSet('access')) { clearOutputBuffer(); } else { // Output message - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT', $access)); + displayMessage(getMaskedMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT', $access)); return; } @@ -83,7 +83,7 @@ if (isGetRequestParameterSet('access')) { shutdown(); } else { // Not readable! - loadTemplate('admin_settings_saved', false, getMaskedMessage('LOGFILE_NOT_READABLE', $access)); + displayMessage(getMaskedMessage('LOGFILE_NOT_READABLE', $access)); } } else { // Is the directory there? @@ -104,7 +104,7 @@ if (isGetRequestParameterSet('access')) { outputHtml(''); } else { // logs directory does not exist - loadTemplate('admin_settings_saved', false, '{--ADMIN_LOGS_DIR_404--}'); + displayMessage('{--ADMIN_LOGS_DIR_404--}'); } } diff --git a/inc/modules/admin/what-maintenance.php b/inc/modules/admin/what-maintenance.php index d676120a3c..a5aba07894 100644 --- a/inc/modules/admin/what-maintenance.php +++ b/inc/modules/admin/what-maintenance.php @@ -61,7 +61,7 @@ if (isFormSent()) { updateConfiguration('maintenance', $target_mode); // Load template - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } else { switch (getMaintenance()) { case 'Y': // Maintenance mode is active diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index d953213a5b..d77a7b1cf8 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -189,10 +189,10 @@ if (!isFormSent()) { bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__); } - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED'); + displayMessage('{--SETTINGS_SAVED'); } else { // Demo mode! - loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}'); + displayMessage('{--SETTINGS_NOT_SAVED--}'); } // [EOF] diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index ff882da23e..9c2698fc68 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -230,7 +230,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() loadTemplate('admin_member_menu_overview', false, $content); } else { // Menu entries are missing... (???) - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MENUS_FOUND--}'); + displayMessage('{--ADMIN_NO_MENUS_FOUND--}'); } } diff --git a/inc/modules/admin/what-overview.php b/inc/modules/admin/what-overview.php index d2352eefc6..6003db9bba 100644 --- a/inc/modules/admin/what-overview.php +++ b/inc/modules/admin/what-overview.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Is sql_patches not yet installed? if (!isExtensionInstalled('sql_patches')) { // Output warning - loadTemplate('admin_settings_saved', false, '{--ADMIN_WARNING_SQL_PATCHES_MISSING--}'); + displayMessage('{--ADMIN_WARNING_SQL_PATCHES_MISSING--}'); } // END - if // Load include file 'overview-inc' (old standard overview page) @@ -70,7 +70,7 @@ if (getAction() == 'login') { // Are we in 'welcome' page and are there jobs to be done? if (!ifAdminMenuHasEntries(getAction())) { // This menu is empty and so no content is displayed - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MENU_IS_EMPTY', getAction())); + displayMessage(getMaskedMessage('ADMIN_MENU_IS_EMPTY', getAction())); } elseif ($jobsDone === true) { // Generate overview of all main menus if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) { @@ -92,7 +92,7 @@ if (!ifAdminMenuHasEntries(getAction())) { } elseif ($taskExt === false) { if (isExtensionActive('task')) { // Output warning message - loadTemplate('admin_settings_saved', false, getMaskedMessage('EXTENSION_WARNING_EXTENSION_INACTIVE', 'task')); + displayMessage(getMaskedMessage('EXTENSION_WARNING_EXTENSION_INACTIVE', 'task')); } // END - if // List selected tasks on overview when task management is not active diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index f403fa672b..338ae6f7d7 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -81,7 +81,7 @@ if (isFormSent()) { } // Output template - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete entries here $OUT = ''; diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 6e766fec5f..0025912ab0 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -101,7 +101,7 @@ VALUES ('%s','%s','%s')", } // Display message - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } elseif ((ifPostContainsSelections()) && (isFormSent('edit'))) { // Edit banner $OUT = ''; diff --git a/inc/modules/admin/what-repair_amnu.php b/inc/modules/admin/what-repair_amnu.php index 10dab0599b..793ca9f2cd 100644 --- a/inc/modules/admin/what-repair_amnu.php +++ b/inc/modules/admin/what-repair_amnu.php @@ -88,7 +88,7 @@ if ($repairedWeights > 0) { } // Output message -loadTemplate('admin_settings_saved', false, $message); +displayMessage($message); // [EOF] ?> diff --git a/inc/modules/admin/what-repair_cats.php b/inc/modules/admin/what-repair_cats.php index 38e305b819..e0293f6818 100644 --- a/inc/modules/admin/what-repair_cats.php +++ b/inc/modules/admin/what-repair_cats.php @@ -73,7 +73,7 @@ if (!SQL_HASZERONUMS($result)) { } // Load template -loadTemplate('admin_settings_saved', false, $content); +displayMessage($content); // [EOF] ?> diff --git a/inc/modules/admin/what-repair_gmnu.php b/inc/modules/admin/what-repair_gmnu.php index 90f4d860c7..af753414d0 100644 --- a/inc/modules/admin/what-repair_gmnu.php +++ b/inc/modules/admin/what-repair_gmnu.php @@ -90,7 +90,7 @@ if ($repairedWeights > 0) { } // Output message -loadTemplate('admin_settings_saved', false, $message); +displayMessage($message); // ?> diff --git a/inc/modules/admin/what-repair_mmnu.php b/inc/modules/admin/what-repair_mmnu.php index c262dd4ff7..3efb04be09 100644 --- a/inc/modules/admin/what-repair_mmnu.php +++ b/inc/modules/admin/what-repair_mmnu.php @@ -88,7 +88,7 @@ if ($repairedWeights > 0) { } // Output message -loadTemplate('admin_settings_saved', false, $message); +displayMessage($message); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index da0013fdd7..523f00c31b 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('order')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + displayMessage(generateExtensionInactiveNotInstalledMessage('order')); return; } // END - if diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index 39cfa49be6..d964131028 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -78,7 +78,7 @@ ORDER BY } // END - while // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_NL_SEND_DONE--}'); + displayMessage('{--ADMIN_NL_SEND_DONE--}'); } // END - if // Free memory diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 5c5dc6c4e9..da7bed7cce 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -74,7 +74,7 @@ if (getRequestParameter('userid') == 'all') { SQL_FREERESULT($result_main); // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_POINTS_SUBTRACTED--}'); + displayMessage('{--ADMIN_ALL_POINTS_SUBTRACTED--}'); } else { // Display form add points loadTemplate('admin_sub_points_all'); @@ -100,7 +100,7 @@ if (getRequestParameter('userid') == 'all') { sendEmail($content['email'], '{--ADMIN_SUB_SUBJECT--}', $message); // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_POINTS_SUBTRACTED--}'); + displayMessage('{--ADMIN_POINTS_SUBTRACTED--}'); } else { // Prepare content $content['userid'] = bigintval(getRequestParameter('userid')); diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index e7f70a0a17..3ab7526171 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -86,7 +86,7 @@ ORDER BY loadTemplate('admin_surfbar_url_stats', false, $content); } else { // No statistics so far - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_URL_STATS--}'); + displayMessage('{--ADMIN_SURFBAR_NO_URL_STATS--}'); } } else { // Generate general statistics @@ -126,7 +126,7 @@ ORDER BY loadTemplate('admin_surfbar_stats', false, $content); } else { // No statistics so far - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_STATS--}'); + displayMessage('{--ADMIN_SURFBAR_NO_STATS--}'); } } diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 00a4714968..c90166a3c5 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('theme')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + displayMessage(generateExtensionInactiveNotInstalledMessage('theme')); return; } // END - if @@ -139,7 +139,7 @@ if (!SQL_HASZERONUMS($result)) { // No themes found??? $OUT .= ' - ' . loadTemplate('admin_settings_saved', true, '{--ADMIN_NO_THEMES_FOUND--}') . ' + ' . displayMessage('{--ADMIN_NO_THEMES_FOUND--}', true) . ' '; } diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index a7f9c10e51..0d6ad90037 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (!isExtensionActive('theme')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + displayMessage(generateExtensionInactiveNotInstalledMessage('theme')); return; } // END - if @@ -87,7 +87,7 @@ VALUES ('%s','N','%s','%s')", } // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // Initialize array @@ -152,7 +152,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { if (empty($OUT)) { // No themes found??? - $OUT .= loadTemplate('admin_import_theme_none', true, loadTemplate('admin_settings_saved', true, '{--ADMIN_NO_THEMES_FOUND--}')); + $OUT .= loadTemplate('admin_import_theme_none', true, displayMessage('{--ADMIN_NO_THEMES_FOUND--}', true)); } // END - if // Load template diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 201cd9fe39..372af1abe1 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -120,7 +120,8 @@ LIMIT 1", } // Mails unlocked for mail delivery - loadTemplate('admin_settings_saved', false, $message); + + displayMessage($message); } elseif (isPostRequestParameterSet('reject')) { if (ifPostContainsSelections()) { // Reject mail orders @@ -166,7 +167,7 @@ LIMIT 1", loadTemplate('admin_unlock_emails_redir', false, $OUT); } else { // Nothing selected - loadTemplate('admin_settings_saved', false, '{--ADMIN_MAILS_NOTHING_CHECKED--}'); + displayMessage('{--ADMIN_MAILS_NOTHING_CHECKED--}'); } } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (isUrlBlacklistEnabled())) { // Lock URLs @@ -188,7 +189,7 @@ LIMIT 1", } // END - foreach // Output message - loadTemplate('admin_settings_saved', false, '{--ADMIN_URLS_BLOCKED--}'); + displayMessage('{--ADMIN_URLS_BLOCKED--}'); } elseif ((!isFormSent('lock')) && (!isFormSent('accept')) && (!isFormSent('reject'))) { // Mail orders are in pool so we can display them $OUT = ''; @@ -210,14 +211,14 @@ LIMIT 1", loadTemplate('admin_unlock_emails', false, $content); } elseif ((isFormSent('lock')) && (!isUrlBlacklistEnabled())) { // URL blacklist not activated - loadTemplate('admin_settings_saved', false, '{--ADMIN_URL_BLACKLIST_DISABLED--}'); + displayMessage('{--ADMIN_URL_BLACKLIST_DISABLED--}'); } else { // Wrong call! - loadTemplate('admin_settings_saved', false, '{--ADMIN_WRONG_CALL--}'); + displayMessage('{--ADMIN_WRONG_CALL--}'); } } else { // No mail orders fond - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_MAILS_IN_POOL--}'); + displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); } // [EOF] diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 6e290696db..74bd7e8ce9 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -124,7 +124,7 @@ ORDER BY SQL_FREERESULT($result); } else { // Not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_ACCOUNT_404_ALREADY_CONFIRMED', $content['id'])); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_ACCOUNT_404_ALREADY_CONFIRMED', $content['id'])); return; } @@ -187,7 +187,7 @@ LIMIT 1", } // END - foreach } else { // Nothing selected - loadTemplate('admin_settings_saved', false, '{--ADMIN_SPONSOR_NONE_SELECTED_UNLOCK--}'); + displayMessage('{--ADMIN_SPONSOR_NONE_SELECTED_UNLOCK--}'); } } // END - if @@ -217,7 +217,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_unlock_sponsor', false, $OUT); } else { // No pending accounts found - loadTemplate('admin_settings_saved', false, '{--ADMIN_SPONSOR_NONE_PENDING--}'); + displayMessage('{--ADMIN_SPONSOR_NONE_PENDING--}'); } // Free memory diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index 4c1ec1b9e3..5b0d0066e3 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -48,19 +48,19 @@ if ((isPostRequestParameterSet('unlock')) && (is_array(postRequestParameter('url // Unlock selected URLs if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestParameter('url_id'))) { // Unlock done! :-) - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_UNLOCK_DONE--}'); + displayMessage('{--ADMIN_SURFBAR_UNLOCK_DONE--}'); } else { // Unlock failed! - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_UNLOCK_FAILED--}'); + displayMessage('{--ADMIN_SURFBAR_UNLOCK_FAILED--}'); } } elseif ((isPostRequestParameterSet('reject')) && (is_array(postRequestParameter('url_id'))) && (count(postRequestParameter('url_id')) > 0)) { // Reject selected URLs if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestParameter('url_id'))) { // Unlock done! :-) - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_UNLOCK_DONE--}'); + displayMessage('{--ADMIN_SURFBAR_UNLOCK_DONE--}'); } else { // Unlock failed! - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_UNLOCK_FAILED--}'); + displayMessage('{--ADMIN_SURFBAR_UNLOCK_FAILED--}'); } } @@ -93,7 +93,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('admin_unlock_surfbar_urls', false, $OUT); } else { // No URLs in surfbar - loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_URLS_FOUND--}'); + displayMessage('{--ADMIN_SURFBAR_NO_URLS_FOUND--}'); } // Free result diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index ec84e5cfc7..46049de543 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -97,10 +97,10 @@ if (empty($ONLINE['version'])) { loadTemplate('admin_update_download', false, $ONLINE); } elseif ($ONLINE['revision'] < getCurrentRepositoryRevision()) { // Installed revision is newer than on server - loadTemplate('admin_settings_saved', false, '{--ADMIN_LOCAL_REVISION_IS_NEWER_THAN_UPDATE--}'); + displayMessage('{--ADMIN_LOCAL_REVISION_IS_NEWER_THAN_UPDATE--}'); } else { // You have the latest version! - loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_UPDATES_AVAILABLE--}'); + displayMessage('{--ADMIN_NO_UPDATES_AVAILABLE--}'); } // [EOF] diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index a3e1aafa36..fe040c30e3 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -107,7 +107,7 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) { outputHtml($content); } else { // Nothing to load, then we have no directory 'usage' - loadTemplate('admin_settings_saved', false, '{--ADMIN_USAGE_DIRECTORY_404--}'); + displayMessage('{--ADMIN_USAGE_DIRECTORY_404--}'); } // [EOF] diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 93ed6696df..ac51462b02 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -65,14 +65,14 @@ if ((isGetRequestParameterSet('userid')) && (bigintval(getRequestParameter('user sendEmail($content['email'], '{--ADMIN_CONTACT_USER_SUBJECT--}', $message); // Display message - loadTemplate('admin_settings_saved', false, '{--ADMIN_USER_CONTACTED--}'); + displayMessage('{--ADMIN_USER_CONTACTED--}'); } else { // Load contact form template loadTemplate('admin_contct_user_form', false, $content); } } else { // Not found? - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_USER_ACCOUNT_404', bigintval(getRequestParameter('userid')))); + displayMessage(getMaskedMessage('ADMIN_USER_ACCOUNT_404', bigintval(getRequestParameter('userid')))); } } else { // Display selection box diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index f5dee9dc55..9767283030 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -90,7 +90,7 @@ if (isExtensionActive('online')) { } // END - if } else { // Online statistics deactivated! - loadTemplate('admin_settings_saved', false, '{--ONLINE_STATISTICS_DEACTIVATED--}'); + displayMessage('{--ONLINE_STATISTICS_DEACTIVATED--}'); } // [EOF] diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 10674aa667..7602a88895 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -56,7 +56,7 @@ if (isMember()) { } // Output final message -loadTemplate('admin_settings_saved', false, $GLOBALS['message']); +displayMessage($GLOBALS['message']); // [EOF] ?> diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 4203c99cfe..a31c49f5c7 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -106,7 +106,7 @@ if ((isPostRequestParameterSet('url')) || (isGetRequestParameterSet('url')) || ( break; case 'test_top': - loadTemplate('admin_settings_saved', false, '{--GUEST_FRAMETESTER_TOP--}'); + displayMessage('{--GUEST_FRAMETESTER_TOP--}'); break; case 'back': // Back buttom diff --git a/inc/modules/guest/action- b/inc/modules/guest/action- index 29b88273f3..f8cdcc1d46 100644 --- a/inc/modules/guest/action- +++ b/inc/modules/guest/action- @@ -47,7 +47,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('')); + displayMessage(generateExtensionInactiveNotInstalledMessage('')); return; } diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 9528e42356..4733e5f45a 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { } if ((!isExtensionActive('theme')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + displayMessage(generateExtensionInactiveNotInstalledMessage('theme')); return; } // END - if diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index bdd6e19e62..945f6ef8a1 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('active')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('active')); + displayMessage(generateExtensionInactiveNotInstalledMessage('active')); return; } // END - if diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 5dc11a20de..7dc84d0105 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('beg')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + displayMessage(generateExtensionInactiveNotInstalledMessage('beg')); return; } // END - if diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index e12b000e1a..9437acbf4c 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('user')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); + displayMessage(generateExtensionInactiveNotInstalledMessage('user')); return; } // END - if diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index ba7bd2cc94..c185800cc8 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('doubler')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('doubler')); + displayMessage(generateExtensionInactiveNotInstalledMessage('doubler')); return; } // END - if diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 5bafc25312..deb31075c9 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('user')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); + displayMessage(generateExtensionInactiveNotInstalledMessage('user')); return; } // END - if diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 51126ec6d1..25ef23425d 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('mediadata')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mediadata')); + displayMessage(generateExtensionInactiveNotInstalledMessage('mediadata')); return; } // END - if diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index c8a79d6420..50760250e4 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('rallye')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('rallye')); + displayMessage(generateExtensionInactiveNotInstalledMessage('rallye')); return; } // END - if diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index ae06e50078..a7eb9b6676 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -44,10 +44,10 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if (!isExtensionActive('register')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('register')); + displayMessage(generateExtensionInactiveNotInstalledMessage('register')); return; } elseif (!isExtensionActive('country')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('country')); + displayMessage(generateExtensionInactiveNotInstalledMessage('country')); return; } @@ -58,7 +58,7 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { doRegistration(); // Output success registration - loadTemplate('admin_settings_saved', false, '{--REGISTRATION_DONE--}'); + displayMessage('{--REGISTRATION_DONE--}'); } else { // Do this only if form is sent if (isFormSent()) { diff --git a/inc/modules/guest/what-sponsor_agb.php b/inc/modules/guest/what-sponsor_agb.php index 01180cea4a..bea40fcc1f 100644 --- a/inc/modules/guest/what-sponsor_agb.php +++ b/inc/modules/guest/what-sponsor_agb.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('sponsor'))) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } // END - if diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index 44de25d012..089f83de14 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('sponsor'))) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } // END - if @@ -90,12 +90,12 @@ if (!SQL_HASZERONUMS($result_act)) { } // END - while } else { // No pay types setuped so far! - $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', false, loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}')); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', false, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', true)); } } else { // No actions activated so far! - $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', true, loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}')); - $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', true, loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}')); + $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', true, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', true)); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', true, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', true)); } // Free memory diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index e2c967fa34..b86614b9b2 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('sponsor'))) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } elseif (isSponsor()) { // Is already a logged-in sponsor @@ -108,10 +108,10 @@ LIMIT 1", sendAdminNotification('{--ADMIN_NEW_SPONSOR--}', 'admin_sponsor_pending', $data); // Sponsor account set to pending - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACCOUNT_IS_PENDING--}'); + displayMessage('{--SPONSOR_ACCOUNT_IS_PENDING--}'); } else { // Could not unlock account! - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACCOUNT_PENDING_FAILED--}'); + displayMessage('{--SPONSOR_ACCOUNT_PENDING_FAILED--}'); } } elseif ($data['status'] == 'EMAIL') { // Changed email adress need to be confirmed @@ -130,18 +130,18 @@ LIMIT 1", // Check on success if (!SQL_HASZEROAFFECTED()) { // Sponsor account is unlocked again - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN--}'); + displayMessage('{--SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN--}'); } else { // Could not unlock account! - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACCOUNT_EMAIL_FAILED--}'); + displayMessage('{--SPONSOR_ACCOUNT_EMAIL_FAILED--}'); } } else { /// ??? Other status? - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACCOUNT_STATUS_FAILED--}'); + displayMessage('{--SPONSOR_ACCOUNT_STATUS_FAILED--}'); } } else { // No sponsor found - loadTemplate('admin_settings_saved', false, getMaskedMessage('SPONSOR_ACCOUNT_404', getRequestParameter('hash'))); + displayMessage(getMaskedMessage('SPONSOR_ACCOUNT_404', getRequestParameter('hash'))); } // Free memory @@ -185,10 +185,10 @@ LIMIT 1", sendEmail(postRequestParameter('email'), '{--SPONSOR_ACTIVATION_LINK_SUBJECT--}', $message_sponsor); // Output message - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACTIVATION_LINK_SENT--}'); + displayMessage('{--SPONSOR_ACTIVATION_LINK_SENT--}'); } else { // No account found or not UNCONFIRMED - loadTemplate('admin_settings_saved', false, '{--SPONSOR_ACTIVATION_LINK_404--}'); + displayMessage('{--SPONSOR_ACTIVATION_LINK_404--}'); } // Free memory @@ -242,10 +242,10 @@ LIMIT 1", array(md5($DATA['password']), bigintval($DATA['id'])), __FILE__, __LINE__); // Output message - loadTemplate('admin_settings_saved', false, '{--SPONSOR_LOST_PASSWORD_SENT--}'); + displayMessage('{--SPONSOR_LOST_PASSWORD_SENT--}'); } else { // No account found or not UNCONFIRMED - loadTemplate('admin_settings_saved', false, '{--SPONSOR_LOST_PASSWORD_404--}'); + displayMessage('{--SPONSOR_LOST_PASSWORD_404--}'); } // Free memory @@ -283,21 +283,21 @@ LIMIT 1", redirectToUrl('modules.php?module=sponsor'); } else { // Cookie setup failed! - loadTemplate('admin_settings_saved', false, '{--SPONSOR_COOKIE_SETUP_FAILED--}'); + displayMessage('{--SPONSOR_COOKIE_SETUP_FAILED--}'); // Login formular and other links loadTemplate('guest_sponsor_login'); } } else { // Status is not fine - loadTemplate('admin_settings_saved', false, '{--SPONSOR_LOGIN_FAILED_' . strtoupper($status) . '--}'); + displayMessage('{--SPONSOR_LOGIN_FAILED_' . strtoupper($status) . '--}'); // Login formular and other links loadTemplate('guest_sponsor_login'); } } else { // Account missing or wrong pass! We shall not find this out for the "cracker folks"... - loadTemplate('admin_settings_saved', false, '{--SPONSOR_LOGIN_FAILED_404_WRONG_PASS--}'); + displayMessage('{--SPONSOR_LOGIN_FAILED_404_WRONG_PASS--}'); // Login formular and other links loadTemplate('guest_sponsor_login'); diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index f78c2da510..3a8a20154a 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('sponsor'))) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } // END - if @@ -228,7 +228,7 @@ LIMIT 1", $message = doProcessSponsorFormRequest($messageArray); // Display message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } else { // Check for payment types $result = SQL_QUERY('SELECT @@ -281,7 +281,7 @@ ORDER BY // Errors found? if (count($formErrors) > 0) { - $OUT = loadTemplate('admin_settings_saved', true, '{--SPONSOR_REGISTER_SOMETHING_MISSING--}'); + $OUT = displayMessage('{--SPONSOR_REGISTER_SOMETHING_MISSING--}', true); $OUT .= '
    '; foreach ($formErrors as $error) { $OUT .= '
  1. ' . $error . '
  2. '; @@ -306,7 +306,7 @@ ORDER BY loadTemplate('guest_sponsor_reg', false, $content); } else { // Nothing added so far - loadTemplate('admin_settings_saved', false, '{--SPONSOR_PAYMENT_LIST_IS_EMPTY--}'); + displayMessage('{--SPONSOR_PAYMENT_LIST_IS_EMPTY--}'); } // Free memory diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index bf0e3ea7d7..ff9863dd8b 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -208,12 +208,12 @@ switch (getConfig('guest_stats')) { loadTemplate('guest_stats_table', false, $content); } else { // No clicks detected - loadTemplate('admin_settings_saved', false, '{--GUEST_STATS_NO_CLICKS--}'); + displayMessage('{--GUEST_STATS_NO_CLICKS--}'); } break; case 'INACTIVE': // Deactivated stats - loadTemplate('admin_settings_saved', false, '{--GUEST_STATS_DEACTIVATED--}'); + displayMessage('{--GUEST_STATS_DEACTIVATED--}'); break; } // END - switch diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index b9fd3f14db..0e1d4904ad 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('top10')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('top10')); + displayMessage(generateExtensionInactiveNotInstalledMessage('top10')); return; } // END - if diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index 27166d8584..813425e464 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -47,7 +47,7 @@ loadIncludeOnce('inc/classes/rdf.class.php'); addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('wernis')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('wernis')); + displayMessage(generateExtensionInactiveNotInstalledMessage('wernis')); return; } // END - if diff --git a/inc/modules/member/action- b/inc/modules/member/action- index 2404416371..ec95c9aa6c 100644 --- a/inc/modules/member/action- +++ b/inc/modules/member/action- @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('')); + displayMessage(generateExtensionInactiveNotInstalledMessage('')); return; } // END - if diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index 3e087dff57..4980981e94 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bank')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bank')); return; } // END - if diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index 53e8058682..e50d203a12 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('order')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + displayMessage(generateExtensionInactiveNotInstalledMessage('order')); return; } // END - if diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index f4b6faf37a..45990768d0 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('surfbar')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + displayMessage(generateExtensionInactiveNotInstalledMessage('surfbar')); return; } // END - if diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index ebfa82cb7e..9a725b1672 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { } if ((!isExtensionActive('theme')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + displayMessage(generateExtensionInactiveNotInstalledMessage('theme')); return; } // END - if diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index 43d1087ce2..a15af144d5 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bank')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bank')); return; } // END - if diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index b8ace961f4..d78bd5454a 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bank')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bank')); return; } // END - if diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index 2066c6fbf3..5c019a242b 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bank')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bank')); return; } diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index 43d1087ce2..a15af144d5 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bank')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bank')); return; } // END - if diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index 2066c6fbf3..5c019a242b 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bank')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bank')); return; } diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index 2c6c2ca755..48902d0bcb 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('beg')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + displayMessage(generateExtensionInactiveNotInstalledMessage('beg')); return; } // END - if diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 1061adf2c8..996c31ae36 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('beg')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + displayMessage(generateExtensionInactiveNotInstalledMessage('beg')); return; } // END - if diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index a480b8afd2..8c8233c23d 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bonus')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bonus')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bonus')); return; } // END - if diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 5c75e5f5bf..45e79d7492 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -110,15 +110,15 @@ if (!SQL_HASZERONUMS($result)) { // Categories saved? if ($count > 0) { // Output message - loadTemplate('admin_settings_saved', false, '{--MEMBER_CATEGORIES_SAVED--}'); + displayMessage('{--MEMBER_CATEGORIES_SAVED--}'); } else { // None save - loadTemplate('admin_settings_saved', false, '{--MEMBER_CATEGORIES_NOT_SAVED--}'); + displayMessage('{--MEMBER_CATEGORIES_NOT_SAVED--}'); } } else { if ($LEAST === true) { // Also here we have to secure it... :( - loadTemplate('admin_settings_saved', false, '{--CHOOSE_MORE_CATEGORIES--}'); + displayMessage('{--CHOOSE_MORE_CATEGORIES--}'); } // END - if // Put some data into constants for the template @@ -159,7 +159,7 @@ if (!SQL_HASZERONUMS($result)) { } } else { // No cateogries are defined yet - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_CATEGORIES--}'); + displayMessage('{--MEMBER_NO_CATEGORIES--}'); } // Free result diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index 344a61290d..3687b6aeea 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('doubler')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('doubler')); + displayMessage(generateExtensionInactiveNotInstalledMessage('doubler')); return; } // END - if diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 88bdb0064d..10c76eea90 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('holiday')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('holiday')); + displayMessage(generateExtensionInactiveNotInstalledMessage('holiday')); return; } // END - if @@ -98,7 +98,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { } // Display message and exit here - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_HOLIDAY_ORDER', generateDateTime($stamp, 1))); + displayMessage(getMaskedMessage('MEMBER_HOLIDAY_ORDER', generateDateTime($stamp, 1))); return; } } // END - if @@ -152,7 +152,7 @@ LIMIT 1", createNewTask('{--ADMIN_HOLIDAY_SUBJECT--}', $message, 'HOLIDAY_REQUEST', getMemberId()); // Display message - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_IS_ACTIVATED_NOW--}'); + displayMessage('{--MEMBER_HOLIDAY_IS_ACTIVATED_NOW--}'); } } // END - if @@ -211,21 +211,21 @@ LIMIT 1", sendAdminNotification('{--ADMIN_HOLIDAY_DEAC_SUBJECT--}', 'admin_holiday_deactivated', $content, getMemberId()); // Display message to user - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_DEACTIVATED_NOW--}'); + displayMessage('{--MEMBER_HOLIDAY_DEACTIVATED_NOW--}'); } else { // Display message to user - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_CANNOT_DEACTIVATE--}'); + displayMessage('{--MEMBER_HOLIDAY_CANNOT_DEACTIVATE--}'); } // Free result SQL_FREERESULT($result2); } elseif ($content['holiday_active'] == 'Y') { // To fast! - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_LOCKED--}'); + displayMessage('{--MEMBER_HOLIDAY_LOCKED--}'); } } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_HOLIDAY_NOT_STOPPED_404', getMemberId())); + displayMessage(getMaskedMessage('MEMBER_HOLIDAY_NOT_STOPPED_404', getMemberId())); } // Free result @@ -311,7 +311,7 @@ LIMIT 1", } // END - switch } else { // To fast! - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_LOCKED--}'); + displayMessage('{--MEMBER_HOLIDAY_LOCKED--}'); } } // END - if diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 276cfb1f73..c00badbd45 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('html_mail')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('html_mail')); + displayMessage(generateExtensionInactiveNotInstalledMessage('html_mail')); return; } // END - if @@ -55,7 +55,7 @@ if (isFormSent()) { // Save settings SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1", array(postRequestParameter('html'), getMemberId()), __FILE__, __LINE__); - loadTemplate('admin_settings_saved', false, '{--MEMBER_SETTINGS_SAVED--}'); + displayMessage('{--MEMBER_SETTINGS_SAVED--}'); } else { // Prepare it $content['html_y'] = ''; diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 9d8d6127dd..14cb33b936 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('mydata')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mydata')); + displayMessage(generateExtensionInactiveNotInstalledMessage('mydata')); return; } // END - if @@ -71,9 +71,9 @@ switch ($mode) { $content['last_update'] = generateDateTime($content['last_update'], 0); // How far is last change on his profile away from now? - if ((($content['last_update'] + getConfig('profile_lock')) > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) { + if ((($content['last_update'] + getProfileLock()) > time()) && (!isAdmin()) && (getProfileLock() > 0)) { // You cannot change your account - $content['change'] = loadTemplate('admin_settings_saved', true, '
    ' . getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['last_update'] + getConfig('profile_lock'), 0)) . '
    '); + $content['change'] = displayMessage('
    ' . getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['last_update'] + getProfileLock(), 0)) . '
    ', true); } else { // He is allowed to change his profile $content['change'] = loadTemplate('member_mydata_button', true); @@ -123,14 +123,14 @@ LIMIT 1", // Free result SQL_FREERESULT($result); - $content['update_check'] = $content['last_update'] + getConfig('profile_lock'); + $content['update_check'] = $content['last_update'] + getProfileLock(); // How far is last change on his profile away from now? - if (($content['update_check'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) { - $content['update_check'] = getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['update_check'] + getConfig('profile_lock'), 0)); + if (($content['update_check'] > time()) && (!isAdmin()) && (getProfileLock() > 0)) { + $content['update_check'] = getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['update_check'] + getProfileLock(), 0)); // You cannot change your account - loadTemplate('admin_settings_saved', false, $content['update_check']); + displayMessage($content['update_check']); } else { // He is allowed to change his profile foreach (array('gender_m','gender_f','gender_c') as $entry) { @@ -189,17 +189,17 @@ LIMIT 1", $content = merge_array($content, getUserDataArray()); // Calculate time to check - $content['update_check'] = $content['last_update'] + getConfig('profile_lock'); + $content['update_check'] = $content['last_update'] + getProfileLock(); // How far is last change on his profile away from now? - if (($content['update_check'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) { - $content['update_check'] = generateDateTime($content['update_check'] + getConfig('profile_lock'), 0); + if (($content['update_check'] > time()) && (!isAdmin()) && (getProfileLock() > 0)) { + $content['update_check'] = generateDateTime($content['update_check'] + getProfileLock(), 0); // You cannot change your account - loadTemplate('admin_settings_saved', false, $content['update_check']); + displayMessage($content['update_check']); } elseif ((!isEmailValid(postRequestParameter('email'))) && (!isAdmin())) { // Invalid email address! - loadTemplate('admin_settings_saved', false, '{--INVALID_EMAIL_ENTERED--}'); + displayMessage('{--INVALID_EMAIL_ENTERED--}'); } else { // Generate hash $hash = generateHash(postRequestParameter('pass1'), substr($content['password'], 0, -40)); @@ -301,11 +301,11 @@ LIMIT 1", sendModeMails ('mydata', $modes); } else { // Something went wrong - loadTemplate('admin_settings_saved', false, '{--MEMBER_UPDATE_FAILED--}'); + displayMessage('{--MEMBER_UPDATE_FAILED--}'); } } else { // Entered wrong pass for updating profile - loadTemplate('admin_settings_saved', false, '{--MEBER_UPDATE_PWD_WRONG--}'); + displayMessage('{--MEBER_UPDATE_PWD_WRONG--}'); } } break; diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index a0cf5bfecd..0c4a786a4c 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('nickname')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('nickname')); + displayMessage(generateExtensionInactiveNotInstalledMessage('nickname')); return; } // END - if @@ -81,7 +81,7 @@ if ($isValid === true) { } // Load template - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } else { // Do we have already submit the form? if (isPostRequestParameterSet('nickname')) { diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 59b1cb1ba0..0110dfec02 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('order')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + displayMessage(generateExtensionInactiveNotInstalledMessage('order')); return; } // END - if @@ -61,7 +61,7 @@ $total = getTotalPoints(getMemberId()); if ((isExtensionInstalledAndNewer('holiday', '0.1.3')) && (getUserData('holiday_active') == 'Y')) { // Holiday is active! - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_ORDER_NOT_POSSIBLE--}'); + displayMessage('{--MEMBER_HOLIDAY_ORDER_NOT_POSSIBLE--}'); } elseif ((isPostRequestParameterSet('frametester')) && ($ALLOWED > 0) && (postRequestParameter('receiver') > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // @@ -397,7 +397,7 @@ LIMIT 1", $url = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1'); } elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) { // No more mail orders allowed - loadTemplate('admin_settings_saved', false, '{--MEMBER_ORDER_ALLOWED_EXHAUSTED--}'); + displayMessage('{--MEMBER_ORDER_ALLOWED_EXHAUSTED--}'); } elseif ($links < getConfig('unconfirmed')) { // Show only enabled categories to the user ... $whereStatement = " WHERE `visible`='Y'"; @@ -514,7 +514,7 @@ LIMIT 1", if (!empty($message)) { // We got system message so we drop it out to the user - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } // END - if // Load all email types... @@ -659,19 +659,19 @@ LIMIT 1", } } else { // No mail types defined - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_PAYMENTS--}'); + displayMessage('{--MEMBER_NO_PAYMENTS--}'); } } else { // No points left - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_POINTS--}'); + displayMessage('{--MEMBER_NO_POINTS--}'); } } else { // No cateogries are defined yet - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_CATEGORIES--}'); + displayMessage('{--MEMBER_NO_CATEGORIES--}'); } } else { // Please confirm some mails first - loadTemplate('admin_settings_saved', false, '{%message,MEMBER_LINKS_LEFT=' . $links . '%}', $links); + displayMessage('{%message,MEMBER_LINKS_LEFT=' . $links . '%}', $links); } if (!empty($url)) { diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 8e62a5bd70..aa9e6e516c 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -48,7 +48,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('payout')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('payout')); + displayMessage(generateExtensionInactiveNotInstalledMessage('payout')); return; } // END - if @@ -119,7 +119,7 @@ ORDER BY outputPayoutList($totalPoints); } else { // No payout types setup - loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_SETUP_INCOMPLETE--}'); + displayMessage('{--MEMBER_PAYOUT_SETUP_INCOMPLETE--}'); } } else { // Chedk if he can get paid by selected type @@ -207,7 +207,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", sendAdminNotification('{--ADMIN_PAYOUY_REQUEST_SUBJECT--}', $admin_tpl, postRequestArray(), getMemberId()); // Load template and output it - loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_REQUEST_SENT--}'); + displayMessage('{--MEMBER_PAYOUT_REQUEST_SENT--}'); } elseif ($content['allow'] == 'Y') { // Prepare content $content = array( @@ -231,11 +231,11 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", } } else { // Not enougth points - loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_POINTS_NOT_ENOUGTH--}'); + displayMessage('{--MEMBER_PAYOUT_POINTS_NOT_ENOUGTH--}'); } } else { // id is invalid - loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_ID_INVALID--}'); + displayMessage('{--MEMBER_PAYOUT_ID_INVALID--}'); } // Free result diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 5c7f34e643..0fdd37c130 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -155,10 +155,10 @@ if (isExtensionActive('user')) { loadTemplate('member_points', false, $content); } elseif (isAdmin()) { // Missing extension - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); + displayMessage(generateExtensionInactiveNotInstalledMessage('user')); } else { // Message for user - loadTemplate('admin_settings_saved', false, '{--PROBLEM_POINTS_OVERVIEW_UNAVAILABLE--}'); + displayMessage('{--PROBLEM_POINTS_OVERVIEW_UNAVAILABLE--}'); } if (isExtensionActive('payout')) { diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 8a483cb07f..eb627aa0a5 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -48,14 +48,14 @@ addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('primera')) && (!isAdmin())) { // Extension 'primera' is not activated - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('primera')); + displayMessage(generateExtensionInactiveNotInstalledMessage('primera')); return; } // END - if // Check if the admin has entered the data if ((getConfig('primera_api_name') == '') || (getConfig('primera_api_md5') == '')) { // Something important is missing... - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_API_DATA_MISSING--}'); + displayMessage('{--MEMBER_PRIMERA_API_DATA_MISSING--}'); return; } // END - if @@ -106,7 +106,7 @@ if (getRequestParameter('mode') == 'pay') { // Is this enougth for a payout? if ($points < getConfig('primera_min_payout')) { // No, then abort here - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_MIN_PAYOUT_PAYOUT--}'); + displayMessage('{--MEMBER_PRIMERA_MIN_PAYOUT_PAYOUT--}'); return; } // END - if @@ -114,7 +114,7 @@ if (getRequestParameter('mode') == 'pay') { $content['points'] = $points; } else { // Invalid mode! - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_PRIMERA_MODE_INVALID', getRequestParameter('mode'))); + displayMessage(getMaskedMessage('MEMBER_PRIMERA_MODE_INVALID', getRequestParameter('mode'))); return; } @@ -126,22 +126,22 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { // Is the user id and password set? if (!isPostRequestParameterSet('primera_nickname')) { // Nothing entered in Primus nickname - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_USERNAME--}'); + displayMessage('{--MEMBER_PRIMERA_EMPTY_USERNAME--}'); } elseif (!isPostRequestParameterSet('primera_password')) { // Nothing entered in Primera password - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_PASSWORD--}'); + displayMessage('{--MEMBER_PRIMERA_EMPTY_PASSWORD--}'); } elseif (!isPostRequestParameterSet('amount')) { // Nothing entered in amount - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_AMOUNT--}'); + displayMessage('{--MEMBER_PRIMERA_EMPTY_AMOUNT--}'); } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) { // Only numbers in amount! - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_INVALID_AMOUNT--}'); + displayMessage('{--MEMBER_PRIMERA_INVALID_AMOUNT--}'); } elseif (postRequestParameter('amount') < getConfig('primera_min_payout')) { // Not enougth entered! - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_AMOUNT_SMALLER_MIN--}'); + displayMessage('{--MEMBER_PRIMERA_AMOUNT_SMALLER_MIN--}'); } elseif (postRequestParameter('amount') > $points) { // Not enougth points left! - loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_PRIMERA_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points))); + displayMessage(sprintf(getMessage('MEMBER_PRIMERA_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points))); } else { // All is fine here so do the payout $success = executePrimeraPayout(postRequestParameter('primera_nickname'), md5(postRequestParameter('primera_password')), postRequestParameter('amount')); @@ -163,21 +163,21 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { array(postRequestParameter('primera_nickname'), getMemberId()), __FILE__, __LINE__); // All done! - loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_PAYOUT_DONE--}'); + displayMessage('{--MEMBER_PRIMERA_PAYOUT_DONE--}'); return; } elseif ((GET_PRIMERA_ERROR_CODE() == 'user_failed') || (GET_PRIMERA_ERROR_CODE() == 'own_failed') || (GET_PRIMERA_ERROR_CODE() == 'amount_failed') || (GET_PRIMERA_ERROR_CODE() == 'api_amount_failed')) { // Wrong login data - loadTemplate('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE()); + displayMessage(GET_PRIMERA_ERROR_MESSAGE()); } else { // Something went wrong - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_PRIMERA_PAYOUT_FAILED', GET_PRIMERA_ERROR_MESSAGE())); + displayMessage(getMaskedMessage('MEMBER_PRIMERA_PAYOUT_FAILED', GET_PRIMERA_ERROR_MESSAGE())); } } break; default: // Invalid mode! logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestParameter('mode'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_PRIMERA_MODE_INVALID', getRequestParameter('mode'))); + displayMessage(getMaskedMessage('MEMBER_PRIMERA_MODE_INVALID', getRequestParameter('mode'))); return; } } // END - if diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index b438e2fe6e..40591fb49c 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('rallye')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('rallye')); + displayMessage(generateExtensionInactiveNotInstalledMessage('rallye')); return; } // END - if diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 8075701382..cf67b29643 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { redirectToIndexMemberOnlyModule(); } elseif (!isRefbackEnabled()) { // Output message - loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_DISABLED--}'); + displayMessage('{--MEMBER_REFBACK_DISABLED--}'); // Abort here return false; @@ -53,7 +53,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('refback')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('refback')); + displayMessage(generateExtensionInactiveNotInstalledMessage('refback')); return; } // END - if @@ -72,17 +72,17 @@ if ((isFormSent('edit')) && (isPostRequestParameterSet('id'))) { // Check status if (isset($status['ok'])) { // No message found - loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_DONE--}'); + displayMessage('{--MEMBER_REFBACK_DONE--}'); } elseif (isset($status['message'])) { // Something went wrong with error message - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_REFBACK_ERROR_MESSAGE', $status['message'])); + displayMessage(getMaskedMessage('MEMBER_REFBACK_ERROR_MESSAGE', $status['message'])); } else { // No message found - loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_ERROR_EMPTY_MESSAGE--}'); + displayMessage('{--MEMBER_REFBACK_ERROR_EMPTY_MESSAGE--}'); } } else { // Percents out-of-bounds ;-) - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS')); + displayMessage(getMaskedMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS')); } // Insert line @@ -146,7 +146,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('member_refback_list', false, $OUT); } else { // No entries - loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_NO_ENTRIES--}'); + displayMessage('{--MEMBER_REFBACK_NO_ENTRIES--}'); } // Free result diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php index 609c738f6e..c1a5a1794b 100644 --- a/inc/modules/member/what-reflinks.php +++ b/inc/modules/member/what-reflinks.php @@ -108,7 +108,7 @@ if (!SQL_HASZERONUMS($result)) { $content['refbanner_content'] = loadTemplate('member_reflinks_table', true, $OUT); } else { // No refbanner found - $content['refbanner_content'] = loadTemplate('admin_settings_saved', true, '{--MEMBER_NO_REFBANNER_FOUND--}'); + $content['refbanner_content'] = displayMessage('{--MEMBER_NO_REFBANNER_FOUND--}', true); } // Free result diff --git a/inc/modules/member/what-reflist.php b/inc/modules/member/what-reflist.php index f0bdf2f57e..f8fb335492 100644 --- a/inc/modules/member/what-reflist.php +++ b/inc/modules/member/what-reflist.php @@ -90,7 +90,7 @@ if (!SQL_HASZERONUMS($result)) { loadTemplate('member_ref_list', false, $OUT); } else { // No entries - loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_NO_ENTRIES--}'); + displayMessage('{--MEMBER_REFBACK_NO_ENTRIES--}'); } // Free result diff --git a/inc/modules/member/what-sponsor_list.php b/inc/modules/member/what-sponsor_list.php index 80d60391b4..0677350616 100644 --- a/inc/modules/member/what-sponsor_list.php +++ b/inc/modules/member/what-sponsor_list.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('sponsor')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } // END - if diff --git a/inc/modules/member/what-stats.php b/inc/modules/member/what-stats.php index 2153250a16..3411c12dff 100644 --- a/inc/modules/member/what-stats.php +++ b/inc/modules/member/what-stats.php @@ -76,7 +76,7 @@ if (!SQL_HASZERONUMS($result)) { $main_content['pool'] = loadTemplate('member_pool_table', true, $OUT); } else { // No mails in pool! - $main_content['pool'] = loadTemplate('admin_settings_saved', true, '{--MEMBER_NO_MAILS_IN_POOL--}'); + $main_content['pool'] = displayMessage('{--MEMBER_NO_MAILS_IN_POOL--}', true); } // Free result @@ -110,7 +110,7 @@ if (!SQL_HASZERONUMS($result)) { $main_content['stats'] = loadTemplate('member_stats_table', true, $OUT); } else { // No mail orders fond - $main_content['stats'] = loadTemplate('admin_settings_saved', true, '{--MEMBER_NO_MAILS_IN_STATS--}'); + $main_content['stats'] = displayMessage('{--MEMBER_NO_MAILS_IN_STATS--}', true); } // Free result diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index bda4e1beeb..31642af3c4 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('support')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('support')); + displayMessage(generateExtensionInactiveNotInstalledMessage('support')); return; } // END - if diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index 3684fd55c7..f7dd0aa465 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -47,14 +47,14 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('surfbar')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + displayMessage(generateExtensionInactiveNotInstalledMessage('surfbar')); return; } // END - if // Still allowed to book more URLs? if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more URLs allowed to book! - loadTemplate('admin_settings_saved', false, '{--MEMBER_SURFBAR_NO_MORE_ALLOWED--}'); + displayMessage('{--MEMBER_SURFBAR_NO_MORE_ALLOWED--}'); } elseif ((isFormSent()) && (isPostRequestParameterSet('limited'))) { // Is limitation "no" and "limit" is > 0? if ((postRequestParameter('limited') != 'Y') && ((isPostRequestParameterSet('limit')) && (postRequestParameter('limit') > 0)) || (!isPostRequestParameterSet('limit'))) { @@ -75,7 +75,7 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { } // END - if // Load message template - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } else { // Prepare some content $content = array( diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 0b10c3418c..46474d6656 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('surfbar')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + displayMessage(generateExtensionInactiveNotInstalledMessage('surfbar')); return; } // END - if @@ -60,11 +60,11 @@ if ((isFormSent()) && (isPostRequestParameterSet('action')) && (isPostRequestPar // Action performed but shall we display it? if (((postRequestParameter('action') != 'edit') && (postRequestParameter('action') != 'delete')) || (isPostRequestParameterSet('execute'))) { // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed - loadTemplate('admin_settings_saved', false, '{--MEMBER_SURFBAR_ACTION_DONE--}'); + displayMessage('{--MEMBER_SURFBAR_ACTION_DONE--}'); } // END - if } else { // Something went wrong - loadTemplate('admin_settings_saved', false, '{--MEMBER_SURFBAR_ACTION_FAILED--}'); + displayMessage('{--MEMBER_SURFBAR_ACTION_FAILED--}'); } } elseif (count($urlArray) > 0) { // List all URLs @@ -87,7 +87,7 @@ if ((isFormSent()) && (isPostRequestParameterSet('action')) && (isPostRequestPar loadTemplate('member_surfbar_list', false, $OUT); } else { // No URLs booked so far - loadTemplate('admin_settings_saved', false, '{--MEMBER_SURFBAR_NO_URLS_FOUND--}'); + displayMessage('{--MEMBER_SURFBAR_NO_URLS_FOUND--}'); } // [EOF] diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index 63db9020c2..c721627d3c 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('surfbar')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + displayMessage(generateExtensionInactiveNotInstalledMessage('surfbar')); return; } // END - if diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index f7971b61a4..b4eebd6769 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('surfbar')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + displayMessage(generateExtensionInactiveNotInstalledMessage('surfbar')); return; } // END - if diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 603938e115..20d74a441e 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('theme')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + displayMessage(generateExtensionInactiveNotInstalledMessage('theme')); return; } // END - if @@ -62,7 +62,7 @@ if (isPostRequestParameterSet('member_theme')) { setTheme($newTheme); // Theme saved! - loadTemplate('admin_settings_saved', false, '{--MEMBER_THEME_SAVED--}'); + displayMessage('{--MEMBER_THEME_SAVED--}'); } // END - if // Initialize array @@ -131,7 +131,7 @@ if (empty($OUT)) { // No themes found??? $OUT = ' - ' . loadTemplate('admin_settings_saved', true, '{--MEMBER_NO_THEMES_FOUND--}') . ' + ' . displayMessage('{--MEMBER_NO_THEMES_FOUND--}', true) . ' '; } // END - if diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 0bdd10de82..e9e78c92b8 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('transfer')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('transfer')); + displayMessage(generateExtensionInactiveNotInstalledMessage('transfer')); return; } // END - if @@ -174,7 +174,7 @@ switch ($mode) { sendAdminNotification($adminSubject, 'admin_transfer_points', $content); // Transfer is completed - loadTemplate('admin_settings_saved', false, '
    {--TRANSFER_COMPLETED--}' . '
    {--TRANSFER_CONTINUE_OVERVIEW--}
    '); + displayMessage('
    {--TRANSFER_COMPLETED--}' . '
    {--TRANSFER_CONTINUE_OVERVIEW--}
    '); } elseif ($valid_code === false) { // Invalid Touring code! loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_CODE--}'); @@ -242,7 +242,7 @@ switch ($mode) { SQL_FREERESULT($result); } else { // No one else is opt-in - $OUT = loadTemplate('admin_settings_saved', true, '{--TRANSFER_NO_ONE_ELSE_OPT_IN--}'); + $OUT = displayMessage('{--TRANSFER_NO_ONE_ELSE_OPT_IN--}', true); $content['to_disabled'] = ' disabled="disabled"'; } @@ -264,7 +264,7 @@ switch ($mode) { $content['captcha_code'] = ' ' . $img; } else { $code = '00000'; - $content['captcha_code'] = loadTemplate('admin_settings_saved', true, '{--TRANSFER_NO_CODE--}'); + $content['captcha_code'] = displayMessage('{--TRANSFER_NO_CODE--}', true); } // Init points/reason @@ -332,7 +332,7 @@ switch ($mode) { // Nothing for in or out $OUT = ' - ' . loadTemplate('admin_settings_saved', true, $nothingMessage) . ' + ' . displayMessage($nothingMessage, true) . ' '; } @@ -416,7 +416,7 @@ KEY (`party_userid`) // Nothing for in and out $OUT = ' - ' . loadTemplate('admin_settings_saved', true, '{--TRANSFER_NO_INOUT_TRANSFERS--}') . ' + ' . displayMessage('{--TRANSFER_NO_INOUT_TRANSFERS--}', true) . ' '; } @@ -477,7 +477,7 @@ KEY (`party_userid`) array(postRequestParameter('opt_in'), getMemberId()), __FILE__, __LINE__); // "Settings saved..." - loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}'); + displayMessage('{--SETTINGS_SAVED--}'); } // END - if // Init entries diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index e593034a2a..9f06817864 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -257,7 +257,7 @@ LIMIT 1", } } else { // No mails left to confirm... :) - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_MAILS_TO_CONFIRM--}'); + displayMessage('{--MEMBER_NO_MAILS_TO_CONFIRM--}'); } // [EOF] diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index f8c43992b5..bac90e4a6f 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -47,14 +47,14 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('wernis')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('wernis')); + displayMessage(generateExtensionInactiveNotInstalledMessage('wernis')); return; } // END - if // Check if the admin has entered the data if ((getWernisApiId() == '') || (getWernisApiMd5() == '')) { // Something important is missing... - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_API_DATA_MISSING--}'); + displayMessage('{--MEMBER_WERNIS_API_DATA_MISSING--}'); return; } // END - if @@ -122,7 +122,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo // Is this enougth for a payout? if ($points < getConfig('wernis_min_payout')) { // No, then abort here - loadTemplate('admin_settings_saved', false, '{%message,MEMBER_WERNIS_MIN_PAYOUT=' . $points . '%}'); + displayMessage('{%message,MEMBER_WERNIS_MIN_PAYOUT=' . $points . '%}'); return; } // END - if @@ -141,7 +141,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo $content['wernis_userid'] = getUserData('wernis_userid'); } else { // Invalid mode! - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_MODE_INVALID', getRequestParameter('mode'))); + displayMessage(getMaskedMessage('MEMBER_WERNIS_MODE_INVALID', getRequestParameter('mode'))); return; } @@ -150,26 +150,26 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { // Is the user id and password set? if (!isPostRequestParameterSet('wernis_userid')) { // Nothing entered in WDS66 user id - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_EMPTY_USERNAME--}'); + displayMessage('{--MEMBER_WERNIS_EMPTY_USERNAME--}'); } elseif (!isPostRequestParameterSet('wds66_password')) { // Nothing entered in WDS66 password - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_EMPTY_PASSWORD--}'); + displayMessage('{--MEMBER_WERNIS_EMPTY_PASSWORD--}'); } elseif (!isPostRequestParameterSet('amount')) { // Nothing entered in amount - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_EMPTY_AMOUNT--}'); + displayMessage('{--MEMBER_WERNIS_EMPTY_AMOUNT--}'); } elseif (postRequestParameter('wernis_userid') != bigintval(postRequestParameter('wernis_userid'))) { // Only numbers in account id! - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_INVALID_USERNAME'); + displayMessage('{--MEMBER_WERNIS_INVALID_USERNAME'); } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) { // Only numbers in amount! - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_INVALID_AMOUNT--}'); + displayMessage('{--MEMBER_WERNIS_INVALID_AMOUNT--}'); } else { // Check input data depending on the mode and execute the requested mode switch (getRequestParameter('mode')) { case 'withdraw': // Widthdraws WDS66 -> This exchange if (postRequestParameter('amount') < getConfig('wernis_min_withdraw')) { // Not enougth entered! - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_WITHDRAW_AMOUNT_SMALLER_MIN--}'); + displayMessage('{--MEMBER_WERNIS_WITHDRAW_AMOUNT_SMALLER_MIN--}'); } else { // All is fine here so do the withdraw $success = WERNIS_EXECUTE_WITHDRAW(postRequestParameter('wernis_userid'), md5(postRequestParameter('wds66_password')), postRequestParameter('amount')); @@ -182,14 +182,14 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__); // All done! - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_WITHDRAW_DONE--}'); + displayMessage('{--MEMBER_WERNIS_WITHDRAW_DONE--}'); return; } elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed')) { // Wrong login data - loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); + displayMessage(GET_WERNIS_ERROR_MESSAGE()); } else { // Something went wrong - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE())); + displayMessage(getMaskedMessage('MEMBER_WERNIS_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE())); } } break; @@ -197,10 +197,10 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { case 'payout': // Payout this exchange -> WDS66 if (postRequestParameter('amount') < getConfig('wernis_min_payout')) { // Not enougth entered! - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_PAYOUT_AMOUNT_SMALLER_MIN--}'); + displayMessage('{--MEMBER_WERNIS_PAYOUT_AMOUNT_SMALLER_MIN--}'); } elseif (postRequestParameter('amount') > $points) { // Not enougth points left! - loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_WERNIS_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points))); + displayMessage(sprintf(getMessage('MEMBER_WERNIS_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points))); } else { // All is fine here so do the withdraw $success = WERNIS_EXECUTE_PAYOUT(postRequestParameter('wernis_userid'), postRequestParameter('amount')); @@ -213,21 +213,21 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__); // All done! - loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_PAYOUT_DONE--}'); + displayMessage('{--MEMBER_WERNIS_PAYOUT_DONE--}'); return; } elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed') || (GET_WERNIS_ERROR_CODE() == 'api_amount_failed')) { // Wrong login data - loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); + displayMessage(GET_WERNIS_ERROR_MESSAGE()); } else { // Something went wrong - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE())); + displayMessage(getMaskedMessage('MEMBER_WERNIS_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE())); } } break; default: // Invalid mode! logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestParameter('mode'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_MODE_INVALID', getRequestParameter('mode'))); + displayMessage(getMaskedMessage('MEMBER_WERNIS_MODE_INVALID', getRequestParameter('mode'))); return; } // END - switch } diff --git a/inc/modules/order.php b/inc/modules/order.php index ac4023556f..dfb303f01d 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -40,7 +40,7 @@ $url = ''; if (!defined('__SECURITY')) { die(); } elseif ((!isExtensionActive('order')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + displayMessage(generateExtensionInactiveNotInstalledMessage('order')); return; } elseif (!isMember()) { // Sorry, no guest access! diff --git a/inc/modules/sponsor.php b/inc/modules/sponsor.php index 8fb132cafa..eb7297555b 100644 --- a/inc/modules/sponsor.php +++ b/inc/modules/sponsor.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { die(); } elseif ((!isExtensionActive('sponsor'))) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } elseif (!isSponsor()) { // No sponsor! diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index 118d92e9c7..571340b12f 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { die(); } elseif (!isExtensionActive('sponsor')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } elseif (!isSponsor()) { // No sponsor! @@ -118,10 +118,10 @@ if (SQL_NUMROWS($result) == 1) { if (!empty($message)) { // Output message - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, $message); + $GLOBALS['sponsor_output'] = displayMessage($message, true); } else { // No message generated - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MESSAGE_GENERATED--}'); + $GLOBALS['sponsor_output'] = displayMessage('{--SPONSOR_NO_MESSAGE_GENERATED--}', true); } } else { // Init gender @@ -138,11 +138,11 @@ if (SQL_NUMROWS($result) == 1) { } else { // Locked or so? $STATUS = sponsorTranslateUserStatus($content['status']); - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS)); + $GLOBALS['sponsor_output'] = displayMessage(getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS), true); } } else { // Sponsor account not found - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsor_id'))); + $GLOBALS['sponsor_output'] = displayMessage(getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsor_id')), true); } // Free memory diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index d4bc934539..8a4c76b1e0 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { die(); } elseif (!isExtensionActive('sponsor')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } elseif (!isSponsor()) { // No sponsor! @@ -99,10 +99,10 @@ if (SQL_NUMROWS($result) == 1) { if (!empty($message)) { // Output message - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, $message); + $GLOBALS['sponsor_output'] = displayMessage($message, true); } else { // No message generated - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MESSAGE_GENERATED--}'); + $GLOBALS['sponsor_output'] = displayMessage('{--SPONSOR_NO_MESSAGE_GENERATED--}', true); } } else { // Make yes/no selection @@ -116,11 +116,11 @@ if (SQL_NUMROWS($result) == 1) { } else { // Locked or so? $STATUS = sponsorTranslateUserStatus($content['status']); - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS)); + $GLOBALS['sponsor_output'] = displayMessage(getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS), true); } } else { // Sponsor account not found - $GLOBALS['sponsor_output'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsor_id'))); + $GLOBALS['sponsor_output'] = displayMessage(getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsor_id')), true); } // Free memory diff --git a/inc/modules/sponsor/welcome.php b/inc/modules/sponsor/welcome.php index a81ed8fb27..1a37ea1118 100644 --- a/inc/modules/sponsor/welcome.php +++ b/inc/modules/sponsor/welcome.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { die(); } elseif (!isExtensionActive('sponsor')) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor')); return; } elseif (!isSponsor()) { // No sponsor! diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 457ae0b6af..7436f55ae7 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1128,7 +1128,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify sendEmail($userid, '{--DIRECT_PAYMENT_SUBJECT--}', $message); if (!isGetRequestParameterSet('mid')) { // Output message to admin - loadTemplate('admin_settings_saved', false, '{--ADMIN_POINTS_ADDED--}'); + displayMessage('{--ADMIN_POINTS_ADDED--}'); } // END - if } @@ -1951,7 +1951,7 @@ function reduceRecipientReceivedMails ($column, $id, $count) { array(implode(',', $userids), count($userids)), __FUNCTION__, __LINE__); } else { // Nothing deleted - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MAIL_NOTHING_DELETED', $id)); + displayMessage(getMaskedMessage('ADMIN_MAIL_NOTHING_DELETED', $id)); } } // END - if diff --git a/inc/template-functions.php b/inc/template-functions.php index d15de9e25f..cac8b529dd 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -1588,7 +1588,7 @@ function sendModeMails ($mod, $modes) { } // Load template - loadTemplate('admin_settings_saved', false, $content['message']); + displayMessage($content['message']); } // Generates a 'selection box' from given array @@ -1705,6 +1705,12 @@ function translatePoolType ($type) { return sprintf("{--POOL_TYPE_%s--}", strtoupper($type)); } +// Displays given message in admin_settings_saved template +function displayMessage ($message, $return = false) { + // Load the template + return loadTemplate('admin_settings_saved', $return, $message); +} + //----------------------------------------------------------------------------- // Template helper functions for EL //----------------------------------------------------------------------------- diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index eee9e64f0b..2a953014d6 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -2257,7 +2257,7 @@ function getSmtpPassword () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for POINTS_WORD +// "Getter" for points_word function getPointsWord () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -2269,6 +2269,42 @@ function getPointsWord () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for profile_lock +function getProfileLock () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('profile_lock'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for online_timeout +function getOnlineTimeout () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('online_timeout'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for url_tlock +function getUrlTlock () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('url_tlock'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Checks wether proxy configuration is used function isProxyUsed () { // Do we have cache? diff --git a/surfbar.php b/surfbar.php index ed53114ca8..eb9ab63004 100644 --- a/surfbar.php +++ b/surfbar.php @@ -79,7 +79,7 @@ if (!isMember()) { // Is there a 'code' provided? if (isGetRequestParameterSet('code')) { // Then generate an error message - loadTemplate('admin_settings_saved', false, getMessageFromErrorCode(getRequestParameter('code'))); + displayMessage(getMessageFromErrorCode(getRequestParameter('code'))); } // END - if // Display login form