From: Roland Häder Date: Tue, 16 Aug 2011 15:16:13 +0000 (+0000) Subject: Cleanups and all "base scripts" fixed: X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=3161d70d2c3a86649dd16a7909ec16f801f16e4e Cleanups and all "base scripts" fixed: - Referral listing in admin area fixed and deprecated code removed (cleanup) - All "base scripts" now set start time (to avoid later missing elements) - I missed to update 0.4.6 for ext-user, now it is updated - Non-set timestamps are now NULL (was still in ext-user) - TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index d7f2f6460f..5d45fbe32b 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -54,14 +54,14 @@ ./inc/functions.php:2199: // @TODO Rename column data_type to e.g. mail_status ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter ./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); -./inc/language/de.php:1074: // @TODO Rewrite these two constants -./inc/language/de.php:1090: // @TODO Rewrite these three constants +./inc/language/de.php:1073: // @TODO Rewrite these two constants +./inc/language/de.php:1089: // @TODO Rewrite these three constants ./inc/language/de.php:758:// @TODO Are these constants longer used? ./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded ./inc/language-functions.php:44:// @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 * ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings * -./inc/language/refback_de.php:53: // @TODO Rewrite these constants to one +./inc/language/refback_de.php:51: // @TODO Rewrite these constants to one ./inc/language/sponsor_de.php:117:// @TODO Rewrite these four constants to one and use sprintf() ./inc/libs/admins_functions.php:495: // @TODO This can be, somehow, rewritten ./inc/libs/bonus_functions.php:194: // @TODO Move this HTML to a template @@ -132,7 +132,7 @@ ./inc/modules/admin/what-list_links.php:55: // @TODO Try to rewrite this to a filter ./inc/modules/admin/what-list_links.php:85: // @TODO Find a way to rewrite this. See some lines above for different queries ./inc/modules/admin/what-list_links.php:93: // @TODO Rewrite this to includes/filter -./inc/modules/admin/what-list_refs.php:99: // @TODO Try to rewrite some to EL +./inc/modules/admin/what-list_refs.php:100: // @TODO Try to rewrite some to EL ./inc/modules/admin/what-list_unconfirmed.php:107: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus ./inc/modules/admin/what-list_unconfirmed.php:84: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}'); ./inc/modules/admin/what-list_user.php:247: // @TODO Rewrite this into a filter @@ -167,10 +167,10 @@ ./inc/modules/member/what-unconfirmed.php:162: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() ./inc/modules/member/what-unconfirmed.php:227: // @TODO This 'userid' cannot be saved because of encapsulated EL code ./inc/modules/order.php:78: // @TODO Unused: 2,4 -./inc/mysql-manager.php:1381: // @TODO Rewrite these lines to a filter -./inc/mysql-manager.php:1405: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1664: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1710:// @TODO Fix inconsistency between last_module and getWhat() +./inc/mysql-manager.php:1410: // @TODO Rewrite these lines to a filter +./inc/mysql-manager.php:1434: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1693: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1739:// @TODO Fix inconsistency between last_module and getWhat() ./inc/mysql-manager.php:387: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:44:// @TODO Can we cache this? ./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter @@ -194,13 +194,13 @@ ./mailid_top.php:18: * @TODO Merge this script with mailid.php * ./mailid_top.php:196: // @TODO Rewrite this to a filter ./mailid_top.php:231: // @TODO Rewrite these blocks to filter -./network-vcheck.php:54:// @TODO Add processing of request here -./view.php:68: // @TODO No banner found, output some default banner +./network-vcheck.php:57:// @TODO Add processing of request here +./view.php:71: // @TODO No banner found, output some default banner ./templates/de/html/admin/admin_add_country.tpl:23: ./templates/de/html/admin/admin_config_other.tpl:79: ./templates/de/html/admin/admin_config_rewrite.tpl:4: ./templates/de/html/admin/admin_edit_admin_menu.tpl:4: -./templates/de/html/admin/admin_list_refs_level.tpl:21: +./templates/de/html/admin/admin_list_refs_level.tpl:20: ./templates/de/html/admin/admin_list_unconfirmed_list.tpl:3: ./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 @@ -316,6 +316,7 @@ ./templates/de/html/admin/admin_list_country_edit_row.tpl:1: ./templates/de/html/admin/admin_list_network_config_row.tpl:1: ./templates/de/html/admin/admin_list_network_config.tpl:1: +./templates/de/html/admin/admin_list_refs2.tpl:1: ./templates/de/html/admin/admin_list_user_sort_form.tpl:1: ./templates/de/html/admin/admin_mods_stats2_row.tpl:1: ./templates/de/html/admin/admin_mods_stats2.tpl:1: diff --git a/admin.php b/admin.php index be967cd479..c7e2aab0b3 100644 --- a/admin.php +++ b/admin.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'admin'; $GLOBALS['output_mode'] = -1; diff --git a/agb.php b/agb.php index f31b02d0a1..089de85075 100644 --- a/agb.php +++ b/agb.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'agb'; $GLOBALS['output_mode'] = -1; diff --git a/click.php b/click.php index 4826310617..2b0d1dd1f0 100644 --- a/click.php +++ b/click.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'click'; $GLOBALS['output_mode'] = -1; diff --git a/confirm.php b/confirm.php index 9c7db6f02a..21da585962 100644 --- a/confirm.php +++ b/confirm.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module to confirm $GLOBALS['module'] = 'confirm'; $GLOBALS['output_mode'] = -1; diff --git a/css.php b/css.php index 6a81ed5f49..73374f3f16 100644 --- a/css.php +++ b/css.php @@ -41,9 +41,12 @@ require('inc/libs/security_functions.php'); // Footer is disabled in CSS mode $GLOBALS['footer_sent'] = -1; +// Init start time +$GLOBALS['startTime'] = microtime(true); + // This is a CSS file loader! -$GLOBALS['output_mode'] = 1; $GLOBALS['module'] = 'css'; +$GLOBALS['output_mode'] = 1; // Load the required file(s) require('inc/config-global.php'); diff --git a/debug.php b/debug.php index 5029019b66..23005da370 100644 --- a/debug.php +++ b/debug.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module and fake "CSS mode" $GLOBALS['module'] = 'debug'; $GLOBALS['output_mode'] = -1; diff --git a/img.php b/img.php index 64e22fa2e7..92f464d0e7 100644 --- a/img.php +++ b/img.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'img'; $GLOBALS['output_mode'] = -1; diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index ab95aae6bf..345120bbdf 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.4.6'); +setThisExtensionVersion('0.4.8'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -348,7 +348,7 @@ INDEX (`stats_type`)", case '0.3.5': // SQL queries for v0.3.5 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_reason` TINYTEXT"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NULL DEFAULT NULL"); addConfigAddSql('user_delete_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 30)); addAdminMenuSql('user', 'list_user_del', 'Löschungen auflisten', 'Listet die Löschungen von Usern auf.', 9); addDropTableSql('user_del'); @@ -456,7 +456,6 @@ INDEX (`userid`)", break; case '0.4.4': // SQL queries for v0.4.4 - // SQL commands to run addDropTableSql('user_refs'); addCreateTableSql('user_refs', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -477,7 +476,6 @@ INDEX (`refid`)", break; case '0.4.5': // SQL queries for v0.4.5 - // SQL commands to run addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `link_type` `link_type` VARCHAR(255) NOT NULL DEFAULT 'NORMAL'"); // Update notes (these will be set as task text!) @@ -485,7 +483,6 @@ INDEX (`refid`)", break; case '0.4.6': // SQL queries for v0.4.6 - // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben' WHERE `what` = 'add_points' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen' WHERE `what` = 'sub_points' LIMIT 1"); addAdminMenuSql('user','sub_points','{OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen','Allen oder einem Mitglied {OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen.', 8); @@ -496,6 +493,14 @@ INDEX (`refid`)", // Update notes (these will be set as task text!) setExtensionUpdateNotes("Abzug von {?POINTS?} sollte nun dabei sein und Hinzufügen gefixt (war zu kurze Spalte)."); break; + + case '0.4.7': // SQL queries for v0.4.7 + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `lock_timestamp` `lock_timestamp` TIMESTAMP NULL DEFAULT NULL'); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `lock_timestamp`=NULL WHERE `lock_timestamp`='0000-00-00 00:00:00'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("0000-00-00 00:00:00 ist kein Standardwert mehr, NULL ist dies."); + break; } // END - switch break; diff --git a/inc/language/de.php b/inc/language/de.php index febff5cb85..1cfe6cad4a 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -196,7 +196,7 @@ addMessages(array( 'ENTER_EMAIL' => "Bitte geben Sie Ihre Email-Adresse ein! Diese muss auch erreichbar sein.", 'ENTER_SURNAME' => "Bitte geben Sie Ihren Vornamen ein.", 'ENTER_FAMILY' => "Bitte geben Sie Ihren Nachnamen ein.", - 'ADMIN_CONFIG_SECURITY_TITLE' => "Ändern von sicherheits-relevanten Einstellungen", + 'ADMIN_CONFIG_SECURITY_TITLE' => "Sicherheitseinstellungen", 'ADMIN_CONFIG_MIN_PASS_LENGTH' => "Minimale Passwortlänge", 'SETTINGS_NOT_SAVED' => "Einstellungen NICHT gespeichert / geändert.", 'SETTINGS_SAVED' => "Einstellungen gespeichert.", @@ -1011,7 +1011,6 @@ addMessages(array( 'MEMBER_ORDER_TEST_STARTED' => "Framekiller-Test startet...", 'MEMBER_ORDER_PLEASE_WAIT_1' => "Ihre Seite wird auf Framekiller getestet. Bitte noch ", 'MEMBER_ORDER_PLEASE_WAIT_2' => " Sekunden warten.", - 'ADMIN_NO_REFERRAL_LEVELS' => "In Ihrem {?mt_word?} sind keine Referral-Ebenen eingerichtet! Ihre Mitglieder erhalten keine {?POINTS?} gutgeschrieben. Richten Sie mindestens Referral-Ebene 0 mit 100% Vergütung ein.", 'ADMIN_SESSION_SAVE_PATH_INVALID' => "Pfad für Sitzungsdateien ungütig.", 'ADMIN_CONFIG_SESSION_TITLE' => "Einstellungen zum Sitzungsmanagement", 'ADMIN_CONFIG_SESSION_SAVE_PATH' => "Speicherpfad f. Sitzungsdateien", @@ -1180,6 +1179,11 @@ addMessages(array( 'POINTS_SUBJECT_ADMIN_ADD_SINGLE' => "Einzelgutschrift durch den Administrator", 'POINTS_SUBJECT_ADMIN_SUB_ALL' => "Abzug aller Accounts durch den Administrator", 'POINTS_SUBJECT_ADMIN_SUB_SINGLE' => "Einzelabzug durch den Administrator", + + // Admin - List referrals + 'ADMIN_LIST_USER_NO_REFERRALS' => "Das Mitglied %s hat in dieser Referral-Ebene keine Mitglieder geworben.", + 'ADMIN_NO_REFERRAL_LEVELS' => "In Ihrem {?mt_word?} sind keine Referral-Ebenen eingerichtet! Ihre Mitglieder erhalten keine {?POINTS?} gutgeschrieben. Richten Sie mindestens Referral-Ebene 0 mit 100% Vergütung ein.", + 'ADMIN_LIST_USER_NODATA' => "Das Mitglied %s wurde bereits gelöscht.", )); // Description of all months diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index 2dc668170a..05c9a63e72 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -42,8 +42,6 @@ if (!defined('__SECURITY')) { // Admin language strings addMessages(array( - 'ADMIN_LIST_USER_NO_REFERRALS' => "Das Mitglied %s hat in dieser Referral-Ebene keine Refs.", - 'ADMIN_LIST_USER_NODATA' => "Das Mitglied %s wurde bereits gelöscht.", 'ADMIN_CONFIG_REFBACK_TITLE' => "Refback-Einstellungen", 'ADMIN_CONFIG_REFBACK_ENABLED' => "Refback eingeschaltet? (Wenn nein, ist nur die Referral-Übersicht funktionell.)", 'ADMIN_CONFIG_REFBACK_MIN_PERCENTS' => "Minimum erlaubte Refback-Prozente:
(0% ist immer erlaubt!)", diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 3632c774ff..2c410a5e8a 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -69,97 +69,74 @@ ORDER BY // List all ref levels or entries if no refback is installed $OUT = ''; while ($levels = SQL_FETCHARRAY($result_levels)) { - // Is the refback still active? ;-) - if (isExtensionActive('refback')) { - // Load all refs of this user - $result_refs = SQL_QUERY_ESC("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`=%s ORDER BY `refid` ASC", - array($userid, $levels['level']), __FILE__, __LINE__); - //* DEBUG: */ debugOutput($userid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)); - - // Do we have levels? - if (!SQL_HASZERONUMS($result_refs)) { - // Count entries - $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); - $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); - - // Output info message - $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $menge, $menge_lck); - - // Init variables - $OUT_REFS = ''; - - // Load all refs - while ($content = SQL_FETCHARRAY($result_refs)) { - // Is the data there? - if (fetchUserData($content['refid'])) { - // Check for referrals - $refs_cnt = countSumTotalData(getUserData('userid'), 'user_refs', 'id', 'userid', true); - - // Prepare data for the template - // @TODO Try to rewrite some to EL - $content = array( - 'userid' => getUserData('userid'), - 'gender' => getUserData('gender'), - 'refs_link' => 0, - 'surname' => getUserData('surname'), - 'family' => getUserData('family'), - 'email' => '[' . getUserData('email') . ']', - 'status' => getUserData('status'), - 'registered' => generateDateTime(getUserData('joined'), 3), - ); - - // Check if referral count is larger 0 and update link - if ($refs_cnt > 0) { - $content['refs_link'] = generateUserProfileLink(getUserData('userid'), $refs_cnt, 'list_refs'); - } // END - if - - // Load template for level one - $OUT_REFS .= loadTemplate('admin_list_refs_row', true, $content); - } else { - // No refs found - $OUT_REFS = loadTemplate('admin_list_refs_nodata', true, $content); - } - - // Add content - $levels['rows'] = $OUT_REFS; - } // END - while - } else { - // Output info message - $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), 0, 0); - - // No refs found - $levels['rows'] = loadTemplate('admin_list_refs_norefs', true, array('userid' => $userid)); - } - - // Free result - SQL_FREERESULT($result_refs); - - // Load level template - $OUT .= loadTemplate('admin_list_refs_level', true, $levels); + // Load all refs of this user + $result_refs = SQL_QUERY_ESC("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`=%s ORDER BY `refid` ASC", + array( + $userid, + $levels['level'] + ), __FILE__, __LINE__); + //* DEBUG: */ debugOutput($userid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)); + + // Do we have levels? + if (!SQL_HASZERONUMS($result_refs)) { + // Count entries + $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); + $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); + + // Output info message + $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $menge, $menge_lck); + + // Init variables + $OUT_REFS = ''; + + // Load all refs + while ($content = SQL_FETCHARRAY($result_refs)) { + // Is the data there? + if (fetchUserData($content['refid'])) { + // Check for referrals + $refs_cnt = countSumTotalData(getUserData('userid'), 'user_refs', 'id', 'userid', true); + + // Prepare data for the template + // @TODO Try to rewrite some to EL + $content = array( + 'userid' => getUserData('userid'), + 'gender' => getUserData('gender'), + 'refs_link' => 0, + 'surname' => getUserData('surname'), + 'family' => getUserData('family'), + 'email' => '[' . getUserData('email') . ']', + 'status' => getUserData('status'), + 'registered' => generateDateTime(getUserData('joined'), 3), + ); + + // Check if referral count is larger 0 and update link + if ($refs_cnt > 0) { + $content['refs_link'] = generateUserProfileLink(getUserData('userid'), $refs_cnt, 'list_refs'); + } // END - if + + // Load template for level one + $OUT_REFS .= loadTemplate('admin_list_refs_row', true, $content); + } else { + // No refs found + $OUT_REFS = loadTemplate('admin_list_refs_nodata', true, $content); + } + + // Add content + $levels['rows'] = $OUT_REFS; + } // END - while } else { - // Check for referrals - $refs_cnt = countSumTotalData($levels['userid'], 'user_data', 'userid', 'refid', true); - - // Prepare data for the template - $content = array( - 'userid' => $levels['userid'], - 'gender' => $levels['gender'], - 'refs_link' => 0, - 'surname' => $levels['surname'], - 'family' => $levels['family'], - 'email' => '[' . $levels['email'] . ']', - 'status' => $levels['status'], - 'registered' => generateDateTime($levels['joined'], 3), - ); - - // Check if referral count is larger 0 and update link - if ($refs_cnt > 0) { - $content['refs_link'] = generateUserProfileLink($levels['userid'], $refs_cnt, 'list_refs'); - } // END - if - - // Load template for level one - $OUT .= loadTemplate('admin_list_refs_row', true, $content); + // Output info message + $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), 0, 0); + + // No refs found + $levels['rows'] = loadTemplate('admin_list_refs_norefs', true, array('userid' => $userid)); } + + // Free result + SQL_FREERESULT($result_refs); + + // Load level template + $OUT .= loadTemplate('admin_list_refs_level', true, $levels); } // END - while // Prepare content @@ -169,14 +146,7 @@ ORDER BY ); // Load main template - if (isExtensionActive('refback')) { - loadTemplate('admin_list_refs2', false, $content); - } else { - loadTemplate('admin_list_refs', false, $content); - } - } elseif (isExtensionActive('refback')) { - // No levels found, very bad! - displayMessage('{--ADMIN_NO_REFERRAL_LEVELS--}'); + loadTemplate('admin_list_refs', false, $content); } else { // No refs made so far displayMessage('{--USER_REFERRAL_404--}'); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index f45d269bce..60228452a6 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -100,7 +100,7 @@ if (isMember()) { } elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) $url = doUserLogin(postRequestElement('id'), postRequestElement('password')); -} elseif ((isPostRequestElementSet('new_pass')) && (isset($userid))) { +} elseif ((isPostRequestElementSet('new_pass')) && (!empty($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) $errorCode = doNewUserPassword(postRequestElement('email'), $userid); } diff --git a/js.php b/js.php index 0e44f38e50..ae623feb86 100644 --- a/js.php +++ b/js.php @@ -41,6 +41,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // This is a fake-CSS file loader, more a JavaScript loader... // This is in one way good and in one not. The whole reset part will be // by-passed even in this "faked" CSS mode. The bad news is that this makes all @@ -48,8 +51,8 @@ require('inc/libs/security_functions.php'); // pattern is given... // // But mxchange 0.3.0 will show that in better way! :D :D :D -$GLOBALS['output_mode'] = 1; $GLOBALS['module'] = 'js'; +$GLOBALS['output_mode'] = 1; // Load the required file(s) require('inc/config-global.php'); diff --git a/login.php b/login.php index 0f9b80c5a8..d628789f0b 100644 --- a/login.php +++ b/login.php @@ -38,10 +38,11 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Set module -$GLOBALS['module'] = 'login'; +// Init start time +$GLOBALS['startTime'] = microtime(true); -// Set 'CSS-Mode' +// Set module / output mode +$GLOBALS['module'] = 'login'; $GLOBALS['output_mode'] = -2; // Load the required file(s) diff --git a/modules.php b/modules.php index eca084fa11..78ab8920bc 100644 --- a/modules.php +++ b/modules.php @@ -45,8 +45,8 @@ require('inc/libs/security_functions.php'); $GLOBALS['startTime'] = microtime(true); // Init output mode and module -$GLOBALS['output_mode'] = '0'; $GLOBALS['module'] = 'unknown'; +$GLOBALS['output_mode'] = '0'; // Needed include files require('inc/config-global.php'); diff --git a/network-vcheck.php b/network-vcheck.php index b3ccf6f96c..3d379f4d19 100644 --- a/network-vcheck.php +++ b/network-vcheck.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'network-vcheck'; $GLOBALS['output_mode'] = -1; diff --git a/ref.php b/ref.php index 6683a7603c..e2a7c62a30 100644 --- a/ref.php +++ b/ref.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'ref'; $GLOBALS['output_mode'] = -1; diff --git a/sponsor_confirm.php b/sponsor_confirm.php index 64fed3f960..fe3e583a6e 100644 --- a/sponsor_confirm.php +++ b/sponsor_confirm.php @@ -37,10 +37,11 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Set module -$GLOBALS['module'] = 'sponsor_confirm'; +// Init start time +$GLOBALS['startTime'] = microtime(true); -// Set 'CSS-Mode' +// Set module / output mode +$GLOBALS['module'] = 'sponsor_confirm'; $GLOBALS['output_mode'] = -2; // Load the required file(s) diff --git a/sponsor_ref.php b/sponsor_ref.php index 4d7d467beb..daebebb9f7 100644 --- a/sponsor_ref.php +++ b/sponsor_ref.php @@ -37,10 +37,11 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Set module -$GLOBALS['module'] = 'sponsor_ref'; +// Init start time +$GLOBALS['startTime'] = microtime(true); -// Set 'CSS-Mode' +// Set module / output mode +$GLOBALS['module'] = 'sponsor_ref'; $GLOBALS['output_mode'] = -2; // Load the required file(s) diff --git a/surfbar.php b/surfbar.php index 4c1632f733..2c29e25691 100644 --- a/surfbar.php +++ b/surfbar.php @@ -41,7 +41,7 @@ require('inc/libs/security_functions.php'); // Init start time $GLOBALS['startTime'] = microtime(true); -// Set module +// Set module output mode $GLOBALS['module'] = 'surfbar'; $GLOBALS['output_mode'] = '0'; $GLOBALS['header_sent'] = 3; diff --git a/templates/de/html/admin/admin_list_refs.tpl b/templates/de/html/admin/admin_list_refs.tpl index 80d9b6f880..6e5bfebe1f 100644 --- a/templates/de/html/admin/admin_list_refs.tpl +++ b/templates/de/html/admin/admin_list_refs.tpl @@ -1,23 +1,13 @@
- - - - - - - - - - - - + + $content[rows] - - - -
+
+
{%message,ADMIN_LIST_REFERRALS=$content[userid]%} -
{--_USERID--}{--REFS_COUNT--}{--SURNAME_FAMILY--}{--EMAIL--}{--ACCOUNT_STATUS--}{--MEMBER_JOINED--}
+
+ diff --git a/templates/de/html/admin/admin_list_refs2.tpl b/templates/de/html/admin/admin_list_refs2.tpl index aec71c010c..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_refs2.tpl +++ b/templates/de/html/admin/admin_list_refs2.tpl @@ -1,15 +1 @@ -
- - - - -$content[rows] - - - -
- {%message,ADMIN_LIST_REFERRALS=$content[userid]%} -
-
+ diff --git a/templates/de/html/admin/admin_list_refs_level.tpl b/templates/de/html/admin/admin_list_refs_level.tpl index 8d8a291a2a..d2daccb67a 100644 --- a/templates/de/html/admin/admin_list_refs_level.tpl +++ b/templates/de/html/admin/admin_list_refs_level.tpl @@ -1,5 +1,4 @@ - - +
@@ -23,5 +22,4 @@ $content[rows]
- - +
diff --git a/view.php b/view.php index 9ecb261c3d..5c05e73e1b 100644 --- a/view.php +++ b/view.php @@ -38,6 +38,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Set module $GLOBALS['module'] = 'view'; $GLOBALS['output_mode'] = -1;