Naming convention applied, new API function introduced:
authorRoland Häder <roland@mxchange.org>
Mon, 30 Aug 2010 11:56:44 +0000 (11:56 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 30 Aug 2010 11:56:44 +0000 (11:56 +0000)
- Even more templates renamed to naming convention
- New (cached) API function ifUserPointsLocked() introduced
- The above function has needed in mailid_top.php, there was an uninitialized
  variable used which was a relict from older days
- TODOs.txt updated

28 files changed:
.gitattributes
DOCS/TODOs.txt
inc/language/de.php
inc/language/maintenance_de.php
inc/libs/register_functions.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-maintenance.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/mysql-manager.php
inc/wrapper-functions.php
mailid_top.php
templates/de/html/admin/admin_config_cats.tpl
templates/de/html/admin/admin_edit_mods.tpl [new file with mode: 0644]
templates/de/html/admin/admin_edit_mods_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_edit_theme.tpl [new file with mode: 0644]
templates/de/html/admin/admin_edit_theme_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_import_theme.tpl [new file with mode: 0644]
templates/de/html/admin/admin_import_theme_none.tpl [new file with mode: 0644]
templates/de/html/admin/admin_import_theme_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_menu_status_row.tpl
templates/de/html/admin/admin_mods_edit.tpl
templates/de/html/admin/admin_mods_edit_row.tpl
templates/de/html/admin/admin_theme_edit.tpl
templates/de/html/admin/admin_theme_edit_row.tpl
templates/de/html/admin/admin_theme_import.tpl
templates/de/html/admin/admin_theme_import_none.tpl
templates/de/html/admin/admin_theme_import_row.tpl

index f4dc8022d17dbab6c6b694fb830b75e946e8db99..615c672e60603f3f7bcb3b54503e0084d43dcd59 100644 (file)
@@ -1067,6 +1067,8 @@ templates/de/html/admin/admin_edit_guest_menu_form.tpl -text svneol=unset#text/p
 templates/de/html/admin/admin_edit_guest_menu_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_member_menu.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_member_menu_row.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_edit_mods.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_edit_mods_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_network_params.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_network_params_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_network_types.tpl -text svneol=unset#text/plain
@@ -1086,6 +1088,8 @@ templates/de/html/admin/admin_edit_sponsor_edit.tpl -text svneol=unset#text/plai
 templates/de/html/admin/admin_edit_sponsor_sub_points.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_surfbar_urls.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_surfbar_urls_row.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_edit_theme.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_edit_theme_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_edit_user.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_email_archiv.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_email_archiv_row.tpl -text svneol=unset#text/plain
@@ -1105,6 +1109,9 @@ templates/de/html/admin/admin_extensions_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_extensions_text.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_footer.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_guest_menu_status.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_import_theme.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_import_theme_none.tpl svneol=native#text/plain
+templates/de/html/admin/admin_import_theme_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_admins.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_admins_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_autopurge.tpl -text svneol=unset#text/plain
index 1ae53b9adc727c764d6af8d3260f3a238b066ee5..57dfcf1dea32f7cc3afd3af8d80172f69d50ea41 100644 (file)
 ./inc/functions.php:2261:      // @TODO This is still very static, rewrite it somehow
 ./inc/gen_sql_patches.php:96:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:59:        // @TODO DEACTIVATED: changeDataInFile(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
-./inc/language/de.php:1101:// @TODO Rewrite these two constants
-./inc/language/de.php:1116:// @TODO Rewrite these three constants
-./inc/language/de.php:300:     // @TODO Following two are unused?
-./inc/language/de.php:801:// @TODO Are these constants longer used?
+./inc/language/de.php:1089:// @TODO Rewrite these two constants
+./inc/language/de.php:1104:// @TODO Rewrite these three constants
+./inc/language/de.php:288:     // @TODO Following two are unused?
+./inc/language/de.php:789:// @TODO Are these constants longer used?
 ./inc/language-functions.php:234:      // @TODO These are all valid languages, again hard-coded
 ./inc/language-functions.php:46:// @TODO Rewrite all language constants to this function.
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
@@ -71,9 +71,9 @@
 ./inc/libs/rallye_functions.php:855:// @TODO Please document this function
 ./inc/libs/rallye_functions.php:911:           // Load count @TODO Can't we rewrite this to our API?
 ./inc/libs/refback_functions.php:61:           // @TODO Try to rewrite the following unset()
-./inc/libs/register_functions.php:292: // @TODO Rewrite these all to a single filter
-./inc/libs/register_functions.php:362: // @TODO Rewrite this to a filter
-./inc/libs/register_functions.php:369: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
+./inc/libs/register_functions.php:287: // @TODO Rewrite these all to a single filter
+./inc/libs/register_functions.php:357: // @TODO Rewrite this to a filter
+./inc/libs/register_functions.php:364: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
 ./inc/libs/sponsor_functions.php:162:                                  // @TODO Rewrite this to API function
 ./inc/libs/sponsor_functions.php:433:                  // @TODO Rewrite this to API function
 ./inc/libs/surfbar_functions.php:1540:         // @TODO This can be somehow rewritten
 ./templates/de/html/admin/admin_admins_contct_form.tpl:4:      <!-- @TODO Shouldn't we add a title here? //-->
 ./templates/de/html/admin/admin_config_other.tpl:67:                   <!-- @TODO Rewrite this selection to one of our functions //-->
 ./templates/de/html/admin/admin_edit_admin_menu.tpl:4:<!-- @TODO Shouldn't we add a title here? //-->
+./templates/de/html/admin/admin_edit_mods.tpl:4:       <!-- @TODO Shouldn't we add a title here? //-->
 ./templates/de/html/admin/admin_list_autopurge.tpl:2:  <!-- @TODO Shouldn't we add a title here? //-->
 ./templates/de/html/admin/admin_list_beg.tpl:3:        <!-- @TODO No title here? //-->
 ./templates/de/html/admin/admin_list_bonus.tpl:3:      <!-- @TODO No title here? //-->
 ./templates/de/html/admin/admin_list_wernis_main.tpl:2:<!-- @TODO No title here? //-->
 ./templates/de/html/admin/admin_login_form.tpl:34:     @TODO Doesn't work with sessions
 ./templates/de/html/admin/admin_login_form.tpl:37:             @TODO Try to move the select box to our generic functions
-./templates/de/html/admin/admin_mods_edit.tpl:3:       <!-- @TODO Shouldn't we add a title here? //-->
 ./templates/de/html/admin/admin_optimize.tpl:3:        <!-- @TODO Shouldn't we add a title here? //-->
 ./templates/de/html/admin/admin_send_bonus_form.tpl:4: <!-- @TODO Maybe add some title? //-->
 ./templates/de/html/guest/guest_login.tpl:21:  @TODO Deactivated feature, try to implement it or remove it.
 ### ### DEPRECATION FOLLOWS: ### ###
 ./inc/modules/admin/admin-inc.php:439:// @DEPRECATED
 ./templates/de/emails/profile-updte.tpl:1:@DEPRECATED
+./templates/de/html/admin/admin_mods_edit_row.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_mods_edit.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_theme_edit_row.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_theme_edit.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_theme_import_none.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_theme_import_row.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_theme_import.tpl:1:<!-- @DEPRECATED //-->
 ### ### template-warnings.log follows: ### ###
 Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl.
 Warning: Not parsing JavaScript templates/de/html/js/js_cookies_disabled.tpl.
index 21f6321240a271c8bec30d122f37ffa67d747067..bc67d504cf73eee5e05cee334601cc0bb5abfc24 100644 (file)
@@ -45,18 +45,6 @@ if (!defined('__SECURITY')) {
 // Installation/setup
 addMessages(array(
 // Language constants
-       '_TABLE' => "Tabelle",
-       '_SIZE' => "Gr&ouml;&szlig;e",
-       '_STATUS' => "Status",
-       '_SPACESAVED' => "Freigegeben",
-       '_ORESULT' => "Optimization Resultat",
-       '_OJETZT' => "Jetzt freigegeben",
-       '_ONR' => "Sie haben bereits ",
-       '_ONRR' => "mal die Tabellen optimiert",
-       '_OGESAMT' => "KiloByte Gesamt optimiert",
-       '_WOPT' => "wurde bereits optimiert",
-       '_OKOPT' => "Optimiert.",
-       'MAILER_DOWN_FOR_MAINTENANCE' => "System wegen Wartungsarbeiten geschlossen.",
        'MODULE_REGISTRY_404' => "Modul <span class=\"data\">%s</span> existiert nicht.",
        'MODULE_ERROR_404' => "Fehler: Modul nicht gefunden",
        'UNKNOWN_MODULE_DETECTED' => "Unbekanntes Modul %s",
@@ -68,13 +56,13 @@ addMessages(array(
        'FATAL_CANNOT_WRITE_CONFIG' => "Kann Konfigurationsdaten nicht speichern, da ich keinen Schreibzugriff auf {?CACHE_PATH?}/config-local.php habe.",
        'FATAL_CANNOT_CREATE_TMP' => "Kann eine tempor&auml;re Datei nicht erzeugen! Bitte setzen Sie CHMOD 777 auf Verzeichnis inc.",
        'FATAL_ERROR' => "Fataler Fehler",
-       'NO_RENDER_DIRECT' => "Sie haben weder 'render' noch 'direct' als Ausgabe-Modus eingestellt.",
+       'NO_RENDER_DIRECT' => "Sie haben weder &#39;render&#39; noch &#39;direct&#39; als Ausgabe-Modus eingestellt.",
        'FATAL_NO' => "Fataler Fehler Nr. #",
        'FATAL_CORRECT_ERRORS' => "Kann nicht fortsetzen! Bitte korregieren Sie erst die obrigen Probleme und versuchen Sie es dann erneut.",
        'YES' => "Ja",
        'NO' => "Nein",
        'RUNTIME_PROBLEMS_DETECTED' => "Laufzeit-Problem erkannt.",
-       'FATAL_INC_WRITABLE' => "Das Verzeichnis inc ist beschreibbar! Bitte setzen Sie die Zugriffsrechte auf 755 oder 555.",
+       'FATAL_INC_WRITABLE' => "Das Verzeichnis <strong>inc</strong> ist beschreibbar! Bitte setzen Sie die Zugriffsrechte auf 755 oder 555.",
        'MYSQL_ERRORS' => "Es sind MySQL-Fehler aufgetreten! Bitte korregieren Sie diese.",
        'UNKNOWN_MODULE_STATUS' => "Der Return-Code <span class=\"data\">%s</span> ist unbekannt.",
        'MODULE_IS_LOCKED' => "Das Modul <span class=\"data\">%s</span> wurde gesperrt.",
@@ -662,8 +650,8 @@ addMessages(array(
        'ADMIN_CHANGE_MENUS' => "&Auml;ndern",
        'ADMIN_CHANGE_MEMBER_MENU' => "Verdecken, anzeigen, deaktivieren, aktivieren des Mitgliedsmen&uuml;s",
        'ADMIN_CHANGE_MENU' => "&Auml;ndern von <span class=\"data\">%s</span> Men&uuml;eintr&auml;gen",
-       'IS_VISIBLE' => "Wird angezeigt",
-       'IS_ACTIVE' => "Aktiviert",
+       'ADMIN_IS_VISIBLE' => "Wird angezeigt",
+       'ADMIN_IS_ACTIVE' => "Aktiviert",
        'ADMIN_CHANGE_ENTRIES' => "&Auml;nderungen durchf&uuml;hren",
        'BASE_URL_NOTE' => "Ohne abschliessendem /.",
        'ADMIN_WRONG_CALL' => "Falscher Aufruf einer Aktion oder des Scriptes. Bitte navigieren Sie links weiter.",
@@ -870,7 +858,7 @@ addMessages(array(
        'MAILID_LINK' => "Best.-Link",
        'UNKNOWN_MAILID_CODE' => "Unbekannter Fehler-Code <span class=\"data\">%s</span> erkannt.",
        'ADMIN_CHANGE_GUEST_MENU_TITLE' => "Verdecken, anzeigen, deaktivieren, aktivieren des Gastmen&uuml;s",
-       'IS_LOCKED' => "Ist gesperrt",
+       'ADMIN_MENU_IS_LOCKED' => "Ist gesperrt",
        'ADMIN_REMOVE_STATS_ENTRY' => "Hier klicken, um Mitgliederstatistik zu entfernen.",
        'ADMIN_USER_STATS_REMOVED' => "Mitgliederstatistiken entfernt.",
        'MAIL_WILL_NEVER_EXPIRE' => "Best&auml;tigungslink verf&auml;llt nicht.",
index 1adc52dcd1123bfc395d8ab67771abad67abe427..dfcc1a83bc6af792e5a6f8232088439bd5b75f01 100644 (file)
@@ -4,7 +4,7 @@
  * ===================                          Last change: 08/13/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
- * File              : de.php                                           *
+ * File              : maintenance_de.php                               *
  * -------------------------------------------------------------------- *
  * Short description : German langugage support                         *
  * -------------------------------------------------------------------- *
@@ -44,6 +44,9 @@ if (!defined('__SECURITY')) {
 
 // Language constans
 addMessages(array(
+       // General messages
+       'MAILER_DOWN_FOR_MAINTENANCE' => "System wegen Wartungsarbeiten geschlossen.",
+       // Admin messages
        'ADMIN_CHANGE_MAINTENANCE_MODE' => "Wartungsmodus &auml;ndern",
        'ADMIN_MAINTENANCE_MODE_INTRO' => "Wartungsmodus Ihrer Webseite",
        'ADMIN_MAINTENANCE_MODE_IS_INACTIVE' => "Der Wartungsmodus ist derzeit ausgeschaltet. Wenn Sie ihn jetzt aktivieren, wird Ihre Webseite gesperrt. Nur Administratoren k&ouml;nnen diese dann besuchen.",
index 6ff22480a41ea2685d63716e9e68bf699af04520..2cb0bfd1c24522c650f57159ad2ecc6bccc43cc5 100644 (file)
@@ -260,19 +260,14 @@ function doRegistration () {
        if (strlen(postRequestParameter('day'))   == 1) setPostRequestParameter('day'  , '0' . postRequestParameter('day'));
        if (strlen(postRequestParameter('month')) == 1) setPostRequestParameter('month', '0' . postRequestParameter('month'));
 
-       // Get total ...
-       // ... confirmed, ...
-       $confirmedUsers   = getTotalConfirmedUser();
-       // ... unconfirmed ...
-       $unconfirmedUsers = getTotalUnconfirmedUser();
-       // ... and locked users!
-       $lockedUsers      = getTotalLockedUser();
-
        // Generate hash which will be inserted into confirmation mail
        $hash = generateHash(sha1(
-               $confirmedUsers . getEncryptSeperator() .
-               $unconfirmedUsers . getEncryptSeperator() .
-               $lockedUsers . getEncryptSeperator() .
+               // Get total confirmed, ...
+               getTotalConfirmedUser() . getEncryptSeperator() .
+               // ... unconfirmed ...
+               getTotalUnconfirmedUser() . getEncryptSeperator() .
+               // ... and locked users!
+               getTotalLockedUser() . getEncryptSeperator() .
                postRequestParameter('month') . '-' .
                postRequestParameter('day') . '-' .
                postRequestParameter('year') . getEncryptSeperator() .
@@ -381,7 +376,7 @@ function doRegistration () {
        } // END - if
 
        // ... rewrite a zero referal id to the main title
-       if (postRequestParameter('refid') == '0') setPostRequestParameter('refid', getMainTitle());
+       if (!isValidUserId(postRequestParameter('refid'))) setPostRequestParameter('refid', getMainTitle());
 
        // Is ZIP code set?
        if (isPostRequestParameterSet('zip')) {
index 809f4be165eadc650ede036fbc2f8d5dac3c1cec..15ab8cad65e72a4e0243ec9068a71172ecad01fc 100644 (file)
@@ -55,32 +55,27 @@ if (isFormSent('edit')) {
                foreach (postRequestParameter('sel') as $id => $sel) {
                        // Load module data
                        // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function
-                       $result = SQL_QUERY_ESC("SELECT `module`, `title`, `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1",
                                array(bigintval($id)), __FILE__, __LINE__);
 
                        // Load data
-                       $data = SQL_FETCHARRAY($result);
+                       $content = SQL_FETCHARRAY($result);
 
                        // Free result
                        SQL_FREERESULT($result);
 
                        // Prepare array for the template
-                       $content = array(
-                               'mod'    => $data['module'],
-                               'id'     => $id,
-                               'title'  => $data['title'],
-                               'locked' => addSelectionBox('yn', $data['locked']    , 'locked', $id),
-                               'hidden' => addSelectionBox('yn', $data['hidden']    , 'hidden', $id),
-                               'admin'  => addSelectionBox('yn', $data['admin_only'], 'admin' , $id),
-                               'mem'    => addSelectionBox('yn', $data['mem_only']  , 'member', $id),
-                       );
+                       $content['locked']     => addSelectionBox('yn', $content['locked']    , 'locked', $id);
+                       $content['hidden']     => addSelectionBox('yn', $content['hidden']    , 'hidden', $id);
+                       $content['admin_only'] => addSelectionBox('yn', $content['admin_only'], 'admin' , $id);
+                       $content['mem_only']   => addSelectionBox('yn', $content['mem_only']  , 'member', $id);
 
                        // Load row template
-                       $OUT .= loadTemplate('admin_mods_edit_row', true, $content);
+                       $OUT .= loadTemplate('admin_edit_mods_row', true, $content
                } // END - foreach
 
                // Load main template
-               loadTemplate('admin_mods_edit', false, $OUT);
+               loadTemplate('admin_edit_mods', false, $OUT);
        } else {
                // Nothing selected
                loadTemplate('admin_settings_saved', false, '{--ADMIN_MODS_NOTHING_SELECTED--}');
index 5f3154dcea12e19889f8bc62ad40c4abd03b41c7..d1abaa24d8b3528a6a3d9a937df33e0ef884ccd2 100644 (file)
@@ -50,12 +50,12 @@ if (isFormSent()) {
        switch (getConfig('maintenance')) {
                case 'Y':
                        $target_mode = 'N';
-                       $out = '{--ADMIN_MAINTENANCE_DEACTIVATED--}';
+                       $message = '{--ADMIN_MAINTENANCE_DEACTIVATED--}';
                        break;
 
                case 'N':
                        $target_mode = 'Y';
-                       $out = '{--ADMIN_MAINTENANCE_ACTIVATED--}';
+                       $message = '{--ADMIN_MAINTENANCE_ACTIVATED--}';
                        break;
        }
 
@@ -63,7 +63,7 @@ if (isFormSent()) {
        updateConfiguration('maintenance', $target_mode);
 
        // Load template
-       loadTemplate('admin_settings_saved', false, $out);
+       loadTemplate('admin_settings_saved', false, $message);
 } else {
        switch (getConfig('maintenance')) {
                case 'Y': // Maintenance mode is active
index 4b84e0498915c04e3649b3d0530fea7fc7086bbd..96f936afc08a59af8262f55023ba900b289fc8f7 100644 (file)
@@ -122,22 +122,14 @@ if (!SQL_HASZERONUMS($result)) {
                loadInclude($inc);
 
                // Is the loaded theme name != current theme name?
-               $LINK = $content['theme_path'];
-               if ($content['theme_path'] != getCurrentTheme()) $LINK = '<a href="{%url=modules.php?module=admin&amp;what=theme_edit&amp;default_theme=' . $content['theme_path'] . '%}" title="{--ADMIN_SET_AS_NEW_THEME--}">' . $content['theme_path'] . '</a>';
+               $content['link'] = $content['theme_path'];
+               if ($content['theme_path'] != getCurrentTheme()) $content['link'] = '<a href="{%url=modules.php?module=admin&amp;what=theme_edit&amp;default_theme=' . $content['theme_path'] . '%}" title="{--ADMIN_SET_AS_NEW_THEME--}">' . $content['theme_path'] . '</a>';
 
                // Prepare data for the row template
-               $content = array(
-                       'id'            => $content['id'],
-                       'link'          => $LINK,
-                       'theme_name'    => $content['theme_name'],
-                       'theme_active'  => $content['theme_active'],
-                       'email'         => '<a href="mailto:' . $GLOBALS['theme_data']['email'] . '?Subject=[Theme:] ' . $GLOBALS['theme_data']['name'] . ' (' . $content['theme_path'] . ')\>' . $GLOBALS['theme_data']['author'] . '</a>',
-                       'url'           => $GLOBALS['theme_data']['url'],
-                       'theme_version' => $content['theme_version'],
-               );
+               $content['email'] = '<a href="mailto:' . $GLOBALS['theme_data']['email'] . '?Subject=[Theme:] ' . $GLOBALS['theme_data']['name'] . ' (' . $content['theme_path'] . ')\>' . $GLOBALS['theme_data']['author'] . '</a>';
 
                // Load row template and switch color
-               $OUT .= loadTemplate('admin_theme_edit_row', true, $content);
+               $OUT .= loadTemplate('admin_edit_theme_row', true, $content);
        } // END - while
 
        // Free memory
@@ -152,7 +144,7 @@ if (!SQL_HASZERONUMS($result)) {
 }
 
 // Load template
-loadTemplate('admin_theme_edit', false, $OUT);
+loadTemplate('admin_edit_theme', false, $OUT);
 
 // [EOF]
 ?>
index 372159f3311d50c0a44f127a57fab8e67dd8d4dc..103e92c37a357d8269519c716e5e899f27f01e40 100644 (file)
@@ -134,7 +134,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) {
        // Check if current theme is already imported or not
        if (!ifThemeExists($unix)) {
                // Theme not installed
-               $formContent = loadTemplate('admin_theme_import_form', true, $unix);
+               $formContent = loadTemplate('admin_import_theme_form', true, $unix);
        } // END - if
 
        // Prepare content
@@ -149,16 +149,16 @@ foreach ($THEMES['theme_unix'] as $key => $unix) {
        );
 
        // Add row template
-       $OUT .= loadTemplate('admin_theme_import_row', true, $content);
+       $OUT .= loadTemplate('admin_import_theme_row', true, $content);
 } // END - foreach
 
 if (empty($OUT)) {
        // No themes found???
-       $OUT .= loadTemplate('admin_theme_import_none', true, loadTemplate('admin_settings_saved', true, '{--ADMIN_NO_THEMES_FOUND--}'));
+       $OUT .= loadTemplate('admin_import_theme_none', true, loadTemplate('admin_settings_saved', true, '{--ADMIN_NO_THEMES_FOUND--}'));
 } // END - if
 
 // Load template
-loadTemplate('admin_theme_import', false, $OUT);
+loadTemplate('admin_import_theme', false, $OUT);
 
 // [EOF]
 ?>
index 460145e7bb57b12374d97676a318940bb9c02e61..874884fd8809d0e517ff1b928ef92604bf58ceeb 100644 (file)
@@ -1023,7 +1023,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
        //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',points='.$points);
        if (fetchUserData($userid)) {
                // Determine wether the user has some mails to click before he/she gets the points
-               $locked = ((getUserData('ref_payout') > 0) && (!isDirectPaymentEnabled()));
+               $locked = ifUserPointsLocked($userid);
 
                // Default is 'normal' points
                $data = 'points';
@@ -1095,7 +1095,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
 
                                // Send email
                                sendEmail($userid, '{--THANX_REFERAL_ONE_SUBJECT--}', $message);
-                       } elseif (($sendNotify === true) && (getUserData('refid') == '0') && ($locked === false) && ($add_mode == 'direct')) {
+                       } elseif (($sendNotify === true) && (!isValidUserId(getUserData('refid'))) && ($locked === false) && ($add_mode == 'direct')) {
                                // Prepare content
                                $content = array(
                                        'reason' => '{--REASON_DIRECT_PAYMENT--}',
index da04d5ddccea5a9bacc6f1abb70f6daa2f6431a0..f5b412e696a66693b8e724bdfc97cbdf997a98a0 100644 (file)
@@ -1950,5 +1950,17 @@ function generateWrappedUserEmailLink ($email) {
        return generateEmailLink($email, 'user_data');
 }
 
+// Wrapper to check if user points are locked
+function ifUserPointsLocked ($userid) {
+       // Do we have cache?
+       if (!isset($GLOBALS[__FUNCTION__][$userid])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__][$userid] = ((getFetchedUserData('userid', $userid, 'ref_payout') > 0) && (!isDirectPaymentEnabled()));
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__][$userid];
+}
+
 // [EOF]
 ?>
index f5b64e0866521a66db7d10c2f5707f34153bfcb8..7f1639a085d0e807264da6c23da356f14138fa29 100644 (file)
@@ -67,13 +67,13 @@ $code = '0';
 $mode = '';
 
 // Secure all data
-if (isGetRequestParameterSet('userid'))  $userId = bigintval(getRequestParameter('userid'));
-if (isGetRequestParameterSet('mailid'))  $mailId    = bigintval(getRequestParameter('mailid'));
-if (isGetRequestParameterSet('bonusid')) $bonusId    = bigintval(getRequestParameter('bonusid'));
-if (isGetRequestParameterSet('code'))    $code       = bigintval(getRequestParameter('code'));
-if (isGetRequestParameterSet('mode'))    $mode       = getRequestParameter('mode');
+if (isGetRequestParameterSet('userid'))  $userId  = bigintval(getRequestParameter('userid'));
+if (isGetRequestParameterSet('mailid'))  $mailId  = bigintval(getRequestParameter('mailid'));
+if (isGetRequestParameterSet('bonusid')) $bonusId = bigintval(getRequestParameter('bonusid'));
+if (isGetRequestParameterSet('code'))    $code    = bigintval(getRequestParameter('code'));
+if (isGetRequestParameterSet('mode'))    $mode    = getRequestParameter('mode');
 
-// 01           1        12            2    2            21    1                   22     10
+// 01             2       21    12           2    2            21    1                      2210
 if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) {
        // No image? Then output header
        if ($mode != 'img') loadIncludeOnce('inc/header.php');
@@ -243,7 +243,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                                $template = 'mailid_points_done';
 
                                                                                // Right code entered add points and remove entry
-                                                                               if ((getUserData('ref_payout') > 0) && (!isDirectPaymentEnabled())) {
+                                                                               if (ifUserPointsLocked($userId)) {
                                                                                        // Don't add points over the referal system
                                                                                        $template = 'mailid_points_locked';
                                                                                } // END - if
@@ -268,7 +268,13 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
 
                                                                                                        // Set template to mailid_points_done2 which contains a link to the ranking list
                                                                                                        $template = 'mailid_points_done2';
-                                                                                                       if ($locked) $template = 'mailid_points_locked2';
+
+                                                                                                       // Different template if user has some mails to confirm
+                                                                                                       if (ifUserPointsLocked($userId)) {
+                                                                                                               $template = 'mailid_points_locked2';
+                                                                                                       } // END - if
+
+                                                                                                       // Assign more data for the template
                                                                                                        $content['userid']  = $userId;
                                                                                                        $content['type']    = $type;
                                                                                                        $content['data']    = $urlId;
index 376311d5c67da08a3361666c8898c6ea3a4df4f2..a3d17c7d7803aed2959be16c50df17a3724ffce0 100644 (file)
@@ -9,7 +9,7 @@
        <tr>
                <td class="header_column bottom right" align="center"><strong>{--ID_SELECT--}</strong></td>
                <td class="header_column bottom right" align="center"><strong>{--CATEGORY_NAME--}</strong></td>
-               <td class="header_column bottom right" align="center"><strong>{--IS_VISIBLE--}</strong></td>
+               <td class="header_column bottom right" align="center"><strong>{--ADMIN_IS_VISIBLE--}</strong></td>
                <td class="header_column bottom" align="center"><strong>{--SORTING_KEY--}</strong></td>
        </tr>
        $content
diff --git a/templates/de/html/admin/admin_edit_mods.tpl b/templates/de/html/admin/admin_edit_mods.tpl
new file mode 100644 (file)
index 0000000..c730b6e
--- /dev/null
@@ -0,0 +1,22 @@
+<div align="center">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=config_mods%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <!-- @TODO Shouldn't we add a title here? //-->
+       <tr>
+               <td align="center" class="header_column bottom right" height="25"><strong>{--ADMIN_MODS_NAME--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_TITLE--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_LOCKED--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_HIDDEN--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_ADMIN--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_MEMBER--}</strong></td>
+       </tr>
+       $content
+       <tr>
+               <td colspan="6" class="table_footer">
+                       <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
+                       <input type="submit" name="change" class="form_submit" value="{--SAVE_CHANGES--}" />
+               </td>
+       </tr>
+</table>
+</form>
+</div>
diff --git a/templates/de/html/admin/admin_edit_mods_row.tpl b/templates/de/html/admin/admin_edit_mods_row.tpl
new file mode 100644 (file)
index 0000000..d870a05
--- /dev/null
@@ -0,0 +1,20 @@
+<tr>
+       <td class="{%template,ColorSwitch%} bottom right">
+               &nbsp;$content[module] <input type="hidden" name="sel[$content[id]]" value="1" />
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <input type="text" class="form_field" name="title[$content[id]]" size="20" maxlength="255" value="$content[title]" />
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[locked]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[hidden]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[admin_only]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[mem_only]
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_edit_theme.tpl b/templates/de/html/admin/admin_edit_theme.tpl
new file mode 100644 (file)
index 0000000..fe42e14
--- /dev/null
@@ -0,0 +1,27 @@
+<div align="center">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=theme_edit%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td class="header_column bottom right" align="center">{--ID_SELECT--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_UNIX--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_NAME--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_ACTIVE--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_AUTHOR--}</td>
+               <td class="header_column bottom" align="center">{--THEME_VERSION--}</td>
+       </tr>
+       $content
+       <tr>
+               <td colspan="6" class="table_footer">
+                       <input type="reset" class="form_reset" value="{--RESET_SELECT--}" />
+                       <input type="submit" name="status" class="form_submit" value="{--ADMIN_CHANGE_STATUS_THEME--}" />
+                       <input type="submit" name="del" class="form_delete" value="{--ADMIN_DELETE_ENTRIES--}" />
+               </td>
+       </tr>
+</table>
+</form>
+
+<div class="notice">
+       {--ADMIN_THEME_NEW_DEFAULT_THEME--}
+</div>
+
+</div>
diff --git a/templates/de/html/admin/admin_edit_theme_row.tpl b/templates/de/html/admin/admin_edit_theme_row.tpl
new file mode 100644 (file)
index 0000000..03ff0c6
--- /dev/null
@@ -0,0 +1,24 @@
+<tr>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <input type="checkbox" name="sel[$content[id]]" title="{--ID_SELECT--} $content[id]" class="form_field" value="1" />
+               <input type="hidden" name="active[$content[id]]" value="$content[theme_active]" />
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[link]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[theme_name]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               {%pipe,translateYesNo=$content[theme_active]%}
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[email]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">$content[url]</a>
+       </td>
+       <td class="{%template,ColorSwitch%} bottom" align="center">
+               v$content[theme_version]
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_import_theme.tpl b/templates/de/html/admin/admin_import_theme.tpl
new file mode 100644 (file)
index 0000000..5babe98
--- /dev/null
@@ -0,0 +1,18 @@
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td class="header_column bottom right" align="center">{--THEME_UNIX--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_NAME--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_AUTHOR--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_URL--}</td>
+               <td class="header_column bottom right" align="center">{--THEME_VERSION--}</td>
+               <td class="header_column bottom" align="center">{--THEME_INSTALL--}</td>
+       </tr>
+       $content
+       <tr>
+               <td colspan="6" class="table_footer">
+                       <div class="notice">{--ADMIN_THEME_LIST_NOTE--}</div>
+               </td>
+       </tr>
+</table>
+</div>
diff --git a/templates/de/html/admin/admin_import_theme_none.tpl b/templates/de/html/admin/admin_import_theme_none.tpl
new file mode 100644 (file)
index 0000000..92248b7
--- /dev/null
@@ -0,0 +1,5 @@
+<tr>
+       <td colspan="6" class="bottom" height="80">
+               $content
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_import_theme_row.tpl b/templates/de/html/admin/admin_import_theme_row.tpl
new file mode 100644 (file)
index 0000000..74dd228
--- /dev/null
@@ -0,0 +1,14 @@
+<tr>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">$content[unix]</td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">$content[theme_name]</td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <a href="mailto:$content[theme_email]?Subject=[Theme:] $content[theme_name] ($content[unix])">$content[theme_author]</a>
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <a href="{%pipe,generateDerefererUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">v$content[theme_version]</td>
+       <td class="{%template,ColorSwitch%} bottom" align="center">
+               $content[form_content]
+       </td>
+</tr>
index f9d2d5d02bdc3883a6ea3be3e5d0a7447c0f66d3..ad2aaf11d22f911f6d1c8e2e08b98131756c1f46 100644 (file)
@@ -7,11 +7,11 @@
                <input type="hidden" name="sel[$content[sel]]" value="$content[menu]" />
        </td>
        <td width="25%" class="{%template,ColorSwitch%} bottom">
-               {--IS_VISIBLE--}:
+               {--ADMIN_IS_VISIBLE--}:
                $content[visible]
                </td>
        <td width="25%" class="{%template,ColorSwitch%} bottom">
-               {--IS_LOCKED--}:
+               {--ADMIN_MENU_IS_LOCKED--}:
                $content[locked]
        </td>
 </tr>
index 5ded225a4a9a4821b97933da402dd68173f8aa76..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,20 +1 @@
-<form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=config_mods%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <!-- @TODO Shouldn't we add a title here? //-->
-       <tr>
-               <td align="center" class="header_column bottom right" height="25"><strong>{--ADMIN_MODS_NAME--}</strong></td>
-               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_TITLE--}</strong></td>
-               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_LOCKED--}</strong></td>
-               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_HIDDEN--}</strong></td>
-               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_ADMIN--}</strong></td>
-               <td align="center" class="header_column bottom right"><strong>{--ADMIN_MODS_IS_MEMBER--}</strong></td>
-       </tr>
-       $content
-       <tr>
-               <td colspan="6" class="table_footer">
-                       <input type="reset" class="form_reset" value="{--UNDO_SELECTIONS--}" />
-                       <input type="submit" name="change" class="form_submit" value="{--SAVE_CHANGES--}" />
-               </td>
-       </tr>
-</table>
-</form>
+<!-- @DEPRECATED //-->
index 4a81d102c400a4ba54a7fa9e647aa3a125760475..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,20 +1 @@
-<tr>
-       <td class="{%template,ColorSwitch%} bottom right">
-               &nbsp;$content[mod] <input type="hidden" name="sel[$content[id]]" value="1" />
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <input type="text" class="form_field" name="title[$content[id]]" size="20" maxlength="255" value="$content[title]" />
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[locked]
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[hidden]
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[admin]
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[mem]
-       </td>
-</tr>
+<!-- @DEPRECATED //-->
index fe42e1487d532ef16f4ed0825c60b90985ec37e4..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,27 +1 @@
-<div align="center">
-<form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=theme_edit%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td class="header_column bottom right" align="center">{--ID_SELECT--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_UNIX--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_NAME--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_ACTIVE--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_AUTHOR--}</td>
-               <td class="header_column bottom" align="center">{--THEME_VERSION--}</td>
-       </tr>
-       $content
-       <tr>
-               <td colspan="6" class="table_footer">
-                       <input type="reset" class="form_reset" value="{--RESET_SELECT--}" />
-                       <input type="submit" name="status" class="form_submit" value="{--ADMIN_CHANGE_STATUS_THEME--}" />
-                       <input type="submit" name="del" class="form_delete" value="{--ADMIN_DELETE_ENTRIES--}" />
-               </td>
-       </tr>
-</table>
-</form>
-
-<div class="notice">
-       {--ADMIN_THEME_NEW_DEFAULT_THEME--}
-</div>
-
-</div>
+<!-- @DEPRECATED //-->
index 03ff0c656de501a54adac43cfd5f88496aa36e4b..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,24 +1 @@
-<tr>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <input type="checkbox" name="sel[$content[id]]" title="{--ID_SELECT--} $content[id]" class="form_field" value="1" />
-               <input type="hidden" name="active[$content[id]]" value="$content[theme_active]" />
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[link]
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[theme_name]
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               {%pipe,translateYesNo=$content[theme_active]%}
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[email]
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">$content[url]</a>
-       </td>
-       <td class="{%template,ColorSwitch%} bottom" align="center">
-               v$content[theme_version]
-       </td>
-</tr>
+<!-- @DEPRECATED //-->
index 5babe98489322a974926e8ea5f1f95d6b8f92e91..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,18 +1 @@
-<div align="center">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td class="header_column bottom right" align="center">{--THEME_UNIX--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_NAME--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_AUTHOR--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_URL--}</td>
-               <td class="header_column bottom right" align="center">{--THEME_VERSION--}</td>
-               <td class="header_column bottom" align="center">{--THEME_INSTALL--}</td>
-       </tr>
-       $content
-       <tr>
-               <td colspan="6" class="table_footer">
-                       <div class="notice">{--ADMIN_THEME_LIST_NOTE--}</div>
-               </td>
-       </tr>
-</table>
-</div>
+<!-- @DEPRECATED //-->
index 7eca612f2163c4ecf8c6c34f61312d260a7061bc..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,5 +1 @@
-<tr>
-  <td colspan="6" class="bottom" height="80">
-    $content
-  </td>
-</tr>
+<!-- @DEPRECATED //-->
index 74dd22826736c60c050f4a5b974a47914d63fe70..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,14 +1 @@
-<tr>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">$content[unix]</td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">$content[theme_name]</td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <a href="mailto:$content[theme_email]?Subject=[Theme:] $content[theme_name] ($content[unix])">$content[theme_author]</a>
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <a href="{%pipe,generateDerefererUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
-       </td>
-       <td class="{%template,ColorSwitch%} bottom right" align="center">v$content[theme_version]</td>
-       <td class="{%template,ColorSwitch%} bottom" align="center">
-               $content[form_content]
-       </td>
-</tr>
+<!-- @DEPRECATED //-->