From c763367ce3859b46a4ef1d4dfbcbbf2e8b644ee3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 29 Jan 2011 21:48:19 +0000 Subject: [PATCH] A lot more wrapper functions added, templates renamed --- .gitattributes | 2 + inc/extensions/ext-sql_patches.php | 2 +- inc/functions.php | 30 +-- inc/language/autopurge_de.php | 12 +- inc/language/de.php | 19 +- inc/language/order_de.php | 10 +- inc/language/other_de.php | 72 +++--- inc/libs/register_functions.php | 4 +- inc/libs/wernis_functions.php | 209 ++++++++++++++++-- inc/modules/admin.php | 26 ++- inc/modules/admin/admin-inc.php | 6 +- inc/modules/admin/what-email_details.php | 4 +- inc/modules/guest/what-wernis_portal.php | 10 +- inc/modules/member/what-wernis.php | 6 +- inc/template-functions.php | 6 +- inc/wrapper-functions.php | 84 +++++++ .../de/html/admin/admin_config_autopurge.tpl | 10 +- .../de/html/admin/admin_config_order.tpl | 10 +- .../de/html/admin/admin_config_other.tpl | 118 ++++++---- .../admin/admin_logout_sql_patches_remove.tpl | 7 +- .../de/html/admin/admin_reset_pass_done.tpl | 18 +- .../de/html/admin/admin_reset_password.tpl | 2 +- .../html/admin/admin_reset_password_done.tpl | 19 ++ .../admin/admin_reset_password_send_link.tpl | 29 +++ .../de/html/admin/admin_send_reset_link.tpl | 30 +-- 25 files changed, 531 insertions(+), 214 deletions(-) create mode 100644 templates/de/html/admin/admin_reset_password_done.tpl create mode 100644 templates/de/html/admin/admin_reset_password_send_link.tpl diff --git a/.gitattributes b/.gitattributes index fb1bd746f2..73a840f443 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1321,7 +1321,9 @@ templates/de/html/admin/admin_repair_lang_row_compares.tpl -text svneol=unset#te templates/de/html/admin/admin_repair_lang_row_diff.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_reset_pass_done.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_reset_password.tpl -text svneol=unset#text/plain +templates/de/html/admin/admin_reset_password_done.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_reset_password_form.tpl -text svneol=unset#text/plain +templates/de/html/admin/admin_reset_password_send_link.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_send_bonus_form.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_send_bonus_select.tpl -text svneol=unset#text/plain templates/de/html/admin/admin_send_reset_link.tpl -text svneol=unset#text/plain diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 167b5655ce..aa6c5d2028 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -798,7 +798,7 @@ INDEX (`ip`) // Transfer words/numbers to constants if config entry is found if (isExtensionInstalledAndNewer('sql_patches', '0.0.3')) { - setConfigEntry('POINTS', getConfig('points_word')); + setConfigEntry('POINTS', getPointsWord()); } // END - if break; diff --git a/inc/functions.php b/inc/functions.php index aeb0ac419f..e07307acb5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -659,7 +659,7 @@ function generateRandomCode ($length, $code, $userid, $DATA = '') { $server = $_SERVER['PHP_SELF'] . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . getenv('SERVER_SOFTWARE') . getEncryptSeperator() . detectRealIpAddress() . getEncryptSeperator() . detectRemoteAddr(); // Build key string - $keys = getConfig('SITE_KEY') . getEncryptSeperator() . getConfig('DATE_KEY'); + $keys = getSiteKey() . getEncryptSeperator() . getDateKey(); if (isConfigEntrySet('secret_key')) { $keys .= getEncryptSeperator().getSecretKey(); } // END - if @@ -690,22 +690,26 @@ function generateRandomCode ($length, $code, $userid, $DATA = '') { if (isConfigEntrySet('master_salt')) { // Generate hash with master salt from modula of number with the prime number and other data - $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getConfig('DATE_KEY') . getEncryptSeperator() . $a, getMasterSalt()); + $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a, getMasterSalt()); // Create number from hash - $rcode = hexdec(substr($saltedHash, strlen(getMasterSalt()), 9)) / abs(getConfig('rand_no') - $a + sqrt(getConfig('_ADD'))) / pi(); + $rcode = hexdec(substr($saltedHash, strlen(getMasterSalt()), 9)) / abs(getRandNo() - $a + sqrt(getConfig('_ADD'))) / pi(); } else { // Generate hash with "hash of site key" from modula of number with the prime number and other data - $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getConfig('DATE_KEY') . getEncryptSeperator() . $a, substr(sha1(getConfig('SITE_KEY')), 0, getSaltLength())); + $saltedHash = generateHash(($a % getPrime()) . getEncryptSeperator() . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a, substr(sha1(getSiteKey()), 0, getSaltLength())); // Create number from hash - $rcode = hexdec(substr($saltedHash, 8, 9)) / abs(getConfig('rand_no') - $a + sqrt(getConfig('_ADD'))) / pi(); + $rcode = hexdec(substr($saltedHash, 8, 9)) / abs(getRandNo() - $a + sqrt(getConfig('_ADD'))) / pi(); } // At least 10 numbers shall be secure enought! $len = getCodeLength(); - if ($len == '0') $len = $length; - if ($len == '0') $len = 10; + if ($len == '0') { + $len = $length; + } // END - if + if ($len == '0') { + $len = 10; + } // END - if // Cut off requested counts of number $return = substr(str_replace('.', '', $rcode), 0, $len); @@ -947,10 +951,10 @@ function sendRawRequest ($host, $request) { //* DEBUG: */ die('SCRIPT=' . $script); if ($useProxy === true) { // Resolve hostname into IP address - $ip = $resolver->resolveHostname(compileRawCode(getConfig('proxy_host'))); + $ip = $resolver->resolveHostname(compileRawCode(getProxyHost())); // Connect to host through proxy connection - $fp = fsockopen($ip, bigintval(getConfig('proxy_port')), $errno, $errdesc, 30); + $fp = fsockopen($ip, bigintval(getProxyPort()), $errno, $errdesc, 30); } else { // Resolve hostname into IP address $ip = $resolver->resolveHostname($host); @@ -1079,9 +1083,9 @@ function setupProxyTunnel ($host, $resource) { $proxyTunnel .= 'Host: ' . $host . getConfig('HTTP_EOL'); // Use login data to proxy? (username at least!) - if (getConfig('proxy_username') != '') { + if (getProxyUsername() != '') { // Add it as well - $encodedAuth = base64_encode(compileRawCode(getConfig('proxy_username')) . ':' . compileRawCode(getConfig('proxy_password'))); + $encodedAuth = base64_encode(compileRawCode(getProxyUsername()) . ':' . compileRawCode(getProxyPassword())); $proxyTunnel .= 'Proxy-Authorization: Basic ' . $encodedAuth . getConfig('HTTP_EOL'); } // END - if @@ -1176,7 +1180,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { $server = $_SERVER['PHP_SELF'] . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . getenv('SERVER_SOFTWARE') . getEncryptSeperator() . detectRealIpAddress() . getEncryptSeperator() . detectRemoteAddr(); // Build key string - $keys = getConfig('SITE_KEY') . getEncryptSeperator() . getConfig('DATE_KEY') . getEncryptSeperator() . getSecretKey() . getEncryptSeperator() . getFileHash() . getEncryptSeperator() . getDateFromPatchTime() . getEncryptSeperator() . getMasterSalt(); + $keys = getSiteKey() . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . getSecretKey() . getEncryptSeperator() . getFileHash() . getEncryptSeperator() . getDateFromPatchTime() . getEncryptSeperator() . getMasterSalt(); // Additional data $data = $plainText . getEncryptSeperator() . uniqid(mt_rand(), true) . getEncryptSeperator() . time(); @@ -1185,7 +1189,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { $a = time() + getConfig('_ADD') - 1; // Generate SHA1 sum from modula of number and the prime number - $sha1 = sha1(($a % getPrime()) . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getConfig('DATE_KEY') . getEncryptSeperator() . $a); + $sha1 = sha1(($a % getPrime()) . $server . getEncryptSeperator() . $keys . getEncryptSeperator() . $data . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . $a); //* DEBUG: */ debugOutput('SHA1=' . $sha1.' ('.strlen($sha1).')
'); $sha1 = scrambleString($sha1); //* DEBUG: */ debugOutput('Scrambled=' . $sha1.' ('.strlen($sha1).')
'); diff --git a/inc/language/autopurge_de.php b/inc/language/autopurge_de.php index 6b9a2b8620..e695437263 100644 --- a/inc/language/autopurge_de.php +++ b/inc/language/autopurge_de.php @@ -52,7 +52,7 @@ addMessages(array( 'ADMIN_AUTOPURGE_TASKS_SUBJECT' => "[Auto-Purge:] Zu löschen marktierte Aufgaben", 'ADMIN_AUTOPURGE_TURBO_SUBJECT' => "[Auto-Purge:] Veraltete Bonus-Einträge", 'ADMIN_AUTOPURGE_DELETE_MAILS_SUBJECT' => "[Auto-Purge:] Mailbuchungen bereits gel. Mitglieder", - 'ADMIN_AUTOPURGE_CONFIGURATION' => "Konfiguration der automatischen Löschungen", + 'ADMIN_CONFIG_AUTOPURGE_TITLE' => "Konfiguration der automatischen Löschungen", 'ADMIN_AUTOPURGE_INACTIVE' => "Sollten inaktive Accounts erkannt und gelöscht werden?", 'ADMIN_AUTOPURGE_INACTIVE_SINCE' => "Dauer bis bestätigtes Account als inaktiv markiert wird", 'ADMIN_AUTOPURGE_INACTIVE_TIME' => "Dauer bis inaktives Account gelöscht wird", @@ -61,8 +61,8 @@ addMessages(array( 'ADMIN_AUTOPURGE_ALL_ACTIVE' => "Alle Ihre Mitlieder sind aktiv.", 'ADMIN_AUTOPURGE_TASKS' => "Löschen von veralteten zu Löschen markierten Aufgaben?", 'ADMIN_AUTOPURGE_TASKS_TIME' => "Dauer bis zu löschen marktierte Aufgaben gelöscht werden", - 'ADMIN_AUTOPURGE_INACTIVE_TITLE' => "Inaktive Accounts löschen", - 'ADMIN_AUTOPURGE_UNCONFIRMED_TITLE' => "Unbestätigte Accounts löschen", + 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_TITLE' => "Inaktive Accounts löschen", + 'ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TITLE' => "Unbestätigte Accounts löschen", 'ADMIN_AUTOPURGE_TASKS_TITLE' => "Veraltete Aufgaben löschen", 'ADMIN_AUTOPURGE_NOTIFICATION_TITLE' => "Benachtigung an Admin bei Auto-Löschung", 'ADMIN_AUTOPURGE_NOTIFY_INACTIVE' => "Benachrichtigung bei inaktive Accounts löschen", @@ -77,9 +77,9 @@ addMessages(array( 'ADMIN_AUTOPURGE_NOTIFY_DELETE_MAILS' => "Benachrichtigen bei Löschung von Mails", // Moved from other extensions - 'ADMIN_OPTION_AUTOPURGE_ACTIVE' => "Auto-Löschung von Bestätigungslink ist aktiviert?", - 'ADMIN_OPTION_MAIL_LIFETIME' => "Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)", - 'ADMIN_AUTOPURGE_MAILID_TITLE' => "Mailbestätigungslinks löschen", + 'ADMIN_CONFIG_AUTOPURGE_ACTIVE' => "Auto-Löschung von Bestätigungslink ist aktiviert?", + 'ADMIN_CONFIG_MAIL_LIFETIME' => "Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)", + 'ADMIN_CONFIG_AUTOPURGE_MAILID_TITLE' => "Mailbestätigungslinks löschen", )); // [EOF] diff --git a/inc/language/de.php b/inc/language/de.php index 94f595fcfb..8fb201b469 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -930,7 +930,7 @@ addMessages(array( 'DEFAULT_POINTS' => "Punkte", 'PROBLEM_POINTS_OVERVIEW_UNAVAILABLE' => "{?POINTS?}-Übersicht derzeit nicht verfügbar.", 'ADMIN_NOTHING_SELECTED_CHANGE' => "Sie haben nichts zum Ändern des Status ausgewählt.", - 'TEMPLATE_CONTENT' => "Templatedaten:", + 'TEMPLATE_CONTENT' => "Templatedaten", 'MESSAGE_HEADER' => "Hinweis:", 'WARNING_MESSAGE_HEADER' => "Warnung:", 'ADMIN_ALPHA_SELCTION' => "Alphabetische Suche:", @@ -946,7 +946,7 @@ addMessages(array( 'SHOW_TIMINGS_SQL_TIME' => "SQL-Zeit:", 'SHOW_TIMINGS_NUM_TEMPLATES' => "Templates:", 'SHOW_TIMINGS_SECS' => "Sek.", - 'ADMIN_OPTION_MAILID_REDIRECT' => "Soll bei fehlerhafter/gelöschter Mailbuchung beim Bestätigen die Mail auf die Hauptseite oder Ablehnungsseite weitergleitet werden?", + 'ADMIN_CONFIG_MAILID_REDIRECT' => "Soll bei fehlerhafter/gelöschter Mailbuchung beim Bestätigen die Mail auf die Hauptseite oder Ablehnungsseite weitergleitet werden?", 'ADMIN_CONFIG_MAILID_REDIRECT_INDEX' => "Auf Hauptseite weiterleiten.", 'ADMIN_CONFIG_MAILID_REDIRECT_REJECT' => "Auf Ablehnungsseite umleiten.", 'REASON_DIRECT_PAYMENT' => "Direkte Gutschrift (siehe evtl. vorangegangene Mail)", @@ -983,17 +983,18 @@ addMessages(array( 'APP_DIE_TITLE' => "Bug im Script erkannt!", 'ADMIN_CONTACT_LINK_TITLE' => "Kontakt zum Administrator", 'ADMIN_MAIL_NOTHING_DELETED' => "Die Mail mit der Id %s weisst keine Mitglieder auf.", + 'TEMPLATE_DATA' => "Daten aus $DATA", - 'ADMIN_SEND_RESET_LINK_TITLE' => "1/4: Administratorkennwort zurücksetzen", + 'ADMIN_RESET_PASSWORD_SEND_LINK_TITLE' => "1/4: Administratorkennwort zurücksetzen", 'ADMIN_VALIDATE_HASH_TITLE' => "2/4: Validierung Iher Logindaten", 'ADMIN_RESET_PASSWORD_TITLE' => "3/4: Neues Passwort eingeben", - 'ADMIN_RESET_PASS_DONE_TITLE' => "4/4: Neues Passwort gesetzt", + 'ADMIN_RESET_PASSWORD_DONE_TITLE' => "4/4: Neues Passwort gesetzt", - 'ADMIN_SEND_RESET_LINK_SUBMIT' => "Passwort zurücksetzen", + 'ADMIN_RESET_PASSWORD_SEND_LINK_SUBMIT' => "Passwort zurücksetzen", 'ADMIN_VALIDATE_HASH_SUBMIT' => "Adminlogindaten validieren", 'ADMIN_RESET_PASSWORD_SUBMIT' => "Neues Kennwort setzen", - 'ADMIN_SEND_RESET_LINK_NOTE' => "Sobald Sie Ihre Email-Adresse eingegeben haben, wird Ihnen Ihr Loginname zugeschickt. Diesen geben Sie in dem nächsten Formular zusammen mit Ihrem neuen Passwort ein. Danach können Sie wieder in den Adminbereich einloggen.", + 'ADMIN_RESET_PASSWORD_SEND_LINK_NOTE' => "Sobald Sie Ihre Email-Adresse eingegeben haben, wird Ihnen Ihr Loginname zugeschickt. Diesen geben Sie in dem nächsten Formular zusammen mit Ihrem neuen Passwort ein. Danach können Sie wieder in den Adminbereich einloggen.", 'ADMIN_VALIDATE_HASH_NOTE' => "Sie haben diesen Link aus einer Mail angeklickt, die Ihnen zuvor zugesandt wurde. Daraus benötigen Sie Ihren Loginnamen, damit Ihre Daten validiert werden können. Nach Abesenden des Formulars können Sie dann Ihr Administratorkennwort ändern.", 'ADMIN_RESET_PASSWORD_NOTE' => "Geben Sie nun zweimal ein neues Kennwort für das angezeigte Administratorlogin ein. Dabei sollten Sie Buchstaben, Zahlen und Sonderzeichen wie Slash, Strich, Unterstrich usw. verwenden, um die Stärke des Passwortes zu maximieren.", @@ -1004,15 +1005,15 @@ addMessages(array( 'ADMIN_RESET_PASS' => "Ihr Administratorkennwort zurücksetzen?", 'ADMIN_NO_LOGIN_WITH_EMAIL' => "Kein Administrator-Account mit der angegebenen Email-Adresse gefunden.", - 'ADMIN_RESET_PASS_LINK_SUBJECT' => "Zurücksetzung Ihres Admin-Passwortes", - 'ADMIN_RESET_LINK_SENT' => "Der Reset-Link wurde soeben an Ihre eingegebene Email-Adresse ausgesendet.", + 'ADMIN_RESET_PASSWORD_LINK_SUBJECT' => "Zurücksetzung Ihres Admin-Passwortes", + 'ADMIN_RESET_PASSWORD_LINK_SENT' => "Der Reset-Link wurde soeben an Ihre eingegebene Email-Adresse ausgesendet.", 'ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED' => "Validierung Ihrer Logindaten fehlgeschlagen. Haben Sie auch den Link aus der Mail angeklickt und Ihren Loginnamen eingegeben?", 'ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2' => "Validierung Ihrer Logindaten fehlgeschlagen. Es liegt ein Bug im Script vor. Bitte im Bug-Tracker den Fehler melden.", 'ADMIN_SHOW_LOGIN' => "Ihr Administratorlogin:", 'ADMIN_CHANGE_LOGIN' => "Anderes Adminlogin", 'ADMIN_PASSWORD_RESET_DONE' => "Ihr Administratorkennwort wurde neu gesetzt. Sie können sich jetzt mit Ihren neuen Zugangsdaten im Adminbereich einloggen.", 'ADMIN_CONTINUE_LOGIN' => "Weiter zum Administratorlogin", - 'ADMIN_RESET_PASS_LINK' => "Jetzt Ihr Administratorkennwort zurücksetzen (nötiger Schritt!)", + 'ADMIN_RESET_PASSWORD_LINK' => "Jetzt Ihr Administratorkennwort zurücksetzen (nötiger Schritt!)", 'ADMIN_SUPPORT_FORUM_LINK' => "Direktlink zum Support-Forum (neues Fenster)", 'ADMIN_SUPPORT_BUGTRACKER_LINK' => "Direktlink zum Bug-Tracker (neues Fenster)", 'ADMIN_SUPPORT_WIKI_LINK' => "Direktlink zum Doku-Wiki (neues Fenster)", diff --git a/inc/language/order_de.php b/inc/language/order_de.php index a672182c54..af6981b26a 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -51,11 +51,11 @@ addMessages(array( 'ADMIN_ORDER_SELECTION_COLUMN' => "Tabellenspalte, nach der umsortiert werden soll", 'ADMIN_ORDER_SELECTION_MODE' => "Sortierreihenfolge", 'ADMIN_ORDER_SELECTION_SETTINGS' => "Auswahlverfahren der Empfänger", - 'ADMIN_OPTION_MAX_TEXT_LENGTH' => "Maximale Länge des Werbetextes", - 'ADMIN_OPTION_MAX_UNCONFIRMED_MAILS' => "Maximale Anzahl unbest. Mails (Mailbuchung)", - 'ADMIN_OPTION_CHECK_EMAIL_TEXT' => "Sind URLs im Werbetext erlaubt?", - 'ADMIN_OPTION_CHECK_EMAIL_SUBJECT' => "Sind URLs in der Betreffzeile erlaubt?", - 'ADMIN_OPTION_URL_BLACKLIST' => "Black-Liste für gebuchte URLs aktivieren?", + 'ADMIN_CONFIG_MAX_TEXT_LENGTH' => "Maximale Länge des Werbetextes", + 'ADMIN_CONFIG_MAX_UNCONFIRMED_MAILS' => "Maximale Anzahl unbest. Mails (Mailbuchung)", + 'ADMIN_CONFIG_CHECK_EMAIL_TEXT' => "Sind URLs im Werbetext erlaubt?", + 'ADMIN_CONFIG_CHECK_EMAIL_SUBJECT' => "Sind URLs in der Betreffzeile erlaubt?", + 'ADMIN_CONFIG_URL_BLACKLIST' => "Black-Liste für gebuchte URLs aktivieren?", 'MEMBER_ORDER_ALLOWED_RECEIVE' => "Sie können heute noch %s von %s Mailbuchungen aufgeben.", 'MEMBER_ORDER_ALLOWED_MAX' => "Sie können solange Mailbuchungen aufgeben, bis alle Mitglieder nicht mehr empfangsbereit sind.", diff --git a/inc/language/other_de.php b/inc/language/other_de.php index e7e8121a3f..3ec6e40945 100644 --- a/inc/language/other_de.php +++ b/inc/language/other_de.php @@ -42,45 +42,45 @@ if (!defined('__SECURITY')) { // Language constans addMessages(array( - 'ADMIN_OTHER_SETTINGS' => "Sonstige Einstellungen", - 'ADMIN_OPTION_URL_TIME_LOCK' => "Selbe beworbene URL nicht mehr bewerbar (0 = URL sofort erneut buchbar)", - 'ADMIN_OPTION_POOL_MAX_SEND' => "Anzahl zu sendender Mails aus dem Pool", - 'ADMIN_OPTION_LOCK_PROFILE_TIME' => "Sperrzeit des Mitgliedprofiles nach Änderung (0 = Keine Sperrzeit)", - 'ADMIN_OPTION_AUTOSEND_ACTIVE' => "Ist der Auto-Versand aktiv?", - 'ADMIN_OPTION_NOTIFY_ADMIN' => "Benachrichtigung bei Profiländerung?", - 'ADMIN_OPTION_MAX_ONLINETIME' => "Timeout für Who-is-Online", - 'ADMIN_OPTION_SEND_UPDATE' => "Mail zur Erneurung des Profiles senden?", - 'ADMIN_SENDING_SETTINGS' => "Versand-Optionen", - 'ADMIN_NOTIFY_SETTINGS' => "Benachrichtigungsoptionen", - 'ADMIN_TIMEOUT_SETTINGS' => "Time-out Optionen", - 'ADMIN_PROFILE_TIME_SETTINGS' => "Zeitenangaben für Mitgliederprofile", - 'ADMIN_OPTION_PROFILE_UPDATE' => "Profilaktualisierungsinterval (0 = Keine Erinnerung aussenden)", - 'ADMIN_OPTION_PROFILE_REUPDATE' => "Erneute Aussendung der Mail (0 = Keine Erinnerung aussenden)", - 'ADMIN_OPTION_CODE_LENGTH' => "Länge des grafischen Codes im Best.-Frame (0 = Nur Button anklicken)", + 'ADMIN_CONFIG_OTHER_TITLE' => "Sonstige Einstellungen", + 'ADMIN_CONFIG_URL_TIME_LOCK' => "Selbe beworbene URL nicht mehr bewerbar (0 = URL sofort erneut buchbar)", + 'ADMIN_CONFIG_POOL_MAX_SEND' => "Anzahl zu sendender Mails aus dem Pool", + 'ADMIN_CONFIG_LOCK_PROFILE_TIME' => "Sperrzeit des Mitgliedprofiles nach Änderung (0 = Keine Sperrzeit)", + 'ADMIN_CONFIG_AUTOSEND_ACTIVE' => "Ist der Auto-Versand aktiv?", + 'ADMIN_CONFIG_NOTIFY_ADMIN' => "Benachrichtigung bei Profiländerung?", + 'ADMIN_CONFIG_MAX_ONLINETIME' => "Timeout für Who-is-Online", + 'ADMIN_CONFIG_SEND_UPDATE' => "Mail zur Erneurung des Profiles senden?", + 'ADMIN_CONFIG_SENDING_TITLE' => "Versand-Optionen", + 'ADMIN_CONFIG_NOTIFY_TITLE' => "Benachrichtigungsoptionen", + 'ADMIN_CONFIG_TIMEOUT_TITLE' => "Time-out Optionen", + 'ADMIN_CONFIG_PROFILE_TIME_TITLE' => "Zeitenangaben für Mitgliederprofile", + 'ADMIN_CONFIG_PROFILE_UPDATE' => "Profilaktualisierungsinterval (0 = Keine Erinnerung aussenden)", + 'ADMIN_CONFIG_PROFILE_REUPDATE' => "Erneute Aussendung der Mail (0 = Keine Erinnerung aussenden)", + 'ADMIN_CONFIG_CODE_LENGTH' => "Länge des grafischen Codes im Best.-Frame (0 = Nur Button anklicken)", 'ADMIN_CODE_LENGTH_NOTE' => "(Zeichenanzahl)", - 'ADMIN_OPTION_ACTIVATE_EXCHANGE' => "Automatisches Freischalten des {?mt_word2?}, wenn x Mitglieder empfangsbereit sind. 0 = Funktion abschalten", - 'ADMIN_OPTION_ZIPCODE_ACTIVE' => "Versand nach PLZ erlauben", - 'ADMIN_OPTION_POINTS_WORD' => "Währung Ihres Tausches (Klammlose, Wernis, Primera, FuCo, etc.)", - 'ADMIN_OPTION_MAX_COMMA' => "Angezeigte Stellen hinter dem Komma", - 'ADMIN_OPTION_CSS_PHP' => "Sollen die CSS-Dateien direkt ausgegeben werden oder von css.php angezeigt werden?", - 'ADMIN_SELECT_CSS_OUTPUT_MODE_DIRECT' => "Per <link>-Tag ausgeben (Debug!)", - 'ADMIN_SELECT_CSS_OUTPUT_MODE_FILE' => "Per css.php ausgeben", - 'ADMIN_SELECT_CSS_OUTPUT_MODE_INLINE' => "In <style>-Tag ausgeben", - 'ADMIN_OPTION_GUEST_MENU' => "Gastmenü ein-/ausblenden", - 'ADMIN_OPTION_MEMBER_MENU' => "Mitgliedsmenü ein-/ausblenden", - 'ADMIN_OPTION_YOURE_HERE' => "Navigation "Sie sind hier" ein-/ausblenden", + 'ADMIN_CONFIG_ACTIVATE_EXCHANGE' => "Automatisches Freischalten des {?mt_word2?}, wenn x Mitglieder empfangsbereit sind. 0 = Funktion abschalten", + 'ADMIN_CONFIG_ZIPCODE_ACTIVE' => "Versand nach PLZ erlauben", + 'ADMIN_CONFIG_POINTS_WORD' => "Währung Ihres Tausches (Klammlose, Wernis, Primera, FuCo, etc.)", + 'ADMIN_CONFIG_MAX_COMMA' => "Angezeigte Stellen hinter dem Komma", + 'ADMIN_CONFIG_CSS_PHP' => "Sollen die CSS-Dateien direkt ausgegeben werden oder von css.php angezeigt werden?", + 'ADMIN_CONFIG_SELECT_CSS_OUTPUT_MODE_DIRECT' => "Per <link>-Tag ausgeben (Debug!)", + 'ADMIN_CONFIG_SELECT_CSS_OUTPUT_MODE_FILE' => "Per css.php ausgeben", + 'ADMIN_CONFIG_SELECT_CSS_OUTPUT_MODE_INLINE' => "In <style>-Tag ausgeben", + 'ADMIN_CONFIG_GUEST_MENU' => "Gastmenü ein-/ausblenden", + 'ADMIN_CONFIG_MEMBER_MENU' => "Mitgliedsmenü ein-/ausblenden", + 'ADMIN_CONFIG_YOURE_HERE' => "Navigation "Sie sind hier" ein-/ausblenden", 'ADMIN_IS_SHOWN' => "Einblenden", 'ADMIN_IS_NOT_SHOWN' => "Ausblenden", - 'ADMIN_OPTION_MT_WORD' => "Art Ihres Tausches (1. Fall)", - 'ADMIN_OPTION_MT_WORD2' => "Art Ihres Tausches (2. Fall)", - 'ADMIN_OPTION_MT_WORD3' => "Art Ihres Tausches (1. Fall, Plural)", - 'ADMIN_OPTION_REJECT_URL' => "Standart-URL bei Ablehnung der Mailbuchung", - 'ADMIN_OPTION_SHOW_TIMINGS' => "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)", - 'ADMIN_OPTION_SHOW_POINTS_UNCONFIRMED' => "{?POINTS?} in unbestätige Mails im Mitgliedsbereich anzeigen?", - 'ADMIN_OPTION_MINIMUM_AGE' => "Ab welchem Mindestalter dürfen sich Ihre Mitglieder anmelden?", - 'ADMIN_SQL_SETTINGS' => "SQL-Einstellungen", - 'ADMIN_DISPLAY_DEBUG_SQLS' => "Sollen die SQL-Abfragen für Administratoren zu Debug-Zwecken angezeigt werden?. Das Einschalten dieser Einstellung kann enorme Performanceverluste bedeuten.", - 'ADMIN_STATS_SETTINGS' => "Interne Statistik Einstellungen", + 'ADMIN_CONFIG_MT_WORD' => "Art Ihres Tausches (1. Fall)", + 'ADMIN_CONFIG_MT_WORD2' => "Art Ihres Tausches (2. Fall)", + 'ADMIN_CONFIG_MT_WORD3' => "Art Ihres Tausches (1. Fall, Plural)", + 'ADMIN_CONFIG_REJECT_URL' => "Standart-URL bei Ablehnung der Mailbuchung", + 'ADMIN_CONFIG_SHOW_TIMINGS' => "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)", + 'ADMIN_CONFIG_SHOW_POINTS_UNCONFIRMED' => "{?POINTS?} in unbestätige Mails im Mitgliedsbereich anzeigen?", + 'ADMIN_CONFIG_MINIMUM_AGE' => "Ab welchem Mindestalter dürfen sich Ihre Mitglieder anmelden?", + 'ADMIN_CONFIG_SQL_TITLE' => "SQL-Einstellungen", + 'ADMIN_CONFIG_DISPLAY_DEBUG_SQLS' => "Sollen die SQL-Abfragen für Administratoren zu Debug-Zwecken angezeigt werden?. Das Einschalten dieser Einstellung kann enorme Performanceverluste bedeuten.", + 'ADMIN_CONFIG_STATS_TITLE' => "Interne Statistik Einstellungen", 'ADMIN_CONFIG_STATS_ENABLED' => "Sollen die internen Statistiken eingeschaltet sein? Das Abschalten dieser Statistiken kann etwas Performance bringen, ist aber für Performancemessungen vorraussetzend.", )); diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 4bfdd0484f..4a0ddb570c 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -302,8 +302,8 @@ function doRegistration () { detectServerName() . getEncryptSeperator() . detectRemoteAddr() . getEncryptSeperator() . detectUserAgent() . '/' . - getConfig('SITE_KEY') . '/' . - getConfig('DATE_KEY') . '/' . + getSiteKey() . '/' . + getDateKey() . '/' . getConfig('CACHE_BUSTER') )); diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index c44c562cd6..46c1250967 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -83,7 +83,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // END - if // Is the API id and MD5 hash there? - if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) { + if ((getWernisApiId() == '') || (getWernisApiMd5() == '')) { // Abort here... return array( 'status' => 'failed_general', @@ -92,8 +92,8 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // END - if // Add more request data - $requestData['api_id'] = getConfig('wernis_api_id'); - $requestData['api_key'] = getConfig('wernis_api_md5'); + $requestData['api_id'] = getWernisApiId(); + $requestData['api_key'] = getWernisApiMd5(); // Is a purpose there? if (isset($requestData['purpose'])) { @@ -105,7 +105,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // END - if // Construct the request string - $requestString = getConfig('wernis_api_url') . $scriptName; + $requestString = getWernisApiUrl() . $scriptName; // Get the raw response from the lower function $response = sendPostRequest($requestString, $requestData); @@ -233,7 +233,7 @@ function WERNIS_TEST_API () { // Widthdraw this amount function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { // Is the sponsor extension installed? - if (getConfig('wernis_withdraw_active') != 'Y') { + if (!isWernisWithdrawActive()) { if (!isExtensionActive('sponsor')) { // No, abort here return false; @@ -251,7 +251,7 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { 'sub_request' => 'receive', 't_uid' => bigintval($wdsId), 't_md5' => $userMd5, - 'r_uid' => getConfig('wernis_refid'), + 'r_uid' => getWernisRefid(), 'amount' => bigintval($amount), 'purpose' => getMaskedMessage('WERNIS_API_PURPOSE_WITHDRAW', getMemberId()) ); @@ -286,8 +286,8 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) { // Prepare the request data $requestData = array( 'sub_request' => 'send', - 't_uid' => getConfig('wernis_refid'), - 't_md5' => getConfig('wernis_pass_md5'), + 't_uid' => getWernisRefid(), + 't_md5' => getWernisPassMd5(), 'r_uid' => bigintval($wdsId), 'amount' => bigintval($amount), 'purpose' => getMaskedMessage('WERNIS_API_PURPOSE_PAYOUT', getMemberId()) @@ -341,8 +341,15 @@ function translateWernisTransferStatus ($status) { // Log the transfer function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = '', $status = '') { // Register this wernis movement - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_wernis` (`userid`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type`,`wernis_api_message`,`wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')", - array(getMemberId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_wernis` (`userid`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type`,`wernis_api_message`,`wernis_api_status`) VALUES (%s, %s, %s, UNIX_TIMESTAMP(), '%s', '%s', '%s')", + array( + getMemberId(), + bigintval($wdsId), + bigintval($amount), + $type, + $message, + $status + ), __FUNCTION__, __LINE__); } // Take fees and factor @@ -351,47 +358,207 @@ function WERNIS_TAKE_FEE ($points, $mode) { //* DEBUG: */ debugOutput('mode='.$mode.',points='.$points); if (!in_array($mode, array('payout', 'withdraw'))) { // Log error and abort - logDebugMessage(__FUNCTION__, __LINE__, "userid={getMemberId()},mode={$mode},points={$points}"); + logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . getMemberId() . ',mode=' . $mode . ',points=' . $points); return false; } // END - if // Is there a percentage or fixed fee? - if (getConfig('wernis_'.$mode.'_fee_percent') > 0) { + if (getConfig('wernis_' . $mode . '_fee_percent') > 0) { // Percentage fee $points -= $points * getConfig('wernis_'.$mode.'_fee_percent') / 100; - } elseif (getConfig('wernis_'.$mode.'_fee_fix') > 0) { + } elseif (getConfig('wernis_' . $mode . '_fee_fix') > 0) { // Fixed fee - $points -= getConfig('wernis_'.$mode.'_fee_fix'); + $points -= getConfig('wernis_' . $mode . '_fee_fix'); } // Divide/multiply the factor if ($mode == 'payout') { // Divide for payout - $points = $points / getConfig('wernis_payout_factor'); + $points = $points / getWernisPayoutFactor(); } else { // Multiply for withdraw - $points = $points * getConfig('wernis_withdraw_factor'); + $points = $points * getWernisWithdrawFactor(); } // Return value - //* DEBUG: */ debugOutput('mode='.$mode.',points='.$points); + //* DEBUG: */ debugOutput('mode=' . $mode . ',points=' . $points); return $points; } // Add withdraw fees and factor function WERNIS_ADD_WITHDRAW_FEE ($points) { // Is there a percentage or fixed fee? - if (getConfig('wernis_withdraw_fee_percent') > 0) { + if (getWernisWithdrawFeePercent() > 0) { // Percentage fee - $points += $points * getConfig('wernis_withdraw_fee_percent') / 100; - } elseif (getConfig('wernis_withdraw_fee_fix') > 0) { + $points += $points * getWernisWithdrawFeePercent() / 100; + } elseif (getWernisWithdrawFeeFix() > 0) { // Fixed fee - $points += getConfig('wernis_withdraw_fee_fix'); + $points += getWernisWithdrawFeeFix(); } // Return value return $points; } +// --------------------------------------------------------------------------- +// Wrapper functions +// --------------------------------------------------------------------------- + +// Wrapper function for 'wernis_refid' +function getWernisRefid () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_refid'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_pass_md5' +function getWernisPassMd5 () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_pass_md5'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_api_id' +function getWernisApiId () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_api_id'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_api_md5' +function getWernisApiMd5 () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_api_md5'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_api_url' +function getWernisApiUrl () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_api_url'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_withdraw_active' +function getWernisWithdrawActive () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_withdraw_active'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_payout_active' +function getWernisPayoutActive () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_payout_active'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_withdraw_active' +function isWernisWithdrawActive () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = (getConfig('wernis_withdraw_active') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_payout_active' +function isWernisPayoutActive () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = (getConfig('wernis_payout_active') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_withdraw_factor' +function getWernisWithdrawFactor () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_withdraw_factor'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_payout_factor' +function getWernisPayoutFactor () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_payout_factor'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_withdraw_fee_percent' +function getWernisWithdrawFeePercent () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_withdraw_fee_percent'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper function for 'wernis_withdraw_fee_fix' +function getWernisWithdrawFeeFix () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Get config entry + $GLOBALS[__FUNCTION__] = getConfig('wernis_withdraw_fee_fix'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/modules/admin.php b/inc/modules/admin.php index eef42adeac..ad48308d35 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -199,7 +199,7 @@ if (!isAdminRegistered()) { ); // Validation okay so display form for final password change - loadTemplate('form_reset_password_form', false, $content); + 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--}'); @@ -208,14 +208,14 @@ if (!isAdminRegistered()) { // Okay, we shall the admin password here. So first revalidate the hash if (adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('login'))) { // Output result - loadTemplate('form_reset_pass_done', false, doResetAdminPassword(postRequestParameter('login'), postRequestParameter('pass1'))); + 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--}'); } } else { // Output reset password form - loadTemplate('admin_send_reset_link'); + loadTemplate('admin_reset_password_send_link'); } } elseif ((!isSessionVariableSet('admin_id')) || (!isSessionVariableSet('admin_md5')) || (!isSessionVariableSet('admin_last'))) { // At leat one administrator account was created @@ -300,19 +300,29 @@ if (!isAdminRegistered()) { $passwdMessage = ''; // No login entered? - if (!isPostRequestParameterSet('login')) $loginMessage = '{--ADMIN_NO_LOGIN--}'; + if (!isPostRequestParameterSet('login')) { + $loginMessage = '{--ADMIN_NO_LOGIN--}'; + } // END - if // An error comes back from login? - if ((!empty($ret)) && (postRequestParameter('ok') == '404')) $loginMessage = $ret; + if ((!empty($ret)) && (postRequestParameter('ok') == '404')) { + $loginMessage = $ret; + } // END - if // No password entered? - if (!isPostRequestParameterSet('password')) $passwdMessage = '{--ADMIN_NO_PASS--}'; + if (!isPostRequestParameterSet('password')) { + $passwdMessage = '{--ADMIN_NO_PASS--}'; + } // END - if // Or password too short? - if (strlen(postRequestParameter('password')) < 4) $passwdMessage = '{--ADMIN_SHORT_PASS--}'; + if (strlen(postRequestParameter('password')) < 4) { + $passwdMessage = '{--ADMIN_SHORT_PASS--}'; + } // END - if // An error comes back from login? - if ((!empty($ret)) && (postRequestParameter('ok') == 'password')) $passwdMessage = $ret; + if ((!empty($ret)) && (postRequestParameter('ok') == 'password')) { + $passwdMessage = $ret; + } // END - if // Load message template $content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage); diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 126e4dd5be..904a5d17c0 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -1136,13 +1136,13 @@ function sendAdminPasswordResetLink ($email) { unset($content['password']); // Prepare email - $mailText = loadEmailTemplate('form_reset_password', $content); + $mailText = loadEmailTemplate('admin_reset_password', $content); // Send it out - sendEmail($email, '{--ADMIN_RESET_PASS_LINK_SUBJECT--}', $mailText); + sendEmail($email, '{--ADMIN_RESET_PASSWORD_LINK_SUBJECT--}', $mailText); // Prepare output - return '{--ADMIN_RESET_LINK_SENT--}'; + return '{--ADMIN_RESET_PASSWORD_LINK_SENT--}'; } // Validate hash and login for password reset diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index eca649dee4..97e547a81e 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -136,7 +136,9 @@ if (!isGetRequestParameterSet('mid')) { // Run SQL query for normal mails $result_list = SQL_QUERY($sql, __FILE__, __LINE__); -if ((!empty($SQL2)) && (empty($WHO))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__); +if ((!empty($SQL2)) && (empty($WHO))) { + $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__); +} // END - if // Calculate pages $numPages = '0'; diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index e6c3d6296e..27166d8584 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -56,13 +56,13 @@ $rdf = new fase4_rdf(); $rdf->_use_nl2br = false; $rdf->use_dynamic_display(false); $rdf->set_CacheDir(getCachePath() . ''); -$rdf->set_salt(md5(getConfig('SITE_KEY'))); +$rdf->set_salt(md5(getSiteKey())); $rdf->set_max_item(10); $rdf->set_Options( array( 'textinput' => 'hidden', 'sitelink' => 'http://www.wds66.com', - 'refid' => getConfig('wernis_refid'), + 'refid' => getWernisRefid(), 'reflink' => '/ref.php?refid=', ) ); @@ -70,12 +70,12 @@ $rdf->set_Options( // Use proxy? if (isProxyUsed()) { // Set proxy data - $rdf->set_proxy(getConfig('proxy_host'), getConfig('proxy_port')); + $rdf->set_proxy(getProxyHost(), getProxyPort()); // Use auth? - if (getConfig('proxy_username') != '') { + if (getProxyUsername() != '') { // Set auth data - $rdf->set_proxy_auth(getConfig('proxy_username'), getConfig('proxy_password')); + $rdf->set_proxy_auth(getProxyUsername(), getProxyPassword()); } // END - if } // END - if diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index e1a6504383..f8c43992b5 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -52,7 +52,7 @@ if ((!isExtensionActive('wernis')) && (!isAdmin())) { } // END - if // Check if the admin has entered the data -if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) { +if ((getWernisApiId() == '') || (getWernisApiMd5() == '')) { // Something important is missing... loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_API_DATA_MISSING--}'); return; @@ -104,7 +104,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo } // END - if // Is the withdraw mode active? - if (getConfig('wernis_withdraw_active') == 'Y') { + if (isWernisWithdrawActive()) { // Add link $content['withdraw_link'] = '
{--MEMBER_WERNIS_MODE_WITHDRAW--}
'; } // END - if @@ -132,7 +132,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo // Add points to content array $content['points'] = $points; -} elseif ((getRequestParameter('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) { +} elseif ((getRequestParameter('mode') == 'withdraw') && (isWernisWithdrawActive())) { // Prepare data for the template $content['points'] = getTotalPoints(getMemberId()); $content['wernis_userid'] = ''; diff --git a/inc/template-functions.php b/inc/template-functions.php index 4a3b1cb7b0..d15de9e25f 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -331,7 +331,7 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC (' . $template . ')
- {--TEMPLATE_CONTENT--} + {--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
'; } else { @@ -490,9 +490,9 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU {--TEMPLATE_404--}: ' . $template . '
- {--TEMPLATE_CONTENT--} + {--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
- {--TEMPLATE_DATA--} + {--TEMPLATE_DATA--}:
' . print_r($DATA, true) . '
'; diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index b5d5bf4bd1..19da2ee5b6 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1512,6 +1512,30 @@ function getSecretKey () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for SITE_KEY +function getSiteKey () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('SITE_KEY'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for DATE_KEY +function getDayKey () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('DATE_KEY'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // "Getter" for master_salt function getMasterSalt () { // Do we have cache? @@ -2076,6 +2100,18 @@ function getMailsPage () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for rand_no +function getRandNo () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('rand_no'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // "Getter" for __DB_NAME function getDbName () { // Do we have cache? @@ -2100,6 +2136,54 @@ function getDomain () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for proxy_username +function getProxyUsername () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('proxy_username'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for proxy_password +function getProxyPassword () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('proxy_password'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for proxy_host +function getProxyHost () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('proxy_host'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for proxy_port +function getProxyPort () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('proxy_port'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // "Getter" for SMTP_HOSTNAME function getSmtpHostname () { // Do we have cache? diff --git a/templates/de/html/admin/admin_config_autopurge.tpl b/templates/de/html/admin/admin_config_autopurge.tpl index 14e5f095b0..21cfdf949f 100644 --- a/templates/de/html/admin/admin_config_autopurge.tpl +++ b/templates/de/html/admin/admin_config_autopurge.tpl @@ -3,12 +3,12 @@ @@ -51,12 +51,12 @@
- {--ADMIN_AUTOPURGE_CONFIGURATION--} + {--ADMIN_CONFIG_AUTOPURGE_TITLE--}
- {--ADMIN_AUTOPURGE_INACTIVE_TITLE--} + {--ADMIN_CONFIG_AUTOPURGE_INACTIVE_TITLE--}
- {--ADMIN_AUTOPURGE_MAILID_TITLE--} + {--ADMIN_CONFIG_AUTOPURGE_MAILID_TITLE--}
- {--ADMIN_OPTION_AUTOPURGE_ACTIVE--}: + {--ADMIN_CONFIG_AUTOPURGE_ACTIVE--}: {--YES--}
@@ -65,7 +65,7 @@
- {--ADMIN_OPTION_MAIL_LIFETIME--}: + {--ADMIN_CONFIG_MAIL_LIFETIME--}: $content[auto_purge] diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index 09816d985e..359867cac3 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -26,7 +26,7 @@
- {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}: + {--ADMIN_CONFIG_MAX_UNCONFIRMED_MAILS--}: @@ -35,7 +35,7 @@
- {--ADMIN_OPTION_MAX_TEXT_LENGTH--}: + {--ADMIN_CONFIG_MAX_TEXT_LENGTH--}: @@ -44,7 +44,7 @@
- {--ADMIN_OPTION_CHECK_EMAIL_TEXT--} + {--ADMIN_CONFIG_CHECK_EMAIL_TEXT--} {--YES--}
@@ -54,7 +54,7 @@
- {--ADMIN_OPTION_CHECK_EMAIL_SUBJECT--} + {--ADMIN_CONFIG_CHECK_EMAIL_SUBJECT--} {--YES--}
@@ -64,7 +64,7 @@
- {--ADMIN_OPTION_URL_BLACKLIST--} + {--ADMIN_CONFIG_URL_BLACKLIST--} {--YES--}
diff --git a/templates/de/html/admin/admin_config_other.tpl b/templates/de/html/admin/admin_config_other.tpl index bf170f398d..401971c8f9 100644 --- a/templates/de/html/admin/admin_config_other.tpl +++ b/templates/de/html/admin/admin_config_other.tpl @@ -3,12 +3,14 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
- {--ADMIN_OTHER_SETTINGS--} + {--ADMIN_CONFIG_OTHER_TITLE--}
{--ADMIN_OPTION_CODE_LENGTH--}: + {--ADMIN_CONFIG_CODE_LENGTH--}: +
{--ADMIN_CODE_LENGTH_NOTE--}
@@ -17,7 +19,7 @@
- {--ADMIN_OPTION_ACTIVATE_EXCHANGE--}: + {--ADMIN_CONFIG_ACTIVATE_EXCHANGE--}: @@ -26,7 +28,7 @@
- {--ADMIN_OPTION_MINIMUM_AGE--}: + {--ADMIN_CONFIG_MINIMUM_AGE--}: @@ -34,35 +36,45 @@
{--ADMIN_OPTION_POINTS_WORD--}: + {--ADMIN_CONFIG_POINTS_WORD--}: +
{--ADMIN_OPTION_MT_WORD--}: + {--ADMIN_CONFIG_MT_WORD--}: +
{--ADMIN_OPTION_MT_WORD2--}: + {--ADMIN_CONFIG_MT_WORD2--}: +
{--ADMIN_OPTION_MT_WORD3--}: + {--ADMIN_CONFIG_MT_WORD3--}: +
{--ADMIN_OPTION_MAX_COMMA--}: + {--ADMIN_CONFIG_MAX_COMMA--}: +
{--ADMIN_OPTION_REJECT_URL--}: + {--ADMIN_CONFIG_REJECT_URL--}: +
{--ADMIN_OPTION_CSS_PHP--}: + {--ADMIN_CONFIG_CSS_PHP--}: + - {--ADMIN_SELECT_CSS_OUTPUT_MODE_DIRECT--}
- {--ADMIN_SELECT_CSS_OUTPUT_MODE_FILE--}
- {--ADMIN_SELECT_CSS_OUTPUT_MODE_INLINE--} + {--ADMIN_CONFIG_SELECT_CSS_OUTPUT_MODE_DIRECT--}
+ {--ADMIN_CONFIG_SELECT_CSS_OUTPUT_MODE_FILE--}
+ {--ADMIN_CONFIG_SELECT_CSS_OUTPUT_MODE_INLINE--}
{--ADMIN_OPTION_GUEST_MENU--}: + {--ADMIN_CONFIG_GUEST_MENU--}: + {--ADMIN_IS_SHOWN--}
{--ADMIN_IS_NOT_SHOWN--} @@ -101,7 +119,9 @@
{--ADMIN_OPTION_MEMBER_MENU--}: + {--ADMIN_CONFIG_MEMBER_MENU--}: + {--ADMIN_IS_SHOWN--}
{--ADMIN_IS_NOT_SHOWN--} @@ -109,7 +129,9 @@
{--ADMIN_OPTION_YOURE_HERE--}: + {--ADMIN_CONFIG_YOURE_HERE--}: + {--ADMIN_IS_SHOWN--}
{--ADMIN_IS_NOT_SHOWN--} @@ -117,7 +139,9 @@
{--ADMIN_OPTION_SHOW_TIMINGS--}: + {--ADMIN_CONFIG_SHOW_TIMINGS--}: + {--YES--}
{--NO--} @@ -125,7 +149,9 @@
{--ADMIN_OPTION_SHOW_POINTS_UNCONFIRMED--}: + {--ADMIN_CONFIG_SHOW_POINTS_UNCONFIRMED--}: + {--YES--}
{--NO--} @@ -133,7 +159,9 @@
{--ADMIN_OPTION_MAILID_REDIRECT--}: + {--ADMIN_CONFIG_MAILID_REDIRECT--}: + {--ADMIN_CONFIG_MAILID_REDIRECT_INDEX--}
{--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--} @@ -142,19 +170,23 @@
- {--ADMIN_SENDING_SETTINGS--} + {--ADMIN_CONFIG_SENDING_TITLE--}
{--ADMIN_OPTION_POOL_MAX_SEND--}: + {--ADMIN_CONFIG_POOL_MAX_SEND--}: +
{--ADMIN_OPTION_ZIPCODE_ACTIVE--}: + {--ADMIN_CONFIG_ZIPCODE_ACTIVE--}: + {--YES--}
{--NO--} @@ -162,7 +194,9 @@
{--ADMIN_OPTION_AUTOSEND_ACTIVE--}: + {--ADMIN_CONFIG_AUTOSEND_ACTIVE--}: + {--YES--}
{--NO--} @@ -171,12 +205,14 @@
- {--ADMIN_NOTIFY_SETTINGS--} + {--ADMIN_CONFIG_NOTIFY_TITLE--}
{--ADMIN_OPTION_SEND_UPDATE--}: + {--ADMIN_CONFIG_SEND_UPDATE--}: + {--YES--}
{--NO--} @@ -184,7 +220,9 @@
{--ADMIN_OPTION_NOTIFY_ADMIN--}: + {--ADMIN_CONFIG_NOTIFY_ADMIN--}: + {--YES--}
{--NO--} @@ -193,49 +231,51 @@
- {--ADMIN_TIMEOUT_SETTINGS--} + {--ADMIN_CONFIG_TIMEOUT_TITLE--}
{--ADMIN_OPTION_MAX_ONLINETIME--}:{--ADMIN_CONFIG_MAX_ONLINETIME--}: $content[online_timeout]
{--ADMIN_OPTION_URL_TIME_LOCK--}:{--ADMIN_CONFIG_URL_TIME_LOCK--}: $content[url_tlock]
- {--ADMIN_PROFILE_TIME_SETTINGS--} + {--ADMIN_CONFIG_PROFILE_TIME_TITLE--}
{--ADMIN_OPTION_LOCK_PROFILE_TIME--}:{--ADMIN_CONFIG_LOCK_PROFILE_TIME--}: $content[profile_lock]
{--ADMIN_OPTION_PROFILE_UPDATE--}:{--ADMIN_CONFIG_PROFILE_UPDATE--}: $content[profile_update]
{--ADMIN_OPTION_PROFILE_REUPDATE--}:{--ADMIN_CONFIG_PROFILE_REUPDATE--}: $content[profile_reupdate]
- {--ADMIN_SQL_SETTINGS--} + {--ADMIN_CONFIG_SQL_TITLE--}
{--ADMIN_DISPLAY_DEBUG_SQLS--} + {--ADMIN_CONFIG_DISPLAY_DEBUG_SQLS--} + {--YES--}
{--NO--} @@ -244,12 +284,14 @@
- {--ADMIN_STATS_SETTINGS--} + {--ADMIN_CONFIG_STATS_TITLE--}
{--ADMIN_CONFIG_STATS_ENABLED--} + {--ADMIN_CONFIG_STATS_ENABLED--} + {--YES--}
{--NO--} diff --git a/templates/de/html/admin/admin_logout_sql_patches_remove.tpl b/templates/de/html/admin/admin_logout_sql_patches_remove.tpl index 82732fad17..eee379285a 100644 --- a/templates/de/html/admin/admin_logout_sql_patches_remove.tpl +++ b/templates/de/html/admin/admin_logout_sql_patches_remove.tpl @@ -1,11 +1,12 @@ -
+
+
{--ADMIN_LOGOUT_SQL_PATCHES_REMOVE--}
-
+ diff --git a/templates/de/html/admin/admin_reset_pass_done.tpl b/templates/de/html/admin/admin_reset_pass_done.tpl index 25cb1bb643..11f5d85d80 100644 --- a/templates/de/html/admin/admin_reset_pass_done.tpl +++ b/templates/de/html/admin/admin_reset_pass_done.tpl @@ -1,17 +1 @@ - - - - - - - - - - -
- {--ADMIN_RESET_PASS_DONE_TITLE--} -
- $content -
+ diff --git a/templates/de/html/admin/admin_reset_password.tpl b/templates/de/html/admin/admin_reset_password.tpl index 9e6a9a80b7..7497821f80 100644 --- a/templates/de/html/admin/admin_reset_password.tpl +++ b/templates/de/html/admin/admin_reset_password.tpl @@ -17,7 +17,7 @@
diff --git a/templates/de/html/admin/admin_reset_password_done.tpl b/templates/de/html/admin/admin_reset_password_done.tpl new file mode 100644 index 0000000000..ed43bf339a --- /dev/null +++ b/templates/de/html/admin/admin_reset_password_done.tpl @@ -0,0 +1,19 @@ +
+ + + + + + + + + + +
+ {--ADMIN_RESET_PASSWORD_DONE_TITLE--} +
+ $content +
+
diff --git a/templates/de/html/admin/admin_reset_password_send_link.tpl b/templates/de/html/admin/admin_reset_password_send_link.tpl new file mode 100644 index 0000000000..577f798142 --- /dev/null +++ b/templates/de/html/admin/admin_reset_password_send_link.tpl @@ -0,0 +1,29 @@ +
+
+ + + + + + + + + + + +
+ {--ADMIN_RESET_PASSWORD_SEND_LINK_TITLE--} +
+ {--ADMIN_ENTER_EMAIL--} + + +
+
+ +
+ {--ADMIN_RESET_PASSWORD_SEND_LINK_NOTE--} +
+
diff --git a/templates/de/html/admin/admin_send_reset_link.tpl b/templates/de/html/admin/admin_send_reset_link.tpl index b402d08054..11f5d85d80 100644 --- a/templates/de/html/admin/admin_send_reset_link.tpl +++ b/templates/de/html/admin/admin_send_reset_link.tpl @@ -1,29 +1 @@ -
-
- - - - - - - - - - - -
- {--ADMIN_SEND_RESET_LINK_TITLE--} -
- {--ADMIN_ENTER_EMAIL--} - - -
-
- -
- {--ADMIN_SEND_RESET_LINK_NOTE--} -
-
+ -- 2.30.2