Huge rewrite of default parameters, ext-network continued:
authorRoland Häder <roland@mxchange.org>
Thu, 5 Nov 2009 15:18:54 +0000 (15:18 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 5 Nov 2009 15:18:54 +0000 (15:18 +0000)
- All default parameters with default value zero are now char zero and not
  number. This prevented a bug in several queries and bigintval(). :(
- Extension ext-network continued but still unfinished
- TODOs.txt updated

155 files changed:
.gitattributes
DOCS/TODOs.txt
beg.php
debug.php
doubler.php
inc/autopurge/purge-general.php
inc/autopurge/purge-mails.php
inc/classes/rdf.class.php
inc/config-functions.php
inc/db/lib-mysql3.php
inc/extensions-functions.php
inc/extensions/ext-bonus.php
inc/extensions/ext-network.php
inc/extensions/ext-rallye.php
inc/filter-functions.php
inc/filters.php
inc/functions.php
inc/gen_mediadata.php
inc/header.php
inc/install-inc.php
inc/language-functions.php
inc/libs/_functions.php [new file with mode: 0644]
inc/libs/admins_functions.php
inc/libs/bonus_functions.php
inc/libs/doubler_functions.php
inc/libs/html_mail_functions.php
inc/libs/jackpot_functions.php
inc/libs/mediadata_functions.php
inc/libs/network_functions.php [new file with mode: 0644]
inc/libs/newsletter_functions.php
inc/libs/online_functions.php
inc/libs/optimize_functions.php
inc/libs/primera_functions.php
inc/libs/rallye_functions.php
inc/libs/refback_functions.php
inc/libs/removeip_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/libs/yoomedia_functions.php
inc/mails/doubler_mails.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-config_cats.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_payouts.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-config_secure.php
inc/modules/admin/what-config_yoomedia.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_details.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_bonus.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_doubler.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_sponsor.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/admin/what-list_surfbar_urls.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_yoomedia_tm.php
inc/modules/admin/what-memedit.php
inc/modules/admin/what-optimize.php
inc/modules/admin/what-refbanner.php
inc/modules/admin/what-repair_amnu.php
inc/modules/admin/what-repair_cats.php
inc/modules/admin/what-repair_gmnu.php
inc/modules/admin/what-repair_mmnu.php
inc/modules/admin/what-surfbar_stats.php
inc/modules/admin/what-theme_check.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-updates.php
inc/modules/guest/action-themes.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/guest/what-stats.php
inc/modules/member/action-
inc/modules/member/action-account.php
inc/modules/member/action-bank.php
inc/modules/member/action-extras.php
inc/modules/member/action-logout.php
inc/modules/member/action-main.php
inc/modules/member/action-order.php
inc/modules/member/action-rals.php
inc/modules/member/action-stats.php
inc/modules/member/action-surfbar.php
inc/modules/member/action-themes.php
inc/modules/member/what-categories.php
inc/modules/member/what-holiday.php
inc/modules/member/what-mydata.php
inc/modules/member/what-nickname.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-refback.php
inc/modules/member/what-reflinks.php
inc/modules/member/what-reflist.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/modules/member/what-wernis.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/phpmailer/class.phpmailer.php
inc/phpmailer/class.pop3.php
inc/phpmailer/class.smtp.php
inc/phpmailer/test/phpmailer_test.php
inc/phpmailer/test/phpunit.php
inc/pool/pool-bonus.php
inc/pool/pool-user.php
inc/reset/reset_birthday.php
inc/reset/reset_profile.php
inc/sql-functions.php
inc/stats-functions.php
inc/stylesheet.php
inc/wrapper-functions.php
index.php
install.php
lead-confirm.php
mailid.php
mailid_top.php
modules.php
show_bonus.php
surfbar.php
templates/de/emails/admins_mail_contct_admin.tpl [deleted file]
templates/de/emails/admins_msg_contct_admin.tpl [deleted file]
templates/de/html/admin/admin_add_network.tpl [new file with mode: 0644]
templates/de/html/admin/admin_config_beg.tpl
templates/de/html/admin/admin_edit_networks_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_networks.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_networks_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_network_added.tpl [new file with mode: 0644]
theme/default/css/general.css
theme/default/css/register.css

index 3113150ad23f73e166b0b3cd0e333446be77eaef..d43918ba66034d1356429d052cafcdf86a2f00a2 100644 (file)
@@ -255,6 +255,7 @@ inc/language/user_de.php -text
 inc/language/wernis_de.php -text
 inc/language/yoomedia_de.php -text
 inc/libs/.htaccess -text
+inc/libs/_functions.php -text
 inc/libs/active_functions.php -text
 inc/libs/admins_functions.php -text
 inc/libs/autopurge_functions.php -text
@@ -270,6 +271,7 @@ inc/libs/holiday_functions.php -text
 inc/libs/html_mail_functions.php -text
 inc/libs/jackpot_functions.php -text
 inc/libs/mediadata_functions.php -text
+inc/libs/network_functions.php -text
 inc/libs/newsletter_functions.php -text
 inc/libs/nickname_functions.php -text
 inc/libs/online_functions.php -text
@@ -750,8 +752,6 @@ templates/de/emails/admin/admin_wernis_request.tpl -text
 templates/de/emails/admins/.htaccess -text
 templates/de/emails/admins/admins_mail_contct_admin.tpl -text
 templates/de/emails/admins/admins_msg_contct_admin.tpl -text
-templates/de/emails/admins_mail_contct_admin.tpl -text
-templates/de/emails/admins_msg_contct_admin.tpl -text
 templates/de/emails/back-admin.tpl -text
 templates/de/emails/back-member.tpl -text
 templates/de/emails/beg/.htaccess -text
@@ -869,6 +869,7 @@ templates/de/html/admin/admin_add_banner.tpl -text
 templates/de/html/admin/admin_add_cat.tpl -text
 templates/de/html/admin/admin_add_country.tpl -text
 templates/de/html/admin/admin_add_max.tpl -text
+templates/de/html/admin/admin_add_network.tpl -text
 templates/de/html/admin/admin_add_payment.tpl -text
 templates/de/html/admin/admin_add_points.tpl -text
 templates/de/html/admin/admin_add_points_all.tpl -text
@@ -991,6 +992,7 @@ templates/de/html/admin/admin_edit_cats_row.tpl -text
 templates/de/html/admin/admin_edit_email.tpl -text
 templates/de/html/admin/admin_edit_email_row.tpl -text
 templates/de/html/admin/admin_edit_email_select.tpl -text
+templates/de/html/admin/admin_edit_networks_row.tpl -text
 templates/de/html/admin/admin_edit_payments.tpl -text
 templates/de/html/admin/admin_edit_payments_row.tpl -text
 templates/de/html/admin/admin_edit_rallyes.tpl -text
@@ -1063,6 +1065,8 @@ templates/de/html/admin/admin_list_links_problem.tpl -text
 templates/de/html/admin/admin_list_links_row.tpl -text
 templates/de/html/admin/admin_list_mods.tpl -text
 templates/de/html/admin/admin_list_mods_row.tpl -text
+templates/de/html/admin/admin_list_networks.tpl -text
+templates/de/html/admin/admin_list_networks_row.tpl -text
 templates/de/html/admin/admin_list_notify_emails.tpl -text
 templates/de/html/admin/admin_list_notify_emails_row.tpl -text
 templates/de/html/admin/admin_list_online.tpl -text
@@ -1157,6 +1161,7 @@ templates/de/html/admin/admin_mods_stats.tpl -text
 templates/de/html/admin/admin_mods_stats2.tpl -text
 templates/de/html/admin/admin_mods_stats2_row.tpl -text
 templates/de/html/admin/admin_mods_stats_row.tpl -text
+templates/de/html/admin/admin_network_added.tpl -text
 templates/de/html/admin/admin_newsletter.tpl -text
 templates/de/html/admin/admin_newsletter_nohtml.tpl -text
 templates/de/html/admin/admin_next_link.tpl -text
index fad06a682d8af3171b848b8d1e3aca72ede3d2d5..e6c7cde3860fa170573f8c60633c6eddf2bb0a48 100644 (file)
@@ -8,34 +8,35 @@
 ./inc/extensions/ext-html_mail.php:137:                // @TODO Move these arrays into config
 ./inc/extensions/ext-network.php:71:           // @TODO network_type_name is an internal name and needs documentation
 ./inc/extensions/ext-newsletter.php:215:               // @TODO Move these into configuration
-./inc/extensions/ext-rallye.php:329:           // @TODO Move this code into rallye_functions.php
+./inc/extensions/ext-rallye.php:330:           // @TODO Move this code into rallye_functions.php
+./inc/extensions/ext-rallye.php:93:            // @TODO Fix config_rallye_prices to list_rallye_prices
 ./inc/extensions/ext-sql_patches.php:741:                      // @TODO Rewrite this to a filter
 ./inc/extensions/ext-sql_patches.php:94:               /* @TODO SQL_ALTER_TABLE() should work now properly
 ./inc/extensions/ext-yoomedia.php:122:         // @TODO Can this be moved into a database table?
 ./inc/extensions/ext-yoomedia.php:55:// @TODO Only deprecated when 'network' is ready! setExtensionDeprecated('Y');
 ./inc/extensions-functions.php:376:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions-functions.php:489:            // @TODO Extension is loaded, what next?
-./inc/functions.php:1308:      // @TODO Remove this if() block if all is working fine
-./inc/functions.php:222:       // @TODO Remove this sanity-check if all is fine
-./inc/functions.php:225:       // @TODO Try to rewrite all $DATA to $content
-./inc/functions.php:2328:// @TODO Try to move this to inc/libs/theme_functions.php
-./inc/functions.php:2499:// @TODO Please describe this function
-./inc/functions.php:2517:      searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
-./inc/functions.php:2613:              // @TODO Add a little more infos here
-./inc/functions.php:2624:      // @TODO This cannot be rewritten to app_die(), try to find a solution for this.
-./inc/functions.php:2706:                      // @TODO Rewrite this old lost code to a template
-./inc/functions.php:2825:                      // @TODO Are these convertions still required?
-./inc/functions.php:2843:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:225:       // @TODO Remove this sanity-check if all is fine
+./inc/functions.php:228:       // @TODO Try to rewrite all $DATA to $content
+./inc/functions.php:2352:// @TODO Try to move this to inc/libs/theme_functions.php
+./inc/functions.php:2523:// @TODO Please describe this function
+./inc/functions.php:2541:      searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
+./inc/functions.php:2637:              // @TODO Add a little more infos here
+./inc/functions.php:2648:      // @TODO This cannot be rewritten to app_die(), try to find a solution for this.
+./inc/functions.php:2730:                      // @TODO Rewrite this old lost code to a template
+./inc/functions.php:2819:                      // @TODO Are these convertions still required?
+./inc/functions.php:2837:// @TODO Rewrite this function to use readFromFile() and writeToFile()
 ./inc/functions.php:546:               // @TODO Extension 'msg' does not exist
 ./inc/functions.php:615:// @TODO Rewrite this to an extension 'smtp'
 ./inc/install-functions.php:62:        // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1140:// @TODO Rewrite these two constants
-./inc/language/de.php:1156:// @TODO Rewrite these five constants
-./inc/language/de.php:735:// @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used.
-./inc/language/de.php:843:// @TODO Are these constants longer used?
+./inc/language/de.php:1141:// @TODO Rewrite these two constants
+./inc/language/de.php:1157:// @TODO Rewrite these five constants
+./inc/language/de.php:736:// @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used.
+./inc/language/de.php:844:// @TODO Are these constants longer used?
 ./inc/language-functions.php:45:// @TODO Rewrite all language constants to this function.
 ./inc/language/holiday_de.php:49:// @TODO Rewrite these two constants to one
-./inc/language/rallye_de.php:110:// @TODO Rewrite following two lines to one
+./inc/language/rallye_de.php:113:// @TODO Rewrite following two lines to one
+./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings             *
 ./inc/language/refback_de.php:45:// @TODO Rewrite these constants to one
 ./inc/language/sponsor_de.php:118:// @TODO Rewrite these four constants to one and use sprintf()
 ./inc/libs/admins_functions.php:418:           // @TODO This can be, somehow, rewritten
@@ -45,8 +46,8 @@
 ./inc/libs/rallye_functions.php:699:   $EXPIRE = 3; // @TODO The hard-coded value...
 ./inc/libs/rallye_functions.php:763:           // @TODO Rewrite this to our API function
 ./inc/libs/refback_functions.php:60:           // @TODO Try to rewrite the following unset()
-./inc/libs/surfbar_functions.php:1501:         // @TODO This can be somehow rewritten
-./inc/libs/surfbar_functions.php:954:  // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:1497:         // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:950:  // @TODO Invalid salt should be refused
 ./inc/libs/task_functions.php:244:             // @TODO These can be rewritten to filter
 ./inc/libs/task_functions.php:52:// @TODO Move all extension-dependent queries into filters
 ./inc/libs/theme_functions.php:218:// @TODO Move this code block into a filter and register it with 'init'
 ./inc/libs/yoomedia_functions.php:64:  $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
 ./inc/load_config.php:76:      // @TODO Rewrite them to avoid this else block
 ./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php           *
-./inc/modules/admin/admin-inc.php:349:         // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/modules/admin/admin-inc.php:354:                         // @TODO ACL is 'allow'... hmmm
-./inc/modules/admin/admin-inc.php:406:                                 // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/modules/admin/admin-inc.php:412:                                                 // @TODO ACL is 'allow'... hmmm
-./inc/modules/admin/admin-inc.php:514:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
-./inc/modules/admin/admin-inc.php:527:         // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
+./inc/modules/admin/admin-inc.php:351:         // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/modules/admin/admin-inc.php:356:                         // @TODO ACL is 'allow'... hmmm
+./inc/modules/admin/admin-inc.php:422:                                 // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/modules/admin/admin-inc.php:428:                                                 // @TODO ACL is 'allow'... hmmm
+./inc/modules/admin/admin-inc.php:530:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
+./inc/modules/admin/admin-inc.php:543:         // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
 ./inc/modules/admin/overview-inc.php:160:                              // @TODO Rewrite this to a filter
 ./inc/modules/admin/overview-inc.php:274:                              // @TODO Rewrite this to something with include files
 ./inc/modules/admin/overview-inc.php:312:                                              // @TODO This may also be rewritten to include files
@@ -81,8 +82,8 @@
 ./inc/modules/admin/what-chk_regs.php:65:              // @TODO Rewritings: surname->surname,family->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template
 ./inc/modules/admin/what-config_admins.php:148:        // @TODO Rewrite this to filter 'run_sqls'
 ./inc/modules/admin/what-config_mods.php:137:          // @TODO Rewritings: mod->module in template
-./inc/modules/admin/what-config_rallye_prices.php:202:                         // @TODO Rewritings: level->price_level, infos->info in template
-./inc/modules/admin/what-config_rallye_prices.php:219:                 // @TODO Rewrite these two constants
+./inc/modules/admin/what-config_rallye_prices.php:211:                         // @TODO Rewritings: level->price_level, infos->info in template
+./inc/modules/admin/what-config_rallye_prices.php:228:                 // @TODO Rewrite these two constants
 ./inc/modules/admin/what-config_register.php:67:       // @TODO Move this HTML code into a template
 ./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country                                    *
 ./inc/modules/admin/what-email_archiv.php:91:  // @TODO Rewrite to SQL_FETCHARRAY()
 ./inc/modules/admin/what-list_links.php:56:            // @TODO Try to rewrite this to a filter
 ./inc/modules/admin/what-list_links.php:88:                            // @TODO Find a way to rewrite this. See some lines above for different queries
 ./inc/modules/admin/what-list_links.php:97:                                    // @TODO Rewrite this to includes/filter
-./inc/modules/admin/what-list_payouts.php:118:                                         // @TODO Do we need this time-consuming eval() here?
-./inc/modules/admin/what-list_rallyes.php:250:                 // @TODO Rewritings: userid->userid,opoints->curr_points,old->refs in template
-./inc/modules/admin/what-list_rallyes.php:303:                 // @TODO Rewritings: admin_id->admin_id in template
+./inc/modules/admin/what-list_payouts.php:117:                                         // @TODO Do we need this time-consuming eval() here?
+./inc/modules/admin/what-list_rallyes.php:266:                 // @TODO Rewritings: userid->userid,opoints->curr_points,old->refs in template
 ./inc/modules/admin/what-list_sponsor.php:148:                 // @TODO Rewritings: surname->surname,family->family,ip->remote_addr in template
 ./inc/modules/admin/what-list_task.php:148:            // @TODO Rewrite these templates to one and add $OUT
 ./inc/modules/admin/what-list_task.php:182:                    // @TODO Rewritings: admin->assigned_admin,userid->userid,type->task_type_msg in template
 ./inc/modules/member/what-unconfirmed.php:144: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/order.php:75:            // @TODO Unused: 2,4
 ./inc/monthly/monthly_bonus.php:68:    // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1655:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1876:                  // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:2196:          // @TODO This can be somehow rewritten
+./inc/mysql-manager.php:1667:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:1888:                  // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:2208:          // @TODO This can be somehow rewritten
 ./inc/mysql-manager.php:220:                   // @TODO Nothing helped???
+./inc/mysql-manager.php:2231:// @TODO Fix inconsistency between last_module and getWhat()
 ./inc/mysql-manager.php:255:                   // @TODO Rewrite this to a filter
 ./inc/mysql-manager.php:576:   // @TODO Try to rewrite this to one or more functions
-./inc/mysql-manager.php:891:// @TODO Lame description for this function
+./inc/mysql-manager.php:903:// @TODO Lame description for this function
 ./inc/mysql-manager.php:93:// @TODO Can we cache this?
 ./inc/reset/reset_birthday.php:92:                     // @TODO 4 is hard-coded here, should we move it out in config?
 ./inc/wrapper-functions.php:127:// @TODO Implement $compress
 ./inc/wrapper-functions.php:134:// @TODO Implement $decompress
 ./inc/wrapper-functions.php:402:// @TODO Do some more sanity check here
-./mailid.php:131:                                      // @TODO Rewrite this to a filter
-./mailid.php:211:      // @TODO Rewrite this to a dynamic include or so
+./mailid.php:134:                                      // @TODO Rewrite this to a filter
+./mailid.php:214:      // @TODO Rewrite this to a dynamic include or so
 ./mailid.php:94:               // @TODO Rewrite this to a filter
 ./mailid_top.php:135:                                  // @TODO Rewrite this to a filter
 ./mailid_top.php:182:                                                  // @TODO Rewrite this to a filter
 ./mailid_top.php:99:           // @TODO Rewrite this to a filter
 ./view.php:72:         // @TODO No banner found, output some default banner
 ### ### DEPRECATION FOLLOWS: ### ###
-./inc/modules/admin/admin-inc.php:515:// @DEPRECATED
+./inc/modules/admin/admin-inc.php:531:// @DEPRECATED
 ./templates/de/emails/admins_mail_contct_admin.tpl:1:@DEPRECATED
 ./templates/de/emails/admins_msg_contct_admin.tpl:1:@DEPRECATED
 ### ### template-warnings.log follows: ### ###
diff --git a/beg.php b/beg.php
index 59d3572d675a507f0c501e34cd4cf57280a49b9f..67e9855844707ace61455ef319cf8ee1004623ad 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -59,7 +59,7 @@ redirectOnUninstalledExtension('beg');
 // Check for userid
 if (isGetRequestElementSet('userid')) {
        // Init variables
-       $points = 0;
+       $points = '0';
 
        // Don't pay is the default...
        $pay = false;
@@ -107,7 +107,7 @@ if (isGetRequestElementSet('userid')) {
                        array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__);
 
                // Entry not found, points set and not logged in?
-               if (((SQL_NUMROWS($result) == 0) || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) {
+               if (((SQL_NUMROWS($result) == '0') || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) {
 
                        // Admin is testing?
                        if (!isAdmin()) {
@@ -185,7 +185,7 @@ if (isGetRequestElementSet('userid')) {
        } elseif ((getUserData('status') != 'CONFIRMED') && (getUserData('status') != 'failed')) {
                // Maybe locked/unconfirmed account?
                $errorCode = generateErrorCodeFromUserStatus();
-       } elseif ((getUserData('userid') == 0) || (getUserData('status') == 'failed')) {
+       } elseif ((getUserData('userid') == '0') || (getUserData('status') == 'failed')) {
                // Inalid or locked account, so let's find out
                if (fetchUserData(getRequestElement('userid'), 'nickname')) {
                        // Locked account
index 6768e95cc01c37f52fb962b15dbc317145a4e77d..8475924f9f87433a0ce523ec47665ffb056c3a4d 100644 (file)
--- a/debug.php
+++ b/debug.php
@@ -47,7 +47,7 @@ $GLOBALS['output_mode'] = -1;
 require('inc/config-global.php');
 
 // Redirect only to registration page when this script is installed
-if ((isExtensionActive('debug')) && (getTotalFatalErrors() == 0)) {
+if ((isExtensionActive('debug')) && (getTotalFatalErrors() == '0')) {
        // Is the request parameter set?
        if (isPostRequestElementSet('request')) {
                // Handle the request
index 4a97351b9bf7ca1efff89d9dbc476501a76da54f..abcc79b9f3ae0370107203ea8eb56506d16d8558 100644 (file)
@@ -44,7 +44,7 @@ $GLOBALS['startTime'] = microtime(true);
 
 // Set module
 $GLOBALS['module'] = 'doubler';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 
 // Load the required file(s)
 require('inc/config-global.php');
@@ -55,9 +55,6 @@ setContentType('text/html');
 // Is the 'doubler' extension active?
 redirectOnUninstalledExtension('doubler');
 
-// Only check this if refid is provided. This will do the rest for us
-determineReferalId();
-
 // Init content array
 $content = array(
        'message' => '',
index c9e9bcbea2320e36ddac5c77eab940bd98e68035..a175389d606cfe3d5c4b081c9da4c92bb6b105e2 100644 (file)
@@ -56,7 +56,7 @@ if ((getConfig('auto_purge_active') == 'Y') && (getConfig('auto_purge') > 0)) {
        $PURGE = getConfig('auto_purge');
 
        // Init variables
-       $admin_points = 0;
+       $admin_points = '0';
 
        // Then check for outdated mail order. We don't delete them just the confirmation links will be deleted.
        $result = SQL_QUERY_ESC("SELECT
@@ -74,7 +74,7 @@ ORDER BY
                array(bigintval($PURGE)), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Start deleting procedure
-               $userid = 0; $points = 0;
+               $userid = '0'; $points = '0';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Check if confirmation links are purged or not
                        $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s LIMIT 1",
@@ -87,7 +87,7 @@ ORDER BY
                                if (($userid != $content['userid']) && ($userid > 0) && ($points > 0)) {
                                        // Directly add points back to senders account
                                        addPointsAutoPurge($userid, $points);
-                                       $points = 0;
+                                       $points = '0';
                                } // END - if
 
                                // Add points
@@ -117,7 +117,7 @@ ORDER BY
                        array(bigintval($PURGE)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Start deleting procedure
-                       $points = 0;
+                       $points = '0';
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Check if confirmation links are purged or not
                                $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
index a38879112429fd3d72d2ee550c98a59918637c56..1b4b39c19578979ca6d4d00b8675f524068383df 100644 (file)
@@ -58,7 +58,7 @@ ORDER BY
        `sender` ASC", __FILE__, __LINE__);
 
 // Reset counter...
-$DELETED = 0;
+$DELETED = '0';
 
 // Do we have "purged" mails?
 if (SQL_NUMROWS($result_mails) > 0) {
index dc1e85ca4539de1b62d62ab0fb0e8f5d12e5ebd8..4ae354b7028c73e0ba913fe99aba6b4173792a13 100644 (file)
@@ -53,7 +53,7 @@ class fase4_rdf {
         * @access private
         * @var    integer
         */
-       var $_word_wrap = 0;
+       var $_word_wrap = '0';
 
        /**
         * Wether to recode \n -> <br /> or not in description
@@ -246,7 +246,7 @@ class fase4_rdf {
         * @access private
         * @var    int
         */
-       var $_item_count = 0;
+       var $_item_count = '0';
 
        /**
         * No of max <item>s
@@ -399,7 +399,7 @@ class fase4_rdf {
                $this->out .= $this->cache();
                $this->out .= "</table>";
                $this->_output = '';
-               $this->_item_count = 0;
+               $this->_item_count = '0';
                return true;
        }
 
@@ -621,13 +621,13 @@ class fase4_rdf {
                }
 
                if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) {
-                       $this->_depth[$this->get_parser_id($parser)] = 0;
+                       $this->_depth[$this->get_parser_id($parser)] = '0';
                }
                $this->_depth[$this->get_parser_id($parser)]++;
                array_push($this->_tags, $name);
 
                if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) {
-                       $this->_cdepth[$this->get_parser_id($parser)] = 0;
+                       $this->_cdepth[$this->get_parser_id($parser)] = '0';
                }
                $this->_cdepth[$this->get_parser_id($parser)]++;
                array_push($this->_ctags, $name);
@@ -712,7 +712,7 @@ class fase4_rdf {
                                                        // Wrap with <br />\n
                                                        $this->_item['description'] = wordwrap($this->_item['description'], $this->_word_wrap, "*<br>\n");
                                                }
-                                               elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br))
+                                               elseif (($this->_word_wrap == '0') && (!$this->_use_nl2br))
                                                {
                                                        // Strip tags out instead when word-wrap is disabled
                                                        $this->_item['description'] = strip_tags($this->_item['description'], '<a>, <img>');
@@ -874,7 +874,7 @@ class fase4_rdf {
         */
        function get_parser_id ($parser) {
                // Default is zero
-               $id = 0;
+               $id = '0';
 
                // Is it a resource?
                if (is_resource($parser)) {
@@ -1024,7 +1024,7 @@ class fase4_rdf {
 
                $_cache_f = $this->_cache_dir.$this->_cached_file;
 
-               if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
+               if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == '0')) {
                        // We have to parse the remote file
                        $this->_use_cached_file = false;
                        // --> we want to provide proper Information for Use in
@@ -1078,7 +1078,7 @@ class fase4_rdf {
                        if($arr[0]=='') {
                                $path = '/';
                        }
-                       for($i = 0;$i<$c;$i++)
+                       for($i = '0';$i<$c;$i++)
                        {
                                if($arr[$i]!='') {
                                        $path .= $arr[$i].'/';
@@ -1297,7 +1297,7 @@ class fase4_rdf {
                        }
 
 
-                       for ( $i = 0; !feof ($fp) ; $i++)
+                       for ( $i = '0'; !feof ($fp) ; $i++)
                        {
                                $usable_data[$i] = "";
                                $usable_data[$i] = fgets($fp,4096);
@@ -1384,7 +1384,7 @@ class fase4_rdf {
                                        }
                                        $i++;
                                }
-                               if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
+                               if ((count($dummy) > 0) && (count($reply) == '0') && (!$isContent)) {
                                        // Transfer content from dummy
                                        $reply = $content;
                                }
index cda835e7752a9f1ae7ca72392600dc3e5a721e6f..881b7f63d8c9359184542915cf0002cc2aeffa20 100644 (file)
@@ -278,7 +278,7 @@ function updateOldConfigFile () {
 }
 
 // Update config entries
-function updateConfiguration ($entries, $values, $updateMode='') {
+function updateConfiguration ($entries, $values, $updateMode='', $config = '0') {
        // Do not update config in CSS mode
        if ((getOutputMode() == 1) || (getOutputMode() == -1) || (isInstallationPhase())) {
                return;
@@ -344,7 +344,8 @@ function updateConfiguration ($entries, $values, $updateMode='') {
 
        // Run database update
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}");
-       SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=0 LIMIT 1", __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1",
+                       array(bigintval($config)), __FUNCTION__, __LINE__);
        //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />");
 
        // Rebuild cache
@@ -352,7 +353,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 b4e386ce8ea20a1835d8a4bea4be04d445c05938..e75d09fc579a7c4098136fc62337dcae5435e3da 100644 (file)
@@ -142,10 +142,10 @@ function SQL_NUMROWS ($result) {
                $lines = mysql_num_rows($result);
 
                // Is the result empty? Then we have an error!
-               if (empty($lines)) $lines = 0;
+               if (empty($lines)) $lines = '0';
        } elseif (SQL_IS_LINK_UP()) {
                // No resource given, no lines found!
-               $lines = 0;
+               $lines = '0';
        }
 
        // Return lines
@@ -190,7 +190,7 @@ function SQL_FETCHARRAY ($res, $nr=0, $remove_numerical=true) {
                if ($remove_numerical) {
                        // So let's remove all numerical elements to save memory!
                        $max = count($row);
-                       for ($idx = 0; $idx < ($max / 2); $idx++) {
+                       for ($idx = '0'; $idx < ($max / 2); $idx++) {
                                // Remove entry
                                unset($row[$idx]);
                        } // END - for
@@ -205,7 +205,7 @@ function SQL_FETCHARRAY ($res, $nr=0, $remove_numerical=true) {
 }
 
 // SQL result
-function SQL_RESULT ($res, $row, $field = 0) {
+function SQL_RESULT ($res, $row, $field = '0') {
        // Is $res valid?
        if ((!is_resource($res)) || (!SQL_IS_LINK_UP())) return false;
 
@@ -401,14 +401,14 @@ function SQL_ALTER_TABLE ($sql, $F, $L) {
 
                        // Do we have no entry on ADD or an entry on DROP?
                        // 123           4       4     3    3      4           4          32    23           4       4     3    3      4            4          321
-                       if (((SQL_NUMROWS($result) == 0) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) {
+                       if (((SQL_NUMROWS($result) == '0') && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) {
                                // Do the query
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Executing: ' . $sql);
                                $result = SQL_QUERY($sql, $F, $L, false);
 
                                // Skip further attempt(s)
                                break;
-                       } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 0) && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) {
+                       } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == '0') && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) {
                                // Abort here because it is alreay there
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Skipped: ' . $sql);
                                break;
index 5bcdf37ee2920623867fd033ca2bc0b8d970ae3a..a9d1ed29103109e68f87d31369e617fbcb5816bc 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,
@@ -173,12 +173,12 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru
        initExtensionUpdateDependencies();
 
        // Is the task id zero? Then we need to auto-fix it here
-       if ($task_id == 0) {
+       if ($task_id == '0') {
                // Try to find the task
                $task_id = determineExtensionTaskId(getCurrentExtensionName());
 
                // Still zero and not in dry-run?
-               if (($task_id == 0) && (!getExtensionDryRun())) {
+               if (($task_id == '0') && (!getExtensionDryRun())) {
                        // Then request a bug report
                        debug_report_bug(sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
                                __FUNCTION__,
@@ -278,7 +278,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru
                } // END - for
 
                // Is there no update?
-               if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) {
+               if (countExtensionUpdateDependencies(getCurrentExtensionName()) == '0') {
                        // Then test is passed!
                        $test = true;
                } // END - if
@@ -767,7 +767,7 @@ function getExtensionName ($ext_id) {
 // Get extension id from name
 function getExtensionId ($ext_name) {
        // Init id number
-       $ret = 0;
+       $ret = '0';
 
        // Do we have cache?
        if (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) {
@@ -891,7 +891,7 @@ function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) {
        // Is the extension there?
        if (isExtensionInstalled($ext_name)) {
                // Check if task is not there
-               if (determineTaskIdBySubject($subject) == 0) {
+               if (determineTaskIdBySubject($subject) == '0') {
                        // Create extension update-task
                        createNewTask($subject, $notes, 'EXTENSION_UPDATE', 0, $adminId);
                } // END - if
@@ -904,7 +904,7 @@ function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) {
 // Creates a new task for newly installed extension
 function createNewExtensionTask ($adminId, $subject, $ext) {
        // Not installed and do we have created a task for the admin?
-       if ((determineTaskIdBySubject($subject) == 0) && (!isExtensionInstalled($ext))) {
+       if ((determineTaskIdBySubject($subject) == '0') && (!isExtensionInstalled($ext))) {
                // Set default message if ext-foo is missing
                $message = sprintf(getMessage('ADMIN_EXT_TEXT_FILE_MISSING'), $ext);
 
@@ -935,7 +935,7 @@ function createExtensionDeactivationTask ($ext) {
        $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED'));
 
        // Not installed and do we have created a task for the admin?
-       if ((determineTaskIdBySubject($subject) == 0) && (getExtensionVersion($ext) != '')) {
+       if ((determineTaskIdBySubject($subject) == '0') && (getExtensionVersion($ext) != '')) {
                // Task not created so add it
                createNewTask($subject, SQL_ESCAPE(loadTemplate('task_ext_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION');
        } // END - if
@@ -993,7 +993,7 @@ function ifModuleHasMenu ($mod, $forceDb = false) {
 // Determines the task id for given extension
 function determineExtensionTaskId ($ext_name) {
        // Default is not found
-       $task_id = 0;
+       $task_id = '0';
 
        // Search for extension task's id
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `task_type`='EXTENSION' AND `subject`='[%s:]' LIMIT 1",
@@ -1015,7 +1015,7 @@ function determineExtensionTaskId ($ext_name) {
 // Determines the task id for given subject
 function determineTaskIdBySubject ($subject) {
        // Default is not found
-       $task_id = 0;
+       $task_id = '0';
 
        // Search for task id
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1",
@@ -1234,7 +1234,7 @@ function removeExtensionUpdateDependency ($ext_name) {
 // Init iterator for update depencies
 function initExtensionUpdateIterator () {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
-       $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = 0;
+       $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = '0';
 }
 
 // Getter for depency iterator
index b30b1ba113dac0c2af2a609d8dba624dd138e2c0..de89b7015a9c10516f6ff094a86102495bb44d96 100644 (file)
@@ -351,7 +351,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...
index a2d93e4295558f4478346b358f4c6a7956624ad3..51288513fb23cced5042aa36771a6dccc84c624b 100644 (file)
@@ -212,6 +212,9 @@ PRIMARY KEY (`network_reload_id`)
                // - Request parameters incomplete
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_codes` (`network_code`) VALUES ('REQUEST_PARAMS_INCOMPLETE')");
 
+               // Sponsor networks
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_data` (`network_short_name`, `network_title`, `network_reflink`, `network_data_seperator`, `network_row_seperator`, `network_request_type`, `network_charset`) VALUES ('yoomedia', 'Yoo!Media Solutions', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252')");
+               
                // Admin menu entries
                addAdminMenuSql('network',NULL,'Werbenetzwerke','Verwalten Sie hier Werbenetzwerke (API-Anbindung), versenden Sie deren Mails, oder &uuml;bernehmen Sie deren Textlinks und vieles mehr. <strong>VORSICHT:</strong> Das Einrichten von weiteren Werbenetzwerken ist nicht leicht, daf&uuml;r aber sehr flexibel! Sollte ein Netzwerk fehlen, so melden Sie dies bitte <a href="http://forum.mxchange.org/topic-462.html" target="_blank" title="Direktlink zum Forum">im Forum</a>!',4);
                addAdminMenuSql('network','config_networks','API-Daten','Stellen Sie Ihre Affiliate- Webseiten-Id und API-Passwort ein. Diese erhalten Sie zu &uuml;ber 99% aus dem jeweiligen Zugangsbereich des Anbieters. Sollten Sie bei einem Netzwerk noch nicht angemeldet sein, verwenden Sie bitte meinen Referal-Link.',1);
@@ -220,10 +223,10 @@ PRIMARY KEY (`network_reload_id`)
                addAdminMenuSql('network','config_network','Einstellungen','Stellen Sie generelle Einstellungen ein, die f&uuml;r alle Werbenetzwerke gelten, wie z.B. Cache-Erneuerungsinterval. Generell sind aber die Einstellungen in Ordnung, da z.B. sonst Ihre freien Abfragen beim Werbenetzwerk sich zu schnell abbauen.',4);
                addAdminMenuSql('network','list_network_reloads','Reload-Sperren','Listen oder l&ouml;schen Sie hier Reload-Sperren. <strong>Vorsicht:</strong> Die hier gespeicherten Reload-Sperren sind vom jeweiligen Werbenetzwerk &uuml;bernommen. Eventuell verdienen Sie nichts, wenn Sie z.B. eine Mail innerhalb der Reload-Sperre erneut versenden.',5);
                addAdminMenuSql('network','list_networks','Auflisten/Verwalten','<strong>Experten-Einstellungen!</strong> Hier &auml;ndern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Werbenetzwerks ab. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',6);
-               addAdminMenuSql('network','list_network_types','Werbearten verwalten','<strong>Experten-Einstellungen!</strong> Hier &auml;ndern Sie die Einstellungen zu den Werbearten pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',7);
+               addAdminMenuSql('network','list_network_types','Werbearten','<strong>Experten-Einstellungen!</strong> Hier &auml;ndern Sie die Einstellungen zu den Werbearten pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',7);
                addAdminMenuSql('network','list_network_params','Abfrageparameter','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Abfrageparameter (wie sie genannt werden m&uuml;ssen, um das API-Script korrekt aufrufen zu k&ouml;nnen) ein, pro Werbenetzwerk. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',8);
                addAdminMenuSql('network','list_network_code_types','R&uuml;ckgabewerte','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die R&uuml;ckgabewerte ein, die im Falle eines Fehlers pro API-Script kommen k&ouml;nnen. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',9);
-               addAdminMenuSql('network','list_network_codes','Fehlercodes einstellen','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zur&uuml;ckliefern k&ouml;nnen. <strong>Dies sind INTERNE Daten und sollten nur vom MXChange-Entwicklerteam angepasst werden.</strong> Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',10);
+               addAdminMenuSql('network','list_network_codes','Fehlercodes','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zur&uuml;ckliefern k&ouml;nnen. <strong>Dies sind INTERNE Daten und sollten nur vom MXChange-Entwicklerteam angepasst werden.</strong> Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten m&ouml;chten.',10);
 
                // Configuration entries
                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `network_cache_refresh` BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 15) . '');
index 427567273fa2115507f9c502e833488bccdc3078..75c56d7d75154f6fbcfa8b9452743867e8cfbb63 100644 (file)
@@ -90,6 +90,7 @@ PRIMARY KEY (id)
                // Admin menu
                addAdminMenuSql('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufh&ouml;hren. Dabei wird alles weitere automatisch geregelt.',9);
                addAdminMenuSql('rallye','add_rallye','Neue Rallye hinzuf&uuml;gen','Neue Ref-Rallye hinzuf&uuml;gen.',1);
+               // @TODO Fix config_rallye_prices to list_rallye_prices
                addAdminMenuSql('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.',2);
                addAdminMenuSql('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, l&ouml;schen usw.',3);
 
index e83211bd9d394ffd7a211dba1e0309bab8c814b6..26c986403f362f4287ccbaab743b22831ecf6bba 100644 (file)
@@ -96,7 +96,7 @@ ORDER BY
                                $filterFunction = $filterArray['filter_function'];
 
                                // Set counter to default
-                               $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0;
+                               $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0';
 
                                // Mark this filter as loaded (from database)
                                $GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction] = true;
@@ -215,7 +215,7 @@ function registerFilter ($filterName, $filterFunction, $silentAbort = true, $for
                // Simply add it to the array
                //* DEBUG: */ print __FUNCTION__.': filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
                $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A';
-               $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0;
+               $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0';
        } // END - if
 }
 
index 56d82c0f92669b38beb84bdb2296a88faf103638..dbc68d39dad3eaa5f196c3a0b5d6989db2a5bde5 100644 (file)
@@ -66,8 +66,8 @@ function FILTER_FLUSH_FILTERS () {
        } // END - if
 
        // Nothing is added/remove by default
-       $inserted = 0;
-       $removed = 0;
+       $inserted = '0';
+       $removed = '0';
 
        // Prepare SQL queries
        $insertSQL = "INSERT INTO `{?_MYSQL_PREFIX?}_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES";
@@ -490,7 +490,7 @@ function FILTER_UPDATE_EXTENSION_DATA ($ext_name) {
 // Load more reset scripts
 function FILTER_RUN_RESET_INCLUDES () {
        // Is the reset set or old sql_patches?
-       if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getOutputMode() == 0)) {
+       if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getOutputMode() == '0')) {
                // Then abort here
                logDebugMessage(__FUNCTION__, __LINE__, 'Cannot run reset! Please report this bug. Thanks');
        } // END - if
@@ -628,7 +628,7 @@ function FILTER_TRIGGER_SENDING_POOL () {
        } // END - if
 
        // Init counter
-       $GLOBALS['pool_cnt'] = 0;
+       $GLOBALS['pool_cnt'] = '0';
 
        // Init & set the include pool
        initIncludePool('pool');
@@ -732,7 +732,7 @@ function FILTER_COUNT_MODULE () {
 // Handles fatal errors
 function FILTER_HANDLE_FATAL_ERRORS () {
        // Do we have errors to handle and right output mode?
-       if ((getTotalFatalErrors() == 0) || (getOutputMode() != 0)) {
+       if ((getTotalFatalErrors() == '0') || (getOutputMode() != 0)) {
                // Abort executing here
                return false;
        } // END - if
@@ -833,7 +833,7 @@ function FILTER_DISPLAY_COPYRIGHT () {
 function FILTER_DISPLAY_PARSING_TIME () {
        // Shall we display the parsing time and number of queries?
        // 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)) {
+       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
index e1ed3428f23adb5f4c8e6cbdae0594201592c46d..a285c70519303109e23f3e9d2f4c6f17d00a3b32 100644 (file)
@@ -124,7 +124,7 @@ function outputHtml ($htmlCode, $newLine = true) {
                } // END - if
 
                // Init counter
-               $cnt = 0;
+               $cnt = '0';
 
                // Compile and run finished rendered HTML code
                while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
@@ -208,7 +208,7 @@ function addFatalMessage ($F, $L, $message, $extra='') {
 // Getter for total fatal message count
 function getTotalFatalErrors () {
        // Init coun
-       $count = 0;
+       $count = '0';
 
        // Do we have at least the first entry?
        if (!empty($GLOBALS['fatal_messages'][0])) {
@@ -244,7 +244,7 @@ function loadTemplate ($template, $return=false, $content=array()) {
 
                // Init some data
                $ret = '';
-               if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0;
+               if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = '0';
 
                // Base directory
                $basePath = sprintf("%stemplates/%s/html/", getConfig('PATH'), getLanguage());
@@ -325,7 +325,7 @@ function loadTemplate ($template, $return=false, $content=array()) {
                        $ret = '';
                        if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false)) {
                                // Normal HTML output?
-                               if (getOutputMode() == 0) {
+                               if (getOutputMode() == '0') {
                                        // Add surrounding HTML comments to help finding bugs faster
                                        $ret = "<!-- Template " . $template . " - Start -->\n" . $GLOBALS['tpl_content'] . "<!-- Template " . $template . " - End -->\n";
 
@@ -382,7 +382,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;
 
        // Make sure all template names are lowercase!
@@ -412,7 +412,7 @@ function loadEmailTemplate ($template, $content = array(), $UID = 0) {
 
        // Expiration in a nice output format
        // NOTE: Use $content[expiration] in your templates instead of $EXPIRATION
-       if (getConfig('auto_purge') == 0) {
+       if (getConfig('auto_purge') == '0') {
                // Will never expire!
                $EXPIRATION = getMessage('MAIL_WILL_NEVER_EXPIRE');
        } else {
@@ -668,16 +668,16 @@ function sendRawEmail ($toEmail, $subject, $message, $from) {
 }
 
 // Generate a password in a specified length or use default password length
-function generatePassword ($length = 0) {
+function generatePassword ($length = '0') {
        // Auto-fix invalid length of zero
-       if ($length == 0) $length = getConfig('pass_len');
+       if ($length == '0') $length = getConfig('pass_len');
 
        // Initialize array with all allowed chars
        $ABC = explode(',', '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,-,+,_,/,.');
 
        // Start creating password
        $PASS = '';
-       for ($i = 0; $i < $length; $i++) {
+       for ($i = '0'; $i < $length; $i++) {
                $PASS .= $ABC[mt_rand(0, count($ABC) -1)];
        } // END - for
 
@@ -693,12 +693,12 @@ 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);
 
        // If the stamp is zero it mostly didn't "happen"
-       if ($time == 0) {
+       if ($time == '0') {
                // Never happend
                return getMessage('NEVER_HAPPENED');
        } // END - if
@@ -768,7 +768,7 @@ function translatePoolType ($type) {
 }
 
 // Translates the american decimal dot into a german comma
-function translateComma ($dotted, $cut = true, $max = 0) {
+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);
 
@@ -779,12 +779,12 @@ function translateComma ($dotted, $cut = true, $max = 0) {
        if ($max > 0) $maxComma = $max;
 
        // Cut zeros off?
-       if (($cut === true) && ($max == 0)) {
+       if (($cut === true) && ($max == '0')) {
                // Test for commata if in cut-mode
                $com = explode('.', $dotted);
                if (count($com) < 2) {
                        // Don't display commatas even if there are none... ;-)
-                       $maxComma = 0;
+                       $maxComma = '0';
                }
        } // END - if
 
@@ -883,7 +883,7 @@ function countSelection ($array) {
        } // END - if
 
        // Init count
-       $ret = 0;
+       $ret = '0';
 
        // Count all entries
        foreach ($array as $key => $selected) {
@@ -1115,7 +1115,7 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
  * Sie, dass es doch nicht so schwer ist! :-)                           *
  *                                                                      *
  ************************************************************************/
-function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums = false) {
+function array_pk_sort (&$array, $a_sort, $primary_key = '0', $order = -1, $nums = false) {
        $dummy = $array;
        while ($primary_key < count($a_sort)) {
                foreach ($dummy[$a_sort[$primary_key]] as $key => $value) {
@@ -1151,7 +1151,7 @@ function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums =
 }
 
 //
-function addSelectionBox ($type, $default, $prefix = '', $id = 0, $class = 'register_select') {
+function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'register_select') {
        $OUT = '';
 
        if ($type == 'yn') {
@@ -1235,8 +1235,8 @@ function addSelectionBox ($type, $default, $prefix = '', $id = 0, $class = 'regi
 
                case 'sec':
                case 'min':
-                       for ($idx = 0; $idx < 60; $idx+=5) {
-                               if (strlen($idx) == 1) $idx = 0 . $idx;
+                       for ($idx = '0'; $idx < 60; $idx+=5) {
+                               if (strlen($idx) == 1) $idx = '0' . $idx;
                                $OUT .= "<option value=\"" . $idx."\"";
                                if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1244,8 +1244,8 @@ function addSelectionBox ($type, $default, $prefix = '', $id = 0, $class = 'regi
                        break;
 
                case 'hour':
-                       for ($idx = 0; $idx < 24; $idx++) {
-                               if (strlen($idx) == 1) $idx = 0 . $idx;
+                       for ($idx = '0'; $idx < 24; $idx++) {
+                               if (strlen($idx) == 1) $idx = '0' . $idx;
                                $OUT .= "<option value=\"" . $idx."\"";
                                if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1310,8 +1310,8 @@ function generateRandomCode ($length, $code, $userid, $DATA = '') {
 
        // At least 10 numbers shall be secure enought!
        $len = getConfig('code_length');
-       if ($len == 0) $len = $length;
-       if ($len == 0) $len = 10;
+       if ($len == '0') $len = $length;
+       if ($len == '0') $len = 10;
 
        // Cut off requested counts of number
        $return = substr(str_replace('.', '', $rcode), 0, $len);
@@ -1329,7 +1329,6 @@ function bigintval ($num, $castValue = true) {
        if ($castValue === true) $ret = (double)$ret;
 
        // Has the whole value changed?
-       // @TODO Remove this if() block if all is working fine
        if ('' . $ret . '' != '' . $num . '') {
                // Log the values
                debug_report_bug('Problem with number found. ret=' . $ret . ', num='. $num);
@@ -1342,7 +1341,7 @@ function bigintval ($num, $castValue = true) {
 // Insert the code in $img_code into jpeg or PNG image
 function generateImageOrCode ($img_code, $headerSent = true) {
        // Is the code size oversized or shouldn't we display it?
-       if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == 0)) {
+       if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == '0')) {
                // Stop execution of function here because of over-sized code length
                debug_report_bug('img_code ' . $img_code .' has invalid length. img_code()=' . strlen($img_code) . ' code_length=' . getConfig('code_length'));
        } elseif ($headerSent === false) {
@@ -1403,7 +1402,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
        //* DEBUG: */ print("*" . $stamp.'/' . $timestamp."*<br />");
 
        // Do we have a leap year?
-       $SWITCH = 0;
+       $SWITCH = '0';
        $TEST = date('Y', time()) / 4;
        $M1 = date('m', time());
        $M2 = date('m', (time() + $timestamp));
@@ -1434,7 +1433,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
        //* DEBUG: */ print("s={$s}<br />");
 
        // Is seconds zero and time is < 60 seconds?
-       if (($s == 0) && ($timestamp < 60)) {
+       if (($s == '0') && ($timestamp < 60)) {
                // Fix seconds
                $s = round($timestamp);
        } // END - if
@@ -1493,7 +1492,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg('Y', $display) || (empty($display))) {
                        // Generate year selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_ye\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 10; $idx++) {
+                       for ($idx = '0'; $idx <= 10; $idx++) {
                                $OUT .= "    <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $Y) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1506,7 +1505,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg('M', $display) || (empty($display))) {
                        // Generate month selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_mo\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 11; $idx++)
+                       for ($idx = '0'; $idx <= 11; $idx++)
                        {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $M) $OUT .= ' selected="selected"';
@@ -1520,7 +1519,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg("W", $display) || (empty($display))) {
                        // Generate week selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_we\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 4; $idx++) {
+                       for ($idx = '0'; $idx <= 4; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $W) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1533,7 +1532,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg("D", $display) || (empty($display))) {
                        // Generate day selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_da\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 31; $idx++) {
+                       for ($idx = '0'; $idx <= 31; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $D) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1546,7 +1545,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg("h", $display) || (empty($display))) {
                        // Generate hour selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_ho\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 23; $idx++)      {
+                       for ($idx = '0'; $idx <= 23; $idx++)    {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $h) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1559,7 +1558,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg('m', $display) || (empty($display))) {
                        // Generate minute selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_mi\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 59; $idx++) {
+                       for ($idx = '0'; $idx <= 59; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $m) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1572,7 +1571,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                if (ereg("s", $display) || (empty($display))) {
                        // Generate second selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_se\" size=\"1\">\n";
-                       for ($idx = 0; $idx <= 59; $idx++) {
+                       for ($idx = '0'; $idx <= 59; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $s) $OUT .= ' selected="selected"';
                                $OUT .= ">" . $idx."</option>\n";
@@ -1592,10 +1591,10 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
 //
 function createTimestampFromSelections ($prefix, $postData) {
        // Initial return value
-       $ret = 0;
+       $ret = '0';
 
        // Do we have a leap year?
-       $SWITCH = 0;
+       $SWITCH = '0';
        $TEST = date('Y', time()) / 4;
        $M1   = date('m', time());
        // If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
@@ -1810,7 +1809,7 @@ function sendPostRequest ($script, $postData) {
 // Sends a raw request to another host
 function sendRawRequest ($host, $request) {
        // Init errno and errdesc with 'all fine' values
-       $errno = 0; $errdesc = '';
+       $errno = '0'; $errdesc = '';
 
        // Initialize array
        $response = array('', '', '');
@@ -2095,7 +2094,7 @@ function scrambleString($str) {
 
        // Scramble string here
        //* DEBUG: */ outputHtml("***Original=" . $str."***<br />");
-       for ($idx = 0; $idx < strlen($str); $idx++) {
+       for ($idx = '0'; $idx < strlen($str); $idx++) {
                // Get char on scrambled position
                $char = substr($str, $scrambleNums[$idx], 1);
 
@@ -2122,7 +2121,7 @@ function descrambleString($str) {
        // Begin descrambling
        $orig = str_repeat(' ', 40);
        //* DEBUG: */ outputHtml("+++Scrambled=" . $str."+++<br />");
-       for ($idx = 0; $idx < 40; $idx++) {
+       for ($idx = '0'; $idx < 40; $idx++) {
                $char = substr($str, $idx, 1);
                $orig = substr_replace($orig, $char, $scrambleNums[$idx], 1);
        } // END - for
@@ -2138,7 +2137,7 @@ function genScrambleString ($len) {
        $scrambleNumbers = array();
 
        // First we need to setup randomized numbers from 0 to 31
-       for ($idx = 0; $idx < $len; $idx++) {
+       for ($idx = '0'; $idx < $len; $idx++) {
                // Generate number
                $rand = mt_rand(0, ($len -1));
 
@@ -2165,7 +2164,7 @@ function generatePassString ($passHash) {
        if ((isExtensionInstalled('sql_patches')) && (isExtensionInstalledAndNewer('other', '0.2.5')) && (isConfigEntrySet('_PRIME')) && (isConfigEntrySet('secret_key')) && (isConfigEntrySet('master_salt'))) {
                // Only calculate when the secret key is generated
                $newHash = ''; $start = 9;
-               for ($idx = 0; $idx < 10; $idx++) {
+               for ($idx = '0'; $idx < 10; $idx++) {
                        $part1 = hexdec(substr($passHash, $start, 4));
                        $part2 = hexdec(substr(getConfig('secret_key'), $start, 4));
                        $mod = dechex($idx);
@@ -2252,7 +2251,7 @@ function displayParsingTime() {
        $start = explode(' ', $GLOBALS['startTime']);
        $end = explode(' ', $endTime);
        $runTime = $end[0] - $start[0];
-       if ($runTime < 0) $runTime = 0;
+       if ($runTime < 0) $runTime = '0';
 
        // Prepare output
        $content = array(
@@ -2316,7 +2315,7 @@ function getCurrentTheme () {
                $ret = getSession('mxchange_theme');
 
                // Is it valid?
-               if (getThemeId($ret) == 0) {
+               if (getThemeId($ret) == '0') {
                        // Fix it to default
                        $ret = 'default';
                } // END - if
@@ -2359,7 +2358,7 @@ function getThemeId ($name) {
        } // END - if
 
        // Default id
-       $id = 0;
+       $id = '0';
 
        // Is the cache entry there?
        if (isset($GLOBALS['cache_array']['themes']['id'][$name])) {
@@ -2536,7 +2535,7 @@ function getArrayFromActualVersion () {
        $akt_vers = array();
 
        // Init value for counting the founded keywords
-       $res = 0;
+       $res = '0';
 
        // Searches all Files and there date of the last modifikation and puts the newest File in $last_changed.
        searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
@@ -2866,7 +2865,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
                                        // Read from source file
                                        $line = fgets ($fp, 1024);
 
-                                       if (strpos($line, $search) > -1) { $next = 0; $found = true; }
+                                       if (strpos($line, $search) > -1) { $next = '0'; $found = true; }
 
                                        if ($next > -1) {
                                                if ($next === $seek) {
@@ -2910,7 +2909,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 (isExtensionInstalledAndNewer('admins', '0.4.1')) {
                // Send new way
                sendAdminsEmails($subject, $templateName, $content, $userid);
@@ -3175,11 +3174,11 @@ function determineReferalId () {
                $GLOBALS['refid'] = getConfig('def_refid');
        } else {
                // No default id when sql_patches is not installed or none set
-               $GLOBALS['refid'] = 0;
+               $GLOBALS['refid'] = '0';
        }
 
        // Set cookie when default refid > 0
-       if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((getSession('refid') == 0) && (isConfigEntrySet('def_refid')) && (getConfig('def_refid') > 0))) {
+       if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((getSession('refid') == '0') && (isConfigEntrySet('def_refid')) && (getConfig('def_refid') > 0))) {
                // Default is not found
                $found = false;
 
@@ -3234,13 +3233,13 @@ function shutdown () {
 
 // Init member id
 function initMemberId () {
-       $GLOBALS['member_id'] = 0;
+       $GLOBALS['member_id'] = '0';
 }
 
 // Setter for member id
 function setMemberId ($memberid) {
        // We should not set member id to zero
-       if ($memberid == 0) debug_report_bug('Userid should not be set zero.');
+       if ($memberid == '0') debug_report_bug('Userid should not be set zero.');
 
        // Set it secured
        $GLOBALS['member_id'] = bigintval($memberid);
@@ -3249,7 +3248,7 @@ function setMemberId ($memberid) {
 // Getter for member id or returns zero
 function getMemberId () {
        // Default member id
-       $memberid = 0;
+       $memberid = '0';
 
        // Is the member id set?
        if (isMemberIdSet()) {
index 027d21a621758e79be62fcb978fc243dbc13f2dc..565159b78177723014c9854b94f9f988bc068439 100644 (file)
@@ -42,14 +42,14 @@ if (!defined('__SECURITY')) {
 }
 
 // Init variables
-$bsent = 0; $bclicks = 0; $bcount = 0;
+$bsent = '0'; $bclicks = '0'; $bcount = '0';
 
 // Check for normal mails
 $result_media = SQL_QUERY('SELECT SUM(max_rec) AS max_rec, SUM(clicks) AS clicks
 FROM `{?_MYSQL_PREFIX?}_user_stats`', __FILE__, __LINE__);
 list($nsent, $nclicks) = SQL_FETCHROW($result_media);
-if (empty($nsent))   $nsent   = 0;
-if (empty($nclicks)) $nclicks = 0;
+if (empty($nsent))   $nsent   = '0';
+if (empty($nclicks)) $nclicks = '0';
 
 // Free memory
 SQL_FREERESULT($result_media);
@@ -66,8 +66,8 @@ if (isExtensionActive('bonus')) {
        $result_media = SQL_QUERY('SELECT SUM(mails_sent) AS bonus_sent, SUM(clicks) AS bonus_clicks
 FROM `{?_MYSQL_PREFIX?}_bonus`', __FILE__, __LINE__);
        list($bsent, $bclicks) = SQL_FETCHROW($result_media);
-       if (empty($bsent))   $bsent   = 0;
-       if (empty($bclicks)) $bclicks = 0;
+       if (empty($bsent))   $bsent   = '0';
+       if (empty($bclicks)) $bclicks = '0';
 } // END - if
 
 // Load (maybe) missing file
index 261f49b4ef1318c0192fe0d1cd3daa73d8656cd8..05ad10994f37ddc9028c6bf9c71b2ef7352619d5 100644 (file)
@@ -74,7 +74,7 @@ if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) {
 
        // Closing HEAD tag
        if (getOutputMode() != 1) outputHtml('</head>');
-       if ($GLOBALS['header_sent'] == 0) $GLOBALS['header_sent'] = 1;
+       if ($GLOBALS['header_sent'] == '0') $GLOBALS['header_sent'] = 1;
 } // END - if
 
 // Add BODY tag or not?
index 7e66a605bf42ab295a2332950afa6e7249dc9e60..4bbca9b7791fda18897333b1bcefe69047f4a5cb 100644 (file)
@@ -202,7 +202,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                                        addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
                                                } // END - if
 
-                                               if (getTotalFatalErrors() == 0) {
+                                               if (getTotalFatalErrors() == '0') {
                                                        // Set type and prefix from POST data
                                                        setConfigEntry('_TABLE_TYPE'  , postRequestElement('mysql', 'type'));
                                                        setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix'));
@@ -230,7 +230,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                                        //* DEBUG: */ die('<pre>'.print_r(getSqls(), true).'</pre>');
 
                                                        // Are some SQLs found?
-                                                       if (countSqls() == 0) {
+                                                       if (countSqls() == '0') {
                                                                // Abort here
                                                                addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
                                                                return;
index f2fe7a9536d422c83e12a0a6c2a53c94b503b724..cb1f925dbcb9a016f1cbd89d9f164312573bef82 100644 (file)
@@ -180,7 +180,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,
diff --git a/inc/libs/_functions.php b/inc/libs/_functions.php
new file mode 100644 (file)
index 0000000..3f301d3
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 11/04/2009 *
+ * ===============                              Last change: 11/04/2009 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : _functions.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext-                               *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Funktionen fuer ext-                             *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1194                                                   $ *
+ * $Date:: 2009-10-27 18:24:18 +0100 (Tue, 27 Oct 2009)               $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: quix0r                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// [EOF]
+?>
index 076213c0aea5ae2ba63b682c6d521b55a8245fbd..ed45da64a1bd0243017938599ffad490b712b6e7 100644 (file)
@@ -156,7 +156,7 @@ LIMIT 1",
 // Change a lot admin account
 function adminsChangeAdminAccount ($postData) {
        // Begin the update
-       $cache_update = 0;
+       $cache_update = '0';
        foreach ($postData['login'] as $id => $login) {
                // Secure id number
                $id = bigintval($id);
@@ -339,7 +339,7 @@ function adminsDeleteAdminAccount ($postData) {
 // Remove the given accounts
 function adminsRemoveAdminAccount ($postData) {
        // Begin removal
-       $cache_update = 0;
+       $cache_update = '0';
        foreach ($postData['sel'] as $id => $del) {
                // Secure id number
                $id = bigintval($id);
@@ -409,7 +409,7 @@ function sendAdminsEmails ($subj, $template, $content, $UID) {
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
                array($template), __FUNCTION__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Create new entry (to all admins)
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
                        array($template), __FUNCTION__, __LINE__);
@@ -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 80238712b247ccc1991eda36208f4c8c9225d574..17f35434e704e6aec4e6cb9c7b85e75489d71bac 100644 (file)
@@ -47,7 +47,7 @@ function addTurboBonus ($mid, $userid, $type) {
        if (getConfig('bonus_active') != 'Y') return false;
 
        // Init variables
-       $sql = ''; $bonus = 0; $mail = 0; $column = '';
+       $sql = ''; $bonus = '0'; $mail = '0'; $column = '';
 
        // Select SQL command
        switch ($type) {
@@ -234,7 +234,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 6b8d7f8b92c563f4474057c561fd605fc2f3110e..28ce65d9b8cfaa87725e12708a55869e927ce44a 100644 (file)
@@ -43,9 +43,9 @@ if (!defined('__SECURITY')) {
 
 // Generates a HTML table based on given data
 // @TODO Lame description
-function generateDoublerTable ($userid = 0, $done = 'N', $ref = 'N', $sort = 'ASC') {
-       if (empty($cnt)) $cnt = 0;
-       $add = ''; $DT_MODE = 0;
+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 = sprintf(" AND `userid`=%s", bigintval($userid));
@@ -122,7 +122,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__);
 //
 function DOUBLER_GET_TOTAL_POINTS_LEFT() {
        // Initialize variables
-       $points = 0;
+       $points = '0';
 
        if (getConfig('doubler_own') == 'Y') {
                // Take points from doubler's own account
index 6b951f8a00d52f07057f44527b5286727acdbf28..91f9504bcc30d5c87e2c86c8894fd1e4ac43a802 100644 (file)
@@ -118,7 +118,7 @@ function insertUrlsIntoHtml ($text) {
                } // END - if
 
                // And now go forward...
-               $idx = 0;
+               $idx = '0';
                while ($idx < strlen($test)) {
                        $check = substr($test, $idx, 1);
                        if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
index c64026d0c4f59b29e870c31abb66eb0eef4001be..013ba16b4014b41b9e7b65d25010f49cffd83c17 100644 (file)
@@ -51,7 +51,7 @@ function getJackpotPoints () {
        $result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__);
 
        // Do we have an entry?
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // No, so create line
                SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__);
        } else {
index 1660d777969fab60ad779977786e953c6e9cd5dd..c6075198c87ae3dff60b8d63e20571c5c8131418 100644 (file)
@@ -49,7 +49,7 @@ function updateMediadataEntry ($keys_array, $mode, $value) {
                        // First check if it does exist
                        $result_media = SQL_QUERY_ESC("SELECT media_key FROM `{?_MYSQL_PREFIX?}_mediadata`
 WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
-                       if (SQL_NUMROWS($result_media) == 0) {
+                       if (SQL_NUMROWS($result_media) == '0') {
                                // Not found so we create it (mode will be ignored here!)
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
                                array($key, $value), __FUNCTION__, __LINE__);
diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php
new file mode 100644 (file)
index 0000000..af436af
--- /dev/null
@@ -0,0 +1,200 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 11/04/2009 *
+ * ===============                              Last change: 11/04/2009 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : network_functions.php                            *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext-network                        *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Funktionen fuer ext-network                      *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1194                                                   $ *
+ * $Date:: 2009-10-27 18:24:18 +0100 (Tue, 27 Oct 2009)               $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: quix0r                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Processes an admin form
+function doAdminNetworkProcessForm () {
+       // Form really sent?
+       if ((!isFormSent()) && (!isPostRequestElementSet('edit')) && (!isPostRequestElementSet('del'))) {
+               // Abort here
+               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_FORM_NOT_SENT'));
+               return;
+       } elseif (!isGetRequestElementSet('do')) {
+               // No 'do' found
+               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_DO_404'));
+               return;
+       }
+
+       // Create function name
+       $functionName = sprintf("doAdminNetworkProcess%sForm", ucfirst(strtolower(getRequestElement('do'))));
+
+       // Is the function valid?
+       if (!function_exists($functionName)) {
+               // Invalid function name
+               debug_report_bug('Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.');
+       } // END - if
+
+       // Call-back the method handling our request
+       call_user_func($functionName);
+}
+
+// Checks wether the (short) network name is already used (valid)
+function isNetworkNameValid ($name) {
+       // Query for it
+       $result = SQL_QUERY_ESC("SELECT `network_id` FROM `{?_MYSQL_PREFIX?}_network_data` WHERE `network_short_name`='%s' LIMIT 1",
+               array($name), __FUNCTION__, __LINE__);
+
+       // Does it exist?
+       $isValid = (SQL_NUMROWS($result) == 1);
+
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Return result
+       return $isValid;
+}
+
+// "Getter" for a network's data by provided id number
+function getNetworkDataById ($id) {
+       // Ids lower one are not accepted
+       if ($id < 1) {
+               // Not good, should be fixed
+               debug_report_bug('Network id ' . $id . ' is smaller than 1.');
+       } // END - if
+
+       // By default we have no data
+       $networkData = array();
+
+       // Query for the network data
+       $result = SQL_QUERY_ESC("SELECT
+       `network_id`, `network_short_name`, `network_title`, `network_reflink`, `network_data_seperator`, `network_row_seperator`, `network_request_type`, `network_charset`
+FROM
+       `{?_MYSQL_PREFIX?}_network_data`
+WHERE
+       `network_id`=%s
+LIMIT 1",
+               array(bigintval($id)), __FUNCTION__, __LINE__);
+
+       // Do we have an entry?
+       if (SQL_NUMROWS($result) == 1) {
+               // Then get it
+               $networkData = SQL_FETCHARRAY($result);
+       } // END - if
+
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Return result
+       return $networkData;
+}
+
+//------------------------------------------------------------------------------
+//                             Call-back functions
+//------------------------------------------------------------------------------
+
+// Callback function to add new network
+function doAdminNetworkProcessAddnetworkForm () {
+       // We can say here, the form is sent, so check if the network is already added
+       if (isNetworkNameValid(postRequestElement('network_short_name'))) {
+               // Already there
+               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_ALREADY_ADDED'), postRequestElement('network_short_name')));
+               return;
+       } // END - if
+
+       // Remove the 'ok' part
+       unsetPostRequestElement('ok');
+
+       // Add the whole request to database
+       SQL_QUERY("INSERT INTO
+       `{?_MYSQL_PREFIX?}_network_data`
+(
+       `" . implode('`,`', array_keys(postRequestArray())) . "`
+) VALUES (
+       '" . implode("','", array_values(postRequestArray())) . "'
+)", __FUNCTION__, __LINE__);
+
+       // Add the id for output only
+       setRequestPostElement('network_id', SQL_INSERTID());
+
+       // Output message
+       if (SQL_AFFECTEDROWS() == 1) {
+               // Successfully added
+               loadTemplate('admin_network_added', false, postRequestArray());
+       } else {
+               // Not added
+               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_DATA_NOT_ADDED'), postRequestElement('network_short_name')));
+       }
+}
+
+// Displays selected networks for editing
+function doAdminNetworkProcessHandlenetworkForm () {
+       // Do we have selections?
+       if (countPostSelection() > 0) {
+               // Something has been selected, so start displaying one by one
+               $SW = 2; $OUT = '';
+               foreach (postRequestElement('sel') as $id=>$sel) {
+                       // Is this selected?
+                       if ($sel == 1) {
+                               // Load this network's data
+                               $networkData = getNetworkDataById($id);
+
+                               // Do we have found the network?
+                               if (count($networkData) > 0) {
+                                       // Add color
+                                       $networkData['sw'] = $SW;
+
+                                       // Make selection box for network_request_type
+                                       $networkData['network_request_type'] = addSelectionBox('network_request_type', $networkData['network_request_type'], '', 0, 'admin_select');
+
+                                       // Add row template and switch color
+                                       $OUT .= loadTemplate('admin_edit_networks_row', true, $networkData);
+                                       $SW = 3 - $SW;
+                               } // END - if
+                       } // END - if
+               } // END - foreach
+
+               // If we have no rows, we don't need to display the edit form
+               if (!empty($OUT)) {
+                       // Output main template
+                       loadTemplate('admin_edit_networks', false, $OUT);
+
+                       // Don't display the list/add new form
+                       $GLOBALS['network_display'] = false;
+               } else {
+                       // Nothing selected/found
+                       loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_NOTHING_FOUND'));
+               }
+       } // END - if
+}
+
+// [EOF]
+?>
index e2f9b722709802685e3a10ed108d4497463e91e1..d50037e4f8389346b4a52fe59af78ff1ed3a3c73 100644 (file)
@@ -92,7 +92,7 @@ function insertNewsletterUrls ($text) {
                }
 
                // And now go forward...
-               $idx = 0;
+               $idx = '0';
                while ($idx < strlen($test)) {
                        $check = substr($test, $idx, 1);
                        if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
index 125f4a38a70821e9069b015fd2b56eab616eb120..9ea589e721d56a2fd404b0351a267f08a2db2d4c 100644 (file)
@@ -53,7 +53,7 @@ function FILTER_UPDATE_ONLINE_LIST () {
        } // END - if
 
        // Initialize variables
-       $userid = 0;
+       $userid = '0';
        $MEM = 'N';
        $ADMIN = 'N';
 
index 01ada00791a3e916e538435bf074446ba15b33de..1b22cbb9b7c73a7ca0f8199cfb48598770df1644 100644 (file)
@@ -44,12 +44,12 @@ if (!defined('__SECURITY')) {
 // Part taken from admin optimize module of PHPNuke (http://www.phpnuke.org)
 function repairOptimizeDatabase () {
        $ret = array();
-       $tot_data = 0; $tabs = 0; $opts = 0;
-       $tot_idx = 0; $total_gain = 0;
-       $tot_all = 0;
+       $tot_data = '0'; $tabs = '0'; $opts = '0';
+       $tot_idx = '0'; $total_gain = '0';
+       $tot_all = '0';
        $result = SQL_QUERY("SHOW TABLE STATUS FROM `{?__DB_NAME?}`", __FUNCTION__, __LINE__);
        $tabs = SQL_NUMROWS($result);
-       $ret['total_size'] = 0;
+       $ret['total_size'] = '0';
        $ret['total_tabs'] = $tabs;
        $ret['tables'] = array();
        if ($tabs > 0) {
index 1082695af8c4adf3bbd45e3c2f6f6fda8dbcc53b..29f15fd8c46fb7fabb993b515a72c96120b280c3 100644 (file)
@@ -108,7 +108,7 @@ class PrimeraApi {
        var $host = "http://www.primusportal.de";
        var $path = "/transfer.interface.2.0.php";
 
-       var $errno = 0;
+       var $errno = '0';
        var $err = '';
 
        var $seperator = ':';
index 97eb083c6ee3070df2fe912c6c87118490693ed7..a1038eb205cfacf51738223d712f8dcded9fc204 100644 (file)
@@ -81,12 +81,12 @@ function autostartReferalRallyes ($result) {
 
                // Get refs by userid
                $cnt = getReferalRallyeRefsCount($content['userid']);
-               if (empty($cnt)) $cnt = 0; // Added prevent some unknown troubles... :-?
+               if (empty($cnt)) $cnt = '0'; // Added prevent some unknown troubles... :-?
 
                // Check if line is already included...
                $result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1",
                        array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
-               if (SQL_NUMROWS($result_ref) == 0) {
+               if (SQL_NUMROWS($result_ref) == '0') {
                        // Free memory
                        SQL_FREERESULT($result_ref);
 
@@ -247,7 +247,7 @@ LIMIT 1",
                // Free result
                SQL_FREERESULT($result_ref);
 
-               if (empty($refpoints)) $refpoints = 0;
+               if (empty($refpoints)) $refpoints = '0';
 
                // Init userid for list
                $_userid = '---';
@@ -271,7 +271,7 @@ LIMIT 1",
        // Generate table
        $OUT = loadTemplate('guest_rallye_header', true);
        $SW = 2;
-       for ($idx = 0; $idx < $prices; $idx++) {
+       for ($idx = '0'; $idx < $prices; $idx++) {
                if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
                if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = '---';
                // Add row
@@ -321,7 +321,7 @@ WHERE
 LIMIT 1", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Init variables
-               $min_users = 0; $min_prices = 0;
+               $min_users = '0'; $min_prices = '0';
                // Load data
                if (getExtensionVersion('rallye') >= '0.2.0') {
                        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -337,7 +337,7 @@ LIMIT 1", __FUNCTION__, __LINE__);
                        array(bigintval($id), bigintval($userid)), __FUNCTION__, __LINE__);
 
                // Is this user added?
-               if (SQL_NUMROWS($result) == 0) {
+               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)",
@@ -354,7 +354,7 @@ VALUES ('%s','%s',0)",
                        $DATA['now_t'] = generateDateTime(time(), 2);
                        $DATA['title'] = $title;
                        $DATA['id']    = $id;  // id for the rallye details link
-                       $DATA['ref']   = 0;
+                       $DATA['ref']   = '0';
                        $DATA['refs']  = countSumTotalData($userid, 'user_data', 'userid', "refid", true);
 
                        // Load prices
@@ -385,7 +385,7 @@ function markReferalRallyesAsExpired ($result) {
        $prices = getArrayFromReferalRallyeUsers($id);
 
        // Init array
-       $DATA = array(); $cnt = 0;
+       $DATA = array(); $cnt = '0';
        $users = array();
        $DATA['title']  = $title;
        $DATA['start']  = generateDateTime($start, 1);
@@ -393,11 +393,11 @@ function markReferalRallyesAsExpired ($result) {
        $DATA['now_t']  = generateDateTime(time(), 1);
 
        // Just count...
-       $total = 0;
+       $total = '0';
        foreach($prices['userid'] as $key => $userid) {
                // Check status
                //   active = 1: account is still confirmed
-               //   active = 0: account is deleted or locked
+               //   active = '0': account is deleted or locked
                $result = SQL_QUERY_ESC("SELECT
        COUNT(`userid`) AS active
 FROM
@@ -417,7 +417,7 @@ LIMIT 1",
                } // END - if
        } // END - foreach
 
-       if (($total < $min_prices) || ($total == 0)) {
+       if (($total < $min_prices) || ($total == '0')) {
                // Do not end this rallye!
                unset($DATA);
                return;
@@ -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(
@@ -595,7 +595,7 @@ LIMIT 1",
                SQL_FREERESULT($result_ref);
 
                // Fix empty refpoints
-               if (empty($refpoints)) $refpoints = 0;
+               if (empty($refpoints)) $refpoints = '0';
 
                // Store calculated new refs to array
                $users['userid'][]     = $content['userid'];
@@ -642,14 +642,14 @@ function addReferalRallyeWinners ($rallye, $default=0) {
        // Generate table
        $OUT = loadTemplate('guest_rallye_expired_header', true);
        $SW = 2;
-       for ($idx = 0; $idx < $prices; $idx++) {
+       for ($idx = '0'; $idx < $prices; $idx++) {
                // Check status
                //   active = 1: account is still confirmed
-               //   active = 0: account is deleted or locked
+               //   active = '0': account is deleted or locked
                $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]   = '---';
@@ -779,11 +779,11 @@ function addReferalRallyeTemplateSelection ($name = 'template', $default = '') {
 }
 
 //
-function getReferalRallyeRefsCount ($userid, $old = 0) {
+function getReferalRallyeRefsCount ($userid, $old = '0') {
        // Check current refs
        if (getExtensionVersion('cache') >= '0.1.2') {
                // Get refs from cache
-               $cnt = 0;
+               $cnt = '0';
                foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $userid) {
                        // Do we have a ref for this user?
                        //* DEBUG: */ print("id={$id},userid={$userid},userid={$userid},old={$old},level={$GLOBALS['cache_array']['refsystem']['level'][$id]}<br />");
@@ -829,7 +829,7 @@ WHERE s.userid=%s AND s.level=1", array(bigintval($userid)), __FUNCTION__, __LIN
                list($cnt) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
                if (empty($cnt)) {
-                       $cnt = 0;
+                       $cnt = '0';
                } else {
                        $cnt -= $old;
                }
index 1c499387538523d1fddbadb81a9d12fdd452d170..48ddd1a1928d4c3a2b5314faba46e80afa3c6955 100644 (file)
@@ -114,7 +114,7 @@ function getRefbackPercents ($userid, $ref) {
        if ($userid == $ref) return 0;
 
        // Default is zero
-       $percents = 0;
+       $percents = '0';
 
        // Get percents from database
        $result = SQL_QUERY_ESC("SELECT refback FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `refid`=%s LIMIT 1",
@@ -184,8 +184,8 @@ function updateRefbackTable ($userid) {
        //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']}<br />");
 
        // Init refid
-       $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = 0;
-       $old = 0; $minus = 0;
+       $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = '0';
+       $old = '0'; $minus = '0';
 
        // Check for his referal
        $result_refid = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=%s ORDER BY `userid` ASC",
@@ -217,7 +217,7 @@ function updateRefbackTable ($userid) {
 
                                // Do we have no entry?
                                //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />");
-                               if (SQL_NUMROWS($result) == 0) {
+                               if (SQL_NUMROWS($result) == '0') {
                                        // Insert this level
                                        //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!<br />");
                                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
@@ -238,7 +238,7 @@ function updateRefbackTable ($userid) {
 
                                        // Do we have no entry?
                                        //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />");
-                                       if (SQL_NUMROWS($result) == 0) {
+                                       if (SQL_NUMROWS($result) == '0') {
                                                // Insert this level
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
                                                        array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
@@ -253,7 +253,7 @@ function updateRefbackTable ($userid) {
        } // END - if
 
        // When he has a referal...
-       if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == 0)) && (isExtensionInstalledAndNewer('cache', '0.1.2')) && (!isset($GLOBALS['refback_cached']))) {
+       if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2')) && (!isset($GLOBALS['refback_cached']))) {
                // Remove cache here
                //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - CACHE!<br />");
                if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->removeCacheFile();
@@ -265,7 +265,7 @@ function updateRefbackTable ($userid) {
        //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']} - LEVEL!<br />");
 
        // Fix empty refid
-       if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = 0;
+       if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = '0';
        //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]} - BACK!<br />");
        //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
 }
@@ -370,7 +370,7 @@ function updateMemberRefbackPercents ($id, $percents) {
        $dummy = getArrayFromUserRefbackData($id);
 
        // Is this valid?
-       if (count($dummy) == 0) {
+       if (count($dummy) == '0') {
                // id does not belong to user!
                $status['message'] = getMessage('MEMBER_REFBACK_ERROR_ID_MISMATCH');
                return $status;
index 8e908dad35e10905448736d5a1d616e25da283bc..23d393492f63fb986a6178a172b78bbd344d20c9 100644 (file)
@@ -104,7 +104,7 @@ function getAnonymousReferer ($referer) {
 // Adds informations about anonymity/privacy to the menu
 function addAnonymityLevel () {
        // "Base-privacy" is by default low (we add more later)
-       $anonymity = 0;
+       $anonymity = '0';
 
        // Is some data anonymized?
        if (getConfig('removeip_anon_ip')   == 'Y') $anonymity++;
index d0eb5c850fda45ae917b798c0bb0450b96e7b872..51d3510e97c238cb4cb390f9a323226289d4f159 100644 (file)
@@ -122,7 +122,7 @@ function handlSponsorRequest (&$postData, $update=false, $messageArray=array(),
                // Save sponsor?
                if ($SAVE === true) {
                        // Default is no force even when a guest want to abuse this force switch
-                       if ((empty($postData['force'])) || (!isAdmin())) $postData['force'] = 0;
+                       if ((empty($postData['force'])) || (!isAdmin())) $postData['force'] = '0';
 
                        // SQL and message string is empty by default
                        $sql = ''; $message = '';
index dd17a102a7a9406f41607c1dac1861d5b6d654da..d87130fee37f06366ae64891ac42f807c8aa36ea 100644 (file)
@@ -108,7 +108,7 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) {
        } elseif (!is_array($IDs)) {
                // No array
                return false;
-       } elseif (count($IDs) == 0) {
+       } elseif (count($IDs) == '0') {
                // Empty array
                return false;
        }
@@ -135,7 +135,7 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) {
        } elseif (!is_array($IDs)) {
                // No array
                return false;
-       } elseif (count($IDs) == 0) {
+       } elseif (count($IDs) == '0') {
                // Empty array
                return false;
        }
@@ -406,7 +406,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) {
        // Is limitation "no" and "limit" is > 0?
        if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] != 'Y') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) {
                // Set it to unlimited
-               $urlData[$action]['limit'] = 0;
+               $urlData[$action]['limit'] = '0';
        } // END - if
 
        // Construct function name
@@ -598,17 +598,17 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r
 
        // Is limit/reload set?
        if (!isset($config['limit'])) {
-               $content['limit']  = 0;
+               $content['limit']  = '0';
        } // END - if
        if (!isset($config['reload'])) {
-               $content['reload'] = 0;
+               $content['reload'] = '0';
        } // END - if
 
        // Insert the URL into database
        $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content);
 
        // Is this id valid?
-       if ($content['insert_id'] == 0) {
+       if ($content['insert_id'] == '0') {
                // INSERT did not insert any data!
                return false;
        } // END - if
@@ -635,7 +635,7 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
        $userid = bigintval($urlData['userid']);
 
        // Is the id set?
-       if (empty($userid)) $userid = 0;
+       if (empty($userid)) $userid = '0';
 
        // Just run the insert query for now
        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)",
@@ -684,7 +684,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
 // Notify the user about the performed action
 function SURFBAR_NOTIFY_USER ($messageType, $content) {
        // Skip notification if userid is zero
-       if ($content['userid'] == 0) {
+       if ($content['userid'] == '0') {
                return false;
        } // END - if
 
@@ -720,7 +720,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
 // Translates the limit
 function translateSurfbarLimit ($limit) {
        // Is this zero?
-       if ($limit == 0) {
+       if ($limit == '0') {
                // Unlimited!
                $return = getMessage('MEMBER_SURFBAR_UNLIMITED_VIEWS');
        } else {
@@ -841,7 +841,7 @@ INNER JOIN
 ON
        u.id=l.url_id
 WHERE
-       l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = 0)
+       l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = '0')
 LIMIT 1",
                array(getMemberId()), __FUNCTION__, __LINE__
        );
@@ -852,7 +852,7 @@ LIMIT 1",
        // Is it null?
        if (is_null($GLOBALS['surfbar_cache']['user_locks'])) {
                // Then fix it to zero!
-               $GLOBALS['surfbar_cache']['user_locks'] = 0;
+               $GLOBALS['surfbar_cache']['user_locks'] = '0';
        } // END - if
 
        // Free result
@@ -870,12 +870,12 @@ LIMIT 1",
 }
 
 // Get total amount of URLs of given status for current user or of ACTIVE URLs by default
-function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) {
+function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = '0') {
        // Determine depleted user account
        $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS();
 
        // If we dont get any user ids back, there are no URLs
-       if (count($UIDs['userid']) == 0) {
+       if (count($UIDs['userid']) == '0') {
                // No user ids found, no URLs!
                return 0;
        } // END - if
@@ -904,18 +904,18 @@ WHERE `userid` NOT IN (".implode(', ', $UIDs['userid']).") AND `status`='%s'",
 }
 
 // Check wether the user is allowed to book more URLs
-function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = 0) {
+function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = '0') {
        // Is this admin and userid is zero or does the user has some URLs left to book?
-       return ((($userid == 0) && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array("REJECTED")) < getConfig('surfbar_max_order')));
+       return ((($userid == '0') && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array("REJECTED")) < getConfig('surfbar_max_order')));
 }
 
 // Get total amount of URLs of given status for current user
-function SURFBAR_GET_TOTAL_USER_URLS ($userid = 0, $status = '',$exclude = '') {
+function SURFBAR_GET_TOTAL_USER_URLS ($userid = '0', $status = '',$exclude = '') {
        // Is the user 0 and user is logged in?
-       if (($userid == 0) && (isMember())) {
+       if (($userid == '0') && (isMember())) {
                // Then use this userid
                $userid = getMemberId();
-       } elseif ($userid == 0) {
+       } elseif ($userid == '0') {
                // Error!
                return (getConfig('surfbar_max_order') + 1);
        }
@@ -954,7 +954,7 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') {
        $length = getConfig('code_length');
 
        // Fix length to 10
-       if ($length == 0) $length = 10;
+       if ($length == '0') $length = 10;
 
        // Generate a code until the length matches
        $valCode = '';
@@ -1127,11 +1127,11 @@ function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) {
        );
 
        // Do we have a current user id?
-       if ((isMember()) && ($limit == 0)) {
+       if ((isMember()) && ($limit == '0')) {
                // Then add this as well
                $UIDs['userid'][getMemberId()]      = getMemberId();
                $UIDs['points'][getMemberId()]   = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
-               $UIDs['notified'][getMemberId()] = 0;
+               $UIDs['notified'][getMemberId()] = '0';
 
                // Get all userid except logged in one
                $result = SQL_QUERY_ESC("SELECT
@@ -1245,7 +1245,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array())
        $newStatus = strtolower($newStatus);
 
        // Get URL data for status comparison if missing
-       if ((!is_array($data)) || (count($data) == 0)) {
+       if ((!is_array($data)) || (count($data) == '0')) {
                // Fetch missing URL data
                $data = SURFBAR_GET_URL_DATA($urlId);
        } // END - if
@@ -1302,7 +1302,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array())
 // Calculate minimum value for dynamic payment model
 function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
        // Addon is zero by default
-       $addon = 0;
+       $addon = '0';
 
        // Percentage part
        $percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1));
@@ -1336,7 +1336,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
 // Calculate maximum value for dynamic payment model
 function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
        // Addon is zero by default
-       $addon = 0;
+       $addon = '0';
 
        // Maximum value
        $max = log(2);
@@ -1521,13 +1521,13 @@ function SURFBAR_RELOAD_TO_STOP_PAGE ($page="stop") {
 
 // Determine next id for surfbar or get data for given id, always call this before you call other
 // getters below this function!!!
-function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) {
+function SURFBAR_DETERMINE_NEXT_ID ($urlId = '0') {
        // Default is no id and no random number
-       $nextId = 0;
-       $randNum = 0;
+       $nextId = '0';
+       $randNum = '0';
 
        // Is the id set?
-       if ($urlId == 0) {
+       if ($urlId == '0') {
                // Get array with lock ids
                $USE = SURFBAR_GET_LOCK_IDS();
 
@@ -1607,7 +1607,7 @@ LIMIT 1",
                if ((!isset($GLOBALS['surfbar_cache']['last_surfed'])) || (is_null($GLOBALS['surfbar_cache']['last_surfed']))) {
                        // Fix it here
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', false);
-                       $GLOBALS['surfbar_cache']['last_surfed'] = 0;
+                       $GLOBALS['surfbar_cache']['last_surfed'] = '0';
                } // END - if
 
                // Get base/fixed reward and costs
index 9327c3056ea4bfffbc04c75ad344afef1e731fe5..08adc665b24d79c53a4d282c33992a0e47f80d82 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
@@ -580,7 +580,7 @@ function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) {
                                if (empty($TITLEs[$key])) $TITLEs[$key] = getMessage('ADMIN_TASK_UNKNOWN_LIST_TITLE');
                                $content['row_link'] = "<a href=\"{?URL?}/modules.php?module=admin&amp;what=".$WHATs[$key]."\" title=\"".$TITLEs[$key]."\">".$value."</a>";
                        } else {
-                               $content['row_link'] = 0;
+                               $content['row_link'] = '0';
                        }
 
                        // And insert the final string into extras template
index 9ab8d984f3853504d2f3973a7cd65c80a6d1caed..8e5383e71254c045d7b35c9404992f47e1d02c51 100644 (file)
@@ -223,7 +223,7 @@ LIMIT 1",
 // Selects a random user id as the new referal id if they have at least X confirmed mails in this run
 function determineRandomReferalId () {
        // Default is zero refid
-       $refid = 0;
+       $refid = '0';
 
        // Is the extension version fine?
        if (getExtensionVersion('user') >= '0.3.4') {
@@ -263,7 +263,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p
        // Init variables
        $dmy = '';
        $add = '';
-       $errorCode = 0;
+       $errorCode = '0';
 
        // Add last_login if available
        $lastOnline = '';
index 19f8a773f5bd22e92419d2a34e11c56bb56722ed..9ec49a7aa66f438ede9cd5f2402c32b3765bcf69 100644 (file)
@@ -67,7 +67,7 @@ function YOOMEDIA_TEST_CONFIG ($data) {
        $errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response);
 
        // Log the response if failed
-       if (count($response) == 0) {
+       if (count($response) == '0') {
                // Queries depleted (as we count here!)
                logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total'));
                $errorCode = -1;
@@ -84,11 +84,11 @@ function YOOMEDIA_TEST_CONFIG ($data) {
                $errorCode = -1;
        } else {
                // This is fine, because the result array is okay and the response code on element 8 is fine
-               $errorCode = 0;
+               $errorCode = '0';
        }
 
        // Do we have some data there?
-       return ($errorCode == 0);
+       return ($errorCode == '0');
 }
 
 // Queries the given Yoo!Media API 2.0 script
@@ -179,7 +179,7 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) {
        $dataArray = explode('|', $responseLine);
 
        // Now make the result array with two dimensions
-       $cnt = 0; $entry = 0;
+       $cnt = '0'; $entry = '0';
        foreach ($dataArray as $line) {
                // Add the line
                $result[$entry][yoomediaTranslateIndex($type, $cnt)] = $line;
@@ -188,7 +188,7 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) {
                if ($cnt == 6) {
                        // Then advance to next entry and reset counter
                        $entry++;
-                       $cnt = 0;
+                       $cnt = '0';
                } else {
                        // Count up
                        $cnt++;
@@ -247,7 +247,7 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) {
        }
 
        // Add dummy receiver to avoid notice
-       $data['receiver'] = 0;
+       $data['receiver'] = '0';
 
        // HTML or normal? (normal is default...)
        $type = 't';
index 75d4b46c5cdca4b5a91f6aef6362333ba7e14eee..6279fd213d9608a3dfe3fecff272aefb80264248 100644 (file)
@@ -47,12 +47,12 @@ if (!defined('__SECURITY')) {
 if (getOutputMode() != 0) return;
 
 // Initialize variables
-$jackpot = 0; $user = 0;
+$jackpot = '0'; $user = '0';
 if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
 
 // Get total points of the doubler itself
 $DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT();
-if ($DOUBLER_POINTS == 0) {
+if ($DOUBLER_POINTS == '0') {
        // Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...)
        return;
 } // END - if
@@ -61,7 +61,7 @@ if ($DOUBLER_POINTS == 0) {
 unsetGetRequestElement('DOUBLER_UID');
 unsetPostRequestElement('DOUBLER_UID');
 setSession('DOUBLER_UID', '');
-if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = 0;
+if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = '0';
 
 // Check for doubles which we can pay out
 $result_total = SQL_QUERY_ESC("SELECT d.id, d.userid, d.points, d.remote_ip, d.timemark
@@ -103,7 +103,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
                        $ref = countSumTotalData($content['userid'], 'doubler', 'points', 'refid', false, " AND `completed`='N' AND `is_ref`='Y'");
 
                        // Zero refid when empty (might be helpful!)
-                       if (empty($ref)) $ref = 0;
+                       if (empty($ref)) $ref = '0';
 
                        if (($ref > 0) && ($GLOBALS['doubler_userid'] == $content['userid']) && (!empty($ref))) {
                                // Referal points found so add them and set line(s) to completed='Y'
@@ -112,7 +112,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
                                        array(bigintval($content['userid'])), __FILE__, __LINE__);
                        } else {
                                // No referal points found
-                               $ref = 0;
+                               $ref = '0';
                        }
 
                        // Exclude webmaster from doubling...
index 426440e50d6ffc9673a842aee76af5068e03d0d6..ec8bb508a9fc06ac504afe8ff66d432da8142ecf 100644 (file)
@@ -51,7 +51,7 @@ function addAdminAccount ($user, $md5, $email) {
                array($user), __FUNCTION__, __LINE__);
 
        // Is the entry there?
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Ok, let's create the admin login
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins` (`login`, `password`, `email`) VALUES ('%s', '%s', '%s')",
                        array(
@@ -537,7 +537,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
@@ -708,7 +708,7 @@ function generateUserProfileLink ($userid, $title = '', $what = 'list_user') {
                $title = $userid;
        } // END - if
 
-       if (($title == 0) && ($what == 'list_refs')) {
+       if (($title == '0') && ($what == 'list_refs')) {
                // Return title again
                return $title;
        } elseif (isExtensionActive('nickname')) {
@@ -759,7 +759,7 @@ function adminGetMenuMode () {
 
 // Change activation status
 function adminChangeActivationStatus ($IDs, $table, $row, $idRow = 'id') {
-       $cnt = 0; $newStatus = 'Y';
+       $cnt = '0'; $newStatus = 'Y';
        if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" all through and count them
                foreach ($IDs as $id => $selected) {
@@ -1037,7 +1037,7 @@ function adminEditEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctio
                // Shall we change here or list for editing?
                if ($editNow === true) {
                        // Change them all
-                       $affected = 0;
+                       $affected = '0';
                        foreach ($IDs as $id => $sel) {
                                // Prepare content array (new values)
                                $content = array();
@@ -1174,7 +1174,7 @@ function sendAdminPasswordResetLink ($email) {
                array($email), __FUNCTION__, __LINE__);
 
        // Is there an account?
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // No account found!
                return getMessage('ADMIN_NO_LOGIN_WITH_EMAIL');
        } // END - if
index 278c2b0e7a24c9778631e117388c2920363aab5e..31b89cb81e89c73add8eb227eb6b3d4135d30126 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__);
@@ -176,7 +176,7 @@ LIMIT 1",
                                        } else {
                                                // Invalid userid, so log and zero it
                                                logDebugMessage(__FUNCTION__, __LINE__, 'Invalid userid=' . $userid . ' -> not found!');
-                                               $userid = 0;
+                                               $userid = '0';
                                        }
                                } // END - if
 
@@ -279,7 +279,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),
index 555b6ca7f7b4f77dfe6bdbd518f28a60b6810aa4..12afe8b0c8aea753811532ce908886af6fb5d574 100644 (file)
@@ -53,7 +53,7 @@ if (isFormSent()) {
        $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1",
                array($START, $START, $START, $END), __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Ok, start and end time did not overlap
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
 VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
index ed24beee93548c3e32ab912799c8ba52ef6df668..cf97dffe96d73f7041fb640dd5287ef580748fdf 100644 (file)
@@ -52,7 +52,7 @@ if (isGetRequestElementSet('sub')) {
 } // END - if
 
 // Get count of (maybe) selected menu points
-$chk = 0;
+$chk = '0';
 if (isPostRequestElementSet('sel')) $chk = countPostSelection();
 
 // List all menu points and make them editable
@@ -61,7 +61,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        // @TODO Kill all constants in this file
        $content['sub'] = $SUB;
        $content['chk'] = $chk;
-       $cnt = 0; $SW = 2;
+       $cnt = '0'; $SW = 2;
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -112,7 +112,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        $content['chk'] = $chk;
 
        // Del menu entries with or without confirmation
-       $SW = 2; $cnt = 0; $OUT = '';
+       $SW = 2; $cnt = '0'; $OUT = '';
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -240,7 +240,7 @@ WHERE ".$AND." AND id=%s LIMIT 1",
                $content['sub'] = $SUB;
 
                // Init variables
-               $OUT = ''; $SW  = 2; $cnt = 0;
+               $OUT = ''; $SW  = 2; $cnt = '0';
 
                // Process all entries
                while ($data = SQL_FETCHARRAY($result)) {
@@ -249,7 +249,7 @@ WHERE ".$AND." AND id=%s LIMIT 1",
 
                        // Init navigation variable
                        $data['navi'] = '';
-                       if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) {
+                       if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
                                // Is highest position
                                $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&amp;what=adminedit&amp;sub=".$content['sub']."&amp;act=".$data['action']."&amp;w=".$data['what']."&amp;tid=".($data['sort']+1)."&amp;fid=".$data['sort']."\">{--LOWER--}</a>";
                        } elseif ($cnt == $max) {
index 9e582cac8ee340129112f5a1088f871504bcd5fe..c949b03161714f08e2abf121410f9968e1a2f313 100644 (file)
@@ -55,12 +55,12 @@ if (isPostRequestElementSet('edit')) {
                        // First of all load data from DB
                        $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC",
                                array($template), __FILE__, __LINE__);
-                       $OUT = ''; $adminId2 = 0;
+                       $OUT = ''; $adminId2 = '0';
                        while ($content = SQL_FETCHARRAY($result)) {
                                // @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 5d36456f403c3d47398ea4a334e9365e2ede0b1a..46da2c11fc6c29a3900263d501ffeb5f0c939efa 100644 (file)
@@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-$SEL = 0;
+$SEL = '0';
 if (isPostRequestElementSet('sel')) $SEL = countPostSelection();
 
 if ((isPostRequestElementSet('edit')) && ($SEL > 0)) {
@@ -176,7 +176,7 @@ if ((isPostRequestElementSet('edit')) && ($SEL > 0)) {
                        // Main or sub menu selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1",
                                array(bigintval(postRequestElement('admin_id')), postRequestElement('action_menu'), postRequestElement('what_menu')), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 0) {
+                       if (SQL_NUMROWS($result) == '0') {
                                // Finally add the new ACL
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode)
 VALUES ('%s','%s','%s','%s')",
index 3360eeb3d0adc2da68d3989f3555c6852a15d89b..04102a6ad08d650700e5aa531650e3d6427bd1cf 100644 (file)
@@ -93,7 +93,7 @@ if (isFormSent()) {
 
        // Generate list
        $OUT = "<ol start=\"2\">\n";
-       $cnt = 0;
+       $cnt = '0';
        foreach ($RANKS as $k => $rate) {
                if (!empty($rate))      {
                        // Print only when something is in
index 7be072178694a89c42b1b827332c90ad064c9798..bdbb540774a59947803ce536e28d22a6e10fe246 100644 (file)
@@ -52,7 +52,7 @@ if (isPostRequestElementSet('add')) {
        // Add a new category
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE cat='%s' LIMIT 1",
        array(postRequestElement('catname')), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Category does not exists, we simply add it...
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')",
                array(postRequestElement('catname'), postRequestElement('visible'), bigintval(postRequestElement('parent') + 1)), __FILE__, __LINE__);
index 9d84ac91df1ff7983c76c8a9d982b08cb0bff140..a03200ca1070a3af528107bad891470c8aef20e5 100644 (file)
@@ -51,7 +51,7 @@ if (isPostRequestElementSet(('add_max'))) {
        // Save all settings
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1",
        array(bigintval(postRequestElement('max'))), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Add this value (including comment)
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')",
                array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__);
index d6ea507d027378b9d7b2a2d41597f7582f5d7a85..f490afd9d42039f2055e70060dd33330cc68373a 100644 (file)
@@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-$SEL = 0;
+$SEL = '0';
 if (isPostRequestElementSet('edit')) {
        // Check if at least one module is selected
        $SEL = countPostSelection();
@@ -119,7 +119,7 @@ if (isPostRequestElementSet('edit')) {
        loadTemplate('admin_settings_saved', false, getMessage('MODS_CHANGED'));
 }
 
-if ($SEL == 0) {
+if ($SEL == '0') {
        // Load module data (We do not need to check if there's at least one...)
        $result = SQL_QUERY('SELECT id, module, locked, hidden, admin_only, title, mem_only
 FROM `{?_MYSQL_PREFIX?}_mod_reg`
index 54226ccbc5fdc82e3feec1a2206417243ddd2e4e..c17d617305e8e647a504ec3ec3b6456bfab920be 100644 (file)
@@ -102,7 +102,7 @@ if (isFormSent()) {
                $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
        } // END - foreach
 
-       for ($i = 0; $i <= 5; $i++) {
+       for ($i = '0'; $i <= 5; $i++) {
                $content['comma_def_' . $i] = '';
        } // END - for
 
index 328a4444f06e6112096a06c066ab4f1e29a237ab..bf11b764a2d586e389f2fcdd4e842a9e607210c0 100644 (file)
@@ -50,7 +50,7 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('title')) && (p
        // Add new payout type
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1",
        array(postRequestElement('title')), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Add now
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_payout_types`
 (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
index c43f40a6e613bbbcc70495de1430d0485986893b..6da283298145378a4ef3978089819e20b09b11c0 100644 (file)
@@ -120,11 +120,11 @@ if (isFormSent()) {
                                array('allow_direct_pay', 'reg_points_mode', 'ref_payout'),
                                array(postRequestElement('allow_direct_pay'), postRequestElement('reg_points_mode'), $REF)
                        );
-                       if ((getConfig('ref_payout') == 0) && (postRequestElement('ref_payout') > 0)) {
+                       if ((getConfig('ref_payout') == '0') && (postRequestElement('ref_payout') > 0)) {
                                // Update account's ref_payout for "must-confirm"
                                addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`)
 WHERE `mails_confirmed` < %s", $REF, $REF));
-                       } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == 0)) {
+                       } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == '0')) {
                                // Update account's ref_payout for "not-must-confirm"
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0");
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0");
index 63030d31811b9510976cf93098aec98ad6261917..3245fb300025a35d0ed0ac50e286fc796f6c1460 100644 (file)
@@ -52,7 +52,7 @@ if (isGetRequestElementSet('rallye')) {
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
                        array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__);
 
-                       if (SQL_NUMROWS($result) == 0) {
+                       if (SQL_NUMROWS($result) == '0') {
                                // Ok, new price level entered!
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_prices` (rallye_id, price_level, points, info)
 VALUES ('%s','%s','%s','%s')",
index d7156d0fc8f62da26093949cfa564b573a10a1cd..47623c479ef9f5158ec28df3ccabcc89edaa7fa1 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 b9ea6197245983b3ee100f584915dc5a3e3803c0..cc02c640da831c547006471e97d1036fc04b9424 100644 (file)
@@ -61,7 +61,7 @@ if (isFormSent()) {
        }
 } else {
        // Erotic selection
-       for ($idx = 0; $idx <= 2; $idx++) {
+       for ($idx = '0'; $idx <= 2; $idx++) {
                $content['yoomedia_erotic_allowed_' . $idx] = '';
        } // END - for
 
index b09c9bbcfee3fdb57dc82191b7a035d097fd6477..3ce87e6a67716f1b235bd71c243f04f8704cc11f 100644 (file)
@@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Init counter for deleted mails
-$cnt = 0;
+$cnt = '0';
 
 if (isGetRequestElementSet('mid')) {
        // Load email data
@@ -107,7 +107,7 @@ LIMIT 1",
                                        // Shall we payback to user or jackpot?
                                        if (getConfig('repay_deleted_mails') == 'JACKPOT') {
                                                // Set jackpot
-                                               $sender = 0;
+                                               $sender = '0';
                                        } // END - if
 
                                        // Pay back points
@@ -179,7 +179,7 @@ LIMIT 1",
                reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $sent);
 
                // Init counter for deleted mails
-               $cnt = 0;
+               $cnt = '0';
 
                // Delete bonus mail entirely from database
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
@@ -216,7 +216,7 @@ LIMIT 1",
                list ($id, $subject, $url, $timestamp) = SQL_FETCHROW($result);
 
                // Init counter for deleted mails
-               $cnt = 0;
+               $cnt = '0';
 
                // Delete bonus mail entirely from database
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
index d46a98c78744b257026d50c2617e789d2e92d2d8..a61324a4f528d0dfc6f6262dfe7dd81e7fb78a74 100644 (file)
@@ -45,13 +45,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Check for selected holidays
-$SUM = 0;
+$SUM = '0';
 if (isPostRequestElementSet('sel')) $SUM = countPostSelection();
 
 // Shall I delete selected holidays???
 if ($SUM > 0) {
        // Delete multiple holiday requests (for list_holiday)
-       $cnt = 0;
+       $cnt = '0';
        foreach (postRequestElement('sel') as $id => $sel) {
                // Get the userid
                $result = SQL_QUERY_ESC("SELECT
index 33279661be13860b8bfee0388e821339adb5b6da..7a6c1d6a8543f908fe1412f9e69caa44a7c10028 100644 (file)
@@ -66,7 +66,7 @@ if (isPostRequestElementSet('del')) {
 
 // We only need outgoing transfers
 $result = SQL_QUERY("SELECT userid, to_userid, trans_id, points, reason, time_trans FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__);
-$total = 0;
+$total = '0';
 if (SQL_NUMROWS($result) > 0) {
        // Output rows
        $OUT = ''; $SW = 2;
index 4da39063aec863cef87bbd74c33d1eae9eef1d51..dd35fd9979ac405f937cf5c2e1e15cfc7684c5c0 100644 (file)
@@ -127,7 +127,7 @@ $result_list = SQL_QUERY($sql, __FILE__, __LINE__);
 if ((!empty($SQL2)) && ($WHO == getMessage('_ALL'))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
 
 // Calculate pages
-$PAGES = 0;
+$PAGES = '0';
 if (isConfigEntrySet('mails_page')) {
        $PAGES = round(SQL_NUMROWS($result_normal) / getConfig('mails_page') + 0.3);
 } // END - if
@@ -155,7 +155,7 @@ if (SQL_NUMROWS($result_list) > 0) {
                        $pool['unconfirmed'] = "<strong><a href=\"{?URL?}/modules.php?module=admin&amp;what=list_unconfirmed&amp;mid=".$pool['id']."\">".$pool['unconfirmed']."</a></strong>";
                } elseif ($pool['unconfirmed'] < 0) {
                        // Sometimes rarely displayed minus values will be "fixed" to zero
-                       $pool['unconfirmed'] = 0;
+                       $pool['unconfirmed'] = '0';
                }
 
                // Prepare content
index 33e4de8f72a1a7f3192f619ebd06ed1bd2961c81..88811b38b0c92c8625b64c2e1bb32385d4a08f98 100644 (file)
@@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__);
 
 // Normally we want the overview of all registered extensions
 $do = 'overview';
-$SEL = 0;
+$SEL = '0';
 
 // Are some extensions submitted?
 if (isPostRequestElementSet('sel')) {
@@ -79,7 +79,7 @@ if (isGetRequestElementSet('reg_ext')) {
        // Change settings like CSS file load
        if (isPostRequestElementSet(('modify'))) {
                // Change entries
-               $cache_update = 0;
+               $cache_update = '0';
                foreach (postRequestElement('sel') as $ext_id => $sel) {
                        // Secure id
                        $ext_id = bigintval($ext_id);
@@ -215,7 +215,7 @@ if (isGetRequestElementSet('reg_ext')) {
        $do = 'delete';
 } elseif ((isPostRequestElementSet('remove')) && ($SEL > 0) && (!isDemoModeActive())) {
        // Remove extensions from DB (you have to delete all files manually!)
-       $cache_update = 0;
+       $cache_update = '0';
        foreach (postRequestElement('sel') as $ext_id => $active) {
                // Secure id number
                $ext_id = bigintval($ext_id);
@@ -313,7 +313,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__);
                        SQL_FREERESULT($result);
 
                        // Disable cache update by default
-                       $cache_update = 0;
+                       $cache_update = '0';
                        if (!empty($subj)) {
                                // Extract extension's name from subject...
                                $ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1));
@@ -326,7 +326,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__);
                                        // ... so we can finally register and load it in registration mode
                                        if (registerExtension($ext_name, $ext_id)) {
                                                // Errors?
-                                               if (getTotalFatalErrors() == 0) {
+                                               if (getTotalFatalErrors() == '0') {
                                                        // Extension was found and successfully registered
                                                        loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_REGISTERED'), $ext_name));
 
@@ -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 9fc694c62ebcb880e9a29fb3956dc1bf8a2cdc2e..566696a9d7637fbe96310d8d137159e8ec716198 100644 (file)
@@ -53,7 +53,7 @@ if (isGetRequestElementSet('sub')) {
 } // END - if
 
 // Get count of (maybe) selected menu points
-$chk = 0;
+$chk = '0';
 if (isPostRequestElementSet('sel')) $chk = countPostSelection();
 
 // List all menu points and make them editable
@@ -62,7 +62,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        $content['sub'] = $SUB;
        $content['chk'] = $chk;
 
-       $cnt = 0; $OUT = ''; $SW = 2;
+       $cnt = '0'; $OUT = ''; $SW = 2;
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -109,7 +109,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        $content['sub'] = $SUB;
        $content['chk'] = $chk;
 
-       $cnt = 0;
+       $cnt = '0';
        $OUT = '';
        $SW  = 2;
 
@@ -192,7 +192,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        $content['chk'] = $chk;
 
        // Load template
-       $SW = 2; $cnt = 0; $OUT = '';
+       $SW = 2; $cnt = '0'; $OUT = '';
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -282,13 +282,13 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
 
                // Init variables
                $SW = 2;
-               $cnt = 0;
+               $cnt = '0';
                $OUT = '';
 
                // Process all menu entries
                while ($data = SQL_FETCHARRAY($result)) {
                        $cnt++;
-                       if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) {
+                       if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
                                // Is highest position
                                $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&amp;what=guestedit&amp;sub=".$content['sub']."&amp;act=".$data['action']."&amp;w=".$data['what']."&amp;tid=".($data['sort']+1)."&amp;fid=".$data['sort']."\">{--LOWER--}</a>";
                        } elseif ($cnt == $max) {
index f665ea2209063ff8f8077d26f2d0b82c92f1118b..051cb49c62e3653f19686f972adb15e6ae746f1c 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
@@ -71,7 +71,7 @@ ORDER BY beg_points DESC, last_online DESC, userid",
 
        if (SQL_NUMROWS($result) > 0) {
                // List users
-               $OUT = '';$SW = 2; $cnt = 1; $total = 0;
+               $OUT = '';$SW = 2; $cnt = 1; $total = '0';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Init variables
                        $WIN1 = ''; $WIN2 = '';
index 030dc4f70485f33a8dcb0ae21a5256719f597ebe..318b75fb216eba7b19abc1c561b6201ec561c81f 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
@@ -85,7 +85,7 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
 
        if (SQL_NUMROWS($result) > 0) {
                // List users
-               $OUT = '';$SW = 2; $cnt = 1; $total = 0;
+               $OUT = '';$SW = 2; $cnt = 1; $total = '0';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Add total points
                        $total += $content['points'];
index 86ba650fe5b4d8b8f3f50d44057df9448d4f968d..8901ee49a5af86f2ac50a656304c19bcf1381198 100644 (file)
@@ -49,7 +49,7 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && (
        // Check if country code does already exist
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE code='%s' LIMIT 1",
        array(strtoupper(postRequestElement('code'))), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Save entry
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')",
                array(
index a6c531fb7c799aa0f4abec03a1ee07bc564b3d27..c5144c70cc3b6c36931891de1142c14b48371521 100644 (file)
@@ -63,11 +63,11 @@ 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
-               $sumAlready = 0; $sumWaiting = 0;
+               $sumAlready = '0'; $sumWaiting = '0';
 
                // Number of direct already payouts and referal
                $cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='N'");
index ff1e5c65208cd234bd6141c59cca89dbbc4140fb..da6b7c323cae77df64695a4f8bb9e55e5d493f1a 100644 (file)
@@ -58,8 +58,8 @@ if (isGetRequestElementSet(('pid'))) {
                array(bigintval($userid)), __FILE__, __LINE__);
                list($task) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
-               if (empty($task)) $task = 0;
-       } elseif ((empty($userid)) || ($userid == 0)) {
+               if (empty($task)) $task = '0';
+       } elseif ((empty($userid)) || ($userid == '0')) {
                // Cannot obtain member id!
                loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID'));
        } else {
@@ -203,7 +203,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'));
        }
index baf0e3bfaa0fa8a7773c45170502240814bedab5..52bdf868cf619aa80e4b5497424a1a1009a2d71e 100644 (file)
@@ -348,7 +348,7 @@ ORDER BY
                                        // Rallye is active so do not edit it!
                                        $row['select'] = "<div class=\"big\">".$row['id']."</div>";
                                        $row['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
-                                       $row['active'] = 0;
+                                       $row['active'] = '0';
                                        break;
 
                                case 'N':
@@ -361,7 +361,7 @@ ORDER BY
                        switch ($data['send_notify']) {
                                case 'Y':
                                        $row['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
-                                       $row['notify'] = 0;
+                                       $row['notify'] = '0';
                                        break;
 
                                case 'N':
@@ -374,7 +374,7 @@ ORDER BY
                        switch ($data['auto_add_new_user']) {
                                case 'Y':
                                        $row['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
-                                       $row['auto'] = 0;
+                                       $row['auto'] = '0';
                                        break;
 
                                case 'N':
index b03b0d4a51108ee522b5f436abc704de0386a547..9e4b676bb95c2a30a52768f20e513776ce3cda5e 100644 (file)
@@ -66,7 +66,7 @@ WHERE `id`='%s' LIMIT 1",
                array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
                list($orders) = SQL_FETCHROW($result_orders);
                SQL_FREERESULT($result_orders);
-               if (empty($orders)) $orders = 0;
+               if (empty($orders)) $orders = '0';
 
                // Prepare all data for the template
                //  Sponsor's id
index 4755b603af4b0d97f8eb349e4205cabb471d8c72..149175e48d4429728c00e41e1617ecfbb3dfa453 100644 (file)
@@ -49,11 +49,11 @@ $message = '';
 if (isPostRequestElementSet('add')) {
        // Check input variables
        if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add');
-       if ((round(postRequestElement('pay_rate')) == 0) || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add');
+       if ((round(postRequestElement('pay_rate')) == '0') || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add');
 
        setRequestPostElement('pay_min_count', bigintval(postRequestElement('pay_min_count')));
 
-       if ((postRequestElement('pay_min_count') == 0) || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add');
+       if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add');
        if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add');
 
 } elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) {
@@ -114,7 +114,7 @@ if (isPostRequestElementSet('add')) {
        // Check if entry with same name does exists
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1",
                array(postRequestElement('pay_name')), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // No entry found so add this line
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
                        array(
index 3f739df7892e7af2241facb6c686539d91423073..126733012e08a758d00f22e82c68878be96bbbdd 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 $show = true;
 
 // Check for 'id' element
-if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array(postRequestElement('id'))) || (count(postRequestElement('id')) == 0))) {
+if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array(postRequestElement('id'))) || (count(postRequestElement('id')) == '0'))) {
        // Not found so output message
        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
 
index 3b0a16f0abeb6566c7439f93832137d65a62c6f4..b0d7f96980f0931c4fef8535cfbde2a26607052d 100644 (file)
@@ -84,7 +84,7 @@ switch (getRequestElement('type')) {
 }
 
 if (!empty($whereStatement)) {
-       $SEL = 0;
+       $SEL = '0';
        if (isPostRequestElementSet(('task'))) $SEL = countSelection(postRequestElement('task'));
 
        if ((isPostRequestElementSet(('assign'))) && ($SEL > 0)) {
index 082726877441afa82960a556dcd6dad90f07d4a2..bb42974a020a0bbe4da7942657d0925c21d9fb09 100644 (file)
@@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__);
 
 // We only need outgoing transfers
 $result = SQL_QUERY("SELECT userid, to_userid, trans_id, points, reason, time_trans FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__);
-$total = 0;
+$total = '0';
 if (SQL_NUMROWS($result) > 0) {
        // Output rows
        $OUT = ''; $SW = 2;
index 9ba81b4235e524ec3d49cbb08049c4afaf93a84f..57cb5aea2da6787f3789f65d1d2805aee93a748d 100644 (file)
@@ -101,7 +101,7 @@ if ($listed === true) {
 
                // Transfer data to constants for the template
                if (($stats_id > 0) && ($ID == '-1')) $ID = $stats_id;
-               if ($col == 'bonus_id') $sender = 0;
+               if ($col == 'bonus_id') $sender = '0';
 
                // Load unconfirmed mail links. Hmmm, this select query is pretty cool
                // but it does only show unconfirmed mail links from existing user
index 53bfce2af9f2f6f2795b85565f41f82a872125cb..0722b871e4affee3a8b048e2f5332912eeb5cd99 100644 (file)
@@ -172,7 +172,7 @@ LIMIT 1",
                } // END - if
 
                // Clickrate
-               $content['click_rate'] = 0;
+               $content['click_rate'] = '0';
                if ($content['emails_received'] > 0) {
                        $content['click_rate'] = translateComma($content['mails_confirmed'] / $content['emails_received'] * 100);
                } // END - if
@@ -185,7 +185,7 @@ LIMIT 1",
                if (isExtensionActive('country')) {
                        // Then overwrite country information
                        $content['country'] = generateCountryInfo($content['country_code']);
-               } elseif ($content['country'] == 0) {
+               } elseif ($content['country'] == '0') {
                        // Zero id???
                        $content['country'] = '???';
                }
@@ -247,7 +247,7 @@ LIMIT 1",
        $result_master = SQL_QUERY($sql, __FILE__, __LINE__);
 
        // Calculate page count (0.5 fixes a bug with page count)
-       if (getConfig('user_limit') == 0) {
+       if (getConfig('user_limit') == '0') {
                setConfigEntry('user_limit', 100);
                loadTemplate('admin_settings_saved', false, getMessage('EXTENSION_WARNING_USER_LIMIT'));
        } // END - if
@@ -312,7 +312,7 @@ LIMIT 1",
                        $pointsTotal = countSumTotalData($content['userid'], 'user_points', 'points')  - countSumTotalData($content['userid'], 'user_data', 'used_points');
 
                        // Clickrate
-                       $clickRate = 0;
+                       $clickRate = '0';
                        if ($content['emails_received'] > 0) {
                                $clickRate = $content['mails_confirmed'] / $content['emails_received'] * 100;
                        } // END - if
index 52a639819437be50b8e0009b813adeebcecaa49d..e5486dc9c8caa4a856bd9c74fecc1519df5edd00 100644 (file)
@@ -68,7 +68,7 @@ if (isFormSent()) {
 }
 
 // Enougth queries left?
-if (getConfig('yoomedia_requests_remain') == 0) {
+if (getConfig('yoomedia_requests_remain') == '0') {
        // Output message
        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_REQUESTS_DEPLETED'));
 
@@ -80,7 +80,7 @@ if (getConfig('yoomedia_requests_remain') == 0) {
 $result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS();
 
 // Sanity-check on result array
-if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
+if ((!is_array($result)) || (count($result) == '0') || (!isset($result[0]['id']))) {
        // Invalid result
        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT'));
        return false;
@@ -107,7 +107,7 @@ foreach ($result as $entry) {
        // Is this mail already sent?
        if ($reload !== false) {
                // Init countdown
-               $countdown = 0;
+               $countdown = '0';
 
                // Not manually locked?
                if ($reload > 0) {
index a959727f2b3f28cee6902200579bb7e29ba906c6..4bdeedc178eaf1299d408d18d07641d747a5d0d9 100644 (file)
@@ -53,7 +53,7 @@ if (isGetRequestElementSet('sub')) {
 } // END - if
 
 // Get count of (maybe) selected menu points
-$chk = 0;
+$chk = '0';
 if (isPostRequestElementSet('sel')) $chk = countPostSelection();
 
 // List all menu points and make them editable
@@ -61,7 +61,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        // Edit menu entries
        $content['sub'] = $SUB;
        $content['chk'] = $chk;
-       $SW = 2; $cnt = 0; $OUT = '';
+       $SW = 2; $cnt = '0'; $OUT = '';
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -104,7 +104,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        // Del menu entries with or without confirmation
        $content['sub'] = $SUB;
        $content['chk'] = $chk;
-       $SW = 2; $cnt = 0; $OUT = '';
+       $SW = 2; $cnt = '0'; $OUT = '';
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -143,7 +143,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
        // Change status (visible / locked)
        $content['sub'] = $SUB;
        $content['chk'] = $chk;
-       $SW = 2; $cnt = 0; $OUT = '';
+       $SW = 2; $cnt = '0'; $OUT = '';
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -260,12 +260,12 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) {
                // Set sub value
                $content['sub'] = $SUB;
 
-               $SW = 2; $cnt = 0; $OUT = '';
+               $SW = 2; $cnt = '0'; $OUT = '';
                while ($data = SQL_FETCHARRAY($result)) {
                        // Init navigation
                        $data['navi'] = '';
                        $cnt++;
-                       if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) {
+                       if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
                                // Is highest position
                                $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&amp;what=memedit&amp;sub=".$content['sub']."&amp;act=".$data['action']."&amp;w=".$data['what']."&amp;tid=".($data['sort']+1)."&amp;fid=".$data['sort']."\">{--LOWER--}</a>";
                        } elseif ($cnt == $max) {
index 622a148e8969431ddbf9ff6ea39e08ec2060534f..d462c8a021ca97f75eb352e88c3041100c3b6630 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 $DATA = repairOptimizeDatabase();
 
 // Output rows
-$SW = 2; $gain_tabs = 0; $OUT = '';
+$SW = 2; $gain_tabs = '0'; $OUT = '';
 foreach ($DATA['tables'] as $row_array) {
        // Init variables
        $B1 = ''; $B2 = '';
@@ -65,7 +65,7 @@ foreach ($DATA['tables'] as $row_array) {
                $OPT = getMessage('OPTIMIZE_STATUS_OPTIMIZED');
                $B1 = '<strong>'; $B2 = '<strong>';
                $gain_tabs++;
-       } elseif (count(explode(' ', $row_array[2])) == 0) {
+       } elseif (count(explode(' ', $row_array[2])) == '0') {
                $OPT = getMessage('OPTIMIZE_STATUS_' . strtoupper($row_array[2]).'');
        }
 
index 99c2d4e6eb468f3da2555930c851050cfe4a5f5e..a157c80fd4bc1232abb7992a50a43261a81cd376 100644 (file)
@@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Init variable
-$SEL = 0;
+$SEL = '0';
 
 // Some sanity-check
 if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet(('alternate')))) {
@@ -64,7 +64,7 @@ if (isFormSent()) {
                        // Check if banner is already added
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1",
                        array(postRequestElement('url')), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 0) {
+                       if (SQL_NUMROWS($result) == '0') {
                                // Add banner
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible)
 VALUES ('%s','%s','%s')",
index 267d0e02121bdfa9e65d221b4f563f883c4ae06a..b242ae8bea7413e223e680b580cb52d72dfb6148 100644 (file)
@@ -48,7 +48,7 @@ $ACTIONS = array();
 
 // First fix all main menus (what = '')...
 $result_fix = SQL_QUERY("SELECT id, action FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = 0; $REP = 0;
+$cnt = '0'; $REP = '0';
 while ($content = SQL_FETCHARRAY($result_fix)) {
        // Store act value for later usage in sorting sub menus
        $ACTIONS[] = $content['action'];
index 84dc4dda2d11ba003c18400eeae37699a1746b9d..cb801e35cad70dc4a188ff2110378c775411cc34 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 $result = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` GROUP BY `userid` ORDER BY `userid` ASC", __FILE__, __LINE__);
 if (SQL_NUMROWS($result) > 0) {
         // Nothing is removed for now... ;-)
-       $REMOVED = 0;
+       $REMOVED = '0';
 
        // Check if found userid is also found in user_data table
        while ($content = SQL_FETCHARRAY($result)) {
index 2d284b37d5ca7bcbff3706161bd09bcd3f7e2ecc..fc1b8ff66877de140c865a8dd524a02659e58200 100644 (file)
@@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__);
 $ACTIONS = array();
 // First fix all main menus (what = '')...
 $result_fix = SQL_QUERY("SELECT id, action FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = 0; $REP = 0;
+$cnt = '0'; $REP = '0';
 while ($content = SQL_FETCHARRAY($result_fix)) {
        // Store act value for later usage in sorting sub menus
        $ACTIONS[] = $content['action'];
index 142ddc1ce8c25ad3769649b8a6087114ebd59f0b..7479e27201c6ebb1ad055a002feb9d46f46efead 100644 (file)
@@ -48,7 +48,7 @@ $ACTIONS = array();
 
 // First fix all main menus (what = '')...
 $result_fix = SQL_QUERY("SELECT id, action FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = 0; $REP = 0;
+$cnt = '0'; $REP = '0';
 while ($content = SQL_FETCHARRAY($result_fix)) {
        // Store action value for later usage in sorting sub menus
        $ACTIONS[] = $content['action'];
index fee9d1c894175d22a21bec26d82785202168e573..9320726982ff15644a13dad1b25b54bfedf95afc 100644 (file)
@@ -56,7 +56,7 @@ ORDER BY `userid` ASC",
        // Entries found?
        if (SQL_NUMROWS($result) > 0) {
                // Get all rows
-               $OUT = ''; $SW = 2; $cnt = 0; $visits = 0;
+               $OUT = ''; $SW = 2; $cnt = '0'; $visits = '0';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Count totals
                        $visits += $content['total_visits'];
@@ -100,7 +100,7 @@ ORDER BY
        // Entries found?
        if (SQL_NUMROWS($result) > 0) {
                // Get all rows
-               $OUT = ''; $SW = 2; $urls = 0; $visits = 0;
+               $OUT = ''; $SW = 2; $urls = '0'; $visits = '0';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Count totals
                        $urls   += $content['visited_urls'];
index 1a0390d4c545dcea058689e24e6552e5d7947777..082e8fdc1835ae8d0f04cf87fee594764453c71a 100644 (file)
@@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__);
 
 // Normally we want the overview of all registered theme_check
 $mode = 'overview';
-$SEL = 0;
+$SEL = '0';
 
 // Get response from our server
 $response = sendGetRequest('check-themes.php');
@@ -117,7 +117,7 @@ if (($response[count($response) - 1] == "[EOF]") && ($response[0] != "[EOF]")) {
                array_pk_sort($themes, array('cver', 'fname'), 0, 1);
 
                // Extensions where found which are not downloaded and installed
-               $OUT = ''; $SW = 2; $totalSize = 0;
+               $OUT = ''; $SW = 2; $totalSize = '0';
                foreach ($themes['fname'] as $idx => $name) {
                        // Prepare data
                        $content = array(
index a5d849245f31fc807f87a7e64be5c6f16101a555..79663f43dd6c2beb38f25e0057c9a0cfbfa5e6f0 100644 (file)
@@ -50,7 +50,7 @@ if (!isExtensionActive('theme')) {
 } // END - if
 
 // Check for selected themes
-$SEL = 0;
+$SEL = '0';
 if (isPostRequestElementSet('sel')) $SEL = countPostSelection();
 if ($SEL > 0) {
        $OUT = '';
index 29b35a2418bc83f215bafc4ac7d130b83056cc82..f19475fa50bba273a8d5a21873c783d46ad269cc 100644 (file)
@@ -59,7 +59,7 @@ ORDER BY
 
 if ((SQL_NUMROWS($result_main) > 0) || (isPostRequestElementSet('lock'))) {
        // Count checked checkboxes
-       $SEL = 0;
+       $SEL = '0';
        if (isPostRequestElementSet('sel')) {
                // Are there checked boxes?
                if (count(postRequestElement('sel')) > 0) {
@@ -191,7 +191,7 @@ LIMIT 1",
                        // Lookup in blacklist
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
                                array($url), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 0) {
+                       if (SQL_NUMROWS($result) == '0') {
                                // Did not find a record so we can add it... :)
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)",
                                        array($url, $id), __FILE__, __LINE__);
index 6d73b593ac92c35a5afeb8b84f40c10502747a4a..55dcc4492203393cbe1bc2f4c6d15469b73cd788 100644 (file)
@@ -57,7 +57,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
        // Analyse header for response code
        if (eregi('200 OK', $response[0])) {
                // Found, kill header
-               $pos = 0;
+               $pos = '0';
                foreach($response as $k => $v) {
                        $v = trim($v);
                        if (empty($v)) {
index 28c50740610b686d6fcb250e4c547149ec44b1c1..673b440848faeafa247a100ea531402349e1309d 100644 (file)
@@ -62,7 +62,7 @@ $OUT = '';
 if ($num_themes > 1) {
        // If more than 1 is installed output selection box
        $OUT = generateThemeSelectionBox();
-} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) {
+} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == '0'))) {
        // If there's only one just output it's name
        $OUT = loadTemplate('theme_one', true, getCurrentThemeName());
 } elseif (isAdmin()) {
index f6fbe748479a45d39ee76e26353a9a0619b22d7c..4e06989ead12dffdee9f56a5b6639279fc8e14cc 100644 (file)
@@ -52,7 +52,7 @@ $content = array(
 
 if (isGetRequestElementSet('hash')) {
        // Initialize the user id
-       $userid = 0;
+       $userid = '0';
 
        // Search for an unconfirmed or confirmed account
        $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `refid`,`gender` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
@@ -90,7 +90,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 d711852a584b67dbc8bb3b6dcf1e3df9f673cc44..901f7b8c69dfadb4dd53372f62ab0634abd85b58 100644 (file)
@@ -51,7 +51,7 @@ if ((!isExtensionActive('user')) && (!isAdmin())) {
 } // END - if
 
 // Initialize variables
-$errorCode = 0;
+$errorCode = '0';
 $userid = false;
 $hash = '';
 $URL = '';
@@ -72,11 +72,11 @@ if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) {
        }
 } elseif (isPostRequestElementSet('new_pass')) {
        // New password requested
-       $userid = 0;
+       $userid = '0';
        if (isPostRequestElementSet('id')) $userid = bigintval(postRequestElement('id'));
 } else {
        // Not logged in
-       $userid = 0; $hash = '';
+       $userid = '0'; $hash = '';
 }
 
 if (isMember()) {
index 75fc6c11eafe712a510e1177c45ffe12efb35896..4da05fad705987ece86f6838748d8899161af892 100644 (file)
@@ -64,7 +64,7 @@ $content['user_count']       = ($content['user_confirmed'] + $content['user_unco
 $content['mt_start'] = generateDateTime(getConfig('mt_start'), 3);
 
 // Project timestamp when number of members are reached
-$PROJECTED = 0;
+$PROJECTED = '0';
 if ($content['user_count'] > 0) {
        // @TODO Find a better formular than this one
        $PROJECTED = round((time() - getConfig('mt_start')) / $content['user_count'] * getConfig('mt_stage') + getConfig('mt_start'));
@@ -92,28 +92,28 @@ $content['max'] = countSumTotalData('CONFIRMED', 'user_data', 'max_mails', 'stat
 $content['rec'] = countSumTotalData('CONFIRMED', 'user_data', 'receive_mails', 'status', false, " AND `receive_mails` > 0");
 
 // Initial lots of variables
-$bmails = 0; $sent = 0; $max = 0; $rec = 0; $clicks = 0;
+$bmails = '0'; $sent = '0'; $max = '0'; $rec = '0'; $clicks = '0';
 
 // Mail orders (only current)
 $nmails = getMediadataEntry('normal_orders');
-if (empty($nmails)) $nmails = 0;
+if (empty($nmails)) $nmails = '0';
 
 // Mails sent so far
 $clicks = getMediadataEntry('normal_clicks');
 $sent   = getMediadataEntry('normal_send');
-if (empty($sent))   $sent   = 0;
-if (empty($clicks)) $clicks = 0;
+if (empty($sent))   $sent   = '0';
+if (empty($clicks)) $clicks = '0';
 
 // Bonus mails
 if (isExtensionActive('bonus')) {
        $bmails = getMediadataEntry('bonus_orders');
-       if (empty($bmails)) $bmails = 0;
+       if (empty($bmails)) $bmails = '0';
 
        // Count bonus mails clicks / sent mails
        $dmy  = getMediadataEntry('bonus_clicks');
        $dmy2 = getMediadataEntry('bonus_send');
-       if (empty($dmy))  $dmy  = 0;
-       if (empty($dmy2)) $dmy2 = 0;
+       if (empty($dmy))  $dmy  = '0';
+       if (empty($dmy2)) $dmy2 = '0';
        $sent += $dmy2; $clicks += $dmy;
 } // END - if
 
@@ -128,10 +128,10 @@ if ($sent > 0) $clr = $clicks / $sent * 100;
 $content['_clr'] = translateComma($clr) . '%';
 
 // Load jackpot
-$jackpot = 0;
+$jackpot = '0';
 if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
 
-if (empty($jackpot)) $jackpot = 0;
+if (empty($jackpot)) $jackpot = '0';
 $content['jackpot'] = translateComma($jackpot);
 
 // Total referal link clicks, total logins
@@ -145,9 +145,9 @@ SQL_FREERESULT($result);
 // Get total points
 $points = getMediadataEntry('total_points');
 
-if (empty($points)) $points = 0;
-if (empty($ref))    $ref    = 0;
-if (empty($logins)) $logins = 0;
+if (empty($points)) $points = '0';
+if (empty($ref))    $ref    = '0';
+if (empty($logins)) $logins = '0';
 
 $content['total_points']    = translateComma($points);
 $content['total_refclicks'] = $ref;
@@ -161,9 +161,9 @@ $result = SQL_QUERY("SELECT SUM(`counter`) AS cnt, SUM(`clicks`) AS clx FROM `{?
 list($views, $clicks) = SQL_FETCHROW($result);
 SQL_FREERESULT($result);
 
-if (empty($total))  $total  = 0;
-if (empty($views))  $views  = 0;
-if (empty($clicks)) $clicks = 0;
+if (empty($total))  $total  = '0';
+if (empty($views))  $views  = '0';
+if (empty($clicks)) $clicks = '0';
 
 $content['ref_total']  = $total;
 $content['ref_views']  = $views;
@@ -235,7 +235,7 @@ WHERE
        __FILE__, __LINE__);
        list($holiday) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
-       if (empty($holiday)) $holiday = 0;
+       if (empty($holiday)) $holiday = '0';
        $data = array(
                'lang'  => getMessage('MEDIA_HOLIDAY_COUNT'),
                'value' => $holiday
@@ -257,8 +257,8 @@ ON
                __FILE__, __LINE__);
        list($count_in, $points_in) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
-       if (empty($count_in))  $count_in  = 0;
-       if (empty($points_in)) $points_in = 0;
+       if (empty($count_in))  $count_in  = '0';
+       if (empty($points_in)) $points_in = '0';
 
        $result = SQL_QUERY("SELECT COUNT(t.id), SUM(t.points)
 FROM `{?_MYSQL_PREFIX?}_user_transfers_out` AS t
@@ -267,8 +267,8 @@ ON t.userid=d.userid",
        __FILE__, __LINE__);
        list($count_out, $points_out) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
-       if (empty($count_out))  $count_out  = 0;
-       if (empty($points_out)) $points_out = 0;
+       if (empty($count_out))  $count_out  = '0';
+       if (empty($points_out)) $points_out = '0';
 
        // Add header
        $OUT_SPECIAL .= loadTemplate('mediadata_extra_hrow', true, getMessage('MEDIA_TRANSFER_HEADER'));
index e93efba270e560c1a6b4d036268a787ccff77b5b..9065ccf701edaa5bc5d6800c9c54b79bdd00d78f 100644 (file)
@@ -55,7 +55,7 @@ if (!isExtensionActive('register')) {
 // Initialize variables
 $isOkay     = true;
 $shortPass  = false;
-$cats       = 0;
+$cats       = '0';
 $ipTimedOut = false;
 
 // Default refid is zero
@@ -261,7 +261,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        $userid = SQL_INSERTID();
 
        // Did this work?
-       if ($userid == 0) {
+       if ($userid == '0') {
                // Something bad happened!
                loadTemplate('admin_settings_saved', false, getMessage('USER_NOT_REGISTERED'));
                return;
@@ -277,7 +277,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        // Write his welcome-points
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`=0 LIMIT 1",
                array(bigintval($userid)), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Add only when the line was not found (maybe some more secure?)
                $locked = 'points';
 
@@ -310,7 +310,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 5aad04bbeccf4827d8868546b01e2666af4b22e5..eca8610959f2ce33691c68143920ca34139913d5 100644 (file)
@@ -198,7 +198,7 @@ if (isFormSent()) {
        if (count($FORM_ERRORS) > 0) unsetPostRequestElement('ok');
 }
 
-if ((isFormSent()) && (count($FORM_ERRORS) == 0)) {
+if ((isFormSent()) && (count($FORM_ERRORS) == '0')) {
        // Generate message array
        $messageArray = array(
                'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'),
index 36d6373b0ae24518a2874f1206dfed255635bf85..7c8088fff1a1cb914b5db4c4695575319dc164f7 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 6eee351e8b96545feee364a20f5d29ab0845df2e..076bfcde3b047429113ee2e278753a6c3799a33b 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('MEMBER_404_ACTION'), getWhat());
+       addFatalMessage(__FILE__, __LINE__, getMessage('MEMBER_404_WHAT'), getWhat());
 }
 
 // [EOF]
index 63e66f12be8294d977e66b00936f0f7232bce10c..dd93ce976edfad6207fbe11c8196ffe7beed4b4d 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index 305391daba81462da1e348a2da819b4d16144a20..e9fdc9e6783d02851219cfb2944a00526232e55b 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index b80d246ff56eaaba813e390ebcdfe918171c2bec..8d3174fa5eeca9fd8cdf30e7e0f3714bfe61d126 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index dd4c5bdd6a70e2089ec1069c71739079cb84a84c..44a6be652947312bf4158e74e43f27ccb0b1bb01 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index 80d999dc811a414d744d9e079c916a8a103dd550..8ec7d19b65af478344c9f6280397a8afad164612 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index 1dfce0a9f44dbce07ae67c2af2ec3afa4964f616..7f88c4d9cafd19ff5201b7660f9306acd7e731dc 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index a6ba127a4a4d1692a1dc4a032853b3b6ce381778..4b224d28a5d95f6c5bdfde57dc4a97946c5a55b1 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index ce1bf1713485f79cbe86866eab9943ed88734c7b..25b15111975b57e5c5b3e3811964ad58d4117b15 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index 212bd73c917fa6181dbc0c9b483352bb41abbea8..acf613205cb675e2c85f9cc361df59baeb2c4316 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
 }
 
 // [EOF]
index ba9ab29a93984b4940d0262cf9440fc3fdcbfd2d..9946a7cab4f16dc591df775508d40f71f331c719 100644 (file)
@@ -63,7 +63,7 @@ if (isAdmin()) {
 if ($num_themes > 1) {
        // If more than 1 is installed output selection box
        $OUT = generateThemeSelectionBox();
-} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) {
+} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == '0'))) {
        // If there's only one just output it's name
        $OUT = loadTemplate('theme_one', true, getCurrentThemeName());
 } elseif (isAdmin()) {
index 66f6981b8c64e25d65e489d91414d3b65c74ef21..df72cb5d3ddbb9a8ec5d902eebd8984353547311 100644 (file)
@@ -56,7 +56,7 @@ $cats = SQL_NUMROWS($result);
 if ($cats > 0) {
        $LEAST = false;
        if (isFormSent()) {
-               $cnt = 0;
+               $cnt = '0';
                foreach (postRequestElement('cat') as $cat => $joined) {
                        if ($joined != 'Y') $cnt++;
                } // END - foreach
@@ -70,7 +70,7 @@ if ($cats > 0) {
        // Is the form sent?
        if (isFormSent()) {
                // Start counting all
-               $cnt = 0;
+               $cnt = '0';
 
                // Go through all entries
                foreach (postRequestElement('cat') as $cat => $joined) {
@@ -83,7 +83,7 @@ if ($cats > 0) {
                                        $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1",
                                                array($UID, bigintval($cat)), __FILE__, __LINE__);
 
-                                       if (SQL_NUMROWS($result_user) == 0) {
+                                       if (SQL_NUMROWS($result_user) == '0') {
                                                $sql = "INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES ('%s','%s')";
                                        } // END - if
 
index e9ec739204e1c4da2c43f43b196b5146fa58e312..973f158538a29faf6215086f219c631bce996c04 100644 (file)
@@ -82,8 +82,8 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) {
        $content = merge_array($content, SQL_FETCHARRAY($result2));
 
        // Fix missing entries
-       if (empty($content['timestamp'])) $content['timestamp'] = 0;
-       if (empty($content['timestamp_ordered'])) $content['timestamp_ordered'] = 0;
+       if (empty($content['timestamp'])) $content['timestamp'] = '0';
+       if (empty($content['timestamp_ordered'])) $content['timestamp_ordered'] = '0';
 
        if ((($content['timestamp'] + getConfig('holiday_lock')) > time()) || (($content['timestamp_ordered'] + getConfig('holiday_lock')) > time())) {
                // Mail order is to close away!
index 3ae5495f1ff970340eda9e3f82eaa1a2d5ea618a..e6bd332db9912ea378ae57e7691c64b47980d32d 100644 (file)
@@ -89,8 +89,8 @@ switch ($mode) {
                        $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;
index 9589728a3a85f9089b6681255465dce676b6333e..6d0587fa53c4c90c0496a0d27f2e9026c1a49494 100644 (file)
@@ -69,7 +69,7 @@ if ($isValid === true) {
        // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !)
        $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1",
                array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Nickname not in use, so set it now
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1",
                        array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__);
index a9b269896d66e50e85eefbe9cd9f84a791b98c4e..0aff1082ad70491f69341a2820a9eca6d8576871 100644 (file)
@@ -51,7 +51,7 @@ if ((!isExtensionActive('order')) && (!isAdmin())) {
        return;
 } // END - if
 
-$URL = ''; $id = 0;
+$URL = ''; $id = '0';
 $whereStatement = " WHERE `visible`='Y'";
 
 // Set undefined array elements
@@ -108,7 +108,7 @@ LIMIT 1",
                        getConfig('url_tlock')
                ), __FILE__, __LINE__);
 
-       $type = 'TEMP'; $id = 0;
+       $type = 'TEMP'; $id = '0';
        if (SQL_NUMROWS($result) == 1) {
                // Load id and mail type
                list($id, $type) = SQL_FETCHROW($result);
@@ -236,7 +236,7 @@ ORDER BY
                        } // END - if
 
                        // Load receivers from database
-                       $TEST = array(); $cnt = 0;
+                       $TEST = array(); $cnt = '0';
                        while ($holidayContent = SQL_FETCHARRAY($result)) {
                                if ($HOLIDAY) {
                                        // Check for his holiday status
@@ -248,7 +248,7 @@ WHERE
        `userid`=%s AND `holiday_start` < UNIX_TIMESTAMP() AND `holiday_end` > UNIX_TIMESTAMP()
 LIMIT 1",
                                                array($holidayContent['userid']), __FILE__, __LINE__);
-                                       if (SQL_NUMROWS($result_holiday) == 1) $holidayContent['userid'] = 0; // Exclude user who are in holiday
+                                       if (SQL_NUMROWS($result_holiday) == 1) $holidayContent['userid'] = '0'; // Exclude user who are in holiday
 
                                        // Free memory
                                        SQL_FREERESULT($result_holiday);
@@ -286,9 +286,9 @@ LIMIT 1",
                        // 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;
+                                       $id = '0';
                                        if (isExtensionActive('html_mail')) {
                                                // HTML extension is active
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_pool` (`sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `zip`, `html_msg`)
@@ -385,7 +385,7 @@ LIMIT 1",
                                }
 
                                // Do we need to get the id number?
-                               if ($id == 0) {
+                               if ($id == '0') {
                                        // Order is placed as temporary. We need to get it's id for the frametester
                                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s AND `subject`='%s' AND `payment_id`=%s AND `data_type`='TEMP' AND `timestamp`=UNIX_TIMESTAMP() LIMIT 1",
                                                array(
@@ -403,7 +403,7 @@ LIMIT 1",
 
                                // id is received so we can redirect the user, used points will be added when he send's out the mail
                                $URL = 'modules.php?module=frametester&amp;order=' . $id;
-                       } elseif ($content['target_send'] == 0) {
+                       } elseif ($content['target_send'] == '0') {
                                // Not enougth receivers found which can receive mails
                                $URL = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('MORE_RECEIVERS2');
                        } else {
@@ -418,7 +418,7 @@ LIMIT 1",
 } 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')) {
+} 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)) {
@@ -457,7 +457,7 @@ ORDER BY
                                $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC",
                                        array(bigintval($categoriesContent['id']), getMemberId()), __FILE__, __LINE__);
 
-                               $userid_cnt = 0;
+                               $userid_cnt = '0';
                                while (list($ucat) = SQL_FETCHROW($result_userids)) {
                                        // Check for holiday system
                                        $HOL_ACTIVE = false;
@@ -685,7 +685,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 763187ed6a25ceb31657524be57323d2a3a976fb..49e1636cf752868ec687fa294ac9e031696cfaa7 100644 (file)
@@ -54,7 +54,7 @@ if ((!isExtensionActive('payout')) && (!isAdmin())) {
 } // END - if
 
 $result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
-$totalPoints = 0;
+$totalPoints = '0';
 while ($content = SQL_FETCHARRAY($result_depths)) {
        // Load referal points
        $result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
@@ -179,10 +179,10 @@ ORDER BY
 
                // Calculate maximum value
                $max     = round($totalPoints * $content['rate'] - 0.5);
-               $PAY_MAX = 0;
+               $PAY_MAX = '0';
 
                // Calulcate points from submitted amount
-               $points = 0;
+               $points = '0';
                if (isPostRequestElementSet('payout')) {
                        $points  = bigintval(postRequestElement('payout')) / $content['rate'];
                        $PAY_MAX = $max / $content['rate'];
index 14023d575e169c89c66bcd3642ac70bb66a9eae9..fc9ea3a66e0951f7a6b2c121d53f7db2fc85e489 100644 (file)
@@ -60,7 +60,7 @@ if (getExtensionVersion('bonus') >= '0.4.4') $depths += 4;
 $content['rowspan'] = ($depths*2+15);
 
 // Init some vars...
-$totalPoints = 0; $TREF = 0; $TLOCK = 0; $OUT = '';
+$totalPoints = '0'; $TREF = '0'; $TLOCK = '0'; $OUT = '';
 
 // Load ref levels
 while ($data = SQL_FETCHARRAY($result_depths)) {
@@ -68,7 +68,7 @@ while ($data = SQL_FETCHARRAY($result_depths)) {
        $content = merge_array($content, $data);
 
        // Initialize ref-count
-       $REFS = 0;
+       $REFS = '0';
 
        // Load referal points
        $result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
@@ -90,7 +90,7 @@ while ($data = SQL_FETCHARRAY($result_depths)) {
                list($REFS) = SQL_FETCHROW($result_refs);
                $TREF += $REFS;
        } else {
-               $REFS = 0;
+               $REFS = '0';
        }
 
        // Free result
@@ -142,7 +142,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(getUserData('used_points'));
index 77bcf6455b7ae910f25a2356a100ef4115675937..bc866cc2dd5a9096a5567a0ae07b18b71daabb7a 100644 (file)
@@ -178,7 +178,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 be8f0301587f2cc2cd8eabaf6e5818e0e169b500..e2fd4870d96086201a4dc31e25952f39d1deecb6 100644 (file)
@@ -68,7 +68,7 @@ if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) {
                $percents = convertCommaToDot(postRequestElement('percents'));
 
                // Validate percents
-               if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) {
+               if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == '0')) && ($percents <= getConfig('refback_max_perc'))) {
                        // Change ref-back for this direct id
                        $status = updateMemberRefbackPercents(postRequestElement('id'), postRequestElement('percents'));
 
@@ -117,7 +117,7 @@ if (SQL_NUMROWS($result) > 0) {
        while ($content = SQL_FETCHARRAY($result)) {
                // Init variables
                $rows = '';
-               $counter = 0;
+               $counter = '0';
                $SW = 2;
 
                // Check for users ref in this level
index aa806b1237e147eb3dc9adab69d9bbf622d638d4..52dfa51da8f313f2f81de4c3474804b192656892 100644 (file)
@@ -78,7 +78,7 @@ if (SQL_NUMROWS($result) > 0) {
        // List available ref banners
        $OUT = ''; $SW = 2;
        while ($row = SQL_FETCHARRAY($result)) {
-               $test = str_replace(getConfig('URL'), getConfig('PATH'), $row['url']); $size = 0;
+               $test = str_replace(getConfig('URL'), getConfig('PATH'), $row['url']); $size = '0';
                if ($test == $row['url']) {
                        // Download banner (I hope you keep the banner on same server???)
                        $fp = sendGetRequest($row['url']); $bannerContent = '';
index ecd52bb0599f4487412c3506b22caaaa09f12015..6e573f79356028b8351d3706125eaf0d7b46aa83 100644 (file)
@@ -61,7 +61,7 @@ if (SQL_NUMROWS($result) > 0) {
        while ($content = SQL_FETCHARRAY($result)) {
                // Init variables
                $rows = '';
-               $counter = 0;
+               $counter = '0';
                $SW = 2;
 
                // Check for users ref in this level
index 777d43cc00ac54f2b309b9dcfcb78264a3c9b8e7..3cb992daf5a08b8b0efdc23994ee567e8cd47747 100644 (file)
@@ -307,7 +307,7 @@ switch ($mode) {
                } // END - switch
 
                // Run the SQL command and set total points to zero
-               $totalPoints = 0;
+               $totalPoints = '0';
                $result = SQL_QUERY_ESC($sql, array(getMemberId()), __FILE__, __LINE__);
 
                // Do we have entries?
@@ -398,7 +398,7 @@ KEY (`party_userid`)
                // Free memory
                SQL_FREERESULT($result);
 
-               $total = 0;
+               $total = '0';
                if (SQL_NUMROWS($result) > 0) {
                        // Search for entries
                        $result = SQL_QUERY("SELECT `party_userid`, `trans_id`, `points`, `reason`, `time_trans`, `trans_type` FROM `{?_MYSQL_PREFIX?}_transfers_tmp` ORDER BY `time_trans` DESC",
index 1e7e55cb04c0128f5dc38bfbe0640803bde2916f..6b74bacc480c89da6ff0f268506a9c3eb03442b0 100644 (file)
@@ -136,7 +136,7 @@ if (isExtensionActive('bonus')) {
 // Mails left for confirmation?
 if (SQL_NUMROWS($result) > 0) {
        // Please confirm these mails!
-       $sum = 0; $OUT = ''; $SW = 2;
+       $sum = '0'; $OUT = ''; $SW = 2;
 
        // Init content
        $content = array();
index 2006833362a2c715b87b0115b3b7459209c867dc..5e2c960cb0c206164b7ca6c7b4a1200990f5d371 100644 (file)
@@ -66,7 +66,7 @@ $content = array(); $points = false;
 if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose')) {
        // Let the user choose what he wants to do
        $content['refid']    = getConfig(('wernis_refid'));
-       $content['wernis_userid'] = 0;
+       $content['wernis_userid'] = '0';
 
        // Are there some entries?
        if (fetchUserData(getMemberId())) {
index 61353a29839085000f57eb50b25079fd603eb42b..aa7df75574a5dc4d8808687d9c10f676b7e8a10e 100644 (file)
@@ -63,7 +63,7 @@ initRequest();
 initMemberId();
 
 // Set important header_sent
-if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = 0;
+if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = '0';
 
 // Init fatal messages
 initFatalMessages();
index 17b3ae9f72937c50751ce00c2007a095e56001f0..a96b22392bb58706bb7de976607f4033388ccad9 100644 (file)
@@ -79,7 +79,7 @@ function getModuleTitle ($mod) {
        if (empty($title)) {
                // No name found
                $title = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $mod);
-               if (SQL_NUMROWS($result) == 0) {
+               if (SQL_NUMROWS($result) == '0') {
                        // Add module to database
                        $dummy = checkModulePermissions($mod);
                } // END - if
@@ -253,7 +253,7 @@ function checkModulePermissions ($mod = '') {
 
                        // Destroy cache here
                        // @TODO Rewrite this to a filter
-                       if ((getOutputMode() == 0) || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules');
+                       if ((getOutputMode() == '0') || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules');
 
                        // And reload data
                        unset($GLOBALS['module_status'][$mod]);
@@ -262,7 +262,7 @@ function checkModulePermissions ($mod = '') {
                        // Module not found we don't add it to the database
                        $ret = '404';
                }
-       } elseif (($ret == 'cache_miss') && (getOutputMode() == 0)) {
+       } elseif (($ret == 'cache_miss') && (getOutputMode() == '0')) {
                // Rebuild the cache files
                rebuildCacheFile('modules', 'modules');
        } elseif ($found === false) {
@@ -348,7 +348,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
 
        // Begin the navigation line
        if ((!isset($GLOBALS['nav_depth'])) && ($return === false)) {
-               $GLOBALS['nav_depth'] = 0;
+               $GLOBALS['nav_depth'] = '0';
                $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{?URL?}/modules.php?module=".getModule().$LINK_ADD."\">Home</a></strong>";
        } else {
                if ($return === false) $GLOBALS['nav_depth']++;
@@ -386,7 +386,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
                                //* DEBUG: */ print(__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' => ""));
@@ -411,7 +411,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
 // Adds a menu (mode = guest/member/admin/sponsor) to output
 function addMenu ($mode, $action, $what) {
        // Init some variables
-       $main_cnt = 0;
+       $main_cnt = '0';
        $AND = '';
 
        // is the menu action valid?
@@ -451,7 +451,7 @@ function addMenu ($mode, $action, $what) {
                        // Do we have some entries?
                        if ($totalWhats > 0) {
                                // Init counter
-                               $cnt = 0;
+                               $cnt = '0';
 
                                // Load all sub menus
                                while ($content2 = SQL_FETCHARRAY($result_sub)) {
@@ -580,7 +580,7 @@ function isMember () {
        if (isset($GLOBALS['is_member'])) {
                // Then return it
                return $GLOBALS['is_member'];
-       } elseif (getMemberId() == 0) {
+       } elseif (getMemberId() == '0') {
                // No member
                return false;
        } else {
@@ -676,7 +676,7 @@ function fetchUserData ($userid, $column='userid') {
                if (isset($GLOBALS['user_data'][getCurrentUserId()]['last_failure'])) {
                        // Backup the raw one and zero it
                        $GLOBALS['user_data'][getCurrentUserId()]['last_failure_raw'] = $GLOBALS['user_data'][getCurrentUserId()]['last_failure'];
-                       $GLOBALS['user_data'][getCurrentUserId()]['last_failure'] = 0;
+                       $GLOBALS['user_data'][getCurrentUserId()]['last_failure'] = '0';
 
                        // Is it not zero?
                        if ($GLOBALS['user_data'][getCurrentUserId()]['last_failure_raw'] != '0000-00-00 00:00:00') {
@@ -1082,7 +1082,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) {
@@ -1172,7 +1172,7 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $
                                array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
 
                        // Was it *not* found?
-                       if (SQL_NUMROWS($result) == 0) {
+                       if (SQL_NUMROWS($result) == '0') {
                                // So we add one!
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')",
                                        array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
@@ -1193,7 +1193,7 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $
 
 // Calculate sum (default) or count records of given criteria
 function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') {
-       $ret = 0;
+       $ret = '0';
        //* DEBUG: */ print($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />');
        if ((empty($search)) && ($search != '0')) {
                // Count or sum whole table?
@@ -1230,7 +1230,7 @@ function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatemen
                $ret = '0.00000';
        } elseif (''.$ret.'' == '') {
                // Fix empty result
-               $ret = 0;
+               $ret = '0';
        }
 
        // Return value
@@ -1240,7 +1240,7 @@ function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatemen
 // Getter fro ref level percents
 function getReferalLevelPercents ($level) {
        // Default is zero
-       $per = 0;
+       $per = '0';
 
        // Do we have cache?
        if ((isset($GLOBALS['cache_array']['refdepths']['level'])) && (isExtensionActive('cache'))) {
@@ -1285,13 +1285,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: */ print("----------------------- <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'))) {
+       // When $userid = '0' add points to jackpot
+       if (($userid == '0') && (isExtensionActive('jackpot'))) {
                // Add points to jackpot
                addPointsToJackpot($points);
                return;
@@ -1316,7 +1316,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
        if (!isset($GLOBALS['ref_level'])) {
                // Initialialize referal system
                //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal system initialized!<br />");
-               $GLOBALS['ref_level'] = 0;
+               $GLOBALS['ref_level'] = '0';
        } else {
                // Increase referal level
                $GLOBALS['ref_level']++;
@@ -1379,7 +1379,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                                $message = loadEmailTemplate('confirm-referal', $content, bigintval($userid));
 
                                sendEmail(getUserData('email'), THANX_REFERAL_ONE, $message);
-                       } elseif (($sendNotify) && (getUserData('refid') == 0) && ($locked === false) && ($add_mode == 'direct')) {
+                       } elseif (($sendNotify) && (getUserData('refid') == '0') && ($locked === false) && ($add_mode == 'direct')) {
                                // Prepare content
                                $content = array(
                                        'text'   => getMessage('REASON_DIRECT_PAYMENT'),
@@ -1426,7 +1426,7 @@ function updateReferalCounter ($userid) {
        } // END - if
 
        // Init referal id
-       $ref = 0;
+       $ref = '0';
 
        // Check for his referal
        if (fetchUserData($userid)) {
@@ -1442,7 +1442,7 @@ function updateReferalCounter ($userid) {
                //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />");
                $GLOBALS['cache_array']['ref_level'][$userid]++;
                updateReferalCounter($ref);
-       } elseif ((($ref == $userid) || ($ref == 0)) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
+       } elseif ((($ref == $userid) || ($ref == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
                // Remove cache here
                //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - CACHE!<br />");
                rebuildCacheFile('refsystem', 'refsystem');
@@ -1687,7 +1687,7 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher
 // Activate exchange
 function FILTER_ACTIVATE_EXCHANGE () {
        // Is the extension 'user' there?
-       if ((!isExtensionActive('user')) || (getConfig('activate_xchange') == 0)) {
+       if ((!isExtensionActive('user')) || (getConfig('activate_xchange') == '0')) {
                // Silently abort here
                return false;
        } // END - if
@@ -1715,7 +1715,7 @@ function FILTER_ACTIVATE_EXCHANGE () {
 
 // Deletes a user account with given reason
 function deleteUserAccount ($userid, $reason) {
-       $points = 0;
+       $points = '0';
        $result = SQL_QUERY_ESC("SELECT
        (SUM(p.points) - d.used_points) AS points
 FROM
@@ -1884,7 +1884,7 @@ function generateCategoryOptionsList ($mode) {
                                array(bigintval($content['id'])), __FUNCTION__, __LINE__);
 
                        // Start adding all
-                       $userid_cnt = 0;
+                       $userid_cnt = '0';
                        // @TODO Rewrite this to $content = SQL_FETCHARRAY()
                        while (list($ucat) = SQL_FETCHROW($result_userids)) {
                                $result_ver = SQL_QUERY_ESC("SELECT
@@ -1943,7 +1943,7 @@ function addBonusMailToQueue ($subject, $text, $receiverList, $points, $seconds,
        $target = countSelection(explode(';', $receiverList));
 
        // Receiver is zero?
-       if ($receiver == 0) {
+       if ($receiver == '0') {
                // Then auto-fix it
                $receiver = $target;
        } // END - if
@@ -2004,7 +2004,7 @@ function generateReceiverList ($cat, $receiver, $mode = '') {
        $receiver = bigintval($receiver);
 
        // Is the receiver zero and mode set?
-       if (($receiver == 0) && (!empty($mode))) {
+       if (($receiver == '0') && (!empty($mode))) {
                // Auto-fix receiver maximum
                $receiver = getTotalReceivers($mode);
        } // END - if
@@ -2056,12 +2056,12 @@ function generateReceiverList ($cat, $receiver, $mode = '') {
 }
 
 // Get timestamp for given stats type and data
-function getTimestampFromUserStats ($type, $data, $userid = 0) {
+function getTimestampFromUserStats ($type, $data, $userid = '0') {
        // Default timestamp is zero
-       $stamp = 0;
+       $stamp = '0';
 
        // User id set?
-       if ((isMemberIdSet()) && ($userid == 0)) {
+       if ((isMemberIdSet()) && ($userid == '0')) {
                $userid = getMemberId();
        } // END - if
 
@@ -2161,7 +2161,7 @@ ORDER BY ur.refid ASC",
                        $row['unconfirmed']  = countSumTotalData($row['refid'], 'user_links', 'id', 'userid', true);
 
                        // Init clickrate with zero
-                       $row['clickrate'] = 0;
+                       $row['clickrate'] = '0';
 
                        // Is at least one mail received?
                        if ($row['emails_received'] > 0) {
@@ -2221,7 +2221,7 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
 }
 
 // Creates a new task
-function createNewTask ($subject, $notes, $taskType, $userid = 0, $adminId = 0, $strip = true) {
+function createNewTask ($subject, $notes, $taskType, $userid = '0', $adminId = '0', $strip = true) {
        // Insert the task data into the database
        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())",
                array($adminId, $userid, $taskType, $subject, smartAddSlashes($notes)), __FUNCTION__, __LINE__, true, $strip);
index 114effae2eee232351b37f14b953db15e1b31f55..6939fc2c8a3320ec239cabec75936aa0b6491c46 100644 (file)
@@ -114,7 +114,7 @@ class PHPMailer {
    * characters.
    * @var int
    */
-  var $WordWrap          = 0;
+  var $WordWrap          = '0';
 
   /**
    * Method to send mail: ("mail", "sendmail", or "smtp").
@@ -255,7 +255,7 @@ class PHPMailer {
   var $message_type    = '';
   var $boundary        = array();
   var $language        = array();
-  var $error_count     = 0;
+  var $error_count     = '0';
   var $LE              = "\r\n";
   var $sign_cert_file  = "";
   var $sign_key_file   = "";
@@ -392,7 +392,7 @@ class PHPMailer {
       $this->ContentType = 'multipart/alternative';
     }
 
-    $this->error_count = 0; // reset errors
+    $this->error_count = '0'; // reset errors
     $this->SetMessageType();
     $header .= $this->CreateHeader();
     $body = $this->CreateBody();
@@ -462,7 +462,7 @@ class PHPMailer {
   function MailSend($header, $body) {
 
     $to = '';
-    for($i = 0; $i < count($this->to); $i++) {
+    for($i = '0'; $i < count($this->to); $i++) {
       if($i != 0) { $to .= ', '; }
       $to .= $this->AddrFormat($this->to[$i]);
     }
@@ -527,24 +527,24 @@ class PHPMailer {
     }
 
     /* Attempt to send attach all recipients */
-    for($i = 0; $i < count($this->to); $i++) {
+    for($i = '0'; $i < count($this->to); $i++) {
       if(!$this->smtp->Recipient($this->to[$i][0])) {
         $bad_rcpt[] = $this->to[$i][0];
       }
     }
-    for($i = 0; $i < count($this->cc); $i++) {
+    for($i = '0'; $i < count($this->cc); $i++) {
       if(!$this->smtp->Recipient($this->cc[$i][0])) {
         $bad_rcpt[] = $this->cc[$i][0];
       }
     }
-    for($i = 0; $i < count($this->bcc); $i++) {
+    for($i = '0'; $i < count($this->bcc); $i++) {
       if(!$this->smtp->Recipient($this->bcc[$i][0])) {
         $bad_rcpt[] = $this->bcc[$i][0];
       }
     }
 
     if(count($bad_rcpt) > 0) { // Create error message
-      for($i = 0; $i < count($bad_rcpt); $i++) {
+      for($i = '0'; $i < count($bad_rcpt); $i++) {
         if($i != 0) {
           $error .= ', ';
         }
@@ -583,7 +583,7 @@ class PHPMailer {
 
     $this->smtp->do_debug = $this->SMTPDebug;
     $hosts = explode(';', $this->Host);
-    $index = 0;
+    $index = '0';
     $connection = ($this->smtp->Connected());
 
     /* Retry while there is no connection */
@@ -730,7 +730,7 @@ class PHPMailer {
     for ($i=0 ;$i < count($line); $i++) {
       $line_part = explode(' ', $line[$i]);
       $buf = '';
-      for ($e = 0; $e<count($line_part); $e++) {
+      for ($e = '0'; $e<count($line_part); $e++) {
         $word = $line_part[$e];
         if ($qp_mode and (strlen($word) > $length)) {
           $space_left = $length - strlen($buf) - 1;
@@ -773,7 +773,7 @@ class PHPMailer {
           }
         } else {
           $buf_o = $buf;
-          $buf .= ($e == 0) ? $word : (' ' . $word);
+          $buf .= ($e == '0') ? $word : (' ' . $word);
 
           if (strlen($buf) > $length and $buf_o != '') {
             $message .= $buf_o . $soft_break;
@@ -810,7 +810,7 @@ class PHPMailer {
         if ($dec < 128) { // Single byte character.
           // If the encoded char was found at pos 0, it will fit
           // otherwise reduce maxLength to start of the encoded char
-          $maxLength = ($encodedCharPos == 0) ? $maxLength :
+          $maxLength = ($encodedCharPos == '0') ? $maxLength :
           $maxLength - ($lookBack - $encodedCharPos);
           $foundSplitPos = true;
         } elseif ($dec >= 192) { // First byte of a multi byte character
@@ -874,7 +874,7 @@ class PHPMailer {
     if($this->Mailer != 'mail') {
       if(count($this->to) > 0) {
         $result .= $this->AddrAppend('To', $this->to);
-      } elseif (count($this->cc) == 0) {
+      } elseif (count($this->cc) == '0') {
         $result .= $this->HeaderLine('To', 'undisclosed-recipients:;');
       }
     }
@@ -916,7 +916,7 @@ class PHPMailer {
     }
 
     // Add custom headers
-    for($index = 0; $index < count($this->CustomHeader); $index++) {
+    for($index = '0'; $index < count($this->CustomHeader); $index++) {
       $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
     }
     if (!$this->sign_key_file) {
@@ -1140,7 +1140,7 @@ class PHPMailer {
     $this->attachment[$cur][4] = $type;
     $this->attachment[$cur][5] = false; // isStringAttachment
     $this->attachment[$cur][6] = 'attachment';
-    $this->attachment[$cur][7] = 0;
+    $this->attachment[$cur][7] = '0';
 
     return true;
   }
@@ -1156,7 +1156,7 @@ class PHPMailer {
     $mime = array();
 
     /* Add all attachments */
-    for($i = 0; $i < count($this->attachment); $i++) {
+    for($i = '0'; $i < count($this->attachment); $i++) {
       /* Check for string attachment */
       $bString = $this->attachment[$i][5];
       if ($bString) {
@@ -1262,7 +1262,7 @@ class PHPMailer {
    * @return string
    */
   function EncodeHeader ($str, $position = 'text') {
-    $x = 0;
+    $x = '0';
 
     switch (strtolower($position)) {
       case 'phrase':
@@ -1286,7 +1286,7 @@ class PHPMailer {
         break;
     }
 
-    if ($x == 0) {
+    if ($x == '0') {
       return ($str);
     }
 
@@ -1351,8 +1351,8 @@ class PHPMailer {
     // Base64 has a 4:3 ratio
     $offset = $avgLength = floor($length * $ratio * .75);
 
-    for ($i = 0; $i < $mb_length; $i += $offset) {
-      $lookBack = 0;
+    for ($i = '0'; $i < $mb_length; $i += $offset) {
+      $lookBack = '0';
 
       do {
         $offset = $avgLength - $lookBack;
@@ -1384,10 +1384,10 @@ class PHPMailer {
     while( list(, $line) = each($lines) ) {
       $linlen = strlen($line);
       $newline = '';
-      for($i = 0; $i < $linlen; $i++) {
+      for($i = '0'; $i < $linlen; $i++) {
         $c = substr( $line, $i, 1 );
         $dec = ord( $c );
-        if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
+        if ( ( $i == '0' ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
           $c = '=2E';
         }
         if ( $dec == 32 ) {
@@ -1465,7 +1465,7 @@ class PHPMailer {
     $this->attachment[$cur][4] = $type;
     $this->attachment[$cur][5] = true; // isString
     $this->attachment[$cur][6] = 'attachment';
-    $this->attachment[$cur][7] = 0;
+    $this->attachment[$cur][7] = '0';
   }
 
   /**
@@ -1514,7 +1514,7 @@ class PHPMailer {
    */
   function InlineImageExists() {
     $result = false;
-    for($i = 0; $i < count($this->attachment); $i++) {
+    for($i = '0'; $i < count($this->attachment); $i++) {
       if($this->attachment[$i][6] == 'inline') {
         $result = true;
         break;
index 09f790adc82625a9466dc3c36af702b75a151431..3dd53b8ceddc74b87d20d99129d496a9d7f14406 100644 (file)
@@ -114,7 +114,7 @@ class POP3
    */
   function POP3 ()
     {
-      $this->pop_conn = 0;
+      $this->pop_conn = '0';
       $this->connected = false;
       $this->error = null;
     }
@@ -128,7 +128,7 @@ class POP3
    * @param string $username
    * @param string $password
    */
-  function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0)
+  function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = '0')
   {
     $this->host = $host;
 
index e7d4abda22fe94721ce029b0da5ae041327ac742..50779bf96740f2bc9457bab8af49a88341e05d3b 100644 (file)
@@ -73,11 +73,11 @@ class SMTP
    * @return void
    */
   function SMTP() {
-    $this->smtp_conn = 0;
+    $this->smtp_conn = '0';
     $this->error = null;
     $this->helo_rply = null;
 
-    $this->do_debug = 0;
+    $this->do_debug = '0';
   }
 
   /*************************************************************
@@ -252,7 +252,7 @@ class SMTP
     if(!empty($this->smtp_conn)) {
       # close the connection and cleanup
       fclose($this->smtp_conn);
-      $this->smtp_conn = 0;
+      $this->smtp_conn = '0';
     }
   }
 
index 22d6f42b8e6ef0388e420db37ff98224b0b596f8..8a933e521f48985a1c654e2a228e194c1fc191c3 100644 (file)
@@ -69,7 +69,7 @@ class phpmailerTest extends TestCase
         $this->Mail->Subject = "Unit Test";\r
         $this->Mail->Body = "";\r
         $this->Mail->AltBody = "";\r
-        $this->Mail->WordWrap = 0;\r
+        $this->Mail->WordWrap = '0';\r
         $this->Mail->Host = $global_vars["mail_host"];\r
         $this->Mail->Port = 25;\r
         $this->Mail->Helo = "localhost.localdomain";\r
@@ -145,7 +145,7 @@ class phpmailerTest extends TestCase
         {\r
             $ReportBody .= "Attachments:" . $eol;\r
             $ReportBody .= $bullet_start;\r
-            for($i = 0; $i < count($this->Mail->attachment); $i++)\r
+            for($i = '0'; $i < count($this->Mail->attachment); $i++)\r
             {\r
                 $ReportBody .= $bullet . "Name: " . $this->Mail->attachment[$i][1] . ", ";\r
                 $ReportBody .= "Encoding: " . $this->Mail->attachment[$i][3] . ", ";\r
@@ -161,7 +161,7 @@ class phpmailerTest extends TestCase
             $ReportBody .= "-------" . $eol;\r
 \r
             $ReportBody .= $bullet_start;\r
-            for($i = 0; $i < count($this->ChangeLog); $i++)\r
+            for($i = '0'; $i < count($this->ChangeLog); $i++)\r
             {\r
                 $ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" . \r
                                $this->ChangeLog[$i][1] . "]" . $eol;\r
@@ -176,7 +176,7 @@ class phpmailerTest extends TestCase
             $ReportBody .= "-----" . $eol;\r
 \r
             $ReportBody .= $bullet_start;\r
-            for($i = 0; $i < count($this->NoteLog); $i++)\r
+            for($i = '0'; $i < count($this->NoteLog); $i++)\r
             {\r
                 $ReportBody .= $bullet . $this->NoteLog[$i] . $eol;\r
             }\r
index a476d30ef204bb21643d574a4ce0de8b28a0fb57..02c58e2d48af49cb34b8188a36e70cb2a78baaec 100644 (file)
@@ -113,7 +113,7 @@ class TestCase extends Assert /* implements Test */ {
       $testResult = $this->_createResult();\r
     $this->fResult = $testResult;\r
     $testResult->run(&$this);\r
-    $this->fResult = 0;\r
+    $this->fResult = '0';\r
     return $testResult;\r
   }\r
 \r
@@ -235,7 +235,7 @@ class TestSuite /* implements Test */ {
   function countTestCases() {\r
     /* Number of TestCases comprising this TestSuite (including those\r
        in any constituent TestSuites) */\r
-    $count = 0;\r
+    $count = '0';\r
     reset($fTests);\r
     while (list($na, $test_case) = each($this->fTests)) {\r
       $count += $test_case->countTestCases();\r
@@ -268,7 +268,7 @@ class TestFailure {
 class TestResult {\r
   /* Collect the results of running a set of TestCases. */\r
   var $fFailures = array();\r
-  var $fRunTests = 0;\r
+  var $fRunTests = '0';\r
   var $fStop = false;\r
 \r
   function TestResult() { }\r
@@ -331,7 +331,7 @@ class TextTestResult extends TestResult {
     $nFailures = $this->countFailures();\r
     printf("<p>%s test%s run<br>", $nRun, ($nRun == 1) ? '' : 's');\r
     printf("%s failure%s.<br>\n", $nFailures, ($nFailures == 1) ? '' : 's');\r
-    if ($nFailures == 0)\r
+    if ($nFailures == '0')\r
       return;\r
 \r
     print("<ol>\n");\r
index 66c350fdf146f561849b0d10a445da6b50d3522f..602820c88c6109769a1043b948ede3ed7bf77626 100644 (file)
@@ -130,7 +130,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                                } // END - if
 
                                                // Do we have send maximum mails?
-                                               if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == 0)) {
+                                               if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == '0')) {
                                                        // Yes, we have
                                                        //* DEBUG: */ print("*EXIT/L:".__LINE__."<br />");
                                                        break;
@@ -150,7 +150,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
 
                        // Close sending system
                        //* DEBUG: */ print("-L:".__LINE__.'/'.countSelection($dummy)."-<br />");
-                       if (countSelection($dummy) == 0) {
+                       if (countSelection($dummy) == '0') {
                                // Queue reached!
                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
                                array(bigintval($DATA['id'])), __FILE__, __LINE__);
index b6b705170c7742eb14fd73847b6675a4d6037564..dac7c27d85076dece6db43a27d6229bb7b0e48bf 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)) {
@@ -100,7 +100,7 @@ if (SQL_NUMROWS($result_main) > 0) {
 
                                        // If there's no stats entry add it!
                                        //* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />");
-                                       if (SQL_NUMROWS($result_stats) == 0) {
+                                       if (SQL_NUMROWS($result_stats) == '0') {
                                                // No entry was found, so we add him!
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
                                                        array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__);
@@ -209,7 +209,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `timestamp_send`=UNIX_TIMESTAMP() WHERE `pool_id`=%s LIMIT 1",
                                                        array(bigintval($DATA['id'])), __FILE__, __LINE__);
 
-                                               $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = 0;
+                                               $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = '0';
                                                $cnt2 += $GLOBALS['pool_cnt'];
 
                                                // Update mediadata if version is 0.0.4 or higher
@@ -238,7 +238,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 2614f26b4d649fac9bf0e6c6eb6d7d8d26430680..d8d2185b8808f60b98185fd8904d567f74eaea03 100644 (file)
@@ -90,7 +90,7 @@ if (SQL_NUMROWS($result_birthday) > 0) {
                        $content['check']  = '';
 
                        // @TODO 4 is hard-coded here, should we move it out in config?
-                       for ($idx = 0; $idx < 4; $idx++) {
+                       for ($idx = '0'; $idx < 4; $idx++) {
                                $content['check'] .= generateRandomCode("8", mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1)));
                        } // END - for
 
index 9e8a052dccc126bfde96ba5b91467520d0cdbf60..94bdeead11e42321d8d081747f23970aad614be4 100644 (file)
@@ -56,7 +56,7 @@ FROM
 WHERE
        (`last_update` < (UNIX_TIMESTAMP() - %s) AND `last_update` != 0 AND `last_profile_sent` < (UNIX_TIMESTAMP() - %s))
 OR
-       (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - %s))
+       (`last_update` = '0' AND `last_profile_sent` = '0' AND `joined` < (UNIX_TIMESTAMP() - %s))
 ORDER BY
        `userid` ASC",
                array(
@@ -72,7 +72,7 @@ ORDER BY
                        // Translate timestamp
                        $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 {
index e662138762362b744a3dbc8a52b0df53f190ca00..d7cf55d1bdeebb6d8b6058aac99e0343aa80f01e 100644 (file)
@@ -99,7 +99,7 @@ function mergeSqls ($SQLs, $type = '') {
 // Counter for SQLs array
 function countSqls () {
        // Default is false
-       $count = 0;
+       $count = '0';
 
        // Is the array there?
        if (isSqlsInitialized()) {
index 1e4b5dac22d7634abdd1ca86203bf1db3209ce2f..598ca9b5a4e23a510db68224606e8e824de14faa 100644 (file)
@@ -80,7 +80,7 @@ function incrementStatsEntry ($entry, $amount=1) {
 // Getter for stats
 function getStatsEntry ($entry) {
        // Default is zero
-       $stats = 0;
+       $stats = '0';
 
        // Is it there?
        if (isStatsEntrySet($entry)) {
index cd64492f18d13a9fd80b9c12b19e1faa74d39e96..d311ef3d29bdfe42698731562a3589f88cdd7147 100644 (file)
@@ -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 26187489f3450b0c4264429c305456d912a4af33..0bcd4f09b13e06a15bacda74b794b3857a516568 100644 (file)
@@ -711,7 +711,7 @@ function setAdminHash ($admin, $hash) {
 // Init user data array
 function initUserData () {
        // User id should not be zero
-       if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+       if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
 
        // Init the user
        $GLOBALS['user_data'][getCurrentUserId()]['status'] = 'GUEST';
@@ -720,7 +720,7 @@ function initUserData () {
 // Getter for user data
 function getUserData ($column) {
        // User id should not be zero
-       if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+       if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
 
        // Return the value
        return $GLOBALS['user_data'][getCurrentUserId()][$column];
@@ -729,7 +729,7 @@ function getUserData ($column) {
 // Geter for whole user data array
 function getUserDataArray () {
        // User id should not be zero
-       if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+       if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
 
        // Get the whole array
        return $GLOBALS['user_data'][getCurrentUserId()];
@@ -739,7 +739,7 @@ function getUserDataArray () {
 // in, but you should use isMember() if you want to find that out.
 function isUserDataValid () {
        // User id should not be zero
-       if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+       if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
 
        // Is the array there and filled?
        return ((isset($GLOBALS['user_data'][getCurrentUserId()])) && (count($GLOBALS['user_data'][getCurrentUserId()]) > 1));
index 27cf6e95987094772cd10c700291cb4f32080326..486b6321d53307e470f689040466f73118157cba 100644 (file)
--- a/index.php
+++ b/index.php
@@ -47,7 +47,7 @@ $GLOBALS['startTime'] = microtime(true);
 $GLOBALS['module'] = 'index';
 
 // Set 'CSS-Mode'
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 
 // Load config.php
 require('inc/config-global.php');
@@ -63,7 +63,7 @@ if (!isConfigEntrySet('index_delay'))  setConfigEntry('index_delay' , 0);
 if (!isConfigEntrySet('index_cookie')) setConfigEntry('index_cookie', 0);
 
 // Check for cookies
-if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == 0)) {
+if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == '0')) {
        // Is the index page configured for redirect pr not?
        if (getConfig('index_cookie') > 0) {
                // Set cookie and remeber it for specified time
index 1f3ff34eadb1ed18e1497d8ceb4d8dd8b4f1171e..22e48ef1b1417cd0909ab8f113e3672f92c5a305 100644 (file)
@@ -59,7 +59,7 @@ $GLOBALS['startTime'] = microtime(true);
 $GLOBALS['mxchange_installing'] = true;
 
 // Set CSS variable for "normal mode"
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 
 // Set module
 $GLOBALS['module'] = 'install';
index 47024cf435ab0e061e6c3ad18507ebf7b780dac2..6b53ae93b1a599f13ac307c78175f4f7732d88b7 100644 (file)
@@ -46,7 +46,7 @@ $GLOBALS['startTime'] = microtime(true);
 $GLOBALS['module'] = 'lead-confirm';
 
 // Set "CSS-Mode"
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 
 // Load config.php
 require('inc/config-global.php');
@@ -77,7 +77,7 @@ if (isSessionVariableSet('lead_userid')) {
                $content['lead_email'] = getUserData('email');
        } else {
                // Not found!
-               $content['lead_userid'] = 0;
+               $content['lead_userid'] = '0';
        }
 } else {
        // Maybe spider?
index 26a90bae141d36d122444dd58ec0d6314a1f6cac..5afcbacd71d2941d5c5c40f2297f69d6d4d201d4 100644 (file)
@@ -57,9 +57,9 @@ setContentType('text/html');
 redirectOnUninstalledExtension('mailid');
 
 // Init
-$url_userid = 0;
-$url_bid = 0;
-$url_mid = 0;
+$url_userid = '0';
+$url_bid = '0';
+$url_mid = '0';
 
 // Secure all data
 if (isGetRequestElementSet('userid'))  $url_userid = bigintval(getRequestElement('userid'));
@@ -67,7 +67,7 @@ if (isGetRequestElementSet('mailid'))  $url_mid    = bigintval(getRequestElement
 if (isGetRequestElementSet('bonusid')) $url_bid    = bigintval(getRequestElement('bonusid'));
 
 // 01           1        12            2    2            21    1                   22     10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
        // Init result
        $result_link = false;
 
@@ -127,7 +127,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                        if (fetchUserData($url_userid)) {
                                // Status must be CONFIRMED
                                if (getUserData('status') == 'CONFIRMED') {
-                                       // Update last activity
+                                       // Update last activity if not admin
                                        updateLastActivity($url_userid);
 
                                        // User has confirmed his account so we can procede...
@@ -171,7 +171,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 080fc732011db534bf73e15de08824a46ce6848b..b31eedf9348888cc34506db1e6e65d2680ca5e89 100644 (file)
@@ -59,10 +59,10 @@ redirectOnUninstalledExtension('mailid');
 redirectOnUninstalledExtension('other');
 
 // Init variables
-$url_userid = 0;
-$url_bid = 0;
-$url_mid = 0;
-$code = 0;
+$url_userid = '0';
+$url_bid = '0';
+$url_mid = '0';
+$code = '0';
 $mode = '';
 
 // Secure all data
@@ -73,7 +73,7 @@ if (isGetRequestElementSet('code'))    $code       = bigintval(getRequestElement
 if (isGetRequestElementSet('mode'))    $mode       = getRequestElement('mode');
 
 // 01           1        12            2    2            21    1                   22     10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
        // No image? Then output header
        if ($mode != 'img') loadIncludeOnce('inc/header.php');
 
@@ -125,7 +125,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                        SQL_FREERESULT($result_mailid);
 
                        // Set sender to 0 when we have a bonus mail
-                       if ($ltype == 'BONUS') $sender = 0;
+                       if ($ltype == 'BONUS') $sender = '0';
 
                        // Is the user id valid?
                        if (fetchUserData($url_userid) === true) {
@@ -171,9 +171,9 @@ 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;
+                                                       $img_code = '0';
                                                        if (!empty($code)) {
                                                                // Generate code
                                                                $img_code = generateRandomCode(getConfig('code_length'), $code, $url_userid, $urlId);
@@ -183,7 +183,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                        switch ($mode) {
                                                                case 'add':
                                                                        // Init stats data
-                                                                       $stats_data = 0;
+                                                                       $stats_data = '0';
 
                                                                        // Count clicks
                                                                        // @TODO Rewrite this to a filter
index 4034faef7d39d43af39461c91a9ae1c640c3f240..5437ef3e6ec225e67c9100d5f9fec57f3c3723f7 100644 (file)
@@ -46,7 +46,7 @@ require('inc/libs/security_functions.php');
 $GLOBALS['startTime'] = microtime(true);
 
 // Init output mode and module
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 $GLOBALS['module'] = '';
 
 // Needed include files
@@ -70,7 +70,7 @@ $check = 'failed';
 if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (!isAdmin()) && (getModule() != 'admin')) {
        // Maintain mode is active and you are no admin
        addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));
-} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == 0)) {
+} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == '0')) {
        // Construct module name
        $GLOBALS['module_inc'] =  sprintf("inc/modules/%s.php", getModule());
 
@@ -82,10 +82,10 @@ if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (
                case 'mem_only': // Member-only access
                case 'done': // All fine!
                        // Does the module exists on local file system?
-                       if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == 0)) {
+                       if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == '0')) {
                                // Module is valid, active and located on the local disc...
                                $isModuleValid = true;
-                       } elseif (getTotalFatalErrors() == 0) {
+                       } elseif (getTotalFatalErrors() == '0') {
                                // Module not found!
                                addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule()));
                        }
@@ -110,7 +110,7 @@ if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (
                        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
                        break;
        } // END - switch
-} elseif (getTotalFatalErrors() == 0) {
+} elseif (getTotalFatalErrors() == '0') {
        // MySQL problems!
        addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_ERRORS'));
 }
index cf45a31fe1723037bf90ecb2ee90bebf753778c6..d23e3d25466b8c492eaa3ee5bfadb304b44d2569 100644 (file)
@@ -44,7 +44,7 @@ $GLOBALS['startTime'] = microtime(true);
 
 // Set this because we have no module in URI
 $GLOBALS['module'] = 'show_bonus';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 
 // Load the required file(s)
 require('inc/config-global.php');
index 8194064e4a21c565c488c4665abb0440eead29e0..14e27b6559daa1e6e9d3e003eb7c16d047e753f8 100644 (file)
@@ -44,7 +44,7 @@ $GLOBALS['startTime'] = microtime(true);
 
 // Set module
 $GLOBALS['module'] = 'surfbar';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 $GLOBALS['header_sent'] = 3;
 
 // Load the required file(s)
@@ -56,7 +56,7 @@ setContentType('text/html');
 // Is a frame active?
 if (isGetRequestElementSet('frame')) {
        // Then we need to set header_sent to 0
-       $GLOBALS['header_sent'] = 0;
+       $GLOBALS['header_sent'] = '0';
 } // END - if
 
 // Only logged in users may use this surfbar!
diff --git a/templates/de/emails/admins_mail_contct_admin.tpl b/templates/de/emails/admins_mail_contct_admin.tpl
deleted file mode 100644 (file)
index 84d1ed3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-@DEPRECATED
diff --git a/templates/de/emails/admins_msg_contct_admin.tpl b/templates/de/emails/admins_msg_contct_admin.tpl
deleted file mode 100644 (file)
index 84d1ed3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-@DEPRECATED
diff --git a/templates/de/html/admin/admin_add_network.tpl b/templates/de/html/admin/admin_add_network.tpl
new file mode 100644 (file)
index 0000000..2453a07
--- /dev/null
@@ -0,0 +1,90 @@
+<div align="center">
+<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&amp;what=list_networks&amp;do=addnetwork" method="post" style="margin-bottom: 0px">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+       <tr>
+               <td class="admin_title bottom2" colspan="2" align="center" height="30">
+                       <strong>{--ADMIN_NETWORK_ADD_TITLE--}</strong>
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_SHORT_NAME--}:</td>
+               <td>
+                       <input type="text" name="network_short_name" class="admin_normal" size="10" maxlength="50" />
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_TITLE--}:</td>
+               <td>
+                       <input type="text" name="network_title" class="admin_normal" size="20" maxlength="255" />
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_REFLINK--}:</td>
+               <td>
+                       <input type="text" name="network_reflink" class="admin_normal" size="30" maxlength="255" />
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_DATA_SEPERATOR--}:</td>
+               <td>
+                       <input type="text" name="network_data_seperator" class="admin_normal" size="4" maxlength="4" />
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_ROW_SEPERATOR--}:</td>
+               <td>
+                       <input type="text" name="network_row_seperator" class="admin_normal" size="4" maxlength="4" />
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_REQUEST_TYPE--}:</td>
+               <td>
+                       <select class="admin_select" name="network_request_type" size="1">
+                               <option value="GET">{--ADMIN_NETWORK_REQUEST_TYPE_GET--}</option>
+                               <option value="POST">{--ADMIN_NETWORK_REQUEST_TYPE_POST--}</option>
+                       </select>
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="right" width="200">{--ADMIN_NETWORK_CHARSET--}:</td>
+               <td>
+                       <input type="text" name="network_charset" class="admin_normal" size="15" maxlength="20" />
+               </td>
+       </tr>
+       <tr>
+               <td class="seperator bottom2" colspan="2" height="7">&nbsp;</td>
+       </tr>
+       <tr>
+               <td class="admin_footer" colspan="2" align="center">
+                       <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+                       <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_NETWORK_ADD--}" />
+               </td>
+       </tr>
+</table>
+</form>
+</div>
+
+<div class="admin_note">
+       {--ADMIN_NETWORK_ADD_NOTE--}
+</div>
index e358aff85ed4c8871557bb5eb0309a847e31a395..4d6024733025eed462411bdef3ec678849057634 100644 (file)
                </td>
                <td class="seperator" width="5">&nbsp;</td>
                <td align="center">
-                       <select name="beg_pay_mode" size="1">
+                       <select class="admin_select" name="beg_pay_mode" size="1">
                                <option value="IMG"$content[pay_mode_img]>{--ADMIN_BEG_PAY_MODE_IMG--}</option>
                                <option value="JS"$content[pay_mode_js]>{--ADMIN_BEG_PAY_MODE_JS--}</option>
                                <option value="BOTH"$content[pay_mode_both]>{--ADMIN_BEG_PAY_MODE_BOTH--}</option>
diff --git a/templates/de/html/admin/admin_edit_networks_row.tpl b/templates/de/html/admin/admin_edit_networks_row.tpl
new file mode 100644 (file)
index 0000000..508996c
--- /dev/null
@@ -0,0 +1,37 @@
+<tr>
+       <td class="$content[sw]">{--ADMIN_NETWORK_SHORT_NAME--}:</td>
+       <td class="$content[sw]">
+               <input type="text" name="network_short_name[$content[network_id]]" class="admin_normal" size="10" maxlength="50" value="$content[network_short_name]" />
+       </td>
+       <td class="$content[sw]">{--ADMIN_NETWORK_TITLE--}:</td>
+       <td class="$content[sw]">
+               <input type="text" name="network_title[$content[network_id]]" class="admin_normal" size="20" maxlength="255" value="$content[network_title]" />
+       </td>
+</tr>
+<tr>
+       <td class="$content[sw]">{--ADMIN_NETWORK_REFLINK--}:</td>
+       <td class="$content[sw]">
+               <input type="text" name="network_reflink[$content[network_id]]" class="admin_normal" size="30" maxlength="255" value="$content[network_reflink]" />
+       </td>
+       <td class="$content[sw]">{--ADMIN_NETWORK_DATA_SEPERATOR--}:</td>
+       <td class="$content[sw]">
+               <input type="text" name="network_data_seperator[$content[network_id]]" class="admin_normal" size="4" maxlength="4" value="$content[network_data_seperator]" />
+       </td>
+</tr>
+<tr>
+       <td class="$content[sw]">{--ADMIN_NETWORK_ROW_SEPERATOR--}:</td>
+       <td class="$content[sw]">
+               <input type="text" name="network_row_seperator[$content[network_id]]" class="admin_normal" size="4" maxlength="4" value="$content[network_row_seperator]" />
+       </td>
+       <td class="$content[sw]">{--ADMIN_NETWORK_REQUEST_TYPE--}:</td>
+       <td class="$content[sw]">
+               $content[network_request_type]
+       </td>
+</tr>
+<tr>
+       <td class="$content[sw]">{--ADMIN_NETWORK_CHARSET--}:</td>
+       <td class="$content[sw]">
+               <input type="text" name="network_charset[$content[network_id]]" class="admin_normal" size="15" maxlength="20" value="$content[network_charset]" />
+       </td>
+       <td class="$content[sw] seperator" colspan="2">&nbsp;</td>
+</tr>
diff --git a/templates/de/html/admin/admin_list_networks.tpl b/templates/de/html/admin/admin_list_networks.tpl
new file mode 100644 (file)
index 0000000..9a0b9e7
--- /dev/null
@@ -0,0 +1,34 @@
+<div align="center">
+<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&amp;what=list_networks&amp;do=handlenetwork" method="post">
+<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed">
+       <tr>
+               <td height="25" colspan="3" class="admin_title bottom2 right2 seperator">&nbsp;</td>
+               <td colspan="2" class="admin_title bottom2 right2" align="center">
+                       <strong>{--ADMIN_NETWORK_SEPERATOR--}</strong>
+               </td>
+               <td colspan="2" class="admin_title bottom2 seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td align="center" class="admin_title bottom2 right2" height="25"><strong>{--ID_SELECT--}</strong></td>
+               <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_SHORT_NAME--}</strong></td>
+               <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_REFLINK--}</strong></td>
+               <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_DATA_SEPERATOR2--}</strong></td>
+               <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_ROW_SEPERATOR2--}</strong></td>
+               <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_REQUEST_TYPE--}</strong></td>
+               <td align="center" class="admin_title bottom2"><strong>{--ADMIN_NETWORK_CHARSET--}</strong></td>
+       </tr>
+       $content
+       <tr>
+               <td colspan="7" class="admin_footer">
+                       <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+                       <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_NETWORK_EDIT--}" />
+                       <input type="submit" name="del" class="admin_delete" value="{--ADMIN_NETWORK_DELETE--}" />
+               </td>
+       </tr>
+</table>
+</form>
+
+<div class="admin_note">
+       {--ADMIN_NETWORK_LIST_NOTE--}
+</div>
+</div>
diff --git a/templates/de/html/admin/admin_list_networks_row.tpl b/templates/de/html/admin/admin_list_networks_row.tpl
new file mode 100644 (file)
index 0000000..f75fa9e
--- /dev/null
@@ -0,0 +1,28 @@
+<tr>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">
+               <input type="checkbox" title="{--ID_SELECT--} $content[network_id]" class="admin_normal" name="sel[$content[network_id]]" value="1" />
+       </td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">
+               $content[network_short_name]:
+               [<a
+                href="{?URL?}/modules.php?module=admin&amp;what=list_network_types&amp;network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_TYPES_LINK_TITLE--}">T</a>|<a
+                href="{?URL?}/modules.php?module=admin&amp;what=list_network_params&amp;network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE--}">P</a>|<a
+                href="{?URL?}/modules.php?module=admin&amp;what=list_network_code_types&amp;network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_CODE_TYPES_LINK_TITLE--}">CT</a>|<a
+                href="{?URL?}/modules.php?module=admin&amp;what=list_network_codes&amp;network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_CODES_LINK_TITLE--}">C</a>]
+       </td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">
+               [<a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>]
+       </td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">
+               $content[network_data_seperator]
+       </td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">
+               $content[network_row_seperator]
+       </td>
+       <td class="switch_sw$content[sw] bottom2 right2" align="center">
+               $content[network_request_type]
+       </td>
+       <td class="switch_sw$content[sw] bottom2" align="center">
+               $content[network_charset]
+       </td>
+</tr>
diff --git a/templates/de/html/admin/admin_network_added.tpl b/templates/de/html/admin/admin_network_added.tpl
new file mode 100644 (file)
index 0000000..790a4ca
--- /dev/null
@@ -0,0 +1,13 @@
+<div align="center" style="margin-top:10px;margin-bottom:10px">
+
+<div style="width:550px" class="admin_table dashed">
+       <div class="admin_title2 bottom2">
+               {--ADMIN_NETWORK_ADDED_TITLE--}
+       </div>
+       <div class="admin_message">
+               Das Werbenetzwerk $content[network_title] wurde soeben hinzugef&uuml;gt.
+               Sie sollten nun als n&auml;chstes die <a href="{?URL?}/modules.php?module=admin&amp;what=list_network_types&amp;network=$content[network_id]">Werbearten hinzuf&uuml;gen</a>.
+       </div>
+</div>
+
+</div>
index 2767d477cbb63dfe42ae212c6f666e839b2b26b9..c9dc3f8cd739fbef68a8cafc0464a851585e1544 100644 (file)
@@ -35,7 +35,7 @@ A:link {
 }
 
 A:visited {
-       color: #AA0044;
+       color: #ae3139;
 }
 
 A:active {
@@ -50,7 +50,7 @@ A:hover {
 input,textarea {
        color: #009900;
        background-color: #EEFFEE;
-       border: 1px solid #AA0044;
+       border: 1px solid #00aa44;
        text-decoration: none;
        border-style: groove;
 }
@@ -58,7 +58,7 @@ input,textarea {
 select,option {
        background-color: #EEFFEE;
        border: solid 1px #009900;
-       color: #AA0044;
+       color: #00aa44;
        text-decoration: none;
        border-style: groove;
 }
@@ -71,12 +71,12 @@ ul,ol {
 .admin_reset, .guest_reset, .member_reset {
        border-style: groove;
        border: solid 1px #009900;
-       color: #AA0044;
+       color: #00aa44;
        cursor: pointer;
 }
 
 .admin_submit, .guest_submit, .member_submit {
-       color: #AA0044;
+       color: #00aa44;
        border-color: #009900;
        cursor: pointer;
 }
@@ -163,7 +163,7 @@ DIV.admin_note {
 }
 
 .admin_done2 {
-       color: #AA0044;
+       color: #00aa44;
 }
 
 .admin_green, .admin_no {
@@ -235,7 +235,7 @@ DIV.admin_note {
 }
 
 .admin_header_b1 {
-       border-bottom: 1px solid #AA0044;
+       border-bottom: 1px solid #00aa44;
        background-color: #ddeedd;
        height: 22px;
 }
@@ -296,12 +296,12 @@ DIV.admin_note {
        color: #009900;
        height: 25px;
        width: 200px;
-       border: 1px solid #AA0044;
+       border: 1px solid #00aa44;
 }
 
 .guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom
        {
-       border: 1px solid #AA0044;
+       border: 1px solid #00aa44;
        border-top: 0px;
        background-color: #eeffbc;
        height: 22px;
@@ -309,7 +309,7 @@ DIV.admin_note {
 }
 
 .member_menu_whats {
-       border: 1px solid #AA0044;
+       border: 1px solid #00aa44;
        border-top: 0px;
        background-color: #eeffee;
        height: 20px;
@@ -374,7 +374,7 @@ ul.copyright_box {
 }
 
 .dashed {
-       border: solid 1px #AA0044;
+       border: solid 1px #00aa44;
 }
 
 .switch_sw1, .switch_mem1 {
@@ -463,7 +463,7 @@ ul.copyright_box {
 .admin_delete, .admin_yes {
        border-style: groove;
        border: solid 1px #00AA00;
-       background-color: #AA0044;
+       background-color: #aa0044;
        color: #DDEEDD;
        cursor: pointer;
 }
@@ -599,19 +599,19 @@ ul.copyright_box {
 }
 
 .top2 {
-       border-top: 1px solid #AA0044;
+       border-top: 1px solid #00aa44;
 }
 
 .bottom2 {
-       border-bottom: 1px solid #AA0044;
+       border-bottom: 1px solid #00aa44;
 }
 
 .left2 {
-       border-left: 1px solid #AA0044;
+       border-left: 1px solid #00aa44;
 }
 
 .right2 {
-       border-right: 1px solid #AA0044;
+       border-right: 1px solid #00aa44;
 }
 
 .nobr {
@@ -657,7 +657,7 @@ ul.copyright_box {
 }
 
 .theme_box {
-       border: 1px dotted #AA0044;
+       border: 1px dotted #00aa44;
        border-top: 0px;
        width: 100%;
        height: 70px;
@@ -704,7 +704,7 @@ ul.copyright_box {
 }
 
 ul.show_timings_block {
-       border: solid 1px #AA0044;
+       border: solid 1px #00aa44;
        background-color: #ddeedd;
        width: 565px;
        height: 20px;
@@ -747,7 +747,7 @@ li.show_timings_column {
 .member_skyscraper, .guest_skyscraper {
        width: 122px;
        height: 602px;
-       border: 1px solid #AA0044;
+       border: 1px solid #00aa44;
        margin: 0px;
        padding: 0px;
        padding-top: 1px;
index 6e42a8966bdc88f1fbd3b7ea797d1e0a5cbb958c..6d409022a1cf94bb7038e6e8b2fb6ea1afdf3f59 100644 (file)
@@ -5,11 +5,11 @@
 .register_reset {
        border-style: groove;
        border: solid 1px #009900;
-       color: #AA0044;
+       color: #00aa44;
 }
 
 .register_submit {
-       color: #AA0044;
+       color: #00aa44;
        border-color: #009900;
 }
 
        background-color: #eeffbc;
        color: #0000AA;
        font-weight: bold;
-       border-top: 1px dotted #AA0044;
-       border-bottom: 1px dotted #AA0044;
+       border-top: 1px dotted #00aa44;
+       border-bottom: 1px dotted #00aa44;
        height: 25px;
 }
 
 .register_term {
-       background-color: #AA0044;
+       background-color: #00aa44;
 }