More rewrites, and output-mode fixed (we should documentate this)
authorRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2009 01:06:50 +0000 (01:06 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2009 01:06:50 +0000 (01:06 +0000)
137 files changed:
DOCS/TODOs.txt
beg.php
birthday_confirm.php
doubler.php
inc/autopurge/purge-general.php
inc/autopurge/purge-inact.php
inc/autopurge/purge-unconfirmed.php
inc/config-functions.php
inc/databases.php
inc/db/lib-mysql3.php
inc/extensions-functions.php
inc/extensions/ext-admins.php
inc/extensions/ext-beg.php
inc/extensions/ext-bonus.php
inc/extensions/ext-doubler.php
inc/extensions/ext-holiday.php
inc/extensions/ext-html_mail.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-nickname.php
inc/extensions/ext-optimize.php
inc/extensions/ext-order.php
inc/extensions/ext-other.php
inc/extensions/ext-rallye.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-theme.php
inc/extensions/ext-transfer.php
inc/filters.php
inc/footer.php
inc/functions.php
inc/header.php
inc/install-inc.php
inc/language-functions.php
inc/libs/admins_functions.php
inc/libs/beg_functions.php
inc/libs/bonus_functions.php
inc/libs/doubler_functions.php
inc/libs/holiday_functions.php
inc/libs/rallye_functions.php
inc/libs/security_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/loader/load_cache-
inc/loader/load_cache-admin.php
inc/loader/load_cache-config.php
inc/loader/load_cache-extension.php
inc/loader/load_cache-filter.php
inc/loader/load_cache-impressum.php
inc/loader/load_cache-modules.php
inc/loader/load_cache-refdepths.php
inc/loader/load_cache-refsystem.php
inc/loader/load_cache-revision.php
inc/loader/load_cache-them.php
inc/mails/doubler_mails.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-add_points.php
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-admins_contct.php
inc/modules/admin/what-admins_edit.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_mediadata.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-config_secure.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-del_holiday.php
inc/modules/admin/what-del_transfer.php
inc/modules/admin/what-email_archiv.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_autopurge.php
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_bonus.php
inc/modules/admin/what-list_doubler.php
inc/modules/admin/what-list_holiday.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_notifications.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_primera.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_refs.php
inc/modules/admin/what-list_sponsor.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_transfer.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-list_wernis.php
inc/modules/admin/what-send_newsletter.php
inc/modules/admin/what-sub_points.php
inc/modules/admin/what-surfbar_stats.php
inc/modules/admin/what-theme_check.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-unlock_sponsor.php
inc/modules/admin/what-updates.php
inc/modules/admin/what-usr_online.php
inc/modules/guest/what-active.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-doubler.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-rallyes.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/guest/what-stats.php
inc/modules/guest/what-top10.php
inc/modules/member/what-beg2.php
inc/modules/member/what-bonus.php
inc/modules/member/what-holiday.php
inc/modules/member/what-mydata.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/modules/member/what-points.php
inc/modules/member/what-primera.php
inc/modules/member/what-rallyes.php
inc/modules/member/what-stats.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-surfbar_start.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/modules/member/what-wernis.php
inc/monthly/monthly_surfbar.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/pool/pool-bonus.php
inc/pool/pool-user.php
inc/reset/reset_100_bonus.php
inc/reset/reset_holiday.php
inc/reset/reset_profile.php
inc/stylesheet.php
inc/weekly/weekly_surfbar.php
login.php
mailid.php
mailid_top.php
sponsor_confirm.php
sponsor_ref.php
templates/de/html/member/member_pool_row.tpl
templates/de/html/member/member_stats_row.tpl

index d06dea0..779093b 100644 (file)
 ./inc/modules/member/what-payout.php:229:                                      // @TODO Rewrite this to a filter
 ./inc/modules/member/what-points.php:54:// @TODO Should we rewrite this to a filter?
 ./inc/modules/member/what-rallyes.php:89:      // @TODO Reactivate this: $content['admin'] = "<a href=\"{?URL?}/modules.php?module=index&amp;what=impressum&amp;admin=".$content['admin_id']."\">".$content['login']."</a>";
-./inc/modules/member/what-stats.php:115:               // @TODO Rewrite in template: stamp->timestamp_ordered,recs->max_rec,clix->clicks,perc->percents
-./inc/modules/member/what-stats.php:68:                // @TODO Rewrite in template subj->subject,stamp->timestamp,recs->target_send
+./inc/modules/member/what-stats.php:118:               // @TODO Rewrite in template: clix->clicks
 ./inc/modules/member/what-transfer.php:101:                    // @TODO Rewrite this to a filter
 ./inc/modules/member/what-transfer.php:143:                            // @TODO Rewrite this to a filter
 ./inc/modules/member/what-transfer.php:233:                            // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
diff --git a/beg.php b/beg.php
index 139a4e6..15bfb4f 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -204,7 +204,7 @@ if (isGetRequestElementSet('userid')) {
        } elseif (($status != 'CONFIRMED') && ($status != 'failed')) {
                // Maybe locked/unconfirmed account?
                $errorCode = generateErrorCodeFromUserStatus($status);
-       } elseif (($userid == '0') || ($status == 'failed')) {
+       } elseif (($userid == 0) || ($status == 'failed')) {
                // Inalid or locked account, so let's find out
                $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE nickname='%s' LIMIT 1",
                        array(getRequestElement('userid')), __FILE__, __LINE__);
index 68738e5..e60f59c 100644 (file)
@@ -92,7 +92,7 @@ if (SQL_NUMROWS($result) == 1) {
                // Add points to account
                // @TODO Try to rewrite the following unset()
                unset($GLOBALS['ref_level']);
-               addPointsThroughReferalSystem('birthday_confirm', $userid, $data['points'], false, '0', $locked, strtolower(getConfig('birthday_mode')));
+               addPointsThroughReferalSystem('birthday_confirm', $userid, $data['points'], false, 0, $locked, strtolower(getConfig('birthday_mode')));
 
                // Remove entry from table
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_birthday` WHERE `userid`=%s AND `chk_value`='%s' LIMIT 1",
index 9b6745a..5fd5202 100644 (file)
@@ -243,7 +243,7 @@ if (isExtensionActive('nickname')) {
 $content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode'));
 
 // Generate table with already payed out doubles
-$content['payout_history'] = generateDoublerTable('0', 'Y', 'N', 'DESC');
+$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
 
 // Generate timemark
 $content['timeout_mark'] = createFancyTime(getConfig('doubler_timeout'));
index c1e0ffa..c9e9bcb 100644 (file)
@@ -153,7 +153,7 @@ ORDER BY
        // Add points from deleted accounts to jackpot, but here just add to notify mail
        if ($admin_points > 0) {
                // Send mail to admin
-               sendAdminNotification(getMessage('AUTOPURGE_ADMIN_SUBJECT'), "admin_autopurge_points", translateComma($points), '0');
+               sendAdminNotification(getMessage('AUTOPURGE_ADMIN_SUBJECT'), "admin_autopurge_points", translateComma($points), 0);
        } // END - if
 
        // Run all SQLs here
index 93dcb5b..97b2dbb 100644 (file)
@@ -99,7 +99,7 @@ ORDER BY
                        $UIDs .= $content['userid'].", ";
 
                        // Get date/time from timestamp
-                       $content['last_online'] = generateDateTime($content['last_online'], '0');
+                       $content['last_online'] = generateDateTime($content['last_online'], 0);
 
                        // Load mail template
                        $message = loadEmailTemplate('member_autopurge_inactive', $content, bigintval($content['userid']));
@@ -143,14 +143,14 @@ ORDER BY `userid` ASC",
                        $UIDs .= $content['userid'] . ', ';
 
                        // Get date/time from timestamp
-                       $content['last_online'] = generateDateTime($content['last_online'], '0');
+                       $content['last_online'] = generateDateTime($content['last_online'], 0);
 
                        // Finnaly delete this inactive account
                        deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_delete', $content['last_online'], ''));
                } // END - while
 
                // Remove last comma
-               $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
+               $UIDs = str_replace(', ', "\n", substr($UIDs, 0, -2));
 
                // Send mail notification to admin
                if (getConfig('ap_in_notify') == 'Y') {
index 1b566c7..cdfd391 100644 (file)
@@ -69,14 +69,14 @@ ORDER BY
                        $UIDs .= $content['userid'] . ', ';
 
                        // Get date/time from timestamp
-                       $content['joined'] = generateDateTime($content['joined'], '0');
+                       $content['joined'] = generateDateTime($content['joined'], 0);
 
                        // Finnaly delete this inactive account
                        deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_unconfirmed', $content, ''));
                } // END - while
 
                // Remove last comma
-               $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
+               $UIDs = str_replace(', ', "\n", substr($UIDs, 0, -2));
 
                // Send mail notification to admin
                if (getConfig('ap_un_notify') == 'Y') {
index 02563b9..48e6d0a 100644 (file)
@@ -294,7 +294,7 @@ function updateOldConfigFile () {
 // Update config entries
 function updateConfiguration ($entries, $values, $updateMode='') {
        // Do not update config in CSS mode
-       if ((getOutputMode() == '1') || (getOutputMode() == -1) || (isInstallationPhase())) {
+       if ((getOutputMode() == 1) || (getOutputMode() == -1) || (isInstallationPhase())) {
                return;
        } // END - if
 
@@ -349,7 +349,7 @@ function updateConfiguration ($entries, $values, $updateMode='') {
 }
 
 // Filter for loading configuration
-function FILTER_LOAD_CONFIGURATION ($no = '0') {
+function FILTER_LOAD_CONFIGURATION ($no = 0) {
        // Check for cache extension, cache-array and if the requested configuration is in cache
        if ((isset($GLOBALS['cache_array']['config'][$no])) && (is_array($GLOBALS['cache_array']['config'][$no]))) {
                // Load config from cache
index ef12560..15c81b8 100644 (file)
@@ -93,7 +93,7 @@ $GLOBALS['replacer'] = array(
 setConfigEntry('ONE_DAY', (60*60*24));
 
 // Current date
-setConfigEntry('CURRENT_DATE', generateDateTime(time(), '3'));
+setConfigEntry('CURRENT_DATE', generateDateTime(time(), 3));
 
 // Timestamp for yesterday, today ... all at 00:00 am
 setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('ONE_DAY')));
index e709c8a..cb1d236 100644 (file)
@@ -104,7 +104,7 @@ Query string:<br />
        incrementConfigEntry('sql_count');
 
        // Debug output
-       if ((getOutputMode() != '1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
+       if ((getOutputMode() != 1) && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
                //
                // Debugging stuff...
                //
index bed7a9c..59e2e95 100644 (file)
@@ -102,7 +102,7 @@ function loadExtension ($ext_name, $ext_mode = 'init', $ext_ver = '', $dry_run =
                        // Download functions file
                        loadIncludeOnce($funcsInclude);
                } // END - if
-       } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) {
+       } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getOutputMode() == 0) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) {
                // No functions file is not so good...
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no own functions file or we cannot read from it. mode=%s",
                        $ext_name,
@@ -534,7 +534,7 @@ function getExtensionVersion ($ext_name) {
 
                // Count cache hits
                incrementStatsEntry('cache_hits');
-       } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (getOutputMode() != '0')) {
+       } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (getOutputMode() != 0)) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT `ext_version` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
                        array($ext_name), __FUNCTION__, __LINE__);
index 7bf9ef6..b2b26ee 100644 (file)
@@ -128,7 +128,7 @@ mail_template VARCHAR(255) NOT NULL,
 KEY (admin_id),
 PRIMARY KEY (id)
 ) TYPE={?_TABLE_TYPE?}");
-                               addExtensionSql("INSERT INTO  `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie k&ouml;nnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')");
+                               addExtensionSql("INSERT INTO  `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie k&ouml;nnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!',5)");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartm&auml;ssig wird weiter an alle versendet.");
index e6f1773..923abf8 100644 (file)
@@ -235,8 +235,8 @@ PRIMARY KEY (id)
                                break;
 
                        case '0.2.4': // SQL queries for v0.2.4
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1");
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=1 WHERE `what`='beg' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`=3, `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
index 822c154..f16ac01 100644 (file)
@@ -113,7 +113,7 @@ PRIMARY KEY  (id)
                                break;
 
                        case '0.2.0': // SQL queries for v0.2.0
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET target_send=mails_sent WHERE target_send=0 AND mails_sent>0 AND receivers != ''");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einf&uuml;gen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <a href=\"{?URL?}/modules.php?module=admin&amp;what=updates\">Updates pr&uuml;fen</a> herunter.");
@@ -188,7 +188,7 @@ KEY userid (userid)
                                break;
 
                        case '0.2.8': // SQL queries for v0.2.8
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET timestamp='0' WHERE timestamp='0000000000'");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET timestamp=0 WHERE timestamp='0000000000'");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
@@ -355,7 +355,7 @@ KEY userid (userid)
                        case '0.5.6': // SQL queries for v0.5.6
                                // Get current month
                                $curr = date('m', time());
-                               if (strlen($curr) == 1) $curr = '0'.$curr;
+                               if (strlen($curr) == 1) $curr = 0 . $curr;
                                if ($curr == "00") $curr = "12";
 
                                // Generate timemark...
@@ -421,7 +421,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        case '0.6.8': // SQL queries for v0.6.8
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND' WHERE `data_type` != 'SEND' AND `data_type` != 'DELETED' AND `receivers`='' AND `target_send`='0'");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND' WHERE `data_type` != 'SEND' AND `data_type` != 'DELETED' AND `receivers`='' AND `target_send`=0");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empf&auml;nderauswahl nicht ber&uuml;cksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitber&uuml;cksichtigt.");
@@ -506,7 +506,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        case '0.8.3': // SQL queries for v0.8.3
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`=2, `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
index 44588a9..dda6a67 100644 (file)
@@ -215,7 +215,7 @@ PRIMARY KEY (id)
                                        break;
 
                                case '0.1.4': // SQL queries for v0.1.4
-                                       addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1");
+                                       addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=4 WHERE `what`='doubler' LIMIT 1");
 
                                        // Update notes (these will be set as task text!)
                                        setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
index 86d16dc..84b2544 100644 (file)
@@ -74,7 +74,7 @@ PRIMARY KEY (id)
                addAdminMenuSql('holiday','config_holiday','Einstellungen','Maximale Tage f&uuml;r Urlaub usw. einstellen.',3);
 
                // Remove 0 max mails per day
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='0' LIMIT 1");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1");
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -82,8 +82,8 @@ PRIMARY KEY (id)
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='holiday' LIMIT 1");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='holiday' LIMIT 4");
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='0' LIMIT 1");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('0','Urlaub')");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES (0,'Urlaub')");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -156,7 +156,7 @@ PRIMARY KEY (id)
 
                        case '0.1.3': // SQL queries for v0.1.3
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='0' LIMIT 1");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('ONE_DAY')*2)."'");
 
                                // Update notes (these will be set as task text!)
@@ -202,7 +202,7 @@ PRIMARY KEY (id)
                                break;
 
                        case '0.1.9': // SQL queries for v0.1.9
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account', `sort`=2, `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
index 3b36479..654f940 100644 (file)
@@ -166,8 +166,8 @@ switch (getExtensionMode()) {
                $GLOBALS['valid_email_chars'] = array(
                        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
                        't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L',
-                       'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1',
-                       '2','3','4','5','6','7','8','9'
+                       'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_',0,1,
+                       2,3,4,5,6,7,8,9
                );
                break;
 
index 6e6d017..5f9e9f3 100644 (file)
@@ -165,7 +165,7 @@ PRIMARY KEY (`nl_id`)
                                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_topics`");
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_topics` (
 `nl_topic_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`nl_id` BIGINT(20) NOT NULL DEFAULT '0',
+`nl_id` BIGINT(20) NOT NULL DEFAULT 0,
 `nl_topic_title` VARCHAR(255) NOT NULL DEFAULT '',
 `nl_topic_text` MEDIUMTEXT,
 INDEX `newsletter_id` (`nl_id`),
@@ -224,8 +224,8 @@ PRIMARY KEY (`nl_order_id`)
                $GLOBALS['valid_email_chars'] = array(
                        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
                        't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L',
-                       'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1',
-                       '2','3','4','5','6','7','8','9'
+                       'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_',0,1,
+                       2,3,4,5,6,7,8,9
                );
                break;
 
index b7ac3ca..0118114 100644 (file)
@@ -100,7 +100,7 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.0.6': // SQL queries for v0.0.6
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_pattern` VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_chars` VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'");
                                addAdminMenuSql('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenl&auml;nge, sowie erlaubte Zeichen hier ein.', 12);
@@ -157,7 +157,7 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.1.6': // SQL queries for v0.1.6
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=2 WHERE `what`='nickname' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
index 79ce41b..cd58bc1 100644 (file)
@@ -58,7 +58,7 @@ switch (getExtensionMode()) {
   gain decimal(10,3) NOT NULL DEFAULT '0.000',
   PRIMARY KEY (id)
 ) TYPE={?_TABLE_TYPE?}");
-               addAdminMenuSql('misc','optimize','DB optimieren','F&uuml;hren Sie dies ab und an aus, damit &uuml;berfl&uuml;ssige Daten aus der Datenbank entfernt werden.','5');
+               addAdminMenuSql('misc','optimize','DB optimieren','F&uuml;hren Sie dies ab und an aus, damit &uuml;berfl&uuml;ssige Daten aus der Datenbank entfernt werden.',5);
                break;
 
        case 'remove': // Do stuff when removing extension
index 9b7993c..5011254 100644 (file)
@@ -74,7 +74,7 @@ switch (getExtensionMode()) {
                switch (getCurrentExtensionVersion()) {
                        case '0.1.0': // SQL queries for v0.1
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
-                               addAdminMenuSql('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.');
+                               addAdminMenuSql('setup','config_order','Mailbuchungsseite',7,'Einstellungen am Mailbuchungsformular.');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Maximale Mailbuchungen sind nun vom maximalen Empfang abh&auml;gig.");
@@ -82,7 +82,7 @@ switch (getExtensionMode()) {
 
                        case '0.1.1': // SQL queries for v0.1.1
                                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1");
-                               addAdminMenuSql('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.');
+                               addAdminMenuSql('setup','config_order','Mailbuchungsseite',7,'Einstellungen am Mailbuchungsformular.');
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
 
                                // Update notes (these will be set as task text!)
@@ -272,7 +272,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                        case '0.4.6': // SQL queries for v0.4.6
                                addMemberMenuSql('order',NULL,'Mailbuchungen','N','Y',3);
                                addMemberMenuSql('order','order2','Framekiller-Mails','N','Y',2);
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order', `sort`=1, `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
index 02e16d3..fd0c94b 100644 (file)
@@ -89,7 +89,7 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.0.4': // SQL queries for v0.0.4
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
index fa87340..88da04d 100644 (file)
@@ -217,7 +217,7 @@ PRIMARY KEY (id)
 
                        case '0.2.0': // SQL queries for v0.2.0
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT 3");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
@@ -289,7 +289,7 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu
                                break;
 
                        case '0.3.2': // SQL queries for v0.3.2
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`=1, `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
@@ -327,7 +327,7 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu
        case 'init': // Do stuff when extension is initialized
                // Do stuff only when not in CSS mode
                // @TODO Move this code into rallye_functions.php
-               if (getOutputMode() != '1') {
+               if (getOutputMode() != 1) {
                        // Get total member count
                        $total = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true);
 
index 77fcb36..9597186 100644 (file)
@@ -456,15 +456,15 @@ PRIMARY KEY (`id`)
                                addMemberMenuSql('extras',NULL,'Extras','Y','N',5);
                                addMemberMenuSql('rals',NULL,'Rallyes','Y','N',6);
                                addMemberMenuSql('account',NULL,'Ihr Account','Y','N',7);
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='stats', `sort`=1, `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=3 WHERE `what`='reflinks' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett umgebaut.");
                                break;
 
                        case '0.3.6': // SQL queries for v0.3.6
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `salt_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `salt_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 9");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `pass_scramble` VARCHAR(255) NOT NULL DEFAULT ''");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` MODIFY `password` VARCHAR(255) NOT NULL DEFAULT ''");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `rand_no` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
index e4b77c7..a44d29b 100644 (file)
@@ -140,8 +140,8 @@ INDEX (`theme_active`)
                                // Memember menu
                                addMemberMenuSql('themes',NULL,'Design-Auswahl','N','Y',3);
                                addMemberMenuSql('main','themes','Designs','N','Y',6);
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1");
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`=8 WHERE `action`='themes' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account', `sort`=1, `title`='Designs' WHERE `what`='themes' LIMIT 1");
 
                                // User data
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `curr_theme` VARCHAR(255) NOT NULL DEFAULT 'default'");
index 3c5ab03..7ef77d5 100644 (file)
@@ -247,7 +247,7 @@ PRIMARY KEY (id)
                                break;
 
                        case '0.2.5': // SQL queries for v0.2.5
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=5 WHERE `what`='transfer' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitgliedsmen&uuml; komplett ge&auml;ndert.");
index 1b7eb19..5b007f3 100644 (file)
@@ -603,7 +603,7 @@ function FILTER_DETERMINE_WHAT_ACTION () {
 // Sends out pooled mails
 function FILTER_TRIGGER_SENDING_POOL () {
        // Are we in normal output mode?
-       if (getOutputMode() != '0') {
+       if (getOutputMode() != 0) {
                // Only in normal output mode to prevent race-conditons!
        } // END - if
 
index 0e9518d..d4f6a4d 100644 (file)
@@ -43,13 +43,13 @@ if (!defined('__SECURITY')) {
 
 // Footer disabled or already sent?
 // 1234      5                       54    45                              5    5                              543    3                              321
-if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && ($GLOBALS['footer_sent'] != '2'))) && (getOutputMode() != '1'))) {
+if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != 1) && ($GLOBALS['footer_sent'] != 2))) && (getOutputMode() != 1))) {
        // @TODO Rewrite these all into filters
        // Handle fatal errors
        handleFatalErrors();
 
        // Shall we display the copyright notice?
-       if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == '2')) {
+       if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) {
                // Backlink enabled?
                if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) {
                        // Copyright with backlink, thanks! :-)
@@ -61,19 +61,20 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') &&
        } // END - if
 
        // Shall we display the parsing time and number of queries?
-       if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() != 0) && ($GLOBALS['header_sent'] == '2')) {
+       // 1234                            5                      54    4         5              5       4    4                       5       543    3                   4432    2             33     2    2                              21
+       if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == 0) && ($GLOBALS['header_sent'] == 2)) {
                // Then display it here
                displayParsingTime();
        } // END - if
 
        // Shall we display SQL queries?
-       if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == '2')) {
+       if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
                // Then display it here
                displayDebugSqls();
        } // END - if
 
        // Shall we include the uberwach snippet?
-       if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == '2')) {
+       if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
                // Then display it here
                loadUberwachSnippet();
        } // END - if
index 0048109..c7064dc 100644 (file)
@@ -116,7 +116,7 @@ function outputHtml ($htmlCode, $newLine = true) {
                sendHeader('Content-language: ' . getLanguage());
 
                // Extension 'rewrite' installed?
-               if ((isExtensionActive('rewrite')) && (getOutputMode() != '1')) {
+               if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
                        $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
                } // END - if
 
@@ -148,7 +148,7 @@ function outputHtml ($htmlCode, $newLine = true) {
                outputRawCode($GLOBALS['output']);
        } elseif ((getConfig('OUTPUT_MODE') == 'render') && (!empty($GLOBALS['output']))) {
                // Rewrite links when rewrite extension is active
-               if ((isExtensionActive('rewrite')) && (getOutputMode() != '1')) {
+               if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
                        $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
                } // END - if
 
@@ -241,7 +241,7 @@ function loadTemplate ($template, $return=false, $content=array()) {
                if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0;
 
                // Generate date/time string
-               $date_time = generateDateTime(time(), '1');
+               $date_time = generateDateTime(time(), 1);
 
                // Is content an array
                if (is_array($content)) $content['date_time'] = $date_time;
@@ -410,7 +410,7 @@ function loadTemplate ($template, $return=false, $content=array()) {
 }
 
 // Loads an email template and compiles it
-function loadEmailTemplate ($template, $content = array(), $UID = '0') {
+function loadEmailTemplate ($template, $content = array(), $UID = 0) {
        global $DATA;
 
        // Our configuration is kept non-global here
@@ -600,7 +600,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
                        // Free result
                        SQL_FREERESULT($result_email);
                }
-       } elseif ($toEmail == '0') {
+       } elseif ($toEmail == 0) {
                // Is the webmaster!
                $toEmail = getConfig('WEBMASTER');
        }
@@ -731,7 +731,7 @@ function generatePassword ($length = 0) {
 }
 
 // Generates a human-readable timestamp from the Uni* stamp
-function generateDateTime ($time, $mode = '0') {
+function generateDateTime ($time, $mode = 0) {
        // Filter out numbers
        $time = bigintval($time);
 
@@ -744,10 +744,10 @@ function generateDateTime ($time, $mode = '0') {
        switch (getLanguage()) {
                case 'de': // German date / time format
                        switch ($mode) {
-                               case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
-                               case '1': $ret = strtolower(date('d.m.Y - H:i', $time)); break;
-                               case '2': $ret = date('d.m.Y|H:i', $time); break;
-                               case '3': $ret = date('d.m.Y', $time); break;
+                               case 0: $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
+                               case 1: $ret = strtolower(date('d.m.Y - H:i', $time)); break;
+                               case 2: $ret = date('d.m.Y|H:i', $time); break;
+                               case 3: $ret = date('d.m.Y', $time); break;
                                default:
                                        logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
                                        break;
@@ -756,10 +756,10 @@ function generateDateTime ($time, $mode = '0') {
 
                default: // Default is the US date / time format!
                        switch ($mode) {
-                               case '0': $ret = date('r', $time); break;
-                               case '1': $ret = date('Y-m-d - g:i A', $time); break;
-                               case '2': $ret = date('y-m-d|H:i', $time); break;
-                               case '3': $ret = date('y-m-d', $time); break;
+                               case 0: $ret = date('r', $time); break;
+                               case 1: $ret = date('Y-m-d - g:i A', $time); break;
+                               case 2: $ret = date('y-m-d|H:i', $time); break;
+                               case 3: $ret = date('y-m-d', $time); break;
                                default:
                                        logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
                                        break;
@@ -808,7 +808,7 @@ function translatePoolType ($type) {
 // Translates the american decimal dot into a german comma
 function translateComma ($dotted, $cut = true, $max = 0) {
        // Default is 3 you can change this in admin area "Misc -> Misc Options"
-       if (!isConfigEntrySet('max_comma')) setConfigEntry('max_comma', '3');
+       if (!isConfigEntrySet('max_comma')) setConfigEntry('max_comma', 3);
 
        // Use from config is default
        $maxComma = getConfig('max_comma');
@@ -1165,7 +1165,7 @@ function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums =
 }
 
 //
-function addSelectionBox ($type, $default, $prefix = '', $id = '0') {
+function addSelectionBox ($type, $default, $prefix = '', $id = 0) {
        $OUT = '';
 
        if ($type == 'yn') {
@@ -1250,7 +1250,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0') {
                case 'sec':
                case 'min':
                        for ($idx = 0; $idx < 60; $idx+=5) {
-                               if (strlen($idx) == 1) $idx = '0' . $idx;
+                               if (strlen($idx) == 1) $idx = 0 . $idx;
                                $OUT .= "<option value=\"" . $idx."\"";
                                if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1259,7 +1259,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0') {
 
                case 'hour':
                        for ($idx = 0; $idx < 24; $idx++) {
-                               if (strlen($idx) == 1) $idx = '0' . $idx;
+                               if (strlen($idx) == 1) $idx = 0 . $idx;
                                $OUT .= "<option value=\"" . $idx."\"";
                                if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1662,7 +1662,7 @@ function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=fals
        $NAV = '';
        for ($page = 1; $page <= $PAGES; $page++) {
                // Is the page currently selected or shall we generate a link to it?
-               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) {
+               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) {
                        // Is currently selected, so only highlight it
                        $NAV .= '<strong>-';
                } else {
@@ -1676,7 +1676,7 @@ function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=fals
                        $NAV .= '">';
                }
                $NAV .= $page;
-               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) {
+               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) {
                        // Is currently selected, so only highlight it
                        $NAV .= '-</strong>';
                } else {
@@ -2166,7 +2166,7 @@ function generatePassString ($passHash) {
                                $mod = dechex(sqrt(($part2 - $part1) * getConfig('_PRIME') / pi()));
                        }
                        $mod = substr(round($mod), 0, 4);
-                       $mod = str_repeat('0', 4-strlen($mod)) . $mod;
+                       $mod = str_repeat(0, 4-strlen($mod)) . $mod;
                        //* DEBUG: */ outputHtml("*" . $start.'=' . $mod."*<br />");
                        $start += 4;
                        $newHash .= $mod;
@@ -2661,7 +2661,7 @@ function getMessageFromErrorCode ($code) {
                case getCode('OVERLENGTH')       : $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break;
                case getCode('URL_FOUND')        : $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break;
                case getCode('SUBJ_URL')         : $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break;
-               case getCode('BLIST_URL')        : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), '0'); break;
+               case getCode('BLIST_URL')        : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), 0); break;
                case getCode('NO_RECS_LEFT')     : $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break;
                case getCode('INVALID_TAGS')     : $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break;
                case getCode('MORE_POINTS')      : $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break;
@@ -2692,7 +2692,7 @@ function getMessageFromErrorCode ($code) {
 
                        // Load timestamp from last order
                        list($timestamp) = SQL_FETCHROW($result);
-                       $timestamp = generateDateTime($timestamp, '1');
+                       $timestamp = generateDateTime($timestamp, 1);
 
                        // Free memory
                        SQL_FREERESULT($result);
@@ -2919,7 +2919,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
        return false;
 }
 // Send notification to admin
-function sendAdminNotification ($subject, $templateName, $content=array(), $userid = '0') {
+function sendAdminNotification ($subject, $templateName, $content=array(), $userid = 0) {
        if (getExtensionVersion('admins') >= '0.4.1') {
                // Send new way
                sendAdminsEmails($subject, $templateName, $content, $userid);
@@ -3047,7 +3047,7 @@ function handleLoginFailtures ($accessLevel) {
                        //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):accessLevel={$accessLevel}<br />");
                        $content = array(
                                'login_failures' => getSession('mxchange_' . $accessLevel.'_failures'),
-                               'last_failure'   => generateDateTime(getSession('mxchange_' . $accessLevel.'_last_fail'), '2')
+                               'last_failure'   => generateDateTime(getSession('mxchange_' . $accessLevel.'_last_fail'), 2)
                        );
 
                        // Load template
@@ -3156,7 +3156,7 @@ function addNewBonusMail ($data, $mode = '', $output=true) {
 // Determines referal id and sets it
 function determineReferalId () {
        // Skip this in non-html-mode
-       if (getOutputMode() != '0') return false;
+       if (getOutputMode() != 0) return false;
 
        // Check if refid is set
        if ((isset($GLOBALS['refid'])) && ($GLOBALS['refid'] > 0)) {
@@ -3188,7 +3188,7 @@ function determineReferalId () {
        }
 
        // Set cookie when default refid > 0
-       if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((getSession('refid') == '0') && (getConfig('def_refid') > 0))) {
+       if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((getSession('refid') == 0) && (getConfig('def_refid') > 0))) {
                // Set cookie
                setSession('refid', $GLOBALS['refid']);
        } // END - if
@@ -3611,21 +3611,26 @@ function linenumberCode ($code)    {
        if (!is_array($code)) $codeE = explode("\n", $code); else $codeE = $code;
        $count_lines = count($codeE);
 
-       $r = "Line | Code:<br />";
+       $r = 'Line | Code:<br />';
        foreach($codeE as $line => $c) {
-               $r .= "<div class=\"line\"><span class=\"linenum\">";
+               $r .= '<div class="line"><span class="linenum">';
                if ($count_lines == 1) {
-                       $r .= '1';
+                       $r .= 1;
                } else {
                        $r .= ($line == ($count_lines - 1)) ? '' :  ($line+1);
                }
-               $r .= "</span>|";
+               $r .= '</span>|';
 
                // Add code
-               $r .= "<span class=\"linetext\">" . htmlentities($c) . "</span></div>";
+               $r .= '<span class="linetext">' . htmlentities($c) . '</span></div>';
        }
 
-       return "<div class=\"code\">" . $r . "</div>\n";
+       return '<div class="code">' . $r . '</div>';
+}
+
+// Convert ';' to ', ' for e.g. receiver list
+function convertReceivers ($old) {
+       return str_replace(';', ', ', $old);
 }
 
 //////////////////////////////////////////////////
index d248ce7..ce68e54 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Is the header already sent?
-if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
+if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) {
        // If not in CSS mode generate the header
        if (getOutputMode() != 1) {
                // Config and database connection valid?
@@ -123,7 +123,7 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
        } // END - if
 
        // Closing HEAD tag
-       if (getOutputMode() != '1') outputHtml('</head>');
+       if (getOutputMode() != 1) outputHtml('</head>');
        if ($GLOBALS['header_sent'] == 0) $GLOBALS['header_sent'] = 1;
 } // END - if
 
index e8304bb..7e66a60 100644 (file)
@@ -88,12 +88,12 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        addTemplateToInstallContent('install_welcome');
                        break;
 
-               case '1': // Server path, base URL
+               case 1: // Server path, base URL
                        // Load template
                        addTemplateToInstallContent('install_page1');
                        break;
 
-               case '2': // MySQL data (alone!)
+               case 2: // MySQL data (alone!)
                        if (empty($mysql['dbase']))  $mysql['dbase']  = 'your_database';
                        if (empty($mysql['login']))  $mysql['login']  = 'your_login';
                        if (empty($mysql['host']))   $mysql['host']   = 'localhost';
@@ -121,7 +121,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        addTemplateToInstallContent('install_page2', $content);
                        break;
 
-               case '3':
+               case 3:
                        // Set more values
                        $content['spath']      = postRequestElement('spath');
                        $content['burl']       = postRequestElement('burl');
@@ -162,7 +162,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                        addTemplateToInstallContent('install_page3', $content);
                        break;
 
-               case '5': // Misc settings
+               case 5: // Misc settings
                        // General settings
                        $content['spath']  = postRequestElement('spath');
                        $content['burl']   = postRequestElement('burl');
index 48f17fd..1936842 100644 (file)
@@ -177,7 +177,7 @@ function loadLanguageFile ($ext_name = 'none') {
        if (isLanguageIncludeReadable($ext_name)) {
                // Load language file
                loadLanguageInclude($ext_name);
-       } elseif ((isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
+       } elseif ((isDebugModeEnabled()) && (getOutputMode() == 0) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
                // No language file is not so good...
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s, mode=%s",
                        $ext_name,
index 4273537..73362ec 100644 (file)
@@ -164,7 +164,7 @@ function adminsChangeAdminAccount ($postData) {
                // When both passwords match update admin account
                if ($postData['pass1'][$id] == $postData['pass2'][$id]) {
                        // Save only when both passwords are the same (also when they are empty)
-                       $add = ''; $cache_update = '1';
+                       $add = ''; $cache_update = 1;
 
                        // Generate hash
                        $hash = generateHash($postData['pass1'][$id]);
@@ -441,7 +441,7 @@ function sendAdminsEmails ($subj, $template, $content, $UID) {
                                        $UID
                                ));
                        }
-               } elseif ($adminId == '0') {
+               } elseif ($adminId == 0) {
                        // Select all email adresses
                        $result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC",
                                __FUNCTION__, __LINE__);
index 6fc6f55..fe4fc53 100644 (file)
@@ -56,7 +56,7 @@ function addPointsBeg ($userid, $points) {
                // Add points to account
                // @TODO Try to rewrite the following unset()
                unset($GLOBALS['ref_level']);
-               addPointsThroughReferalSystem('beg', $userid, $points, false, '0', $locked, strtolower(getConfig('beg_mode')));
+               addPointsThroughReferalSystem('beg', $userid, $points, false, 0, $locked, strtolower(getConfig('beg_mode')));
        }
 
        // Subtract begged points from member account if the admin has selected one
index 68543dc..4c99ef6 100644 (file)
@@ -132,7 +132,7 @@ function addBonusRanks ($data, $type, $userid) {
                // Transfer data to template
                $GLOBALS['ranking_content']['yr_level']  = $GLOBALS['ranking_content']['level'];
                $GLOBALS['ranking_content']['yr_points'] = translateComma($GLOBALS['ranking_content']['points']);
-               $GLOBALS['ranking_content']['yr_tmark']  = generateDateTime($GLOBALS['ranking_content']['timemark'], '1');
+               $GLOBALS['ranking_content']['yr_tmark']  = generateDateTime($GLOBALS['ranking_content']['timemark'], 1);
 
                // Load template
                $GLOBALS['ranking_content']['own'] = loadTemplate('show_bonus_yr', true, $GLOBALS['ranking_content']);
@@ -225,7 +225,7 @@ function handleBonusPoints ($mode) {
        if (getConfig('bonus_active') != 'Y') return;
 
        // Switch to jackpot-mode when no UID is supplied but userid-mode is selected
-       if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_userid') == '0') && (isExtensionActive('jackpot'))) {
+       if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_userid') == 0) && (isExtensionActive('jackpot'))) {
                // Update database & config
                updateConfiguration('bonus_mode', 'JACKPOT');
        } // END - if
index 1efe4bf..6d54679 100644 (file)
@@ -43,17 +43,17 @@ if (!defined('__SECURITY')) {
 
 // Generates a HTML table based on given data
 // @TODO Lame description
-function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') {
+function generateDoublerTable ($userid = 0, $done = 'N', $ref = 'N', $sort = 'ASC') {
        if (empty($cnt)) $cnt = 0;
        $add = ''; $DT_MODE = 0;
        if ($userid > 0) {
                // Load entries only from a single user
                $add = " AND `userid`='".bigintval($userid)."'";
-               $mode = 'member'; $COLS = '4'; $DT_MODE = '2';
+               $mode = 'member'; $COLS = 4; $DT_MODE = 2;
                $message = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND');
        } else {
                // Guest mode!
-               $mode = 'guest'; $COLS = '3'; $DT_MODE = '3';
+               $mode = 'guest'; $COLS = 3; $DT_MODE = 3;
                $message = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND');
        }
 
index 2ddd8df..a14fa0d 100644 (file)
@@ -76,8 +76,8 @@ LIMIT 1",
 
                        // Prepare array
                        $content = array(
-                               'holiday_end'      => generateDateTime($content['holiday_end']  , '3'),
-                               'holiday_start'    => generateDateTime($content['holiday_start'], '3'),
+                               'holiday_end'      => generateDateTime($content['holiday_end']  , 3),
+                               'holiday_start'    => generateDateTime($content['holiday_start'], 3),
                                'holiday_comments' => $content['comments']
                        );
 
@@ -90,7 +90,7 @@ LIMIT 1",
                } // END - if
 
                // Send mail to admins
-               sendAdminNotification(getMessage('HOLIDAY_ADMIN_UNLOCK_SUBJ'), 'admin_holiday_unlock', $admin, '0');
+               sendAdminNotification(getMessage('HOLIDAY_ADMIN_UNLOCK_SUBJ'), 'admin_holiday_unlock', $admin, 0);
 
                // Run all SQLs
                runFilterChain('run_sqls');
index a390b61..02adccd 100644 (file)
@@ -59,9 +59,9 @@ function autostartReferalRallyes ($result) {
 
        // Transfer all neccessary data to the $DATA array
        $DATA['userid_cnt'] = countSumTotalData('CONFIRMED','user_data','userid','status',true);
-       $DATA['start']      = generateDateTime($start, '2');
-       $DATA['end']        = generateDateTime($end  , '2');
-       $DATA['now_t']      = generateDateTime(time(), '2');
+       $DATA['start']      = generateDateTime($start, 2);
+       $DATA['end']        = generateDateTime($end  , 2);
+       $DATA['now_t']      = generateDateTime(time(), 2);
        $DATA['title']      = $title;
        $DATA['id']         = $id;  // ID for the rallye details link
 
@@ -139,7 +139,7 @@ VALUES ('%s','%s','%s','%s')",
        if ($notify == 'Y') $templ = 'admin_rallye_notify';
 
        // Send email to admin
-       sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, '0');
+       sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, 0);
 
        // Free memory
        SQL_FREERESULT($result_user);
@@ -340,7 +340,7 @@ LIMIT 1", __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 0) {
                        // Add userid and his ref count to table
                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` (`rallye_id`, `userid`, `refs`)
-VALUES ('%s','%s','0')",
+VALUES ('%s','%s',0)",
                        array(bigintval($id), bigintval($userid)), __FUNCTION__, __LINE__);
                } // END - if
 
@@ -349,9 +349,9 @@ VALUES ('%s','%s','0')",
 
                if ($notify == 'Y') {
                        // Transfer all neccessary data to the global $DATA array
-                       $DATA['start'] = generateDateTime($start, '2');
-                       $DATA['end']   = generateDateTime($end  , '2');
-                       $DATA['now_t'] = generateDateTime(time(), '2');
+                       $DATA['start'] = generateDateTime($start, 2);
+                       $DATA['end']   = generateDateTime($end  , 2);
+                       $DATA['now_t'] = generateDateTime(time(), 2);
                        $DATA['title'] = $title;
                        $DATA['id']    = $id;  // ID for the rallye details link
                        $DATA['ref']   = 0;
@@ -388,9 +388,9 @@ function markReferalRallyesAsExpired ($result) {
        $DATA = array(); $cnt = 0;
        $users = array();
        $DATA['title']  = $title;
-       $DATA['start']  = generateDateTime($start, '1');
-       $DATA['end']    = generateDateTime($end  , '1');
-       $DATA['now_t']  = generateDateTime(time(), '1');
+       $DATA['start']  = generateDateTime($start, 1);
+       $DATA['end']    = generateDateTime($end  , 1);
+       $DATA['now_t']  = generateDateTime(time(), 1);
 
        // Just count...
        $total = 0;
@@ -553,7 +553,7 @@ function getArrayFromReferalRallyePrices ($rallye) {
 //
 function getArrayFromReferalRallyeUsers ($rallye) {
        // Fix zero points to 0.00000
-       if (getConfig('ref_payout') == '0') setConfigEntry('ref_payout', '0.00000');
+       if (getConfig('ref_payout') == 0) setConfigEntry('ref_payout', '0.00000');
 
        // Init multi array
        $users = array(
@@ -649,7 +649,7 @@ function addReferalRallyeWinners ($rallye, $default=0) {
                $active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'");
 
                if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
-               if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == '0') || (empty($DATA['cpoints'][$idx]))) {
+               if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == 0) || (empty($DATA['cpoints'][$idx]))) {
                        // Allow valid and active users with at least one ref to get points
                        $DATA['ref'][$idx]   = '---';
                        $DATA['userid'][$idx]   = '---';
@@ -709,9 +709,9 @@ WHERE end_time <= (UNIX_TIMESTAMP() - {?ONE_DAY?} - %s) AND expired='Y'",
                // Expire found rallyes and notify admin
                while ($content = SQL_FETCHARRAY($result_rallye)) {
                        // Prepare data for mail template
-                       $content['start_time']  = generateDateTime($content['start_time'], '1');
-                       $content['end_time']    = generateDateTime($content['end_time']  , '1');
-                       $content['now_time']    = generateDateTime(time(), '1');
+                       $content['start_time']  = generateDateTime($content['start_time'], 1);
+                       $content['end_time']    = generateDateTime($content['end_time']  , 1);
+                       $content['now_time']    = generateDateTime(time(), 1);
 
                        // Send mail to admin
                        sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), 'admin_rallye_purged', $content, 0);
index ba081bd..c422806 100644 (file)
@@ -183,7 +183,7 @@ unset($phpSelfDirectory);
 unset($phpSelfFile);
 
 // Security system loaded...
-define('__SECURITY', '1');
+define('__SECURITY', 1);
 
 // [EOF]
 ?>
index 630db06..d0eb5c8 100644 (file)
@@ -142,7 +142,7 @@ function handlSponsorRequest (&$postData, $update=false, $messageArray=array(),
                                // Generate message
                                $message = getMessageFromIndexedArray(getMessage('ADMIN_SPONSOR_UPDATED'), 'updated', $messageArray);
                                $ret = "updated";
-                       } elseif (($ALREADY === false) || (($postData['force'] == '1') && (isAdmin()))) {
+                       } elseif (($ALREADY === false) || (($postData['force'] == 1) && (isAdmin()))) {
                                // Add new sponsor, first add more data
                                $DATA['keys'][] = 'sponsor_created'; $DATA['values'][] = time();
                                $DATA['keys'][] = 'status';
index a46474a..120cb25 100644 (file)
@@ -56,7 +56,7 @@ function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) {
                // URL invalid
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid URL.", $url, $limit, $reload));
                return false;
-       } elseif (SURFBAR_LOOKUP_BY_URL($url, '0')) {
+       } elseif (SURFBAR_LOOKUP_BY_URL($url, 0)) {
                // URL already found in surfbar!
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Already added.", $url, $limit, $reload));
                return false;
@@ -75,7 +75,7 @@ function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) {
        }
 
        // Register the new URL
-       return SURFBAR_REGISTER_URL($url, '0', 'ACTIVE', 'unlock', array('limit' => $limit, 'reload' => $reload));
+       return SURFBAR_REGISTER_URL($url, 0, 'ACTIVE', 'unlock', array('limit' => $limit, 'reload' => $reload));
 }
 
 // Admin unlocked an email so we can migrate the URL
@@ -363,11 +363,11 @@ function SURFBAR_MEMBER_RESUBMIT_ACTION ($urlData) {
 // Display selected "action form"
 function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) {
        // Translate some data
-       $urlData['registered']    = generateDateTime($urlData['registered'], '2');
+       $urlData['registered']    = generateDateTime($urlData['registered'], 2);
        $urlData['views_total']   = translateComma($urlData['views_total']);
        $urlData['views_max']     = translateComma($urlData['views_max']);
        $urlData['views_allowed'] = translateComma($urlData['views_allowed']);
-       $urlData['last_locked']   = generateDateTime($urlData['last_locked'], '2');
+       $urlData['last_locked']   = generateDateTime($urlData['last_locked'], 2);
 
        // Is the lock reason empty?
        if (empty($urlData['lock_reason'])) {
@@ -477,7 +477,7 @@ function SURFBAR_HANDLE_SELF_MAINTENANCE () {
 // Handle URLs which limit has depleted
 function SURFBAR_HANDLE_DEPLETED_VIEWS () {
        // Get all URLs
-       $urlArray = SURFBAR_GET_URL_DATA('0', 'views_max', 'id', 'ASC', 'id', " AND views_allowed>0 AND `status`='ACTIVE'");
+       $urlArray = SURFBAR_GET_URL_DATA(0, 'views_max', 'id', 'ASC', 'id', " AND views_allowed>0 AND `status`='ACTIVE'");
 
        // Do we have some entries?
        if (count($urlArray) > 0) {
@@ -675,8 +675,8 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
 
        // Translate some data if present
        if (isset($content['status']))        $content['status']        = translateSurfbarUrlStatus($content['status']);
-       if (isset($content['registered']))    $content['registered']    = generateDateTime($content['registered'], '2');
-       if (isset($content['last_locked']))   $content['last_locked']   = generateDateTime($content['last_locked'], '2');
+       if (isset($content['registered']))    $content['registered']    = generateDateTime($content['registered'], 2);
+       if (isset($content['last_locked']))   $content['last_locked']   = generateDateTime($content['last_locked'], 2);
        if (isset($content['views_total']))   $content['views_total']   = translateComma($content['views_total']);
        if (isset($content['views_allowed'])) $content['views_allowed'] = translateComma($content['views_allowed']);
        if (isset($content['views_max']))     $content['views_max']     = translateComma($content['views_max']);
@@ -708,8 +708,8 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
 
        // Translate some data if present
        if (isset($content['status']))        $content['status']        = translateSurfbarUrlStatus($content['status']);
-       if (isset($content['registered']))    $content['registered']    = generateDateTime($content['registered'], '2');
-       if (isset($content['last_locked']))   $content['last_locked']   = generateDateTime($content['last_locked'], '2');
+       if (isset($content['registered']))    $content['registered']    = generateDateTime($content['registered'], 2);
+       if (isset($content['last_locked']))   $content['last_locked']   = generateDateTime($content['last_locked'], 2);
        if (isset($content['views_total']))   $content['views_total']   = translateComma($content['views_total']);
        if (isset($content['views_allowed'])) $content['views_allowed'] = translateComma($content['views_allowed']);
        if (isset($content['views_max']))     $content['views_max']     = translateComma($content['views_max']);
@@ -1321,7 +1321,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
        $addon += abs(log($onlineUsers / $totalUsers + 1) * $percent * $totalUsers);
 
        // Get total URLs
-       $totalUrls = SURFBAR_GET_TOTAL_URLS('ACTIVE', '0');
+       $totalUrls = SURFBAR_GET_TOTAL_URLS('ACTIVE', 0);
 
        // Get user's total URLs
        $userUrls = SURFBAR_GET_TOTAL_USER_URLS(0, 'ACTIVE');
@@ -1355,7 +1355,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
        $addon += abs($max * $percent * $totalUsers);
 
        // Get total URLs
-       $totalUrls = SURFBAR_GET_TOTAL_URLS('ACTIVE', '0');
+       $totalUrls = SURFBAR_GET_TOTAL_URLS('ACTIVE', 0);
 
        // Calculate addon
        $addon += abs($max * $percent * $totalUrls);
index 5656d75..585517a 100644 (file)
@@ -79,7 +79,7 @@ function outputAdvancedOverview (&$result_main) {
                        'purged_mails','purged_bonus_mails'
                ) as $entry) {
                // Set it to zero
-               $content[$entry] = '0';
+               $content[$entry] = 0;
        } // END - foreach
 
        // Extension updates found
@@ -116,7 +116,7 @@ function outputAdvancedOverview (&$result_main) {
        //
        // Unassigned tasks
        //
-       $value = countSumTotalData('0', 'task_system', 'id', 'assigned_admin', true, " AND `status` != 'DELETED'");
+       $value = countSumTotalData(0, 'task_system', 'id', 'assigned_admin', true, " AND `status` != 'DELETED'");
 
        if ($value > 0) {
                $content['new_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&amp;what=list_task&amp;type=unassigned\">".$value."</a>";
index 16e7344..d343e52 100644 (file)
@@ -147,7 +147,7 @@ function addPageNavigation ($PAGES, $offset, $show_form, $colspan,$return=false)
 
        $OUT = '';
        for ($page = 1; $page <= $PAGES; $page++) {
-               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) {
+               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) {
                        $OUT .= '<strong>-';
                } else {
                        if (!isGetRequestElementSet('letter')) setRequestGetElement('letter', getMessage('_ALL2'));
@@ -166,7 +166,7 @@ function addPageNavigation ($PAGES, $offset, $show_form, $colspan,$return=false)
 
                $OUT .= $page;
 
-               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) {
+               if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) {
                        $OUT .= '-</strong>';
                } else  {
                        $OUT .= '</a>';
index 9ad7371..d7c5838 100644 (file)
@@ -48,7 +48,7 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) {
        // Load cache
        $GLOBALS['cache_array']['foo'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file
        $GLOBALS['cache_instance']->init();
 
index 8a0b92b..6cbf5c0 100644 (file)
@@ -82,7 +82,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('admin')) && ($GLOBALS['cache_ins
                $GLOBALS['cache_instance']->removeCacheFile();
                unset($GLOBALS['cache_array']['admin']);
        }
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file
        $GLOBALS['cache_instance']->init();
 
@@ -115,7 +115,7 @@ if (isExtensionInstalledAndNewer('admins', '0.3')) {
        if (($GLOBALS['cache_instance']->loadCacheFile('admin_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
                // Load referal system from cache
                $GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache();
-       } elseif (getOutputMode() != '1') {
+       } elseif (getOutputMode() != 1) {
                // Create cache file here
                $GLOBALS['cache_instance']->init();
 
index 2c9e2bf..7e036b7 100644 (file)
@@ -59,7 +59,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_in
 
        // Remove dummy array
        unset($config);
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index 00c56c5..d93cb66 100644 (file)
@@ -131,7 +131,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache
 
        // Remove array and mark cache as loaded
        unset($EXT_POOL);
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index 5d98fc2..a8e12af 100644 (file)
@@ -48,7 +48,7 @@ if (isInstallationPhase()) return;
 if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
        // Load filter from cache
        $GLOBALS['cache_array']['filter'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getOutputMode() != '1') && (isExtensionInstalled('sql_patches'))) {
+} elseif ((getOutputMode() != 1) && (isExtensionInstalled('sql_patches'))) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index 0f54203..d05ff1d 100644 (file)
@@ -51,7 +51,7 @@ if (isInstallationPhase()) return;
 if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) {
        // Load cache
        $GLOBALS['cache_array']['imprint'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file
        $GLOBALS['cache_instance']->init();
 
index 0c7f12e..d210b50 100644 (file)
@@ -70,7 +70,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
                } // END - if
        } // END - foreach
        unset($modArray);
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index faf3e3c..f794f9a 100644 (file)
@@ -48,7 +48,7 @@ if (isInstallationPhase()) return;
 if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
        // Load referal system from cache
        $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index 2d01cce..7cbbc6a 100644 (file)
@@ -48,7 +48,7 @@ if (isInstallationPhase()) return;
 if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
        // Load referal system from cache
        $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index 4f175ba..08b60a7 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile('revision'))) {
        // Load revision from cache
        $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getOutputMode() != '1')) {
+} elseif ((getOutputMode() != 1)) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index dc5e497..ae2d6bf 100644 (file)
@@ -71,7 +71,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_in
 
        // Remove dummy array
        unset($cache);
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
index 4b6d850..718074f 100644 (file)
@@ -163,7 +163,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
                                // Doubled points
                                'points' => translateComma($content['points']),
                                // Timemark
-                               'when'   => generateDateTime($content['timemark'], '2'),
+                               'when'   => generateDateTime($content['timemark'], 2),
                                // IP number when the member submitted the doubling form
                                'ip'     => $content['remote_ip'],
                        );
index 4ee9340..7976506 100644 (file)
@@ -467,7 +467,7 @@ ORDER BY
 }
 
 // Create member selection box
-function addMemberSelectionBox ($def='0', $add_all=false, $return=false, $none=false, $field='userid') {
+function addMemberSelectionBox ($def=0, $add_all=false, $return=false, $none=false, $field='userid') {
        // Output selection form with all confirmed user accounts listed
        $result = SQL_QUERY("SELECT `userid`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_user_data` ORDER BY `userid` ASC", __FUNCTION__, __LINE__);
 
@@ -511,7 +511,7 @@ function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') {
        if (SQL_NUMROWS($result) > 0) {
                // Load menu as selection
                $OUT = "<select name=\"".$mode."_menu";
-               if ((!empty($defid)) || ($defid == '0')) $OUT .= "[".$defid."]";
+               if ((!empty($defid)) || ($defid == 0)) $OUT .= "[".$defid."]";
                $OUT .= "\" size=\"1\" class=\"admin_select\">
        <option value=\"\">{--SELECT_NONE--}</option>\n";
                // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
@@ -594,7 +594,7 @@ function adminSaveSettings (&$postData, $tableName = "_config", $whereStatement
 
        if (SQL_NUMROWS($result) == 1) {
                // "Implode" all data to single string
-               $DATA_UPDATE = implode(", ", $DATA);
+               $DATA_UPDATE = implode(', ', $DATA);
 
                // Generate SQL string
                $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}%s` SET %s WHERE %s LIMIT 1",
@@ -612,8 +612,8 @@ function adminSaveSettings (&$postData, $tableName = "_config", $whereStatement
                } // END - foreach
 
                // Add both in one line
-               $KEYs = implode(", ", $KEYs);
-               $values = implode(", ", $values);
+               $KEYs = implode(', ', $KEYs);
+               $values = implode(', ', $values);
 
                // Generate SQL string
                $sql = sprintf("INSERT INTO {?_MYSQL_PREFIX?}%s (%s) VALUES (%s)",
@@ -677,12 +677,12 @@ function adminAddMenuSelectionBox ($menu, $type, $name, $default = '') {
 
 // Creates a user-profile link for the admin. This function can also be used for many other purposes
 function generateUserProfileLink ($userid, $title = '', $what = 'list_user') {
-       if (($title == '') && ($title != '0')) {
+       if (($title == '') && ($title != 0)) {
                // Set userid as title
                $title = $userid;
        } // END - if
 
-       if (($title == '0') && ($what == 'list_refs')) {
+       if (($title == 0) && ($what == 'list_refs')) {
                // Return title again
                return $title;
        } // END - if
index eb26099..2a09cb9 100644 (file)
@@ -150,7 +150,7 @@ LIMIT 1",
                                // Task is valid...
                                list($tid, $userid, $type, $subj, $text, $created, $status, $adminId) = SQL_FETCHROW($result_task);
 
-                               if ($adminId == '0') {
+                               if ($adminId == 0) {
                                        // Assgin current admin to unassgigned task
                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1",
                                        array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
@@ -264,7 +264,7 @@ LIMIT 1",
                                        'subject'   => $subj,
                                        'add'       => $add,
                                        'text'      => $text,
-                                       'created'   => generateDateTime($created, '1'),
+                                       'created'   => generateDateTime($created, 1),
                                        'extension' => $ext_name
                                );
 
@@ -280,7 +280,7 @@ LIMIT 1",
                                                        array($ext_name), __FILE__, __LINE__);
                                                $lines = SQL_NUMROWS($result_lines);
                                                SQL_FREERESULT($result_lines);
-                                               if ($lines == '0') {
+                                               if ($lines == 0) {
                                                        // New extension found
                                                        $OUT .= loadTemplate('admin_ext_reg_form', true, array(
                                                                'id'       => bigintval($id),
@@ -397,7 +397,7 @@ LIMIT 1",
                // Load final template
                loadTemplate('admin_overview_list', false, $OUT);
        } else {
-               if ((isset($postData['task'])) && ((count($postData['task']) > 0) || ($postData['task'][0] == '1'))) {
+               if ((isset($postData['task'])) && ((count($postData['task']) > 0) || ($postData['task'][0] == 1))) {
                        // Only unassign / delete tasks when there are selected tasks posted
                        if (!empty($postData['unassign'])) {
                                // Unassign from tasks
@@ -455,7 +455,7 @@ LIMIT 1",
                                'assigned_admin' => $content['assigned_admin'],
                                'userid'         => $content['userid'],
                                'task_type_msg'  => $content['task_type_msg'],
-                               'created'        => generateDateTime($content['task_created'], '2')
+                               'created'        => generateDateTime($content['task_created'], 2)
                        ));
 
                        // Do we have extension task?
index 7353479..91a1c62 100644 (file)
@@ -122,7 +122,7 @@ if (getRequestElement('userid') == 'all') {
        SQL_FREERESULT($result);
 } else {
        // Output selection form with all confirmed user accounts listed
-       addMemberSelectionBox('0', true);
+       addMemberSelectionBox(0, true);
 }
 
 // [EOF]
index ef37b45..2b5e387 100644 (file)
@@ -97,8 +97,8 @@ $content['active_options']   = generateOptionList('/ARRAY/', array('N','Y'), arr
 $content['notify_options']   = generateOptionList('/ARRAY/', array('Y','N'), array(getMessage('YES'), getMessage('NO') ));
 
 // Starting day
-$content['start_sec']   = addSelectionBox('sec'  , '0'              , 'start');
-$content['start_min']   = addSelectionBox('min'  , '0'              , 'start');
+$content['start_sec']   = addSelectionBox('sec'  , 0              , 'start');
+$content['start_min']   = addSelectionBox('min'  , 0              , 'start');
 $content['start_hour']  = addSelectionBox('hour' , date('G', time()), 'start');
 $content['start_day']   = addSelectionBox('day'  , date('d', time()), 'start');
 $content['start_month'] = addSelectionBox('month', date('m', time()), 'start');
@@ -110,8 +110,8 @@ $M = date('m', time() + (getConfig('ONE_DAY') * 7));
 $Y = date('Y', time() + (getConfig('ONE_DAY') * 7));
 
 // Ending day
-$content['end_sec']   = addSelectionBox('sec'  , '0'              , 'end');
-$content['end_min']   = addSelectionBox('min'  , '0'              , 'end');
+$content['end_sec']   = addSelectionBox('sec'  , 0              , 'end');
+$content['end_min']   = addSelectionBox('min'  , 0              , 'end');
 $content['end_hour']  = addSelectionBox('hour' , date('G', time()), 'end');
 $content['end_day']   = addSelectionBox('day'  , $D               , 'end');
 $content['end_month'] = addSelectionBox('month', $M               , 'end');
index 364687e..dd56097 100644 (file)
@@ -48,14 +48,14 @@ if ((isFormSent()) && (isGetRequestElementSet('admin'))) {
        // Send mail or message
        if ((isExtensionActive('msg')) && (postRequestElement('type') == 'message')) {
                // Add message
-               $message = loadEmailTemplate('admins_msg_contct_admin', postRequestElement('text'), '0');
+               $message = loadEmailTemplate('admins_msg_contct_admin', postRequestElement('text'), 0);
                SEND_ADMIN_MESSAGE(getRequestElement('admin'), ADMINS_MSG_FROM_ADMIN, $message);
        } else {
                // Load admin's email address
                $email = getAdminEmail(bigintval(getRequestElement('admin')));
 
                // Load email template and send the mail to the admin
-               $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), '0');
+               $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), 0);
                sendEmail($email, getMessage('ADMINS_MSG_FROM_ADMIN'), $message);
        }
 
index b6a8932..8da2ac0 100644 (file)
@@ -53,8 +53,8 @@ if (isGetRequestElementSet('admin')) {
        $adminId = bigintval(getRequestElement('admin'));
 
        // Set required fields
-       setRequestPostElement('edit', '1');
-       setRequestPostElement('sel', array($adminId => '1'));
+       setRequestPostElement('edit', 1);
+       setRequestPostElement('sel', array($adminId => 1));
 } // END - if
 
 if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) {
index 16e4a6a..9711dd6 100644 (file)
@@ -60,7 +60,7 @@ if (isPostRequestElementSet('edit')) {
                                // @TODO Can this be rewritten???
                                $OUT .= "<select name=\"admin_id[".$content['id']."]\" size=\"1\" class=\"admin_select\">
 <option value=\"0\"";
-                               if ($content['admin_id'] == '0') $OUT .= ' selected="selected"';
+                               if ($content['admin_id'] == 0) $OUT .= ' selected="selected"';
                                $OUT .=">{--ADMINS_ALL_ADMINS--}</option>\n";
                                if (isExtensionActive('events')) {
                                        $OUT .= "<option value=\"-1\"";
index 849e879..794f1a6 100644 (file)
@@ -75,7 +75,7 @@ if (isFormSent()) {
        // Start of this exchange
        if (getConfig('mt_start') > 0) {
                // Only show start
-               $content['mt_start'] = '<strong>' . generateDateTime(getConfig('mt_start'), '3') . '</strong>';
+               $content['mt_start'] = '<strong>' . generateDateTime(getConfig('mt_start'), 3) . '</strong>';
        } else {
                // Make start editable
                $content['mt_start'] =
index 6f43d83..1e2fd62 100644 (file)
@@ -260,8 +260,8 @@ ORDER BY
                                'admin_id'        => $content['admin_id'],
                                'email_link' => generateEmailLink($content['admin_id']),
                                'alogin'     => $content['login'],
-                               'start'      => generateDateTime($content['start_time'], '3'),
-                               'end'        => generateDateTime($content['end_time'], '3'),
+                               'start'      => generateDateTime($content['start_time'], 3),
+                               'end'        => generateDateTime($content['end_time'], 3),
                        );
 
                        // Load row template and switch color
index 47623c4..d7156d0 100644 (file)
@@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__);
 
 if (isFormSent()) {
        // If salt length is empty or null then we shall generate new passwords
-       if (!isPostRequestElementSet(('salt_length')) || (postRequestElement('salt_length') == '0')) {
+       if (!isPostRequestElementSet(('salt_length')) || (postRequestElement('salt_length') == 0)) {
                // Generate new passwords for all!
                loadInclude('inc/gen_sql_patches.php');
 
index 42bb935..b09c9bb 100644 (file)
@@ -65,7 +65,7 @@ if (isGetRequestElementSet('mid')) {
                $content['subject']   = $subject;
                $content['url']       = generateDerefererUrl($url);
                $content['url_raw']   = $url;
-               $content['timestamp'] = generateDateTime($timestamp, '0');
+               $content['timestamp'] = generateDateTime($timestamp, 0);
 
                // Load template
                loadTemplate('admin_del_email_normal', false, $content);
@@ -112,7 +112,7 @@ LIMIT 1",
 
                                        // Pay back points
                                        //* DEBUG: */ outputHtml("PAYBACK:".$sender."<br />");
-                                       addPointsThroughReferalSystem('mail_deleted', $sender, $totalPoints, true, '0', false,'direct');
+                                       addPointsThroughReferalSystem('mail_deleted', $sender, $totalPoints, true, 0, false,'direct');
 
                                        // Output message
                                        if (getConfig('repay_deleted_mails') == 'REPAY') {
@@ -193,7 +193,7 @@ LIMIT 1",
                $content['id']        = $id;
                $content['subject']   = $subject;
                $content['url']       = generateDerefererUrl($url);
-               $content['timestamp'] = generateDateTime($timestamp, '0');
+               $content['timestamp'] = generateDateTime($timestamp, 0);
                $content['cnt']       = $cnt;
 
                // Load template
@@ -230,7 +230,7 @@ LIMIT 1",
                $content['id']        = $id;
                $content['subject']   = $subject;
                $content['url']       = generateDerefererUrl($url);
-               $content['timestamp'] = generateDateTime($timestamp, '0');
+               $content['timestamp'] = generateDateTime($timestamp, 0);
                $content['cnt']       = $cnt;
 
                // Load template
index 7435c85..ab27f48 100644 (file)
@@ -64,7 +64,7 @@ WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
 
                        // Update user's account
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
-SET `holiday_active`='N', holiday_activated='0'
+SET `holiday_active`='N', holiday_activated=0
 WHERE `userid`=%s LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__);
 
                        // Remove holiday
@@ -73,8 +73,8 @@ WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
 
                        // Prepare loaded data for the
                        $content = array(
-                               'start' => generateDateTime($start, '3'),
-                               'end'   => generateDateTime($end  , '3')
+                               'start' => generateDateTime($start, 3),
+                               'end'   => generateDateTime($end  , 3)
                        );
 
                        // Send email to user
index cf79679..3327966 100644 (file)
@@ -75,7 +75,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content = array(
                        'sw'          => $SW,
                        'trans_id'    => $content['trans_id'],
-                       'stamp'       => generateDateTime($content['time_trans'], '3'),
+                       'stamp'       => generateDateTime($content['time_trans'], 3),
                        'userid_from' => generateUserProfileLink($content['userid']),
                        'userid_to'   => generateUserProfileLink($content['to_userid']),
                        'reason'      => $content['reason'],
index 8456d5e..8ce52b1 100644 (file)
@@ -61,7 +61,7 @@ ORDER BY
 $result_maximum = SQL_QUERY($sql, __FILE__, __LINE__);
 
 // Set offset an current page to default values
-if (!isGetRequestElementSet('page'))   setRequestGetElement('page'  , '1');
+if (!isGetRequestElementSet('page'))   setRequestGetElement('page'  , 1);
 if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('mails_page'));
 
 // Add limitation to SQL string
@@ -83,8 +83,8 @@ if (SQL_NUMROWS($result) > 0) {
        $content['top_email_nav']    = '';
        $content['bottom_email_nav'] = '';
        if ($pages > 1) {
-               $content['top_email_nav']    = addEmailNavigation($pages, getConfig('mails_page'), true , '3', true);
-               $content['bottom_email_nav'] = addEmailNavigation($pages, getConfig('mails_page'), false, '3', true);
+               $content['top_email_nav']    = addEmailNavigation($pages, getConfig('mails_page'), true , 3, true);
+               $content['bottom_email_nav'] = addEmailNavigation($pages, getConfig('mails_page'), false, 3, true);
        } // END - if
 
        $OUT = ''; $SW = 2;
@@ -112,13 +112,13 @@ if (SQL_NUMROWS($result) > 0) {
                        'pay'         => getPaymentTitlePrice($pool[5]),
                        'cat'         => getCategory($pool[10]),
                        'sent'        => $sent,
-                       'ruserids'    => str_replace(';', ", ", $pool[4]),
+                       'ruserids'    => convertReceivers($pool[4]),
                        'unconfirmed' => $unconfirmed,
                        'type'        => translatePoolType($pool[6]),
                        'target_send' => $pool[9],
                        'frametester' => generateFrametesterUrl($pool[8]),
                        'url'         => $pool[8],
-                       'stamp'       => generateDateTime($pool[7], '0'),
+                       'stamp'       => generateDateTime($pool[7], 0),
                        'mid'         => $pool[0],
                );
 
index dada51d..1edcfd6 100644 (file)
@@ -98,7 +98,7 @@ ORDER BY timestamp DESC";
 $result_normal = SQL_QUERY($sql, __FILE__, __LINE__);
 
 // Set offset an current page to default values
-if (!isGetRequestElementSet('page')) setRequestGetElement('page', '1');
+if (!isGetRequestElementSet('page')) setRequestGetElement('page', 1);
 
 if (!isGetRequestElementSet('offset')) {
        if (isConfigEntrySet('mails_page')) {
@@ -163,10 +163,10 @@ if (SQL_NUMROWS($result_list) > 0) {
                $content['sender_link'] = generateUserProfileLink($pool['sender']);
                $content['payment']     = getPaymentTitlePrice($pool['payment_id']);
                $content['category']    = getCategory($pool['cat_id']);
-               $content['receivers']   = str_replace(';', ", ", $pool['receivers']);
+               $content['receivers']   = convertReceivers($pool['receivers']);
                $content['type']        = translatePoolType($pool['data_type']);
                $content['frametester'] = generateFrametesterUrl($pool['url']);
-               $content['timestamp']   = generateDateTime($pool['timestamp'], '0');
+               $content['timestamp']   = generateDateTime($pool['timestamp'], 0);
 
                // Load row template
                $OUT .= loadTemplate('admin_list_emails_row', true, $content);
@@ -177,7 +177,7 @@ if (SQL_NUMROWS($result_list) > 0) {
 
        // Add navigation (with change box and colspan=3)
        $content['nav'] = '';
-       if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, '3', true);
+       if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, 3, true);
 
        // Prepare content
        $content['rows'] = $OUT;
@@ -215,10 +215,10 @@ if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
                        $content = $bonus;
                        $content['time']        = createFancyTime($content['time']);
                        $content['category']    = getCategory($content['cat_id']);
-                       $content['receivers']   = str_replace(';', ", ", $content['receivers']);
+                       $content['receivers']   = convertReceivers($content['receivers']);
                        $content['type']        = translatePoolType($content['data_type']);
                        $content['frametester'] = generateFrametesterUrl($content['url']);
-                       $content['timestamp']   = generateDateTime($content['timestamp'], '0');
+                       $content['timestamp']   = generateDateTime($content['timestamp'], 0);
 
                        // Load row template
                        $OUT .= loadTemplate('admin_list_bonus_emails_row', true, $content);
@@ -226,7 +226,7 @@ if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
 
                // Add navigation (without change box but with colspan=3)
                $content['nav'] = '';
-               if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, '3', true);
+               if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, 3, true);
 
                // Prepare content
                $content['rows'] = $OUT;
index 2f0b03a..407bd62 100644 (file)
@@ -370,7 +370,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__);
                                // Extension was not found in task management
                                loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404'));
                        }
-               } elseif ($task_found == '0') {
+               } elseif ($task_found == 0) {
                        // No longer assigned or old task
                        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED'));
                } else {
index 3d9cc2f..09cde0c 100644 (file)
@@ -89,9 +89,9 @@ if (SQL_NUMROWS($result) > 0) {
                        'surname'     => $content['surname'],
                        'family'      => $content['family'],
                        'email'       => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>",
-                       'joined'      => generateDateTime($content['joined'], '2'),
-                       'last_online' => generateDateTime($content['last_online'], '2'),
-                       'notified'    => generateDateTime($content['ap_notified'], '2'),
+                       'joined'      => generateDateTime($content['joined'], 2),
+                       'last_online' => generateDateTime($content['last_online'], 2),
+                       'notified'    => generateDateTime($content['ap_notified'], 2),
                );
 
                // Load row template
index fa28e44..f665ea2 100644 (file)
@@ -49,7 +49,7 @@ if (getConfig('beg_rallye') == 'Y') {
        if (isPostRequestElementSet(('withdraw'))) {
                // Okay, let's prepare...
                $curr = date('m', time()) - 1;
-               if (strlen($curr) == 1) $curr = '0'.$curr;
+               if (strlen($curr) == 1) $curr = 0 . $curr;
                updateConfiguration('last_month', $curr);
                loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BEG_WITHDRAW_PREPARED'));
        } // END - if
@@ -91,7 +91,7 @@ ORDER BY beg_points DESC, last_online DESC, userid",
                                'surname'  => $content['surname'],
                                'family'  => $content['family'],
                                'turbo'  => translateComma($content['beg_points']),
-                               'last_online'   => generateDateTime($content['last_online'], '2'),
+                               'last_online'   => generateDateTime($content['last_online'], 2),
                                'sw'     => $SW,
                                'win1'   => $WIN1,
                                'win2'   => $WIN2,
@@ -117,7 +117,7 @@ ORDER BY beg_points DESC, last_online DESC, userid",
 
                // Prepare constant for timemark
                if (isExtensionActive('autopurge')) {
-                       $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), '2');
+                       $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), 2);
                } else {
                        $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
                }
index 9e3167b..030dc4f 100644 (file)
@@ -49,7 +49,7 @@ if (getConfig('bonus_active') == 'Y') {
        if (isPostRequestElementSet(('withdraw'))) {
                // Okay, let's prepare...
                $curr = date('m', time()) - 1;
-               if (strlen($curr) == 1) $curr = '0'.$curr;
+               if (strlen($curr) == 1) $curr = 0 . $curr;
                updateConfiguration('last_month', $curr);
                loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_WITHDRAW_PREPARED'));
        } // END - if
@@ -103,7 +103,7 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
                        $content['email']  = generateEmailLink($content['email'], 'user_data');
                        $content['gender'] = translateGender($content['gender']);
                        $content['points'] = translateComma($content['points']);
-                       $content['last_online']   = generateDateTime($content['last_online'], '2');
+                       $content['last_online']   = generateDateTime($content['last_online'], 2);
                        $content['sw']     = $SW;
                        $content['win1']   = $WIN1;
                        $content['win2']   = $WIN2;
@@ -128,7 +128,7 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
 
                // Prepare constant for timemark
                if (isExtensionActive('autopurge')) {
-                       $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), '2');
+                       $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), 2);
                } else {
                        $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
                }
index 7d13119..a6c531f 100644 (file)
@@ -63,7 +63,7 @@ switch (getRequestElement('mode')) {
        case 'overview': // General overview page
                // Prepare links
                foreach (array('already_direct','already_ref','waiting_direct','waiting_ref') as $entry) {
-                       $content[$entry . '_link'] = '0';
+                       $content[$entry . '_link'] = 0;
                } // END - switch
 
                // Init sums
index 5afce11..c128d55 100644 (file)
@@ -63,11 +63,11 @@ if (SQL_NUMROWS($result) > 0) {
                        'sw'       => $SW,
                        'id'       => $content['id'],
                        'userid'      => generateUserProfileLink($content['userid']),
-                       'start'    => generateDateTime($content['holiday_start'], '3'),
-                       'end'      => generateDateTime($content['holiday_end'], '3'),
+                       'start'    => generateDateTime($content['holiday_start'], 3),
+                       'end'      => generateDateTime($content['holiday_end'], 3),
                        'comments' => wordwrap($content['comments'], 15),
                        'status'   => translateUserStatus($content['status']),
-                       'last_online'     => generateDateTime($content['last_online'], '3'),
+                       'last_online'     => generateDateTime($content['last_online'], 3),
                );
 
                // Load row template and switch color
index ed6be56..aafb7bf 100644 (file)
@@ -134,7 +134,7 @@ if (isGetRequestElementSet('userid')) {
                                                        'sw'      => $SW,
                                                        'link'    => $LINK,
                                                        'subject' => $subject,
-                                                       'stamp'   => generateDateTime($timestamp, '0'),
+                                                       'stamp'   => generateDateTime($timestamp, 0),
                                                        'cat'     => getCategory($cat),
                                                );
 
index 1858732..e95e439 100644 (file)
@@ -49,7 +49,7 @@ $SQL2 = '';
 $result_max = false;
 
 // Set offset an current page to default values
-if (!isGetRequestElementSet('page'))   setRequestGetElement('page'  , '1');
+if (!isGetRequestElementSet('page'))   setRequestGetElement('page'  , 1);
 if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('mails_page'));
 
 if (isExtensionActive('bonus')) {
@@ -98,10 +98,10 @@ if ((isExtensionActive('bonus')) && (SQL_NUMROWS($result_max) > 0) && (!empty($S
                        $content = $bonus;
                        $content['time']        = createFancyTime($content['time']);
                        $content['category']    = getCategory($content['cat_id']);
-                       $content['receivers']   = str_replace(';', ", ", $content['receivers']);
+                       $content['receivers']   = convertReceivers($content['receivers']);
                        $content['type']        = translatePoolType($content['data_type']);
                        $content['frametester'] = generateFrametesterUrl($content['url']);
-                       $content['timestamp']   = generateDateTime($content['timestamp'], '0');
+                       $content['timestamp']   = generateDateTime($content['timestamp'], 0);
 
                        // Load row template
                        $OUT .= loadTemplate('admin_list_notify_emails_row', true, $content);
@@ -109,7 +109,7 @@ if ((isExtensionActive('bonus')) && (SQL_NUMROWS($result_max) > 0) && (!empty($S
 
                // Add navigation (without change box but with colspan=3)
                $content['nav'] = '';
-               if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, '3', true);
+               if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, 3, true);
 
                // Prepare content
                $content['rows'] = $OUT;
index ec39c96..4bf5cb3 100644 (file)
@@ -59,7 +59,7 @@ if (isGetRequestElementSet(('pid'))) {
                list($task) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                if (empty($task)) $task = 0;
-       } elseif ((empty($userid)) || ($userid == '0')) {
+       } elseif ((empty($userid)) || ($userid == 0)) {
                // Cannot obtain member ID!
                loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID'));
        } else {
@@ -204,7 +204,7 @@ LIMIT 1",
                        // Cannot load user data
                        loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERDATA'));
                }
-       } elseif ((empty($task)) || ($task == '0')) {
+       } elseif ((empty($task)) || ($task == 0)) {
                // Failed loading task ID
                loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID'));
        }
@@ -270,7 +270,7 @@ ORDER BY
                                'ptype'   => translateComma($content['payout_total']) . ' ' . $content['type'],
                                'account' => $content['target_account'],
                                'bank'    => $content['target_bank'],
-                               'tstamp'  => generateDateTime($content['payout_timestamp'], '2'),
+                               'tstamp'  => generateDateTime($content['payout_timestamp'], 2),
                                'status'  => $content['status'],
                        );
 
index c43eaa5..e9a6510 100644 (file)
@@ -57,7 +57,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content['sw']                = $SW;
                $content['link']              = generateUserProfileLink($content['userid']);
                $content['primera_amount']    = translateComma($content['primera_amount']);
-               $content['primera_timestamp'] = generateDateTime($content['primera_timestamp'], '2');
+               $content['primera_timestamp'] = generateDateTime($content['primera_timestamp'], 2);
                $content['raw_type']          = strtolower($content['primera_type']);
                $content['primera_type']      = PRIMERA_TRANSFER_STATUS($content['primera_type']);
 
index 42324c4..1b945c7 100644 (file)
@@ -56,11 +56,11 @@ if (isGetRequestElementSet(('rallye'))) {
                // Activate / deactivate
                switch (getRequestElement('activate'))
                {
-                       case '1': // Activate
+                       case 1: // Activate
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1");
                                break;
 
-                       case '0': // Deactivate
+                       case 0: // Deactivate
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
                                break;
                }
@@ -68,11 +68,11 @@ if (isGetRequestElementSet(('rallye'))) {
                // Automatic notification
                switch (getRequestElement('notify'))
                {
-                       case '1': // Activate
+                       case 1: // Activate
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1");
                                break;
 
-                       case '0': // Deactivate
+                       case 0: // Deactivate
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1");
                                break;
                }
@@ -80,11 +80,11 @@ if (isGetRequestElementSet(('rallye'))) {
                // Automatic adding of new members
                switch (getRequestElement('auto'))
                {
-                       case '1': // Activate
+                       case 1: // Activate
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1");
                                break;
 
-                       case '0': // Deactivate
+                       case 0: // Deactivate
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1");
                                break;
                }
@@ -311,8 +311,8 @@ ORDER BY start_time DESC",
                                'title'      => $row['title'],
                                'template'   => $row['template'],
                                'joined'     => $joined,
-                               'start_date' => generateDateTime($row['start_time'], '2'),
-                               'end_date'   => generateDateTime($row['end_time']  , '2'),
+                               'start_date' => generateDateTime($row['start_time'], 2),
+                               'end_date'   => generateDateTime($row['end_time']  , 2),
                                'active_lnk' => translateYesNo($row['is_active']),
                                'notify_lnk' => translateYesNo($row['send_notify']),
                                'auto_lnk'   => translateYesNo($row['auto_add_new_user']),
@@ -335,7 +335,7 @@ ORDER BY start_time DESC",
 
                                case 'N':
                                        $row['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
-                                       $row['active'] = '1';
+                                       $row['active'] = 1;
                                        break;
                        }
 
@@ -349,7 +349,7 @@ ORDER BY start_time DESC",
 
                                case 'N':
                                        $row['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
-                                       $row['notify'] = '1';
+                                       $row['notify'] = 1;
                                        break;
                        }
 
@@ -363,7 +363,7 @@ ORDER BY start_time DESC",
 
                                case 'N':
                                        $row['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
-                                       $row['auto'] = '1';
+                                       $row['auto'] = 1;
                                        break;
                        }
 
index 7a80938..0effbec 100644 (file)
@@ -121,12 +121,12 @@ ORDER BY
                                                                        'sw'         => $SW,
                                                                        'u_link'     => generateUserProfileLink($data['userid']),
                                                                        'gender'     => translateGender($data['gender']),
-                                                                       'refs_link'  => '0',
+                                                                       'refs_link'  => 0,
                                                                        'surname'    => $data['surname'],
                                                                        'family'     => $data['family'],
                                                                        'email'      => "[<a href=\"".generateEmailLink($data['email'], 'user_data')."\">".$data['email']."</a>]",
                                                                        'status'     => translateUserStatus($data['status']),
-                                                                       'registered' => generateDateTime($data['joined'], '3'),
+                                                                       'registered' => generateDateTime($data['joined'], 3),
                                                                );
 
                                                                // Check if referal count is larger 0 and update link
@@ -150,7 +150,7 @@ ORDER BY
                                                } // END - while
                                        } else {
                                                // Output info message
-                                               $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), '0', '0');
+                                               $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));
@@ -170,12 +170,12 @@ ORDER BY
                                                'sw'         => $SW,
                                                'u_link'     => generateUserProfileLink($levels['userid']),
                                                'gender'     => translateGender($levels['gender']),
-                                               'refs_link'  => '0',
+                                               'refs_link'  => 0,
                                                'surname'    => $levels['surname'],
                                                'family'     => $levels['family'],
                                                'email'      => "[<a href=\"".generateEmailLink($levels['email'], 'user_data')."\">".$levels['email']."</a>]",
                                                'status'     => translateUserStatus($levels['status']),
-                                               'registered' => generateDateTime($levels['joined'], '3'),
+                                               'registered' => generateDateTime($levels['joined'], 3),
                                        );
 
                                        // Check if referal count is larger 0 and update link
index 22f892f..d3026f9 100644 (file)
@@ -77,9 +77,9 @@ WHERE `id`='%s' LIMIT 1",
                $content['email_link']  = generateEmailLink($content['email'], 'sponsor_data');
                $content['url']         = generateDerefererUrl($content['url']);
                //  Timestamps
-               $content['created']     = generateDateTime($content['sponsor_created'], '2');
-               $content['last_online'] = generateDateTime($content['last_online'], '2');
-               $content['last_change'] = generateDateTime($content['last_change'], '2');
+               $content['created']     = generateDateTime($content['sponsor_created'], 2);
+               $content['last_online'] = generateDateTime($content['last_online'], 2);
+               $content['last_change'] = generateDateTime($content['last_change'], 2);
                //  Sponsor points
                $content['points_amount'] = translateComma($content['points_amount']);
                $content['points_used']   = translateComma($content['points_used']);
@@ -154,8 +154,8 @@ ORDER BY
                                'family'   => $content['family'],
                                'email'   => generateEmailLink($content['email'], 'sponsor_data'),
                                'status'  => sponsorTranslateUserStatus($content['status']),
-                               'created' => generateDateTime($content['sponsor_created'], '2'),
-                               'last_online'    => generateDateTime($content['last_online'], '2'),
+                               'created' => generateDateTime($content['sponsor_created'], 2),
+                               'last_online'    => generateDateTime($content['last_online'], 2),
                                'points'  => translateComma($content['points_amount'] - $content['points_used']),
                                'ip'      => $content['remote_addr'],
                        );
index 6f9674c..3b0a16f 100644 (file)
@@ -185,7 +185,7 @@ ORDER BY
                                'admin'   => $content['assigned_admin'],
                                'userid'  => $content['userid'],
                                'type'    => $content['task_type_msg'],
-                               'created' => generateDateTime($content['task_created'], '2')
+                               'created' => generateDateTime($content['task_created'], 2)
                        ));
 
                        // Do we have an extension task?
index a845887..0827268 100644 (file)
@@ -55,7 +55,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content = array(
                        'sw'        => $SW,
                        'trans_id'  => $content['trans_id'],
-                       'stamp'     => generateDateTime($content['time_trans'], '3'),
+                       'stamp'     => generateDateTime($content['time_trans'], 3),
                        'from_link' => generateUserProfileLink($content['userid']),
                        'to_link'   => generateUserProfileLink($content['to_userid']),
                        'reason'    => wordwrap($content['reason'], 15),
index 7c4e3c6..a2c535a 100644 (file)
@@ -160,7 +160,7 @@ WHERE
                        'text'          => $text,
                        'url'           => generateFrametesterUrl($url),
                        'unconfirmed'   => $unconfirmed,
-                       'stamp'         => generateDateTime($stamp, '2'),
+                       'stamp'         => generateDateTime($stamp, 2),
                        'rows'          => $OUT
                );
 
index 480eea6..ce195ae 100644 (file)
@@ -52,7 +52,7 @@ if ((!isExtensionInstalled('user')) || (!isExtensionActive('user'))) {
 
 // Init variables
 $MORE = '';
-$colspan = '4';
+$colspan = 4;
 
 // Add nickname if extension is found&active
 // @TODO Rewrite these if-blocks in a filter
@@ -87,7 +87,7 @@ if (isExtensionActive('country')) {
 // Init unset data
 if (!isGetRequestElementSet('letter')) { setRequestGetElement('letter', getMessage('_ALL2')); }
 if (!isGetRequestElementSet('sortby')) { setRequestGetElement('sortby', 'userid');            }
-if (!isGetRequestElementSet('page'))   { setRequestGetElement('page'  , '1');                 }
+if (!isGetRequestElementSet('page'))   { setRequestGetElement('page'  , 1);                 }
 
 // Set base URL
 $base = '[<a href="{?URL?}/modules.php?module=admin';
@@ -131,10 +131,10 @@ LIMIT 1",
                // Is this above zero?
                if ($stamp > 0) {
                        // Then use it
-                       $content['birthday'] = generateDateTime($stamp, '3');
+                       $content['birthday'] = generateDateTime($stamp, 3);
                } else {
                        // Zero or below so set zero!
-                       $content['birthday'] = generateDateTime(0, '3');
+                       $content['birthday'] = generateDateTime(0, 3);
                }
 
                // Prepare data for template
@@ -142,15 +142,15 @@ LIMIT 1",
                $content['gender']            = translateGender($content['gender']);
                $content['email_link']        = generateEmailLink($content['email'], 'user_data');
                $content['status']            = translateUserStatus($content['status']);
-               $content['last_online']       = generateDateTime($content['last_online'], '0');
+               $content['last_online']       = generateDateTime($content['last_online'], 0);
                $content['used_points']       = translateComma($content['used_points']);
                if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $userid . '">' . translateComma($content['emails_sent']) . '</a>]';
-               $content['joined']            = generateDateTime($content['joined'], '0');
-               $content['last_update']       = generateDateTime($content['last_update'], '0');
-               $content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], '0');
+               $content['joined']            = generateDateTime($content['joined'], 0);
+               $content['last_update']       = generateDateTime($content['last_update'], 0);
+               $content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], 0);
                $content['total']             = translateComma(countSumTotalData($userid, 'user_points', 'points'));
                $content['locked']            = translateComma(countSumTotalData($userid, 'user_points', 'locked_points'));
-               $content['lock_timestamp']    = generateDateTime($content['lock_timestamp'], '2');
+               $content['lock_timestamp']    = generateDateTime($content['lock_timestamp'], 2);
 
                // Is the lock reason not set?
                if (!isset($content['lock_reason'])) $content['lock_reason'] = '---';
@@ -255,7 +255,7 @@ LIMIT 1",
        // Activate the extension please!
        $PAGES = round(SQL_NUMROWS($result_master) / getConfig('user_limit') + 0.5);
 
-       if (!isGetRequestElementSet('page'))   setRequestGetElement('page'  , '1');
+       if (!isGetRequestElementSet('page'))   setRequestGetElement('page'  , 1);
        if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('user_limit'));
 
        // Add limitation to SQL string and run him again
@@ -326,7 +326,7 @@ LIMIT 1",
                        $content['points']         = translateComma($pointsTotal);
                        $content['rate']           = translateComma($clickRate);
                        $content['locked']         = translateComma(countSumTotalData($content['userid'], 'user_points', 'locked_points'));
-                       $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], '2');
+                       $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
                        $content['status']         = translateUserStatus($content['status']);
                        $content['refs']           = countSumTotalData($content['userid'], 'refsystem', 'counter');
 
index 30e320e..09aaea6 100644 (file)
@@ -63,7 +63,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content['sw']               = $SW;
                $content['link']             = generateUserProfileLink($content['userid']);
                $content['wernis_amount']    = translateComma($content['wernis_amount']);
-               $content['wernis_timestamp'] = generateDateTime($content['wernis_timestamp'], '2');
+               $content['wernis_timestamp'] = generateDateTime($content['wernis_timestamp'], 2);
                $content['raw_type']         = strtolower($content['wernis_type']);
                $content['wernis_type']      = WERNIS_TRANSFER_STATUS($content['wernis_type']);
 
index 863c326..cbafde7 100644 (file)
@@ -86,7 +86,7 @@ ORDER BY
        }
 } else {
        // Copy data into constants for the template and load it
-       $content['datestamp'] = generateDateTime(time(), '3');
+       $content['datestamp'] = generateDateTime(time(), 3);
        if (isExtensionActive('html_mail')) {
                // Load template with HTML mode
                loadTemplate('admin_newsletter', false, $content);
index f4348b3..448167d 100644 (file)
@@ -113,7 +113,7 @@ if (getRequestElement('userid') == 'all') {
        SQL_FREERESULT($result);
 } else {
        // Output selection form with all confirmed user accounts listed
-       addMemberSelectionBox('0', true);
+       addMemberSelectionBox(0, true);
 }
 
 // [EOF]
index 6818b12..fee9d1c 100644 (file)
@@ -64,7 +64,7 @@ ORDER BY `userid` ASC",
                        // "Translate" some data
                        $content['userid']       = generateUserProfileLink($content['userid']);
                        $content['total_visits'] = translateComma($content['total_visits']);
-                       $content['last_surfed']  = generateDateTime($content['last_surfed'], '2');
+                       $content['last_surfed']  = generateDateTime($content['last_surfed'], 2);
                        $content['sw']           = $SW;
 
                        // Load row template
index 4dd8d5b..1a0390d 100644 (file)
@@ -124,7 +124,7 @@ if (($response[count($response) - 1] == "[EOF]") && ($response[0] != "[EOF]")) {
                                'sw'      => $SW,
                                'index'   => ($idx + 1),
                                'name'    => $name,
-                               'created' => generateDateTime($themes['fctime'][$idx], '2'),
+                               'created' => generateDateTime($themes['fctime'][$idx], 2),
                                'size'    => translateComma(round($themes['fsize'][$idx] / 1.024) / 1000),
                                'version' => $themes['ver'][$idx],
                                'current' => $themes['cver'][$idx],
index fc99d0e..a0eba60 100644 (file)
@@ -220,7 +220,7 @@ LIMIT 1",
                                'cat_link'    => $content['category'],
                                'pay_title'   => str_replace("\"", '&quot;', getPaymentTitlePrice($content['payment'], true)),
                                'pay_link'    => $content['payment'],
-                               'timestamp'   => generateDateTime($content['timestamp'], '2'),
+                               'timestamp'   => generateDateTime($content['timestamp'], 2),
                                'target_send' => $content['target_send'],
                        );
 
index 1684b2a..af6e425 100644 (file)
@@ -83,7 +83,7 @@ ORDER BY sp.pay_name",
 
                                                // Set default email
                                                $content['email'] = getMessage('SPONSOR_NO_ADMIN');
-                                               if ($content['admin_id'] > '0') {
+                                               if ($content['admin_id'] > 0) {
                                                        // Load admin's email address for contact
                                                        $content['email'] = getAdminEmail($content['admin_id']);
                                                } // END - if
@@ -92,7 +92,7 @@ ORDER BY sp.pay_name",
                                                $data = array(
                                                        'admin_id'   => $content['email'],
                                                        'order' => ($content['pay_count'] * $content['pay_rate'])." ".$content['pay_currency'],
-                                                       'stamp' => generateDateTime($content['pay_ordered'], '2'),
+                                                       'stamp' => generateDateTime($content['pay_ordered'], 2),
                                                        'pname' => $content['pay_name'],
                                                );
 
@@ -197,7 +197,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'family'  => $content['family'],
                        'email'   => generateEmailLink($content['email'], 'sponsor_data'),
                        'remote'  => $content['remote_addr'],
-                       'created' => generateDateTime($content['sponsor_created'], '2'),
+                       'created' => generateDateTime($content['sponsor_created'], 2),
                );
 
                // Load row template and switch colors
index 96de642..6d73b59 100644 (file)
@@ -92,7 +92,7 @@ if (empty($ONLINE['version'])) {
        loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>");
 } elseif (($ONLINE['version'] != getConfig('FULL_VERSION')) || ($ONLINE['revision'] != getConfig('CURR_SVN_REVISION'))) {
        // New full-version available (all previous released patches are included in this version!)
-       $ONLINE['changed'] = generateDateTime($ONLINE['changed'], '2');
+       $ONLINE['changed'] = generateDateTime($ONLINE['changed'], 2);
 
        // Load template
        loadTemplate('admin_update_download', false, $ONLINE);
index fc8b6e7..322c346 100644 (file)
@@ -85,7 +85,7 @@ if (isExtensionActive('online')) {
 
                        // Add more content
                        $row['sw'] = $SW;
-                       $row['timestamp'] = generateDateTime($row['timestamp'], '2');
+                       $row['timestamp'] = generateDateTime($row['timestamp'], 2);
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_list_online_row', true, $row);
index b9dfc39..f1602b3 100644 (file)
@@ -80,7 +80,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'userid'      => $userid,
                        'nickname'    => $nick2,
                        'points'      => translateComma(countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points')),
-                       'last_online' => generateDateTime($last, '2'),
+                       'last_online' => generateDateTime($last, 2),
                );
 
                // Load template
index 1562cc0..42dbdc8 100644 (file)
@@ -47,7 +47,7 @@ addMenuDescription('guest', __FILE__);
 // Init content
 $content = array(
        'message' => getMessage('GUEST_CONFIRMED_FAILED'),
-       'userid'  => '0',
+       'userid'  => 0,
 );
 
 if (isGetRequestElementSet('hash')) {
@@ -80,7 +80,7 @@ if (isGetRequestElementSet('hash')) {
                                        updateReferalCounter($rid);
 
                                        // Shall I 'pay' the referal points imidiately?
-                                       if (getConfig('ref_payout') == '0') {
+                                       if (getConfig('ref_payout') == 0) {
                                                // Yes, 'pay' it now
                                                $locked = false;
                                        } else {
index b401838..8b64a86 100644 (file)
@@ -63,7 +63,7 @@ $content['refid'] = determineReferalId();
 $content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode'));
 
 // Generate table with already payed out doubles
-$content['payout_history'] = generateDoublerTable('0', 'Y', 'N', 'DESC');
+$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
 
 // Generate table with next-to-run payouts
 $content['next_table'] = generateDoublerTable();
index 258509f..1cac00d 100644 (file)
@@ -61,7 +61,7 @@ $content['user_locked']      = round(countSumTotalData('LOCKED'     , 'user_data
 $content['user_count']       = ($content['user_confirmed'] + $content['user_unconfirmed'] + $content['user_locked']);
 
 // Start of this exchange
-$content['mt_start'] = generateDateTime(getConfig('mt_start'), '3');
+$content['mt_start'] = generateDateTime(getConfig('mt_start'), 3);
 
 // Project timestamp when number of members are reached
 $PROJECTED = 0;
@@ -74,7 +74,7 @@ if ($content['user_count'] > 0) {
 $TEST = makeTime(0, 0, 0, $PROJECTED);
 
 if ($TEST > time()) {
-       $content['projected'] = generateDateTime($PROJECTED, '3');
+       $content['projected'] = generateDateTime($PROJECTED, 3);
 } else {
        $content['projected'] = getMessage('USER_PROJECTION_UNKNOWN');
 }
@@ -198,7 +198,7 @@ if (isExtensionActive('doubler')) {
        $data = array(
                'lang'  => getMessage('MEDIA_DOUBLER_COUNT'),
                'value' => countSumTotalData('Y','doubler','id','completed', true, " AND `points` > 0"),
-               'rows'  => '4'
+               'rows'  => 4
        );
 
        // Add points
@@ -275,7 +275,7 @@ ON t.userid=d.userid",
        $data = array(
                'lang'  => getMessage('MEDIA_TRANSFER_IN_COUNT'),
                'value' => $count_in,
-               'rows'  => '4'
+               'rows'  => 4
        );
        $OUT_SPECIAL .= loadTemplate('mediadata_extra_row2', true, $data);
        $data = array(
@@ -304,7 +304,7 @@ $content['rowspan_points'] = $ROWS_POINTS;
 $content['rowspan_user']   = $ROWS_USER;
 
 // Patch timespamp
-$contentp['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), '2');
+$contentp['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), 2);
 
 // Load template
 loadTemplate('mediadata', false, $content);
index c2788fb..b90af17 100644 (file)
@@ -102,8 +102,8 @@ if (SQL_NUMROWS($result) == 1) {
        }
 
        // Set start and end time
-       $content['start'] = generateDateTime($start, '1');
-       $content['end']   = generateDateTime($end  , '1');
+       $content['start'] = generateDateTime($start, 1);
+       $content['end']   = generateDateTime($end  , 1);
 
        // Determine min_users
        $content['min_users'] = determineReferalRallyeMinimumUsers($min_users);
index cbd1d65..39cd915 100644 (file)
@@ -180,8 +180,8 @@ LIMIT 1",
 //* DEBUG: */ print intval(isFormSent()).'/'.intval($isOkay).'/'.intval(isAdmin()).'<br />';
 if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) {
        // Prepapre month and day of birth
-       if (strlen(postRequestElement('day'))   == 1) setRequestPostElement('day'  , '0'.postRequestElement('day'));
-       if (strlen(postRequestElement('month')) == 1) setRequestPostElement('month', '0'.postRequestElement('month'));
+       if (strlen(postRequestElement('day'))   == 1) setRequestPostElement('day'  , 0 . postRequestElement('day'));
+       if (strlen(postRequestElement('month')) == 1) setRequestPostElement('month', 0 . postRequestElement('month'));
 
        // Get total ...
        // ... confirmed, ...
@@ -315,7 +315,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        $gender = translateGender(postRequestElement('gender'));
 
        // ... rewrite a zero referal ID to the main title
-       if (postRequestElement('refid') == '0') setRequestPostElement('refid', getConfig('MAIN_TITLE'));
+       if (postRequestElement('refid') == 0) setRequestPostElement('refid', getConfig('MAIN_TITLE'));
 
        // Is ZIP code set?
        if (isPostRequestElementSet('zip')) {
index 35fdaee..cd23e6e 100644 (file)
@@ -241,7 +241,7 @@ WHERE `id`='%s' LIMIT 1",
                                $content['surname']   = secureString(postRequestElement('surname'));
                                $content['family']    = secureString(postRequestElement('family'));
                                $content['gender']    = translateGender(postRequestElement('gender'));
-                               $content['timestamp'] = generateDateTime(time(), '0');
+                               $content['timestamp'] = generateDateTime(time(), 0);
                                $content['password']  = secureString(postRequestElement('pass1'));
 
                                // Generate email and send it to the new sponsor
@@ -351,7 +351,7 @@ ORDER BY `pay_name`", __FILE__, __LINE__);
                        $content['refid'] = bigintval(getRequestElement('refid'));
                } else {
                        // No referal link
-                       $content['refid'] = '0';
+                       $content['refid'] = 0;
                }
 
                // Display registration form
index 44770bd..36d6373 100644 (file)
@@ -100,7 +100,7 @@ switch (getConfig('guest_stats')) {
                        $month = $idx;
 
                        // Append leading zero
-                       if ($idx < 10) $month = '0'.$idx;
+                       if ($idx < 10) $month = 0 . $idx;
 
                        // Count months
                        $months[$month] = countSumTotalData(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'");
index d3c8a06..4bdf990 100644 (file)
@@ -80,7 +80,7 @@ while ($content = SQL_FETCHARRAY($result)) {
                'nickname'     => $content['nickname'],
                'total_logins' => $content['total_logins'],
                'points'       => translateComma(countSumTotalData($content['userid'], 'user_points', 'points')),
-               'last_online'  => generateDateTime($content['last_online'], '3'),
+               'last_online'  => generateDateTime($content['last_online'], 3),
        );
 
        // Load row template
@@ -147,7 +147,7 @@ while ($content = SQL_FETCHARRAY($result)) {
                'userid'      => $content['userid'],
                'nickname'    => $content['nickname'],
                'points'      => translateComma($content['points']),
-               'last_online' => generateDateTime($content['last_online'], '3')
+               'last_online' => generateDateTime($content['last_online'], 3)
        );
 
        // Load row template
@@ -215,7 +215,7 @@ while ($content = SQL_FETCHARRAY($result)) {
                'refs'        => $content['refs'],
                'nickname'    => $content['nickname'],
                'points'      => translateComma(countSumTotalData($content['userid'], 'user_points', 'points')),
-               'last_online' => generateDateTime($content['last_online'], '3')
+               'last_online' => generateDateTime($content['last_online'], 3)
        );
 
        // Load row template
index b37ce18..76ef680 100644 (file)
@@ -87,7 +87,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'cnt'    => $cnt,
                        'userid'    => bigintval($content['userid']),
                        'points' => translateComma($content['beg']),
-                       'last_online'   => generateDateTime($content['last_online'], '2'),
+                       'last_online'   => generateDateTime($content['last_online'], 2),
                );
 
                // Load row template
index a1058a3..5960bd4 100644 (file)
@@ -103,7 +103,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'cnt'    => $cnt,
                        'userid'    => bigintval($content['userid']),
                        'points' => translateComma($content['points']),
-                       'last_online'   => generateDateTime($content['last_online'], '2')
+                       'last_online'   => generateDateTime($content['last_online'], 2)
                );
 
                // Load row template
index b233e86..794e224 100644 (file)
@@ -99,7 +99,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) {
                }
 
                // Display message and exit here
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), generateDateTime($stamp, '1')));
+               loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), generateDateTime($stamp, 1)));
                return;
        }
 } // END - if
@@ -185,8 +185,8 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__);
                        SQL_FREERESULT($result);
 
                        // Prepare it for the template
-                       $content['start'] = generateDateTime($content['holiday_start'], '3');
-                       $content['end']   = generateDateTime($content['holiday_end']  , '3');
+                       $content['start'] = generateDateTime($content['holiday_start'], 3);
+                       $content['end']   = generateDateTime($content['holiday_end']  , 3);
 
                        // Deactivate it now
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
@@ -254,9 +254,9 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__);
                                        SQL_FREERESULT($result);
 
                                        // Prepare it for the template
-                                       $content['start'] = generateDateTime($content['holiday_start'] , '3');
-                                       $content['end']   = generateDateTime($content['holiday_end']   , '3');
-                                       $content['lock']  = generateDateTime($content['holiday_activated'], '1');
+                                       $content['start'] = generateDateTime($content['holiday_start'] , 3);
+                                       $content['end']   = generateDateTime($content['holiday_end']   , 3);
+                                       $content['lock']  = generateDateTime($content['holiday_activated'], 1);
 
                                        // Load template
                                        loadTemplate('member_holiday_deactivate', false, $content);
index 17a4355..adbd169 100644 (file)
@@ -85,19 +85,19 @@ switch ($mode) {
 
                // Translate some things
                $content['gender']      = translateGender($content['gender']);
-               $content['last_update'] = generateDateTime($content['last_update'], '0');
+               $content['last_update'] = generateDateTime($content['last_update'], 0);
 
                // How far is last change on his profile away from now?
                if ((($content['last_update'] + getConfig('profile_lock')) > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) {
                        // You cannot change your account
-                       $content['change'] = loadTemplate('admin_settings_saved', true, "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($content['last_update'] + getConfig('profile_lock'), '0'))."</div>");
+                       $content['change'] = loadTemplate('admin_settings_saved', true, "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($content['last_update'] + getConfig('profile_lock'), 0))."</div>");
                } else {
                        // He is allowed to change his profile
                        $content['change'] = loadTemplate('member_mydata_button', true);
                }
 
-               if (strlen($content['birth_day'])   == 1) $content['birth_day']   = '0' . $content['birth_day'];
-               if (strlen($content['birth_month']) == 1) $content['birth_month'] = '0' . $content['birth_month'];
+               if (strlen($content['birth_day'])   == 1) $content['birth_day']   = 0 . $content['birth_day'];
+               if (strlen($content['birth_month']) == 1) $content['birth_month'] = 0 . $content['birth_month'];
 
                switch (getLanguage()) {
                        case 'de': $content['dob'] = $content['birth_day']   . '.' . $content['birth_month'] . '.' . $content['birth_year']; break;
@@ -144,7 +144,7 @@ LIMIT 1",
 
                // How far is last change on his profile away from now?
                if (($content['update_check'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) {
-                       $content['update_check'] = generateDateTime($content['update_check'] + getConfig('profile_lock'), '0');
+                       $content['update_check'] = generateDateTime($content['update_check'] + getConfig('profile_lock'), 0);
                        // You cannot change your account
                        loadTemplate('member_mydata_locked', false, $content);
                } else {
@@ -215,7 +215,7 @@ LIMIT 1",
 
                // How far is last change on his profile away from now?
                if (($content['last_change'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) {
-                       $content['last_change'] = generateDateTime($content['last_change'] + getConfig('profile_lock'), '0');
+                       $content['last_change'] = generateDateTime($content['last_change'] + getConfig('profile_lock'), 0);
                        // You cannot change your account
                        loadTemplate('member_mydata_locked');
                } elseif ((!isEmailValid(postRequestElement('email'))) && (!isAdmin())) {
index b214a71..f7f6049 100644 (file)
@@ -275,7 +275,7 @@ LIMIT 1",
 
                        // Update receiver list
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `receive_mails`=`receive_mails`-1 WHERE `userid` IN (%s) LIMIT %s",
-                               array(str_replace(';', ", ", $RECEIVER), $content['target_send']), __FILE__, __LINE__);
+                               array(convertReceivers($RECEIVER), $content['target_send']), __FILE__, __LINE__);
 
                        // Is calculated max receivers larger than wanted receivers then reset it
                        if ($content['target_send'] > postRequestElement('receiver')) $content['target_send'] = bigintval(postRequestElement('receiver'));
@@ -284,12 +284,12 @@ LIMIT 1",
                        $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('type')));
 
                        // Fix empty zip code
-                       if (!isPostRequestElementSet('zip')) setRequestPostElement('zip', '0');
+                       if (!isPostRequestElementSet('zip')) setRequestPostElement('zip', 0);
 
                        // Check if he has enougth points for this order and selected more than 0 receivers
                        if (($USED > 0) && ($USED <= $total) && ($content['target_send'] > 0)) {
                                // Gettings points is okay, so we can add $USED later from
-                               if (($id == '0') || ($type != 'TEMP')) {
+                               if (($id == 0) || ($type != 'TEMP')) {
                                        // New order
                                        $id = 0;
                                        if (isExtensionActive('html_mail')) {
@@ -418,13 +418,13 @@ LIMIT 1",
                        $URL = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('NO_RECS_LEFT');
                }
        }
-} elseif (postRequestElement('receiver') == '0') {
+} elseif (postRequestElement('receiver') == 0) {
        // Not enougth receivers selected
        $URL = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('MORE_RECEIVERS1');
 } elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) {
        // No more mail orders allowed
        loadTemplate('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
-} elseif (($links < getConfig('unconfirmed')) && ($mmails == '1')) {
+} elseif (($links < getConfig('unconfirmed')) && ($mmails == 1)) {
        // Display order form
        $result_cats = SQL_QUERY("SELECT
        `id`, `cat`
@@ -684,7 +684,7 @@ LIMIT 1",
                // No cateogries are defined yet
                loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
        }
-} elseif ($mmails == '0') {
+} elseif ($mmails == 0) {
        // Please set more than 0 mails per day
        loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
 } else {
index 10ad466..dbf4c50 100644 (file)
@@ -136,7 +136,7 @@ ORDER BY p.payout_timestamp DESC",
                                        'acc'    => $content['target_account'],
                                        'points' => translateComma($content['payout_total']) . ' ' . $content['type'],
                                        'bank'   => $content['target_bank'],
-                                       'stamp'  => generateDateTime($content['payout_timestamp'], '2'),
+                                       'stamp'  => generateDateTime($content['payout_timestamp'], 2),
                                        'status' => $content['status']
                                );
 
index 3bfde38..947a9ed 100644 (file)
@@ -141,7 +141,7 @@ if (getExtensionVersion('user') >= '0.1.2') {
 }
 
 // If TLOCK is 0 add 3 zeros for floating
-if ($TLOCK == '0') $TLOCK = '0.00000';
+if ($TLOCK == 0) $TLOCK = '0.00000';
 
 // Remember several values in constants
 $content['used']  = translateComma($usedPoints);
index 4088ab3..e95ef39 100644 (file)
@@ -96,7 +96,7 @@ if (!isGetRequestElementSet('mode')) {
                while ($data = SQL_FETCHARRAY($result)) {
                        // Prepare data for output
                        $rowContent = array(
-                               'stamp'         => generateDateTime($data['primera_timestamp'], '2'),
+                               'stamp'         => generateDateTime($data['primera_timestamp'], 2),
                                'points'                => translateComma($data['primera_amount']),
                                'acc'           => SQL_ESCAPE($data['primera_account']),
                                'status'                => PRIMERA_TRANSFER_STATUS($data['primera_type']),
@@ -190,7 +190,7 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                                        $locked = true;
 
                                        // Shall I 'pay' the referal points imidiately?
-                                       if (getConfig('ref_payout') == '0') {
+                                       if (getConfig('ref_payout') == 0) {
                                                // Yes, 'pay' it now
                                                $locked = false;
                                        } // END - if
index 3daa41e..7664ad0 100644 (file)
@@ -99,8 +99,8 @@ if (SQL_NUMROWS($result) == 1) {
        $content['min_prices'] = determineReferalRallyeMinimumPrices($content['min_prices']);
 
        // Set start and end time
-       $content['start'] = generateDateTime($content['start_time'], '1');
-       $content['end']   = generateDateTime($content['end_time']  , '1');
+       $content['start'] = generateDateTime($content['start_time'], 1);
+       $content['end']   = generateDateTime($content['end_time']  , 1);
 
        if ($expired === true) {
                $content['prices']       = addReferalRallyeWinners($content['id']);
index 03242c0..ef5959e 100644 (file)
@@ -50,11 +50,15 @@ addMenuDescription('member', __FILE__);
 $main_content = array();
 
 // Load waiting/pending orders
-$result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp, target_send, data_type, zip
-FROM `{?_MYSQL_PREFIX?}_pool`
-WHERE sender=%s AND data_type != 'SEND'
-ORDER BY timestamp DESC",
-array(getUserId()), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("SELECT
+       `id`, `cat_id`, `payment_id`, `subject`, `url`, `timestamp`, `target_send`, `data_type`, `zip`
+FROM
+       `{?_MYSQL_PREFIX?}_pool`
+WHERE
+       `sender`=%s AND `data_type` != 'SEND'
+ORDER BY
+       `timestamp` DESC",
+       array(getUserId()), __FILE__, __LINE__);
 
 // Are there mails left in pool?
 if (SQL_NUMROWS($result) > 0) {
@@ -65,18 +69,17 @@ if (SQL_NUMROWS($result) > 0) {
                if (empty($data['zip'])) $data['zip'] =  '---';
 
                // Prepare content for output
-               // @TODO Rewrite in template subj->subject,stamp->timestamp,recs->target_send
                $content = array(
-                       'sw'      => $SW,
-                       'id'      => $data['id'],
-                       'cat'     => getCategory($data['cat_id']),
-                       'pay'     => getPaymentTitlePrice($data['payment_id']),
-                       'subject' => $data['subject'],
-                       'url'     => generateDerefererUrl($data['url']),
-                       'stamp'   => generateDateTime($data['timestamp'], '2'),
-                       'recs'    => $data['target_send'],
-                       'type'    => translatePoolType($data['data_type']),
-                       'zip'     => $data['zip']
+                       'sw'          => $SW,
+                       'id'          => $data['id'],
+                       'cat'         => getCategory($data['cat_id']),
+                       'pay'         => getPaymentTitlePrice($data['payment_id']),
+                       'subject'     => $data['subject'],
+                       'url'         => generateDerefererUrl($data['url']),
+                       'timestamp'   => generateDateTime($data['timestamp'], 2),
+                       'target_send' => $data['target_send'],
+                       'type'        => translatePoolType($data['data_type']),
+                       'zip'         => $data['zip']
                );
 
                // Load template
@@ -112,18 +115,18 @@ if (SQL_NUMROWS($result) > 0) {
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Prepare data for the template
-               // @TODO Rewrite in template: stamp->timestamp_ordered,recs->max_rec,clix->clicks,perc->percents
+               // @TODO Rewrite in template: clix->clicks
                $content = array(
-                       'sw'       => $SW,
-                       'cat'      => getCategory($content['cat_id']),
-                       'pay'      => getPaymentTitlePrice($content['payment_id']),
-                       'url'      => generateDerefererUrl($content['url']),
-                       'stamp'    => generateDateTime($content['timestamp_ordered'], '2'),
-                       'recs'     => $content['max_rec'],
-                       'sent'     => generateDateTime($content['timestamp_send'], '2'),
-                       'clix'     => $content['clicks'],
-                       'subject'  => $content['subject'],
-                       'percents' => translateComma($content['clicks'] / $content['max_rec'] * 100)."%",
+                       'sw'                => $SW,
+                       'cat'               => getCategory($content['cat_id']),
+                       'pay'               => getPaymentTitlePrice($content['payment_id']),
+                       'url'               => generateDerefererUrl($content['url']),
+                       'timestamp_ordered' => generateDateTime($content['timestamp_ordered'], 2),
+                       'target_send'       => $content['max_rec'],
+                       'sent'              => generateDateTime($content['timestamp_send'], 2),
+                       'clix'              => $content['clicks'],
+                       'subject'           => $content['subject'],
+                       'percents'          => translateComma($content['clicks'] / $content['max_rec'] * 100)."%",
                );
 
                // Load row template and switch colors
index 1cd2ffc..86b919f 100644 (file)
@@ -78,8 +78,8 @@ if ((isFormSent()) && (isPostRequestElementSet(('action'))) && (isPostRequestEle
                        // Include link to stats
                        $content['views_total'] = "[<a href=\"{?URL?}/modules.php?module=login&amp;what=surfbar_list\">".translateComma($content['views_total'])."</a>]";
                } // END - if
-               $content['registered']  = generateDateTime($content['registered'], '2');
-               $content['last_locked'] = generateDateTime($content['last_locked'], '2');
+               $content['registered']  = generateDateTime($content['registered'], 2);
+               $content['last_locked'] = generateDateTime($content['last_locked'], 2);
                $content['actions']     = SURFBAR_MEMBER_ACTIONS($content['id'], $content['status']);
                $content['status']      = translateSurfbarUrlStatus($content['status']);
                if (empty($content['lock_reason'])) {
index 8fae67e..fe8e16e 100644 (file)
@@ -56,7 +56,7 @@ $content = array(
        'surfbar_static_reward' => translateComma(getConfig('surfbar_static_reward')),
        'surfbar_static_time'   => createFancyTime(getConfig('surfbar_static_time')),
        'surfbar_static_lock'   => createFancyTime(getConfig('surfbar_static_lock')),
-       'surfbar_total_urls'    => SURFBAR_GET_TOTAL_URLS('ACTIVE', '0')
+       'surfbar_total_urls'    => SURFBAR_GET_TOTAL_URLS('ACTIVE', 0)
 );
 
 // In dynamic mode we need some more data
@@ -64,7 +64,7 @@ if (getConfig('surfbar_pay_model') == 'DYNAMIC') {
        // Total URLs
        $content = array(
                'surfbar_dynamic_percent' => translateComma(getConfig('surfbar_dynamic_percent')),
-               'surfbar_total_urls'      => SURFBAR_GET_TOTAL_URLS('ACTIVE', '0'),
+               'surfbar_total_urls'      => SURFBAR_GET_TOTAL_URLS('ACTIVE', 0),
                'surfbar_user_urls'       => SURFBAR_GET_TOTAL_USER_URLS(),
                'surfbar_total_online'    => SURFBAR_DETERMINE_TOTAL_ONLINE(),
                'surfbar_total_users'     => translateComma(countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)),
index 0d4ba2e..8a472a6 100644 (file)
@@ -325,7 +325,7 @@ switch ($mode) {
                                $row = array(
                                        'sw'     => $SW,
                                        'tid'    => $tid,
-                                       'stamp'  => generateDateTime($stamp, '3'),
+                                       'stamp'  => generateDateTime($stamp, 3),
                                        'userid' => $userid,
                                        'reason' => $reason,
                                        'points' => translateComma($points)
@@ -368,10 +368,10 @@ switch ($mode) {
                // First of all create the temporary table
                $result = SQL_QUERY("CREATE TEMPORARY TABLE `{?_MYSQL_PREFIX?}_transfers_tmp` (
 `trans_id` VARCHAR(12) NOT NULL DEFAULT '',
-`party_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+`party_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `reason` VARCHAR(255) NOT NULL DEFAULT '',
-`time_trans` VARCHAR(10) NOT NULL DEFAULT '0',
+`time_trans` VARCHAR(10) NOT NULL DEFAULT 0,
 `trans_type` ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
 KEY (`party_userid`)
 ) TYPE=HEAP", __FILE__, __LINE__);
@@ -414,7 +414,7 @@ KEY (`party_userid`)
 
                                // Prepare content for template
                                $content['sw']     = $SW;
-                               $content['time']   = generateDateTime($content['time_trans'], '3');
+                               $content['time']   = generateDateTime($content['time_trans'], 3);
                                $content['points'] = translateComma($content['points']);
 
                                // Load row template
@@ -533,7 +533,7 @@ LIMIT 1",
                if (SQL_NUMROWS($result) == 1) {
                        // Load newest transaction
                        list($newest) = SQL_FETCHROW($result);
-                       $content['settings'] = sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3'));
+                       $content['settings'] = sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, 3));
                } else {
                        // Load template
                        $content['settings'] = loadTemplate('member_transfer_settings', true);
index 6f9e35d..100c4b0 100644 (file)
@@ -60,7 +60,7 @@ WHERE `id`=%s LIMIT 1",
        $content = SQL_FETCHARRAY($result_data);
 
        // Translate some data
-       $content['timestamp'] = generateDateTime($content['timestamp'], '2');
+       $content['timestamp'] = generateDateTime($content['timestamp'], 2);
        $content['category']  = getCategory($content['cat_id']);
        $content['points']    = translateComma($content['points']);
        $content['is_notify'] = translateYesNo($content['is_notify']);
@@ -70,7 +70,7 @@ WHERE `id`=%s LIMIT 1",
 
        // Get timestamp from insert
        $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
-       generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), '2')
+       generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), 2)
        );
 
        // Display it depending on mail (data) type
@@ -93,7 +93,7 @@ WHERE s.id=%s LIMIT 1",
        $content = SQL_FETCHARRAY($result_data);
 
        // Translate some data
-       $content['timestamp'] = generateDateTime($content['timestamp'], '2');
+       $content['timestamp'] = generateDateTime($content['timestamp'], 2);
        $content['category']  = getCategory($content['cat_id']);
        $content['points']    = translateComma($content['points']);
        $content['time']      = createFancyTime($content['time']);
@@ -101,7 +101,7 @@ WHERE s.id=%s LIMIT 1",
 
        // Get timestamp from insert
        $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
-       generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
+       generateDateTime(getTimestampFromUserStats('mailid', $content['id']), 2)
        );
 
        // Display it depending on mail (data) type
@@ -188,7 +188,7 @@ LIMIT 1",
                                'type'    => $type,
                                'subject' => $subject,
                                'sender'  => $sender,
-                               'stamp'   => generateDateTime($timestamp, '2'),
+                               'stamp'   => generateDateTime($timestamp, 2),
                                'cat'     => getCategory($cat),
                                'points'  => translateComma($pay),
                        );
index 8a50f51..56b201c 100644 (file)
@@ -95,7 +95,7 @@ if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose')
                while ($data = SQL_FETCHARRAY($result)) {
                        // Prepare data for output
                        $rowContent = array(
-                               'stamp'    => generateDateTime($data['wernis_timestamp'], '2'),
+                               'stamp'    => generateDateTime($data['wernis_timestamp'], 2),
                                'points'   => translateComma($data['wernis_amount']),
                                'acc'      => bigintval($data['wernis_account']),
                                'status'   => WERNIS_TRANSFER_STATUS($data['wernis_type']),
index a18ee54..da070a9 100644 (file)
@@ -48,7 +48,7 @@ if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ outputHtml(basename(__FILE__)."<br />");
 
 // Reset surfbar counter
-updateConfiguration('surfbar_monthly_counter', '0');
+updateConfiguration('surfbar_monthly_counter', 0);
 
 //
 ?>
index d799ded..e0914d2 100644 (file)
@@ -149,13 +149,13 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
        setConfigEntry('OUTPUT_MODE', 'direct');
 
        // This hack prevents a backtrace in CSS output
-       if (getOutputMode() == '1') {
+       if (getOutputMode() == 1) {
                // Problem with config so set output mode
                setConfigEntry('OUTPUT_MODE', 'render');
        } // END - if
 
        // Set other missing variables
-       if (!isOutputModeSet()) setOutputMode('0');
+       if (!isOutputModeSet()) setOutputMode(0);
 
        // Include more
        foreach (array('inc/databases.php','inc/db/lib.php','inc/session.php','inc/versions.php','inc/install-functions.php','inc/load_config.php') as $inc) {
@@ -167,7 +167,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
        loadIncludeOnce('inc/load_config.php');
 
        // Are we installation routine?
-       if ((!isInstalling()) && (getOutputMode() != '1') && (getOutputMode() != -1)) {
+       if ((!isInstalling()) && (getOutputMode() != 1) && (getOutputMode() != -1)) {
                // You have to install first!
                redirectToUrl('install.php');
        } // END - if
index abcd20f..a82071d 100644 (file)
@@ -253,7 +253,7 @@ function checkModulePermissions ($mod = '') {
 
                        // Destroy cache here
                        // @TODO Rewrite this to a filter
-                       if (getOutputMode() == '0') rebuildCacheFile('modules', 'modules');
+                       if (getOutputMode() == 0) rebuildCacheFile('modules', 'modules');
 
                        // And reload data
                        unset($GLOBALS['module_status'][$mod]);
@@ -386,7 +386,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
                                //* DEBUG: */ outputHtml(__LINE__.'+'.$type."+<br />");
                                // Add closing div and br-tag
                                $OUT .= "</div><br />\n";
-                               $GLOBALS['nav_depth'] = '0';
+                               $GLOBALS['nav_depth'] = 0;
 
                                // Run the filter chain
                                $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ""));
@@ -1010,7 +1010,7 @@ function getCategory ($cid) {
        $ret = getMessage('_CATEGORY_404');
 
        // Is the category id set?
-       if ($cid == '0') {
+       if ($cid == 0) {
                // No category
                $ret = getMessage('_CATEGORY_NONE');
        } elseif ($cid > 0) {
@@ -1123,7 +1123,7 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $
 function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') {
        $ret = 0;
        //* DEBUG: */ outputHtml($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />');
-       if ((empty($search)) && ($search != '0')) {
+       if ((empty($search)) && ($search != 0)) {
                // Count or sum whole table?
                if ($countRows === true) {
                        // Count whole table
@@ -1158,7 +1158,7 @@ function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatemen
                $ret = '0.00000';
        } elseif (''.$ret.'' == '') {
                // Fix empty result
-               $ret = '0';
+               $ret = 0;
        }
 
        // Return value
@@ -1212,13 +1212,13 @@ function getReferalLevelPercents ($level) {
  * add_mode    = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct'
  *               for default value will cause no referal will get points ever!!!)
  */
-function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = '0', $locked = false, $add_mode = 'ref') {
+function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = 0, $locked = false, $add_mode = 'ref') {
        //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
        // Convert mode to lower-case
        $add_mode = strtolower($add_mode);
 
        // When $userid = 0 add points to jackpot
-       if (($userid == '0') && (isExtensionActive('jackpot'))) {
+       if (($userid == 0) && (isExtensionActive('jackpot'))) {
                // Add points to jackpot
                addPointsToJackpot($points);
                return;
index a93fa52..b926258 100644 (file)
@@ -79,7 +79,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                $RECEIVERS = array($DATA['receivers']);
                        } else {
                                // No users left
-                               $RECEIVERS = array('0');
+                               $RECEIVERS = array(0);
                        }
                        $dummy = $RECEIVERS;
 
index f5afc02..9ddd522 100644 (file)
@@ -61,7 +61,7 @@ if (isExtensionActive('html_mail')) {
 }
 
 // Reset variables
-$cnt2 = 0; $lastSentId = 0; $cnt_back = array('0'); $pointsBack = array('0');
+$cnt2 = 0; $lastSentId = 0; $cnt_back = array(0); $pointsBack = array(0);
 if (SQL_NUMROWS($result_main) > 0) {
        // Parse all mails
        while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) {
@@ -84,7 +84,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                $RECEIVERS = array($DATA['receivers']);
                        } else {
                                // No users left
-                               $RECEIVERS = array('0');
+                               $RECEIVERS = array(0);
                        }
                        $dummy = $RECEIVERS;
 
@@ -258,7 +258,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        SQL_FREERESULT($result_stats);
                                } else {
                                        // User does not exists so we have add the sender's points back to sender's account
-                                       if (($RECEIVERS['id'] == '0') || (empty($RECEIVERS['id']))) {
+                                       if (($RECEIVERS['id'] == 0) || (empty($RECEIVERS['id']))) {
                                                // List was empty
                                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND' WHERE `id`=%s LIMIT 1",
                                                        array(bigintval($DATA['id'])), __FILE__, __LINE__);
index ab6e348..b3686d4 100644 (file)
@@ -68,7 +68,7 @@ if (SQL_NUMROWS($result_bonus) > 0) {
                        array(bigintval($content['userid'])), __FILE__, __LINE__);
 
                // Translate some data
-               $content['timestamp'] = generateDateTime($content['timestamp_ordered'], '2');
+               $content['timestamp'] = generateDateTime($content['timestamp_ordered'], 2);
 
                // Load email template and send email
                $message = loadEmailTemplate('member_stats_bonus', $content, bigintval($content['userid']));
index 998e929..6a4fb03 100644 (file)
@@ -73,9 +73,9 @@ LIMIT 1",
 
                        // Prepare all data for the template
                        $content = array(
-                               'activated' => generateDateTime($content['holiday_activated'], '1'),
-                               'start'     => generateDateTime($content['holiday_start']    , '1'),
-                               'end'       => generateDateTime($content['holiday_end']      , '1')
+                               'activated' => generateDateTime($content['holiday_activated'], 1),
+                               'start'     => generateDateTime($content['holiday_start']    , 1),
+                               'end'       => generateDateTime($content['holiday_end']      , 1)
                        );
 
                        // Send email to user
index d1ed8e4..560e9cb 100644 (file)
@@ -70,14 +70,14 @@ ORDER BY
                // We need to send-out notifications...
                while ($content = SQL_FETCHARRAY($result)) {
                        // Translate timestamp
-                       $content['joined'] = generateDateTime($content['joined'], '0');
+                       $content['joined'] = generateDateTime($content['joined'], 0);
 
-                       if (round($content['last_update']) == '0') {
+                       if (round($content['last_update']) == 0) {
                                // Has never changed his accont
                                $content['last_update'] = getMessage('PROFILE_NEVER_CHANGED');
                        } else {
                                // Has changed his account
-                               $content['last_update'] = generateDateTime($content['last_update'], '0');
+                               $content['last_update'] = generateDateTime($content['last_update'], 0);
                        }
 
                        // Load email template and send mail away
index 219918f..cd64492 100644 (file)
@@ -53,7 +53,7 @@ if ((isInstallationPhase())) $STYLES[] = 'install.css';
 if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE');
 
 // Output CSS files or content or link to css.php ?
-if ((getOutputMode() == '1') || (getConfig('css_php') == 'DIRECT')) {
+if ((getOutputMode() == 1) || (getConfig('css_php') == 'DIRECT')) {
        // Load CSS files
        $STYLES = merge_array($STYLES, getExtensionCssFiles());
 
@@ -82,7 +82,7 @@ if ((getOutputMode() == '1') || (getConfig('css_php') == 'DIRECT')) {
                        } // END - switch
                } // END - if
        } // END - foreach
-} elseif ((getOutputMode() == '0') || (getConfig('css_php') == 'INLINE')) {
+} elseif ((getOutputMode() == 0) || (getConfig('css_php') == 'INLINE')) {
        // Load CSS files
        $STYLES = merge_array($STYLES, getExtensionCssFiles());
 
index 34e046f..e547f8c 100644 (file)
@@ -48,7 +48,7 @@ if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ outputHtml(basename(__FILE__)."<br />");
 
 // Reset the surfbar counter
-updateConfiguration('surfbar_weekly_counter', '0');
+updateConfiguration('surfbar_weekly_counter', 0);
 
 //
 ?>
index 4266bc4..9d5ed5c 100644 (file)
--- a/login.php
+++ b/login.php
@@ -43,7 +43,7 @@ require('inc/libs/security_functions.php');
 $GLOBALS['module'] = 'login';
 
 // Set 'CSS-Mode'
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = -2;
 
 // Load the required file(s)
 require('inc/config-global.php');
index 78c1948..9ee907a 100644 (file)
@@ -172,7 +172,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                        // Was that mail a valid one?
                                        if ($isValid === true) {
                                                // If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
-                                               if (($time == '0') && ($payment > 0)) { $URL = getConfig('URL'); $time = '1'; }
+                                               if (($time == 0) && ($payment > 0)) { $URL = getConfig('URL'); $time = 1; }
                                                if (($time > 0) && (($payment > 0) || ($points > 0))) {
                                                        // Export data into constants for the template
                                                        $content = array(
index e60943d..dc8fb61 100644 (file)
@@ -44,7 +44,7 @@ $GLOBALS['startTime'] = microtime(true);
 
 // Tell everyone we are in this module
 $GLOBALS['module'] = 'mailid';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = -1;
 
 // Load the required file(s)
 require('inc/config-global.php');
@@ -171,7 +171,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
 
                                        // Is this entry valid?
                                        if ($isValid === true) {
-                                               if (($time == '0') && ($payment > 0)) $time = '1';
+                                               if (($time == 0) && ($payment > 0)) $time = 1;
                                                if (($time > 0) && ($payment > 0)) {
                                                        $img_code = 0;
                                                        if (!empty($code)) {
@@ -259,7 +259,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                                                // Add points
                                                                                // @TODO Try to rewrite the following unset()
                                                                                unset($GLOBALS['ref_level']);
-                                                                               addPointsThroughReferalSystem('mailid_okay', $url_userid, $payment, false, '0', $locked);
+                                                                               addPointsThroughReferalSystem('mailid_okay', $url_userid, $payment, false, 0, $locked);
 
                                                                                // Shall I add bonus points for "turbo clickers" ?
                                                                                if (getExtensionVersion('bonus') >= '0.2.2') {
index ec0c52d..b2a330c 100644 (file)
@@ -42,7 +42,7 @@ require('inc/libs/security_functions.php');
 $GLOBALS['module'] = 'sponsor_confirm';
 
 // Set 'CSS-Mode'
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = -2;
 
 // Load the required file(s)
 require('inc/config-global.php');
index 5c8de09..eb6df74 100644 (file)
@@ -42,7 +42,7 @@ require('inc/libs/security_functions.php');
 $GLOBALS['module'] = 'sponsor_ref';
 
 // Set 'CSS-Mode'
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = -2;
 
 // Load the required file(s)
 require('inc/config-global.php');
index 5d9a0ed..5789fec 100644 (file)
@@ -9,7 +9,7 @@
        </td>
        <td class="switch_mem$content[sw] top2" width="30%" align="center">
                {--EMAIL_TIMESTAMP--}:<br />
-               <strong>$content[stamp]</strong>
+               <strong>$content[timestamp]</strong>
        </td>
 </tr>
 <tr>
@@ -29,7 +29,7 @@
 <tr>
        <td align="center" class="switch_mem$content[sw] top right">
                {--EMAIL_RECEIVERS--}:<br />
-               <strong>$content[recs]</strong>
+               <strong>$content[target_send]</strong>
        </td>
        <td align="center" class="switch_mem$content[sw] top right">
                {--EMAIL_TYPE--}:<br />
index f7f5554..a1d33ca 100644 (file)
@@ -5,7 +5,7 @@
        </td>
        <td class="switch_mem$content[sw] top2" width="54%" align="center">
                {--EMAIL_TIMESTAMP--}:<br />
-               <strong>$content[stamp]</strong>
+               <strong>$content[timestamp_ordered]</strong>
        </td>
 </tr>
 <tr>
@@ -31,7 +31,7 @@
 <tr>
        <td align="center" class="switch_mem$content[sw] top right" width="30%">
                {--EMAIL_RECEIVERS--}:<br />
-               <strong>$content[recs]</strong>
+               <strong>$content[target_send]</strong>
        </td>
        <td align="center" class="switch_mem$content[sw] top right" width="16%">
                {--EMAIL_CONFIRMED--}:<br />