From 2379934be6a196a54f4155bb8e24c49b20736969 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 3 Aug 2011 04:51:02 +0000 Subject: [PATCH] Extension ext-earning introduced (unfinished), renamings: - Extension ext-earning introduced (ext-sql_patches did hold the tables) - Some messages updated ('Mitglied-Id' reads better) - All fooRequestParameterBar() functions renamed to fooRequestElementBar() - TODOs.txt updated --- .gitattributes | 13 ++ DOCS/TODOs.txt | 10 +- beg.php | 14 +- birthday_confirm.php | 6 +- click.php | 8 +- confirm.php | 4 +- debug.php | 10 +- doubler.php | 40 ++-- img.php | 8 +- inc/callback-functions.php | 2 +- inc/expression-functions.php | 4 +- inc/extensions/ext-beg.php | 2 +- inc/extensions/ext-bonus.php | 4 +- inc/extensions/ext-doubler.php | 2 +- inc/extensions/ext-earning.php | 134 ++++++++++++ inc/extensions/ext-forced.php | 8 +- inc/extensions/ext-nickname.php | 4 +- inc/extensions/ext-sql_patches.php | 40 +--- inc/extensions/ext-task.php | 2 +- inc/filter/bonus_filter.php | 2 +- inc/filter/forced_filter.php | 17 ++ inc/filter/other_filter.php | 2 +- inc/filter/politician_stop_filter.php | 2 +- inc/filter/theme_filter.php | 4 +- inc/filter/uberwach_filter.php | 2 +- inc/filters.php | 12 +- inc/functions.php | 34 +-- inc/header.php | 2 +- inc/install-functions.php | 38 ++-- inc/install-inc.php | 98 ++++----- inc/js/js-surfbar_frame_top.php | 6 +- inc/js/js-surfbar_member_edit.php | 4 +- inc/language-functions.php | 4 +- inc/language/admins_de.php | 4 +- inc/language/beg_de.php | 8 +- inc/language/bonus_de.php | 2 +- inc/language/de.php | 36 ++-- inc/language/earning_de.php | 78 +++++++ inc/language/forced_de.php | 3 + inc/language/holiday_de.php | 2 +- inc/language/install_de.php | 18 +- inc/language/nickname_de.php | 4 +- inc/language/refback_de.php | 2 +- inc/language/sponsor_de.php | 24 +-- inc/language/yoomedia_de.php | 2 +- inc/libs/earning_functions.php | 203 ++++++++++++++++++ inc/libs/network_functions.php | 92 ++++---- inc/libs/newsletter_functions.php | 2 +- inc/libs/primera_functions.php | 2 +- inc/libs/register_functions.php | 168 +++++++-------- inc/libs/sponsor_functions.php | 16 +- inc/libs/surfbar_functions.php | 4 +- inc/libs/theme_functions.php | 12 +- inc/libs/user_functions.php | 38 ++-- inc/load_config.php | 2 +- inc/loader/load-earning.php | 6 +- inc/mails/doubler_mails.php | 4 +- inc/modules/admin.php | 126 +++++------ inc/modules/admin/action-logout.php | 4 +- inc/modules/admin/admin-inc.php | 76 +++---- inc/modules/admin/what-add_points.php | 32 +-- inc/modules/admin/what-add_rallye.php | 16 +- inc/modules/admin/what-add_surfbar_url.php | 4 +- inc/modules/admin/what-admin_add.php | 24 +-- inc/modules/admin/what-adminedit.php | 26 +-- inc/modules/admin/what-admins_add.php | 4 +- inc/modules/admin/what-admins_contct.php | 10 +- inc/modules/admin/what-admins_edit.php | 14 +- inc/modules/admin/what-admins_mails.php | 12 +- inc/modules/admin/what-config_beg.php | 6 +- inc/modules/admin/what-config_bonus.php | 18 +- inc/modules/admin/what-config_cats.php | 22 +- inc/modules/admin/what-config_home.php | 8 +- inc/modules/admin/what-config_mediadata.php | 18 +- inc/modules/admin/what-config_mods.php | 18 +- inc/modules/admin/what-config_other.php | 26 +-- inc/modules/admin/what-config_payouts.php | 44 ++-- inc/modules/admin/what-config_points.php | 50 ++--- inc/modules/admin/what-config_primera.php | 6 +- .../admin/what-config_rallye_prices.php | 42 ++-- inc/modules/admin/what-config_register.php | 2 +- inc/modules/admin/what-config_register2.php | 4 +- inc/modules/admin/what-config_rewrite.php | 6 +- inc/modules/admin/what-config_secure.php | 4 +- inc/modules/admin/what-config_session.php | 2 +- inc/modules/admin/what-config_wernis.php | 6 +- inc/modules/admin/what-del_email.php | 34 +-- inc/modules/admin/what-del_holiday.php | 12 +- inc/modules/admin/what-del_sponsor.php | 22 +- inc/modules/admin/what-del_transfer.php | 2 +- inc/modules/admin/what-del_user.php | 20 +- inc/modules/admin/what-edit_emails.php | 36 ++-- inc/modules/admin/what-edit_sponsor.php | 46 ++-- inc/modules/admin/what-edit_user.php | 34 +-- inc/modules/admin/what-email_archiv.php | 6 +- inc/modules/admin/what-email_details.php | 24 +-- inc/modules/admin/what-extensions.php | 50 ++--- inc/modules/admin/what-guest_add.php | 28 +-- inc/modules/admin/what-guestedit.php | 14 +- inc/modules/admin/what-list_admins_acls.php | 42 ++-- inc/modules/admin/what-list_bank_package.php | 12 +- inc/modules/admin/what-list_beg.php | 2 +- inc/modules/admin/what-list_bonus.php | 2 +- inc/modules/admin/what-list_cats.php | 6 +- inc/modules/admin/what-list_country.php | 36 ++-- inc/modules/admin/what-list_coupon.php | 4 +- inc/modules/admin/what-list_doubler.php | 14 +- inc/modules/admin/what-list_email_max_rec.php | 24 +-- inc/modules/admin/what-list_forced_ads.php | 2 +- inc/modules/admin/what-list_links.php | 24 +-- .../what-list_network_api_translation.php | 14 +- .../admin/what-list_network_params.php | 14 +- inc/modules/admin/what-list_network_types.php | 6 +- inc/modules/admin/what-list_nickname.php | 2 +- inc/modules/admin/what-list_notifications.php | 6 +- inc/modules/admin/what-list_payouts.php | 28 +-- inc/modules/admin/what-list_rallyes.php | 52 ++--- inc/modules/admin/what-list_refs.php | 10 +- inc/modules/admin/what-list_sponsor.php | 20 +- inc/modules/admin/what-list_sponsor_pay.php | 48 ++--- inc/modules/admin/what-list_sponsor_pays.php | 6 +- inc/modules/admin/what-list_surfbar_urls.php | 2 +- inc/modules/admin/what-list_task.php | 26 +-- inc/modules/admin/what-list_unconfirmed.php | 16 +- inc/modules/admin/what-list_user.php | 36 ++-- inc/modules/admin/what-list_yoomedia_tm.php | 4 +- inc/modules/admin/what-lock_sponsor.php | 18 +- inc/modules/admin/what-lock_user.php | 40 ++-- inc/modules/admin/what-logs.php | 4 +- inc/modules/admin/what-mem_add.php | 28 +-- inc/modules/admin/what-memedit.php | 14 +- inc/modules/admin/what-overview.php | 2 +- inc/modules/admin/what-payments.php | 20 +- inc/modules/admin/what-refbanner.php | 28 +-- inc/modules/admin/what-send_bonus.php | 10 +- inc/modules/admin/what-send_coupon.php | 14 +- inc/modules/admin/what-send_newsletter.php | 12 +- inc/modules/admin/what-stats_mods.php | 4 +- inc/modules/admin/what-sub_points.php | 32 +-- inc/modules/admin/what-surfbar_stats.php | 4 +- inc/modules/admin/what-theme_edit.php | 10 +- inc/modules/admin/what-theme_import.php | 14 +- inc/modules/admin/what-unlock_emails.php | 16 +- inc/modules/admin/what-unlock_sponsor.php | 2 +- .../admin/what-unlock_surfbar_urls.php | 8 +- inc/modules/admin/what-usage.php | 16 +- inc/modules/admin/what-user_contct.php | 12 +- inc/modules/frametester.php | 24 +-- inc/modules/guest/what-confirm.php | 8 +- inc/modules/guest/what-login.php | 34 +-- inc/modules/guest/what-register.php | 43 ++-- inc/modules/guest/what-sponsor_login.php | 34 +-- inc/modules/guest/what-sponsor_reg.php | 116 +++++----- inc/modules/guest/what-stats.php | 10 +- inc/modules/loader.php | 4 +- inc/modules/member/what-book_surfbar.php | 8 +- inc/modules/member/what-cash_coupon.php | 6 +- inc/modules/member/what-categories.php | 10 +- inc/modules/member/what-earnings.php | 62 ++++++ inc/modules/member/what-holiday.php | 30 +-- inc/modules/member/what-html_mail.php | 2 +- inc/modules/member/what-list_surfbar.php | 4 +- inc/modules/member/what-mydata.php | 70 +++--- inc/modules/member/what-nickname.php | 14 +- inc/modules/member/what-order.php | 126 +++++------ inc/modules/member/what-payout.php | 36 ++-- inc/modules/member/what-primera.php | 42 ++-- inc/modules/member/what-refback.php | 10 +- inc/modules/member/what-support.php | 14 +- inc/modules/member/what-themes.php | 6 +- inc/modules/member/what-transfer.php | 66 +++--- inc/modules/member/what-unconfirmed.php | 8 +- inc/modules/member/what-wernis.php | 54 ++--- inc/modules/order.php | 6 +- inc/modules/sponsor/account.php | 20 +- inc/modules/sponsor/settings.php | 8 +- inc/mysql-manager.php | 16 +- inc/referal-functions.php | 2 +- inc/request-functions.php | 24 +-- inc/revision-functions.php | 2 +- inc/stylesheet.php | 8 +- inc/template-functions.php | 14 +- inc/wrapper-functions.php | 14 +- install.php | 4 +- js.php | 4 +- mailid.php | 6 +- mailid_top.php | 12 +- show_bonus.php | 14 +- sponsor_confirm.php | 4 +- surfbar.php | 34 +-- .../de/emails/admin/admin_coupon_cashed.tpl | 2 +- .../admin/admin_delete_surfbar_urls.tpl | 2 +- .../de/emails/admin/admin_earning_added.tpl | 20 ++ .../de/emails/admin/admin_earning_updated.tpl | 18 ++ .../emails/admin/admin_edit_surfbar_urls.tpl | 2 +- .../admin/admin_holiday_deactivated.tpl | 2 +- .../de/emails/admin/admin_holiday_request.tpl | 2 +- .../admin/admin_lock_active_surfbar_urls.tpl | 2 +- .../admin/admin_lock_locked_surfbar_urls.tpl | 2 +- .../emails/admin/admin_newsletter_reset.tpl | 2 +- .../de/emails/admin/admin_payout_request.tpl | 2 +- .../admin/admin_payout_request_banner.tpl | 2 +- .../de/emails/admin/admin_support-ordr.tpl | 2 +- .../de/emails/admin/admin_support-reflink.tpl | 2 +- .../admin/admin_support-unconfirmed.tpl | 2 +- .../admin_surfbar_url_active_deleted.tpl | 2 +- .../admin_surfbar_url_active_depleted.tpl | 2 +- .../admin_surfbar_url_active_pending.tpl | 2 +- .../admin_surfbar_url_active_stopped.tpl | 2 +- .../admin/admin_surfbar_url_confirmed.tpl | 2 +- .../admin_surfbar_url_locked_deleted.tpl | 2 +- .../admin_surfbar_url_locked_pending.tpl | 2 +- .../admin/admin_surfbar_url_migrate.tpl | 2 +- .../admin_surfbar_url_migrated_deleted.tpl | 2 +- .../admin_surfbar_url_migrated_migrated.tpl | 2 +- .../admin_surfbar_url_migrated_pending.tpl | 2 +- .../admin/admin_surfbar_url_pending.tpl | 2 +- .../admin_surfbar_url_pending_active.tpl | 2 +- .../admin_surfbar_url_pending_deleted.tpl | 2 +- .../admin_surfbar_url_pending_rejected.tpl | 2 +- .../de/emails/admin/admin_surfbar_url_reg.tpl | 2 +- .../admin/admin_surfbar_url_rejected.tpl | 2 +- .../admin_surfbar_url_stopped_continued.tpl | 2 +- .../admin_surfbar_url_stopped_deleted.tpl | 2 +- .../admin_surfbar_url_stopped_pending.tpl | 2 +- .../de/emails/admin/admin_transfer_points.tpl | 4 +- .../admin_undelete_active_surfbar_urls.tpl | 2 +- .../de/emails/admin/admin_wernis_request.tpl | 2 +- .../member/member_bonus_pool_normal.tpl | 2 +- .../de/emails/member/member_delete_links.tpl | 2 +- .../member/member_delete_surfbar_urls.tpl | 2 +- .../de/emails/member/member_earning_added.tpl | 18 ++ .../emails/member/member_earning_updated.tpl | 16 ++ .../member/member_edit_surfbar_urls.tpl | 2 +- .../member/member_holiday_activated.tpl | 2 +- .../emails/member/member_holiday_removed.tpl | 2 +- .../emails/member/member_holiday_request.tpl | 2 +- .../emails/member/member_holiday_unlock.tpl | 2 +- .../member_lock_active_surfbar_urls.tpl | 2 +- .../member_lock_locked_surfbar_urls.tpl | 2 +- templates/de/emails/member/member_profile.tpl | 2 +- templates/de/emails/member/member_refback.tpl | 2 +- .../de/emails/member/member_support-ordr.tpl | 2 +- .../emails/member/member_support-reflink.tpl | 2 +- .../member/member_support-unconfirmed.tpl | 2 +- .../member/member_surfbar_low_points.tpl | 2 +- .../member_surfbar_url_active_deleted.tpl | 2 +- .../member_surfbar_url_active_pending.tpl | 2 +- .../member_surfbar_url_active_stopped.tpl | 2 +- .../member/member_surfbar_url_confirmed.tpl | 2 +- .../member/member_surfbar_url_depleted.tpl | 2 +- .../member_surfbar_url_locked_deleted.tpl | 2 +- .../member_surfbar_url_locked_pending.tpl | 2 +- .../member/member_surfbar_url_migrate.tpl | 2 +- .../member_surfbar_url_migrated_deleted.tpl | 2 +- .../member_surfbar_url_migrated_migrated.tpl | 2 +- .../member_surfbar_url_migrated_pending.tpl | 2 +- .../member/member_surfbar_url_pending.tpl | 2 +- .../member_surfbar_url_pending_active.tpl | 2 +- .../member_surfbar_url_pending_deleted.tpl | 2 +- .../member_surfbar_url_pending_rejected.tpl | 2 +- .../emails/member/member_surfbar_url_reg.tpl | 2 +- .../member/member_surfbar_url_rejected.tpl | 2 +- .../member_surfbar_url_stopped_continued.tpl | 2 +- .../member_surfbar_url_stopped_deleted.tpl | 2 +- .../member_surfbar_url_stopped_pending.tpl | 2 +- .../member/member_surfbar_url_unlock.tpl | 2 +- .../member/member_transfer_recipient.tpl | 4 +- .../emails/member/member_transfer_sender.tpl | 4 +- .../member_undelete_active_surfbar_urls.tpl | 2 +- .../de/emails/member/member_user_deleted.tpl | 2 +- .../de/emails/member/member_user_locked.tpl | 2 +- .../emails/member/member_user_pool_normal.tpl | 2 +- .../de/emails/member/member_user_unlocked.tpl | 4 +- templates/de/emails/newsletter.tpl | 2 +- templates/de/emails/newsletter_html.tpl | 2 +- templates/de/html/admin/admin_add_admins.tpl | 4 +- templates/de/html/admin/admin_edit_user.tpl | 4 +- .../admin/admin_list_network_params_row.tpl | 2 +- templates/de/html/admin/admin_list_user.tpl | 2 +- templates/de/html/admin/admin_reg_form.tpl | 4 +- .../html/admin/admin_reset_password_form.tpl | 4 +- templates/de/html/ext/ext_earning.tpl | 3 + templates/de/html/guest/guest_extensions.tpl | 2 +- templates/de/html/guest/guest_register.tpl | 2 +- templates/de/html/install/install_page2.tpl | 4 +- templates/de/html/install/install_page3.tpl | 4 +- .../member/member_book_surfbar_dynamic.tpl | 6 +- .../member/member_book_surfbar_static.tpl | 4 +- .../de/html/member/member_doubler_list.tpl | 2 + templates/de/html/member/member_earning.tpl | 13 ++ .../member/member_earning_data_invalid.tpl | 32 +++ .../html/member/member_earning_data_popup.tpl | 12 ++ .../member/member_earning_popup_form_row.tpl | 22 ++ .../html/member/member_earning_popup_row.tpl | 28 +++ .../member/member_start_surfbar_dynamic.tpl | 4 +- .../member/member_start_surfbar_static.tpl | 4 +- .../member_surfbar_delete_action_form.tpl | 4 +- .../member_surfbar_edit_action_form.tpl | 2 +- theme/business/css/general.css | 6 + theme/default/css/general.css | 6 + theme/desert/css/general.css | 6 + theme/org/css/general.css | 2 +- theme/schleuder/css/general.css | 2 +- theme/ship-simu/css/general.css | 2 +- view.php | 8 +- 306 files changed, 2581 insertions(+), 1894 deletions(-) create mode 100644 inc/extensions/ext-earning.php create mode 100644 inc/language/earning_de.php create mode 100644 inc/libs/earning_functions.php create mode 100644 templates/de/emails/admin/admin_earning_added.tpl create mode 100644 templates/de/emails/admin/admin_earning_updated.tpl create mode 100644 templates/de/emails/member/member_earning_added.tpl create mode 100644 templates/de/emails/member/member_earning_updated.tpl create mode 100644 templates/de/html/ext/ext_earning.tpl create mode 100644 templates/de/html/member/member_earning.tpl create mode 100644 templates/de/html/member/member_earning_data_invalid.tpl create mode 100644 templates/de/html/member/member_earning_data_popup.tpl create mode 100644 templates/de/html/member/member_earning_popup_form_row.tpl create mode 100644 templates/de/html/member/member_earning_popup_row.tpl diff --git a/.gitattributes b/.gitattributes index 1e4ed11c7b..f465bb5705 100644 --- a/.gitattributes +++ b/.gitattributes @@ -144,6 +144,7 @@ inc/extensions/ext-coupon.php svneol=native#text/plain inc/extensions/ext-debug.php svneol=native#text/plain inc/extensions/ext-demo.php svneol=native#text/plain inc/extensions/ext-doubler.php svneol=native#text/plain +inc/extensions/ext-earning.php svneol=native#text/plain inc/extensions/ext-events.php svneol=native#text/plain inc/extensions/ext-forced.php svneol=native#text/plain inc/extensions/ext-funcoins.php svneol=native#text/plain @@ -273,6 +274,7 @@ inc/language/coupon_de.php svneol=native#text/plain inc/language/de.php svneol=native#text/plain inc/language/debug_de.php svneol=native#text/plain inc/language/doubler_de.php svneol=native#text/plain +inc/language/earning_de.php svneol=native#text/plain inc/language/en.php svneol=native#text/plain inc/language/forced_de.php svneol=native#text/plain inc/language/funcoins_de.php svneol=native#text/plain @@ -330,6 +332,7 @@ inc/libs/country_functions.php svneol=native#text/plain inc/libs/coupon_functions.php svneol=native#text/plain inc/libs/debug_functions.php svneol=native#text/plain inc/libs/doubler_functions.php svneol=native#text/plain +inc/libs/earning_functions.php svneol=native#text/plain inc/libs/events_functions.php svneol=native#text/plain inc/libs/forced_functions.php svneol=native#text/plain inc/libs/funcoins_functions.php svneol=native#text/plain @@ -817,6 +820,8 @@ templates/de/emails/admin/admin_coupon_purge.tpl svneol=native#text/plain templates/de/emails/admin/admin_coupon_purge_row.tpl svneol=native#text/plain templates/de/emails/admin/admin_del_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/admin/admin_delete_surfbar_urls.tpl svneol=native#text/plain +templates/de/emails/admin/admin_earning_added.tpl svneol=native#text/plain +templates/de/emails/admin/admin_earning_updated.tpl svneol=native#text/plain templates/de/emails/admin/admin_edit_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/admin/admin_extension_deactivated.tpl svneol=native#text/plain templates/de/emails/admin/admin_holiday_deactivated.tpl svneol=native#text/plain @@ -923,6 +928,8 @@ templates/de/emails/member/member_del_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/member/member_delete_links.tpl svneol=native#text/plain templates/de/emails/member/member_delete_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/member/member_doubler.tpl svneol=native#text/plain +templates/de/emails/member/member_earning_added.tpl svneol=native#text/plain +templates/de/emails/member/member_earning_updated.tpl svneol=native#text/plain templates/de/emails/member/member_edit_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/member/member_holiday_activated.tpl svneol=native#text/plain templates/de/emails/member/member_holiday_removed.tpl svneol=native#text/plain @@ -1513,6 +1520,7 @@ templates/de/html/ext/ext_coupon.tpl svneol=native#text/plain templates/de/html/ext/ext_debug.tpl svneol=native#text/plain templates/de/html/ext/ext_demo.tpl svneol=native#text/plain templates/de/html/ext/ext_doubler.tpl svneol=native#text/plain +templates/de/html/ext/ext_earning.tpl svneol=native#text/plain templates/de/html/ext/ext_events.tpl svneol=native#text/plain templates/de/html/ext/ext_forced.tpl svneol=native#text/plain templates/de/html/ext/ext_funcoins.tpl svneol=native#text/plain @@ -1699,6 +1707,11 @@ templates/de/html/member/member_content_right.tpl svneol=native#text/plain templates/de/html/member/member_doubler.tpl svneol=native#text/plain templates/de/html/member/member_doubler_list.tpl svneol=native#text/plain templates/de/html/member/member_doubler_list_rows.tpl svneol=native#text/plain +templates/de/html/member/member_earning.tpl svneol=native#text/plain +templates/de/html/member/member_earning_data_invalid.tpl svneol=native#text/plain +templates/de/html/member/member_earning_data_popup.tpl svneol=native#text/plain +templates/de/html/member/member_earning_popup_form_row.tpl svneol=native#text/plain +templates/de/html/member/member_earning_popup_row.tpl svneol=native#text/plain templates/de/html/member/member_edit_refback.tpl svneol=native#text/plain templates/de/html/member/member_footer.tpl svneol=native#text/plain templates/de/html/member/member_goto_top.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 9ed35e0459..4af4c4178f 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -3,7 +3,7 @@ ./autoreg.php:58:// @TODO Add processing of request here ./beg.php:175: // @TODO Opps, what is missing here??? ./inc/cache/config-local.php:124:// @TODO Rewrite the following three constants, somehow... -./inc/classes/cachesystem.class.php:504: // @TODO Add support for more types which break in last else-block +./inc/classes/cachesystem.class.php:510: // @TODO Add support for more types which break in last else-block ./inc/config-functions.php:136: // @TODO Make this all better... :-/ ./inc/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye ./inc/daily/daily_birthday.php:96: // @TODO 4 is hard-coded here, should we move it out in config? @@ -53,7 +53,7 @@ ./inc/functions.php:2041: // @TODO This is still very static, rewrite it somehow ./inc/functions.php:2233: // @TODO Rename column data_type to e.g. mail_status ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter -./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); +./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); ./inc/language/de.php:1071: // @TODO Rewrite these two constants ./inc/language/de.php:1087: // @TODO Rewrite these three constants ./inc/language/de.php:757:// @TODO Are these constants longer used? @@ -72,7 +72,7 @@ ./inc/libs/rallye_functions.php:770: $EXPIRE = 3; // @TODO The hard-coded value... ./inc/libs/rallye_functions.php:856:// @TODO Please document this function ./inc/libs/rallye_functions.php:912: // Load count @TODO Can't we rewrite this to our API? -./inc/libs/register_functions.php:290: // @TODO Rewrite these all to a single filter +./inc/libs/register_functions.php:286: // @TODO Rewrite these all to a single filter ./inc/libs/sponsor_functions.php:159: // @TODO Rewrite this to API function ./inc/libs/sponsor_functions.php:430: // @TODO Rewrite this to API function ./inc/libs/surfbar_functions.php:1624: // @TODO This can be somehow rewritten @@ -102,7 +102,7 @@ ./inc/modules/admin/overview-inc.php:426: // @TODO Try to move this in includes ./inc/modules/admin/overview-inc.php:43:// @TODO This function does also check for uncompleted tasks ./inc/modules/admin/what-add_guestnl_cat.php:47: // @TODO Check if category does already exist -./inc/modules/admin/what-add_surfbar_url.php:55: // @TODO Find all convertSelectionsToEpocheTime() calls and rewrite postRequestParameter() calls to $postData +./inc/modules/admin/what-add_surfbar_url.php:55: // @TODO Find all convertSelectionsToEpocheTime() calls and rewrite postRequestElement() calls to $postData ./inc/modules/admin/what-admin_add.php:118: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-admin_add.php:59: // @TODO Cant this be rewritten? ./inc/modules/admin/what-admin_add.php:75: // @TODO This can be somehow rewritten to a function @@ -149,7 +149,7 @@ ./inc/modules/guest/what-mediadata.php:182:// @TODO Rewrite all these if-blocks to filters ./inc/modules/guest/what-mediadata.php:67: // @TODO Find a better formular than this one ./inc/modules/guest/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '' . $login . ''; -./inc/modules/guest/what-sponsor_reg.php:287: // @TODO Maybe a default referal id? +./inc/modules/guest/what-sponsor_reg.php:289: // @TODO Maybe a default referal id? ./inc/modules/guest/what-stats.php:108: // @TODO This can be somehow rewritten ./inc/modules/guest/what-stats.php:82:// @TODO This can be rewritten in a dynamic include ./inc/modules/member/what-beg.php:54:// @TODO Can't this be moved into EL? diff --git a/beg.php b/beg.php index f73f1a8994..056f6547d7 100644 --- a/beg.php +++ b/beg.php @@ -56,7 +56,7 @@ setContentType('text/html'); redirectOnUninstalledExtension('beg'); // Check for userid -if (isGetRequestParameterSet('userid')) { +if (isGetRequestElementSet('userid')) { // Init variables $points = '0'; @@ -64,15 +64,15 @@ if (isGetRequestParameterSet('userid')) { $pay = false; // Validate if it is not a number - if ((isExtensionActive('nickname')) && (isNicknameUsed(getRequestParameter('userid')))) { + if ((isExtensionActive('nickname')) && (isNicknameUsed(getRequestElement('userid')))) { // Maybe we have found a nickname? - fetchUserData(getRequestParameter('userid'), 'nickname'); - } elseif (isNicknameUsed(getRequestParameter('userid'))) { + fetchUserData(getRequestElement('userid'), 'nickname'); + } elseif (isNicknameUsed(getRequestElement('userid'))) { // Nickname entered but nickname is not active $errorCode = getCode('EXTENSION_PROBLEM'); } else { // Direct userid - fetchUserData(getRequestParameter('userid')); + fetchUserData(getRequestElement('userid')); } // Check if locked in so don't pay points @@ -88,7 +88,7 @@ if (isGetRequestParameterSet('userid')) { $points = mt_rand((getBegPoints() * 100000), (getBegPointsMax() * 100000)) / 100000; // Set nickname / userid for template - $content['userid'] = getRequestParameter('userid'); + $content['userid'] = getRequestElement('userid'); $content['clicks'] = (getUserData('beg_clicks') + 1); $content['header_banner'] = loadTemplate('beg_header_banner', true); $content['footer_banner'] = loadTemplate('beg_footer_banner', true); @@ -190,7 +190,7 @@ if (isGetRequestParameterSet('userid')) { $errorCode = generateErrorCodeFromUserStatus(); } elseif ((getUserData('userid') == '0') || (getUserData('status') == 'failed')) { // Inalid or locked account, so let's find out - if (fetchUserData(getRequestParameter('userid'), 'nickname')) { + if (fetchUserData(getRequestElement('userid'), 'nickname')) { // Locked account $errorCode = getCode('ACCOUNT_LOCKED'); } else { diff --git a/birthday_confirm.php b/birthday_confirm.php index 2923ceb2c9..6b03c4880d 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -55,10 +55,10 @@ setContentType('text/html'); redirectOnUninstalledExtension('birthday'); // Script is installed so let's check for his confirmation link... -$userid = bigintval(getRequestParameter('userid')); +$userid = bigintval(getRequestElement('userid')); // Only allow numbers here... -$chk = bigintval(getRequestParameter('check'), false); +$chk = bigintval(getRequestElement('check'), false); // Check if link is not clicked so far $result = SQL_QUERY_ESC("SELECT @@ -77,7 +77,7 @@ LIMIT 1", $userid, $chk ), __FILE__, __LINE__); -//* DEBUG: */ debugOutput("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestParameter('check')).'/'.SQL_NUMROWS($result) . ')'); +//* DEBUG: */ debugOutput("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestElement('check')).'/'.SQL_NUMROWS($result) . ')'); // Prepare content $content = array(); diff --git a/click.php b/click.php index b706543087..fb4b5c105b 100644 --- a/click.php +++ b/click.php @@ -49,14 +49,14 @@ require('inc/config-global.php'); setContentType('text/html'); // Check required parameters -if ((isGetRequestParameterSet('user')) && (isGetRequestParameterSet('banner'))) { +if ((isGetRequestElementSet('user')) && (isGetRequestElementSet('banner'))) { // Update clicks counter... - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1", array(bigintval(getRequestParameter('banner'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1", array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); // A line has been updated? - if ((!SQL_HASZEROAFFECTED()) && (isGetRequestParameterSet('user'))) { + if ((!SQL_HASZEROAFFECTED()) && (isGetRequestElementSet('user'))) { // Redirect to the user's referal link - redirectToUrl('ref.php?refid=' . bigintval(getRequestParameter('user'))); + redirectToUrl('ref.php?refid=' . bigintval(getRequestElement('user'))); } // END - if } // END - if diff --git a/confirm.php b/confirm.php index b17229394b..ae7c6234d5 100644 --- a/confirm.php +++ b/confirm.php @@ -52,9 +52,9 @@ setContentType('text/html'); $url = 'modules.php?module=index&what=confirm'; // Is the hash there? -if (isGetRequestParameterSet('hash')) { +if (isGetRequestElementSet('hash')) { // We have a hash here. So we simply add it - $url .= '&hash=' . getRequestParameter('hash'); + $url .= '&hash=' . getRequestElement('hash'); } // END - if // Load the URL diff --git a/debug.php b/debug.php index 86c3ac0ceb..2a11bf6eca 100644 --- a/debug.php +++ b/debug.php @@ -48,13 +48,13 @@ require('inc/config-global.php'); // Redirect only to registration page when this script is installed if ((isExtensionActive('debug')) && (!ifFatalErrorsDetected())) { // Is the request parameter set? - if (isPostRequestParameterSet('request')) { + if (isPostRequestElementSet('request')) { // Handle the request - if (DEBUG_HANDLE_REQUEST(postRequestParameter('request'))) { + if (DEBUG_HANDLE_REQUEST(postRequestElement('request'))) { // Construct FQFN for the module $inc = sprintf("inc/debug/%s/request_%s.php", getConfig('debug_mode'), - SQL_ESCAPE(postRequestParameter('request')) + SQL_ESCAPE(postRequestElement('request')) ); // Is the module there? Else we log it! @@ -63,11 +63,11 @@ if ((isExtensionActive('debug')) && (!ifFatalErrorsDetected())) { loadInclude($inc); } else { // Missing request files may happen while development - DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', postRequestParameter('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', postRequestElement('request')); } } else { // Unhandled request detected - DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', postRequestParameter('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', postRequestElement('request')); } } else { // Empty request diff --git a/doubler.php b/doubler.php index 99ab704236..e46983e03c 100644 --- a/doubler.php +++ b/doubler.php @@ -62,17 +62,17 @@ $content = array( // Begin with doubler script... if (isFormSent()) { // Secure points (so only integer/double values are allowed - setPostRequestParameter('points', bigintval(postRequestParameter('points'))); + setPostRequestElement('points', bigintval(postRequestElement('points'))); // Begin with doubling process - if ((isPostRequestParameterSet('userid')) && (isPostRequestParameterSet('password')) && (isPostRequestParameterSet('points'))) { + if ((isPostRequestElementSet('userid')) && (isPostRequestElementSet('password')) && (isPostRequestElementSet('points'))) { // Probe for nickname extension and if a nickname was entered - if (isNicknameUsed(postRequestParameter('userid'))) { + if (isNicknameUsed(postRequestElement('userid'))) { // Nickname in URL, so load the id - fetchUserData(postRequestParameter('userid'), 'nickname'); + fetchUserData(postRequestElement('userid'), 'nickname'); } else { // Direct userid entered - fetchUserData(postRequestParameter('userid')); + fetchUserData(postRequestElement('userid')); } // Is the data valid? @@ -82,13 +82,13 @@ if (isFormSent()) { } // END - if // Remove any dots and unwanted chars from the points - setPostRequestParameter('points', bigintval(round(convertCommaToDot(postRequestParameter('points'))))); + setPostRequestElement('points', bigintval(round(convertCommaToDot(postRequestElement('points'))))); // Probe for enough points - $probe_points = ((postRequestParameter('points') >= getConfig('doubler_min')) && (postRequestParameter('points') <= getConfig('doubler_max'))); + $probe_points = ((postRequestElement('points') >= getConfig('doubler_min')) && (postRequestElement('points') <= getConfig('doubler_max'))); // Check all together - if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestParameter('password'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) { + if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestElement('password'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) { // Nickname resolved to a unique userid or direct userid entered by the member $GLOBALS['local_doubler_userid'] = getUserData('userid'); @@ -96,22 +96,22 @@ if (isFormSent()) { $points = getTotalPoints(getUserData('userid')); // So let's continue with probing his points amount - if (($points - getConfig('doubler_left') - postRequestParameter('points') * getConfig('doubler_charge') / 100) >= 0) { + if (($points - getConfig('doubler_left') - postRequestElement('points') * getConfig('doubler_charge') / 100) >= 0) { // Enough points are left so let's continue with the doubling process // Create doubling "account" with *DOUBLED* points SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`,`refid`,`points`,`remote_ip`,`timemark`,`completed`,`is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')", array( getUserData('userid'), makeZeroToNull(determineReferalId()), - bigintval(postRequestParameter('points') * 2), + bigintval(postRequestElement('points') * 2), detectRemoteAddr() ), __FILE__, __LINE__); // Subtract entered points and ignore return status - subtractPoints('doubler', getUserData('userid'), postRequestParameter('points')); + subtractPoints('doubler', getUserData('userid'), postRequestElement('points')); // Add points to "total payed" including charge - $points = postRequestParameter('points') - postRequestParameter('points') * getConfig('doubler_charge') / 100; + $points = postRequestElement('points') - postRequestElement('points') * getConfig('doubler_charge') / 100; updateConfiguration('doubler_points', $points, '+'); incrementConfigEntry('doubler_points', $points); @@ -121,7 +121,7 @@ if (isFormSent()) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`,`refid`,`points`,`remote_ip`,`timemark`,`completed`,`is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')", array( makeZeroToNull(determineReferalId()), - (postRequestParameter('points') * 2 * getConfig('doubler_ref') / 100), + (postRequestElement('points') * 2 * getConfig('doubler_ref') / 100), detectRemoteAddr() ), __FILE__, __LINE__); @@ -132,7 +132,7 @@ if (isFormSent()) { updateConfiguration('doubler_counter', 1, '+'); // Set constant - $content['message'] = loadTemplate('doubler_reflink', true, postRequestParameter('userid')); + $content['message'] = loadTemplate('doubler_reflink', true, postRequestElement('userid')); } else { // Not enougth points left $content['message'] = '{--DOUBLER_FORM_NO_POINTS_LEFT--}'; @@ -146,26 +146,26 @@ if (isFormSent()) { } elseif (getUserData('status') == 'LOCKED') { // Account is locked by admin / holiday! $content['message'] = '{--DOUBLER_FORM_STATUS_LOCKED--}'; - } elseif (postRequestParameter('points') < getConfig('doubler_min')) { + } elseif (postRequestElement('points') < getConfig('doubler_min')) { // Not enougth points entered $content['message'] = '{--DOUBLER_FORM_POINTS_MIN--}'; - } elseif (postRequestParameter('points') > getConfig('doubler_max')) { + } elseif (postRequestElement('points') > getConfig('doubler_max')) { // Too much points entered $content['message'] = '{--DOUBLER_FORM_POINTS_MAX--}'; - } elseif (isNicknameUsed(postRequestParameter('userid'))) { + } elseif (isNicknameUsed(postRequestElement('userid'))) { // Cannot resolv nickname -> userid $content['message'] = '{--DOUBLER_FORM_404_NICKNAME--}'; } else { // Wrong password or account not found $content['message'] = '{--DOUBLER_FORM_404_MEMBER--}'; } - } elseif (!isPostRequestParameterSet('userid')) { + } elseif (!isPostRequestElementSet('userid')) { // Login not entered $content['message'] = '{--DOUBLER_FORM_404_LOGIN--}'; - } elseif (!isPostRequestParameterSet('password')) { + } elseif (!isPostRequestElementSet('password')) { // Password not entered $content['message'] = '{--DOUBLER_FORM_404_PASSWORD--}'; - } elseif (!isPostRequestParameterSet('points')) { + } elseif (!isPostRequestElementSet('points')) { // points not entered $content['message'] = '{--DOUBLER_FORM_404_POINTS--}'; } diff --git a/img.php b/img.php index bb8366557d..4008ceb0ee 100644 --- a/img.php +++ b/img.php @@ -49,13 +49,13 @@ require('inc/config-global.php'); loadIncludeOnce('inc/header.php'); // Code set? -if (isGetRequestParameterSet('code')) { +if (isGetRequestElementSet('code')) { // Generate image - generateImageOrCode(bigintval(getRequestParameter('code'))); -} elseif (isGetRequestParameterSet('img')) { + generateImageOrCode(bigintval(getRequestElement('code'))); +} elseif (isGetRequestElementSet('img')) { // 'img' set so create the IFN (Include-FileName) $inc = sprintf("inc/img/tag-%s.php", - getRequestParameter('img') + getRequestElement('img') ); // Include is readable? diff --git a/inc/callback-functions.php b/inc/callback-functions.php index 0d7456a698..b04e3ba02d 100644 --- a/inc/callback-functions.php +++ b/inc/callback-functions.php @@ -1040,7 +1040,7 @@ function doXmlCallbackFunctionExecute ($callbackFunction, $args) { // Is 'id_index' set and form sent? if ((isset($args['id_index'])) && (isFormSent())) { // Prepare 'id_index' - $args['id_index'] = postRequestParameter($args['id_index']); + $args['id_index'] = postRequestElement($args['id_index']); } // END - if // Just call it diff --git a/inc/expression-functions.php b/inc/expression-functions.php index a7dcfcac86..44279d6180 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -318,7 +318,7 @@ function doExpressionMath ($data) { // Expression call-back for GET request function doExpressionGet ($data) { // Construct the replacer - $replacer = '{%pipe,getRequestParameter=' . $data['value'] . '%}'; + $replacer = '{%pipe,getRequestElement=' . $data['value'] . '%}'; // Replace the code $code = replaceExpressionCode($data, $replacer); @@ -330,7 +330,7 @@ function doExpressionGet ($data) { // Expression call-back for POST request function doExpressionPost ($data) { // Construct the replacer - $replacer = '{%pipe,postRequestParameter=' . $data['value'] . '%}'; + $replacer = '{%pipe,postRequestElement=' . $data['value'] . '%}'; // Replace the code $code = replaceExpressionCode($data, $replacer); diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 3cd5d7d627..49bad6f01a 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -232,7 +232,7 @@ INDEX (`userid`)", addConfigAddSql('beg_include_own', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Eigene Mitglieder-Ids sind von der Bettel-Rallye nun ausschliessbar."); + setExtensionUpdateNotes("Eigene Mitglied-Ids sind von der Bettel-Rallye nun ausschliessbar."); break; case '0.2.3': // SQL queries for v0.2.3 diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 375853e1b2..f514d03f95 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -476,7 +476,7 @@ ORDER BY break; case '0.7.6': // SQL queries for v0.7.6 - setExtensionUpdateNotes("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der Mitglieder-Ids nicht berücksichtig."); + setExtensionUpdateNotes("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der Mitglied-Ids nicht berücksichtig."); break; case '0.7.7': // SQL queries for v0.7.7 @@ -515,7 +515,7 @@ ORDER BY addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD `is_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Eigene Mitglieder-Ids sind von der Aktiv-Rallye nun ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."); + setExtensionUpdateNotes("Eigene Mitglied-Ids sind von der Aktiv-Rallye nun ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."); break; case '0.8.3': // SQL queries for v0.8.3 diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 3c7410914b..538d7cf248 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -140,7 +140,7 @@ INDEX (`userid`)", switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Problem mit Mitglieder-Id behoben."); + setExtensionUpdateNotes("Problem mit Mitglied-Id behoben."); break; case '0.0.2': // SQL queries for v0.0.2 diff --git a/inc/extensions/ext-earning.php b/inc/extensions/ext-earning.php new file mode 100644 index 0000000000..a4b61dddd4 --- /dev/null +++ b/inc/extensions/ext-earning.php @@ -0,0 +1,134 @@ +earnings connection table + addDropTableSql('user_earning'); + addCreateTableSql('user_earning', " +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`earning_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`earning_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`earning_active` ENUM('Y','N') NOT NULL DEFAULT 'Y', +`earning_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +`earning_cancelled` TIMESTAMP NULL DEFAULT NULL, +`earning_daily_amount` SMALLINT(7) NOT NULL DEFAULT 0, +`earning_points` FLOAT(20,5) NOT NULL DEFAULT 0.00000, +PRIMARY KEY (`id`), +UNIQUE `user_earning` (`earning_id`,`earning_userid`), +INDEX (`earning_userid`)", + 'User->Earning connections'); + break; + + case 'remove': // Do stuff when removing extension + // Drop tables + addDropTableSql('earning_data'); + addDropTableSql('user_earning'); + + // Delete entries in menus + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='earnings' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_earnings' LIMIT 1"); + break; + + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='earnings' LIMIT 1"); + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='earnings' LIMIT 1"); + break; + + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch + break; + + case 'modify': // When the extension got modified + break; + + case 'test': // For testing purposes + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + break; +} // END - switch + +// [EOF] +?> diff --git a/inc/extensions/ext-forced.php b/inc/extensions/ext-forced.php index 15b488e387..fc0eb66b93 100644 --- a/inc/extensions/ext-forced.php +++ b/inc/extensions/ext-forced.php @@ -51,8 +51,8 @@ enableExtensionProductive(false); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running - // Add dependency for ext-sql_patches - addExtensionDependency('sql_patches'); + // Add dependency for ext-earning + addExtensionDependency('earning'); // All required tables for this extension: // - Ads @@ -136,8 +136,9 @@ INDEX (`forced_stats_userid`)", // Register Forced-PopUps with earning_data table addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_earning_data` (`earning_group`,`earning_name`,`earning_sorting`) VALUES ('POPUP','FORCED_POPUP',1)"); - // Register filter for default forced ad types + // Register filters registerFilter('add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', false, true, isExtensionDryRun()); + registerFilter('member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -156,6 +157,7 @@ INDEX (`forced_stats_userid`)", // Remove filter unregisterFilter(__FUNCTION__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index cccb291a9b..da13a58775 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -131,12 +131,12 @@ switch (getExtensionMode()) { addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP nick_userid"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Auswahlfür Mitglied ob mit Nickname oder Mitglieder-Id einloggen entfernt."); + setExtensionUpdateNotes("Auswahlfür Mitglied ob mit Nickname oder Mitglied-Id einloggen entfernt."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / Mitglieder-Id ODER die angemeldete EMail-Adresse eingegeben werden."); + setExtensionUpdateNotes("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / Mitglied-Id ODER die angemeldete EMail-Adresse eingegeben werden."); break; case '0.1.3': // SQL queries for v0.1.3 diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index b6b738dffb..d2f04f2fd8 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -77,8 +77,7 @@ IN ( 'config_proxy', 'config_session', 'list_filter', - 'list_point_accounts', - 'list_earnings' + 'list_point_accounts' )"); // Delete/update member menu entries @@ -192,7 +191,7 @@ IN ( break; case '0.1.2': // SQL queries for v0.1.2 - addAdminMenuSql('setup','config_refid','Standard-Ref-Id','Stellen Sie hier die Mitglieder-Id ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren {?mt_word?} aufgerufen hat.', 7); + addAdminMenuSql('setup','config_refid','Standard-Ref-Id','Stellen Sie hier die Mitglied-Id ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren {?mt_word?} aufgerufen hat.', 7); addConfigAddSql('def_refid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) @@ -874,41 +873,8 @@ INDEX (`history_last_used` DESC)", // Old-lost configuration entry addConfigDropSql('ext_autopurge'); - // Extra earning for our members :-) - addMemberMenuSql('earn', 'earnings', 'Zusatzverdienste', 2); - - // Admin menu - addAdminMenuSql('setup', 'list_earnings', 'Zusatzverdienste...', 'Veralten Sie hier bequem alle Zusatzverdienste (wie z.B. vergütete PopUps usw.).', 6); - - // Earning data table - addDropTableSql('earning_data'); - addCreateTableSql('earning_data', " -`earning_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`earning_group` VARCHAR(255) NOT NULL DEFAULT 'INVALID', -`earning_name` VARCHAR(255) NOT NULL DEFAULT 'INVALID', -`earning_sorting` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -PRIMARY KEY (`earning_id`), -UNIQUE `earning_group_name` (`earning_group`,`earning_name`)", - 'Registered (extra) earnings'); - - // User->earnings connection table - addDropTableSql('user_earning'); - addCreateTableSql('user_earning', " -`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`earning_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`earning_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`earning_active` ENUM('Y','N') NOT NULL DEFAULT 'Y', -`earning_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -`earning_cancelled` TIMESTAMP NULL DEFAULT NULL, -`earning_daily_amount` SMALLINT(7) NOT NULL DEFAULT 0, -`earning_points` FLOAT(20,5) NOT NULL DEFAULT 0.00000, -PRIMARY KEY (`id`), -UNIQUE `user_earning` (`earning_id`,`earning_userid`), -INDEX (`earning_userid`)", - 'User->Earning connections'); - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Menüpunkt für Zusatzverdienste wie z.B. Forced-PopUps hinzugefügt und uralten Konfigurationseintrag entfernt."); + setExtensionUpdateNotes("Uralten Konfigurationseintrag entfernt."); break; } // END - switch break; diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index 056064b9a5..7b367adf2a 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -191,7 +191,7 @@ switch (getExtensionMode()) { case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-Id, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); + setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglied-Id, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); break; case '0.2.4': // SQL queries for v0.2.4 diff --git a/inc/filter/bonus_filter.php b/inc/filter/bonus_filter.php index 4520937f45..bd13b975b6 100644 --- a/inc/filter/bonus_filter.php +++ b/inc/filter/bonus_filter.php @@ -71,7 +71,7 @@ LIMIT 1', $bonus = (!SQL_HASZEROAFFECTED()); } // END - if - if (($bonus === true) && (getRequestParameter('mode') == 'bonus')) { + if (($bonus === true) && (getRequestElement('mode') == 'bonus')) { // Output message with added points $GLOBALS['message'] .= '
{--MEMBER_BONUS_LOGIN_BONUS_ADDED--}
'; } else { diff --git a/inc/filter/forced_filter.php b/inc/filter/forced_filter.php index 4076911375..4b69b26547 100644 --- a/inc/filter/forced_filter.php +++ b/inc/filter/forced_filter.php @@ -61,5 +61,22 @@ function FILTER_FORCED_AD_TYPE_DEFAULTS ($data) { return $data; } +// Filter for collecting data for the member table +function FILTER_FORCED_POPUP_TABLE_DATA ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Is this the right filter? + if ($filterData['earning_name'] == 'FORCED_POPUP') { + // Set group + $filterData['earning_group'] = 'POPUP'; + + // Get max/min/count of all popups + //die(__FUNCTION__.':OK!'); + } // END - if + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + + // Return filter data array + return $filterData; +} + // [EOF] ?> diff --git a/inc/filter/other_filter.php b/inc/filter/other_filter.php index 4bed3d6c86..5b99edde38 100644 --- a/inc/filter/other_filter.php +++ b/inc/filter/other_filter.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_DISPLAY_DEBUG_SQL ($filterData) { // Shall we display SQL queries? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) { + if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == 2)) { // Then display it here displayDebugSqls(); } // END - if diff --git a/inc/filter/politician_stop_filter.php b/inc/filter/politician_stop_filter.php index c657bdba49..d77bc99a64 100644 --- a/inc/filter/politician_stop_filter.php +++ b/inc/filter/politician_stop_filter.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($filterData) { // Shall we include the politician_stop snippet? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { + if ((!isGetRequestElementSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { // Then display it here loadPoliticianStopSnippet(); } // END - if diff --git a/inc/filter/theme_filter.php b/inc/filter/theme_filter.php index 4c8de5c308..6c2ea26107 100644 --- a/inc/filter/theme_filter.php +++ b/inc/filter/theme_filter.php @@ -44,9 +44,9 @@ if (!defined('__SECURITY')) { function FILTER_HANDLE_THEME_CHANGE ($filterData) { // Check if new theme is selcted //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) { + if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) { // Set new theme for guests - $newTheme = postRequestParameter('new_theme'); + $newTheme = postRequestElement('new_theme'); // Change to new theme setTheme($newTheme); diff --git a/inc/filter/uberwach_filter.php b/inc/filter/uberwach_filter.php index cf733222e5..f117e5e955 100644 --- a/inc/filter/uberwach_filter.php +++ b/inc/filter/uberwach_filter.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_DISPLAY_UBERWACH_SNIPPET ($filterData) { // Shall we include the uberwach snippet? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { + if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { // Then display it here loadUberwachSnippet(); } // END - if diff --git a/inc/filters.php b/inc/filters.php index 03943c8517..903dd6978b 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -688,9 +688,9 @@ function FILTER_DETERMINE_WHAT_ACTION () { // Fix module if (!isModuleSet()) { // Is the request element set? - if (isGetRequestParameterSet('module')) { + if (isGetRequestElementSet('module')) { // Set module from request - setModule(getRequestParameter('module')); + setModule(getRequestElement('module')); } elseif (isHtmlOutputMode()) { // Set default module 'index' setModule('index'); @@ -774,7 +774,7 @@ function FILTER_RUN_DAILY_RESET () { } // END - if // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D - if (((getDay(getConfig('last_update')) != getDay()) || (isDebugResetEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (!isCssOutputMode())) { + if (((getDay(getConfig('last_update')) != getDay()) || (isDebugResetEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('register')) && (!isCssOutputMode())) { // Tell every module we are in reset-mode! doReset(); } // END - if @@ -788,7 +788,7 @@ function FILTER_RUN_HOURLY_RESET () { } // END - if // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D - if ((((isConfigEntrySet('last_hour')) && (getConfig('last_hour') != getHour())) || (isDebugResetEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (!isCssOutputMode())) { + if ((((isConfigEntrySet('last_hour')) && (getConfig('last_hour') != getHour())) || (isDebugResetEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('register')) && (!isCssOutputMode())) { // Tell every module we are in reset-mode! doHourly(); } // END - if @@ -934,7 +934,7 @@ function FILTER_HANDLE_FATAL_ERRORS () { // Filter for displaying copyright line function FILTER_DISPLAY_COPYRIGHT () { // Shall we display the copyright notice? - if ((!isGetRequestParameterSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) { + if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) { // Backlink enabled? if (((isConfigEntrySet('ENABLE_BACKLINK')) && (getConfig('ENABLE_BACKLINK') == 'Y')) || (isInstalling())) { // Copyright with backlink, thanks! :-) @@ -950,7 +950,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') && (!isGetRequestParameterSet('frame'))) || (isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['header_sent'] == 2)) { + if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['header_sent'] == 2)) { // Then display it here displayParsingTime(); } // END - if diff --git a/inc/functions.php b/inc/functions.php index a5cd6edc6a..df40ef0d65 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1185,11 +1185,11 @@ function getMessageFromErrorCode ($code) { case getCode('COOKIES_DISABLED') : $message = '{--LOGIN_COOKIES_DISABLED--}'; break; case getCode('BEG_SAME_AS_OWN') : $message = '{--BEG_SAME_USERID_AS_OWN--}'; break; case getCode('LOGIN_FAILED') : $message = '{--GUEST_LOGIN_FAILED_GENERAL--}'; break; - case getCode('MODULE_MEMBER_ONLY') : $message = '{%message,MODULE_MEMBER_ONLY=' . getRequestParameter('mod') . '%}'; break; + case getCode('MODULE_MEMBER_ONLY') : $message = '{%message,MODULE_MEMBER_ONLY=' . getRequestElement('mod') . '%}'; break; case getCode('OVERLENGTH') : $message = '{--MEMBER_TEXT_OVERLENGTH--}'; break; case getCode('URL_FOUND') : $message = '{--MEMBER_TEXT_CONTAINS_URL--}'; break; case getCode('SUBJECT_URL') : $message = '{--MEMBER_SUBJECT_CONTAINS_URL--}'; break; - case getCode('BLIST_URL') : $message = '{--MEMBER_URL_BLACK_LISTED--}
{--MEMBER_BLIST_TIME--}: ' . generateDateTime(getRequestParameter('blist'), 0); break; + case getCode('BLIST_URL') : $message = '{--MEMBER_URL_BLACK_LISTED--}
{--MEMBER_BLIST_TIME--}: ' . generateDateTime(getRequestElement('blist'), 0); break; case getCode('NO_RECS_LEFT') : $message = '{--MEMBER_SELECTED_MORE_RECS--}'; break; case getCode('INVALID_TAGS') : $message = '{--MEMBER_HTML_INVALID_TAGS--}'; break; case getCode('MORE_POINTS') : $message = '{--MEMBER_MORE_POINTS_NEEDED--}'; break; @@ -1211,8 +1211,8 @@ function getMessageFromErrorCode ($code) { break; case getCode('EXTENSION_PROBLEM'): - if (isGetRequestParameterSet('ext')) { - $message = '{%pipe,generateExtensionInactiveNotInstalledMessage=' . getRequestParameter('ext') . '%}'; + if (isGetRequestElementSet('ext')) { + $message = '{%pipe,generateExtensionInactiveNotInstalledMessage=' . getRequestElement('ext') . '%}'; } else { $message = '{--EXTENSION_PROBLEM_UNSET_EXT--}'; } @@ -1221,7 +1221,7 @@ function getMessageFromErrorCode ($code) { case getCode('URL_TIME_LOCK'): // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FUNCTION__, __LINE__); + array(bigintval(getRequestElement('id'))), __FUNCTION__, __LINE__); // Load timestamp from last order $content = SQL_FETCHARRAY($result); @@ -1655,22 +1655,22 @@ function determineReferalId () { if (isReferalIdValid()) { // This is fine... //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from GLOBALS (' . getReferalId() . ')'); - } elseif (isPostRequestParameterSet('refid')) { + } elseif (isPostRequestElementSet('refid')) { // Get referal id from POST element refid - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from POST data (' . postRequestParameter('refid') . ')'); - setReferalId(secureString(postRequestParameter('refid'))); - } elseif (isGetRequestParameterSet('refid')) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from POST data (' . postRequestElement('refid') . ')'); + setReferalId(secureString(postRequestElement('refid'))); + } elseif (isGetRequestElementSet('refid')) { // Get referal id from GET parameter refid - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from GET data (' . getRequestParameter('refid') . ')'); - setReferalId(secureString(getRequestParameter('refid'))); - } elseif (isGetRequestParameterSet('ref')) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from GET data (' . getRequestElement('refid') . ')'); + setReferalId(secureString(getRequestElement('refid'))); + } elseif (isGetRequestElementSet('ref')) { // Set refid=ref (the referal link uses such variable) - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using ref from GET data (' . getRequestParameter('refid') . ')'); - setReferalId(secureString(getRequestParameter('ref'))); - } elseif ((isGetRequestParameterSet('user')) && (basename($_SERVER['PHP_SELF']) == 'click.php')) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using ref from GET data (' . getRequestElement('refid') . ')'); + setReferalId(secureString(getRequestElement('ref'))); + } elseif ((isGetRequestElementSet('user')) && (basename($_SERVER['PHP_SELF']) == 'click.php')) { // The variable user comes from click.php - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using user from GET data (' . getRequestParameter('user') . ')'); - setReferalId(bigintval(getRequestParameter('user'))); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using user from GET data (' . getRequestElement('user') . ')'); + setReferalId(bigintval(getRequestElement('user'))); } elseif ((isSessionVariableSet('refid')) && (isValidUserId(getSession('refid')))) { // Set session refid as global //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from SESSION data (' . getSession('refid') . ')'); diff --git a/inc/header.php b/inc/header.php index 0f592edb2b..eac5b4e4be 100644 --- a/inc/header.php +++ b/inc/header.php @@ -63,7 +63,7 @@ if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { } // END - if // Add BODY tag or not? -if ((!isCssOutputMode()) && (!isRawOutputMode()) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) { +if ((!isCssOutputMode()) && (!isRawOutputMode()) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) { loadTemplate('page_body'); $GLOBALS['header_sent'] = 2; } // END - if diff --git a/inc/install-functions.php b/inc/install-functions.php index b989100a55..5cbe9367de 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -43,27 +43,27 @@ if (!defined('__SECURITY')) { // Write the local config-local.php file from "template" function doInstallWriteLocalConfig () { // Copy the config template and verify it - copyFileVerified(postRequestParameter('spath') . 'inc/config-local.php.dist', getPath() . getCachePath() . 'config-local.php', 0644); + copyFileVerified(postRequestElement('spath') . 'inc/config-local.php.dist', getPath() . getCachePath() . 'config-local.php', 0644); // Ok, all done. So we can write the config data to the php files - if (postRequestParameter('spath') != getPath()) changeDataInLocalConfigurationFile('SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestParameter('spath'), 0); - if (postRequestParameter('burl') != getUrl()) changeDataInLocalConfigurationFile('HOST-URL', "setConfigEntry('URL', '", "');", postRequestParameter('burl'), 0); - changeDataInLocalConfigurationFile('MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestParameter('title'), 0); - changeDataInLocalConfigurationFile('SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestParameter('slogan'), 0); - changeDataInLocalConfigurationFile('WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestParameter('email'), 0); - changeDataInLocalConfigurationFile('NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", postRequestParameter('warn_no_pass'), 0); - changeDataInLocalConfigurationFile('WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", postRequestParameter('wfooter'), 0); - changeDataInLocalConfigurationFile('BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", postRequestParameter('blink'), 0); - // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); - changeDataInLocalConfigurationFile('MYSQL-HOST', " 'host' => '", "',", postRequestParameter('mysql','host'), 0); - changeDataInLocalConfigurationFile('MYSQL-DBASE', " 'dbase' => '", "',", postRequestParameter('mysql','dbase'), 0); - changeDataInLocalConfigurationFile('MYSQL-LOGIN', " 'login' => '", "',", postRequestParameter('mysql','login'), 0); - changeDataInLocalConfigurationFile('MYSQL-PASSWORD', " 'password' => '", "',", postRequestParameter('mysql','pass1'), 0); - changeDataInLocalConfigurationFile('MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestParameter('mysql','prefix'), 0); - changeDataInLocalConfigurationFile('TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestParameter('mysql','type'), 0); - changeDataInLocalConfigurationFile('SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestParameter('smtp_host'), 0); - changeDataInLocalConfigurationFile('SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestParameter('smtp_user'), 0); - changeDataInLocalConfigurationFile('SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestParameter('smtp_pass1'), 0); + if (postRequestElement('spath') != getPath()) changeDataInLocalConfigurationFile('SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestElement('spath'), 0); + if (postRequestElement('burl') != getUrl()) changeDataInLocalConfigurationFile('HOST-URL', "setConfigEntry('URL', '", "');", postRequestElement('burl'), 0); + changeDataInLocalConfigurationFile('MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestElement('title'), 0); + changeDataInLocalConfigurationFile('SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestElement('slogan'), 0); + changeDataInLocalConfigurationFile('WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestElement('email'), 0); + changeDataInLocalConfigurationFile('NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", postRequestElement('warn_no_pass'), 0); + changeDataInLocalConfigurationFile('WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", postRequestElement('wfooter'), 0); + changeDataInLocalConfigurationFile('BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", postRequestElement('blink'), 0); + // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); + changeDataInLocalConfigurationFile('MYSQL-HOST', " 'host' => '", "',", postRequestElement('mysql','host'), 0); + changeDataInLocalConfigurationFile('MYSQL-DBASE', " 'dbase' => '", "',", postRequestElement('mysql','dbase'), 0); + changeDataInLocalConfigurationFile('MYSQL-LOGIN', " 'login' => '", "',", postRequestElement('mysql','login'), 0); + changeDataInLocalConfigurationFile('MYSQL-PASSWORD', " 'password' => '", "',", postRequestElement('mysql','pass1'), 0); + changeDataInLocalConfigurationFile('MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestElement('mysql','prefix'), 0); + changeDataInLocalConfigurationFile('TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestElement('mysql','type'), 0); + changeDataInLocalConfigurationFile('SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestElement('smtp_host'), 0); + changeDataInLocalConfigurationFile('SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestElement('smtp_user'), 0); + changeDataInLocalConfigurationFile('SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestElement('smtp_pass1'), 0); // Generate a long site key $siteKey = generatePassword(50); diff --git a/inc/install-inc.php b/inc/install-inc.php index 18af33b97d..378c60bdea 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -55,43 +55,43 @@ FILTER_INIT_TIMEZONE(array()); // Init variables $GLOBALS['install_mysql'] = array(); -if ((isPostRequestParameterSet('mysql')) && (is_array(postRequestParameter('mysql')))) { +if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) { // Transfer 'mysql' array - $GLOBALS['install_mysql'] = postRequestParameter('mysql'); + $GLOBALS['install_mysql'] = postRequestElement('mysql'); } // END - if // Check if both passwords from SMTP are matching -if ((isGetRequestParameterSet('page') && (getRequestParameter('page') == 5))) { +if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) { // Okay, we have to check it - if (isPostRequestParameterSet('smtp_user') && (!isPostRequestParameterSet('smtp_host'))) { + if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) { // Hostname not set addToInstallContent('
{--INSTALL_SMTP_HOSTNAME_EMPTY--}
'); - setGetRequestParameter('page', 3); + setGetRequestElement('page', 3); } // END - if - if ((!isPostRequestParameterSet('smtp_pass1')) && (isPostRequestParameterSet('smtp_pass2'))) { + if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { // Password is empty - addToInstallContent('
{--INSTALL_SMTP_PASS1_EMPTY--}
'); - setGetRequestParameter('page', 3); + addToInstallContent('
{--INSTALL_SMTP_PASSWORD1_EMPTY--}
'); + setGetRequestElement('page', 3); } // END - if - if ((isPostRequestParameterSet('smtp_pass1')) && (!isPostRequestParameterSet('smtp_pass2'))) { + if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { // Password repeat is empty - addToInstallContent('
{--INSTALL_SMTP_PASS2_EMPTY--}
'); - setGetRequestParameter('page', 3); + addToInstallContent('
{--INSTALL_SMTP_PASSWORD2_EMPTY--}
'); + setGetRequestElement('page', 3); } // END - if - if (postRequestParameter('smtp_pass1') != postRequestParameter('smtp_pass1')) { + if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { // Passwords are not matching addToInstallContent('
{--INSTALL_SMTP_PASS_MISMATCH--}
'); - setGetRequestParameter('page', 3); + setGetRequestElement('page', 3); } // END - if } // END - if // Is the mailer installed or no admin registered so far? if ((!isInstalled()) || (!isAdminRegistered())) { // Output page for entered value - switch (getRequestParameter('page')) { + switch (getRequestElement('page')) { case 'welcome': // Welcome to the installation! addTemplateToInstallContent('install_welcome'); break; @@ -120,11 +120,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $content['mysql_prefix'] = $GLOBALS['install_mysql']['prefix']; $content['mysql_login'] = $GLOBALS['install_mysql']['login']; $content['table_type'] = $GLOBALS['install_mysql']['type']; - $content['spath'] = postRequestParameter('spath'); - $content['burl'] = postRequestParameter('burl'); - $content['title'] = postRequestParameter('title'); - $content['slogan'] = postRequestParameter('slogan'); - $content['email'] = postRequestParameter('email'); + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['slogan'] = postRequestElement('slogan'); + $content['email'] = postRequestElement('email'); // Load template addTemplateToInstallContent('install_page2', $content); @@ -132,11 +132,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) { case '3': // Set more values - $content['spath'] = postRequestParameter('spath'); - $content['burl'] = postRequestParameter('burl'); - $content['title'] = postRequestParameter('title'); - $content['slogan'] = postRequestParameter('slogan'); - $content['email'] = postRequestParameter('email'); + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['slogan'] = postRequestElement('slogan'); + $content['email'] = postRequestElement('email'); // Use default SMTP data $smtpHost = '{?SMTP_HOSTNAME?}'; @@ -145,11 +145,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $smtpPass2 = '{?SMTP_PASSWORD?}'; // Overwrite it with the data from sent (failed) form - if (isPostRequestParameterSet('smtp_host')) $smtpHost = postRequestParameter('smtp_host'); - if (isPostRequestParameterSet('smtp_user')) $smtpUser = postRequestParameter('smtp_user'); - if (isPostRequestParameterSet('smtp_pass')) { - $smtpPass1 = postRequestParameter('smtp_pass'); - $smtpPass2 = postRequestParameter('smtp_pass'); + if (isPostRequestElementSet('smtp_host')) $smtpHost = postRequestElement('smtp_host'); + if (isPostRequestElementSet('smtp_user')) $smtpUser = postRequestElement('smtp_user'); + if (isPostRequestElementSet('smtp_pass')) { + $smtpPass1 = postRequestElement('smtp_pass'); + $smtpPass2 = postRequestElement('smtp_pass'); } // END - if // Database login data @@ -173,16 +173,16 @@ if ((!isInstalled()) || (!isAdminRegistered())) { case '5': // Misc settings // General settings - $content['spath'] = postRequestParameter('spath'); - $content['burl'] = postRequestParameter('burl'); - $content['title'] = postRequestParameter('title'); - $content['slogan'] = postRequestParameter('slogan'); - $content['email'] = postRequestParameter('email'); + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['slogan'] = postRequestElement('slogan'); + $content['email'] = postRequestElement('email'); // SMTP settings - $content['smtp_host'] = postRequestParameter('smtp_host'); - $content['smtp_user'] = postRequestParameter('smtp_user'); - $content['smtp_pass'] = postRequestParameter('smtp_pass1'); + $content['smtp_host'] = postRequestElement('smtp_host'); + $content['smtp_user'] = postRequestElement('smtp_user'); + $content['smtp_pass'] = postRequestElement('smtp_pass1'); // Database login data $OUT = ''; @@ -196,7 +196,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; case 'finalize': // Write captured data to files - if ((isPostRequestParameterSet('finalize')) && (!isInstalled())) { + if ((isPostRequestElementSet('finalize')) && (!isInstalled())) { // You have submitted data then we have to reset the SQLs initSqls(); @@ -215,7 +215,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Seems to work, also right database? if (SQL_SELECT_DB($GLOBALS['install_mysql']['dbase'], __FILE__, __LINE__) === true) { // Check for dumps - if ((!isFileReadable(postRequestParameter('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestParameter('spath') . 'install/menu-'.getLanguage().'.sql'))) { + if ((!isFileReadable(postRequestElement('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestElement('spath') . 'install/menu-'.getLanguage().'.sql'))) { // Installation area not found debug_report_bug(__FILE__, __LINE__, 'SQL dumps not found. Please extract ALL files from the archive or checkout all files out from SVN.'); return; @@ -224,13 +224,13 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Any errors detected? if (!ifFatalErrorsDetected()) { // Set type and prefix from POST data - setConfigEntry('_TABLE_TYPE' , postRequestParameter('mysql', 'type')); - setConfigEntry('_MYSQL_PREFIX', postRequestParameter('mysql', 'prefix')); + setConfigEntry('_TABLE_TYPE' , postRequestElement('mysql', 'type')); + setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix')); // Both exists so import them foreach (array('tables', 'menu-'.getLanguage()) as $dump) { // Should be save here because file_exists() is there but we check it again. :) - $FQFN = postRequestParameter('spath') . 'install/' . $dump . '.sql'; + $FQFN = postRequestElement('spath') . 'install/' . $dump . '.sql'; // Is the file readable? if (isFileReadable($FQFN)) { @@ -273,12 +273,12 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $OUT .= ' '; } // END foreach $content['mysql_hidden'] = $OUT; - $content['spath'] = postRequestParameter('spath'); - $content['burl'] = postRequestParameter('burl'); - $content['title'] = postRequestParameter('title'); - $content['smtp_host'] = postRequestParameter('smtp_host'); - $content['smtp_user'] = postRequestParameter('smtp_user'); - $content['smtp_pass'] = postRequestParameter('smtp_pass1'); + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['smtp_host'] = postRequestElement('smtp_host'); + $content['smtp_user'] = postRequestElement('smtp_user'); + $content['smtp_pass'] = postRequestElement('smtp_pass1'); // Load template addTemplateToInstallContent('install_fatal_errors', $content); @@ -306,7 +306,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; default: - logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestParameter('page'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestElement('page'))); addTemplateToInstallContent('admin_settings_unsaved', '{--WRONG_PAGE--}'); break; } // END - switch diff --git a/inc/js/js-surfbar_frame_top.php b/inc/js/js-surfbar_frame_top.php index 25bc676197..d071bd17ce 100644 --- a/inc/js/js-surfbar_frame_top.php +++ b/inc/js/js-surfbar_frame_top.php @@ -46,15 +46,15 @@ if (!defined('__SECURITY')) { SURFBAR_INIT(); // Init data -SURFBAR_DETERMINE_NEXT_ID(getRequestParameter('url_id')); +SURFBAR_DETERMINE_NEXT_ID(getRequestElement('url_id')); // Check reload-locks SURFBAR_CHECK_RELOAD_FULL(); // Prepare content $content = array( - 'url_id' => bigintval(getRequestParameter('url_id')), - 'check' => SURFBAR_GENERATE_VALIDATION_CODE(getRequestParameter('url_id'), SURFBAR_GET_LAST_SALT()), + 'url_id' => bigintval(getRequestElement('url_id')), + 'check' => SURFBAR_GENERATE_VALIDATION_CODE(getRequestElement('url_id'), SURFBAR_GET_LAST_SALT()), 'salt' => SURFBAR_GET_LAST_SALT(), ); diff --git a/inc/js/js-surfbar_member_edit.php b/inc/js/js-surfbar_member_edit.php index 237011b01d..4af95a7b61 100644 --- a/inc/js/js-surfbar_member_edit.php +++ b/inc/js/js-surfbar_member_edit.php @@ -44,8 +44,8 @@ if (!defined('__SECURITY')) { // Prepare content $content = array( - 'views_max' => bigintval(getRequestParameter('views_max')), - 'limited' => bigintval(getRequestParameter('limited')) + 'views_max' => bigintval(getRequestElement('views_max')), + 'limited' => bigintval(getRequestElement('limited')) ); // Simply load the JavaScript here diff --git a/inc/language-functions.php b/inc/language-functions.php index b9b0d82f98..ad1d0507ce 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -129,9 +129,9 @@ function getLanguage () { } // END - if // Is the variable set - if (isGetRequestParameterSet('mailer_lang')) { + if (isGetRequestElementSet('mailer_lang')) { // Accept only first 2 chars - $ret = substr(getRequestParameter('mailer_lang'), 0, 2); + $ret = substr(getRequestElement('mailer_lang'), 0, 2); } elseif (isCurrentLanguageSet()) { // Use cached $ret = getCurrentLanguage(); diff --git a/inc/language/admins_de.php b/inc/language/admins_de.php index f9fc64fb06..3039d7d55d 100644 --- a/inc/language/admins_de.php +++ b/inc/language/admins_de.php @@ -46,8 +46,8 @@ addMessages(array( 'ADMIN_ADMINS_ADD_ADMIN' => "Hinzufügen", 'ADMIN_ADMINS_ENTER_LOGIN' => "Loginname eingeben", 'ADMIN_ADMINS_ENTER_EMAIL' => "E-Mail eingeben", - 'ADMIN_ADMINS_ENTER_PASS1' => "Passwort eingeben", - 'ADMIN_ADMINS_ENTER_PASS2' => "Passwort wiederholen", + 'ADMIN_ADMINS_ENTER_PASSWORD1' => "Passwort eingeben", + 'ADMIN_ADMINS_ENTER_PASSWORD2' => "Passwort wiederholen", 'ADMIN_ADMINS_ADD_DONE' => "Das Admin-Account wurde angelegt.", 'ADMIN_ADMINS_EDIT_ACCOUNTS_TITLE' => "Admin-Accounts bearbeiten", 'ADMIN_ADMINS_EDIT_DELETE_ACCOUNTS_TITLE' => "Admin-Accounts verwalten", diff --git a/inc/language/beg_de.php b/inc/language/beg_de.php index f182631dcd..427392c548 100644 --- a/inc/language/beg_de.php +++ b/inc/language/beg_de.php @@ -45,7 +45,7 @@ addMessages(array( 'ADMIN_CONFIG_BEG_TITLE' => "Einstellungen am Bettel-Link", 'ADMIN_CONFIG_BEG_POINTS' => "{?POINTS?}-Gutschrift bei Klick auf Bettel-Link", 'ADMIN_CONFIG_BEG_TIMEOUT' => "Zeitsperre global", - 'ADMIN_CONFIG_BEG_USERID_TIMEOUT' => "Zeitsperre gegen eine Mitglieder-Id", + 'ADMIN_CONFIG_BEG_USERID_TIMEOUT' => "Zeitsperre gegen eine Mitglied-Id", 'ADMIN_CONFIG_BEG_REMOTE_IP_TIMEOUT' => "Zeitsperre gegen eine IP-Nummer", 'BEG_LINK_BY' => "Bettel-Link bei {?MAIN_TITLE?}", 'BEG_LINK_USERID' => "Unser Mitglied %s hat {?POINTS?} gebettelt.", @@ -74,10 +74,10 @@ addMessages(array( 'GUEST_BEG_HAVE_FUN' => "Heute noch anmelden und Spass haben.", 'ADMIN_CONFIG_BEG_POINTS_MAX' => "Maximale erbettelbare {?POINTS?} bei Klick auf Bettellink", 'ADMIN_CONFIG_BEG_USERID' => "Mitglied-Account zum Abbuchen der erbettelten {?POINTS?}", - 'BEG_SORRY_YOURE_LOGGED_IN_1' => "Oh, schade! Sie haben vermutlich auf Ihren eigenen Bettel-Link mit der Mitglieder-Id ", + 'BEG_SORRY_YOURE_LOGGED_IN_1' => "Oh, schade! Sie haben vermutlich auf Ihren eigenen Bettel-Link mit der Mitglied-Id ", 'BEG_SORRY_YOURE_LOGGED_IN_2' => " geklickt. Sie haben somit auch keine ", 'BEG_SORRY_YOURE_LOGGED_IN_3' => " {?POINTS?} erhalten.", - 'BEG_SAME_USERID_AS_OWN' => "Mitglieder-Id des Webmasters benutzt.", + 'BEG_SAME_USERID_AS_OWN' => "Mitglied-Id des Webmasters benutzt.", 'MEMBER_BEG_LINK_TITLE' => "Ihr Bettellink zum Bewerben", // Pay modes @@ -127,7 +127,7 @@ addMessages(array( 'ADMIN_CONFIG_BEG_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail über eine laufende Bettel-Rallye benachrichtigt werden?", 'ADMIN_CONFIG_BEG_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?", 'BEG_NO_LIMITATION' => "Keine IP-Sperre eingerichtet!!.", - 'ADMIN_CONFIG_BEG_INCLUDE_OWN' => "Soll Ihre Mitglieder-Id an der Bettel-Rallye dran teilnehmen?", + 'ADMIN_CONFIG_BEG_INCLUDE_OWN' => "Soll Ihre Mitglied-Id an der Bettel-Rallye dran teilnehmen?", 'ADMIN_LIST_BEG_TITLE' => "Alle Teilnehmer der Bettel-Rallye auflisten", // Task overview diff --git a/inc/language/bonus_de.php b/inc/language/bonus_de.php index 86c397fd12..126b58f9d8 100644 --- a/inc/language/bonus_de.php +++ b/inc/language/bonus_de.php @@ -114,7 +114,7 @@ addMessages(array( 'ADMIN_CONFIG_BONUS_RALLYE_NOTIFY_POINTS' => "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bonus-Rallye aktiviert wurde.
(0 = Unvergütete Benachrichtigung aussenden)
", 'ADMIN_CONFIG_BONUS_RALLYE_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail über eine laufende Bonus-Rallye benachrichtigt werden?", 'ADMIN_CONFIG_BONUS_RALLYE_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?", - 'ADMIN_CONFIG_BONUS_RALLYE_INCLUDE_ONW' => "Soll Ihre Mitglieder-Id an der Aktiv-Rallye dran teilnehmen?", + 'ADMIN_CONFIG_BONUS_RALLYE_INCLUDE_ONW' => "Soll Ihre Mitglied-Id an der Aktiv-Rallye dran teilnehmen?", 'ADMIN_NOTIFCATION_TITLE' => "Ausgesendete Benachrichtigungen", 'ADMIN_DELETE_NOTIFY_MAIL' => "Obrige Benachrichtigung entfernen", 'ADMIN_NOTIFY_MAIL_ALREADY_DELETED' => "Benachrichtigung bereits entfernt.", diff --git a/inc/language/de.php b/inc/language/de.php index fd514fe9d8..f9baf66657 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -69,19 +69,19 @@ addMessages(array( 'ADMIN_LOGIN' => "Geben Sie Ihren Loginnamen ein", 'ADMIN_PASS' => "Geben Sie Ihr Passwort ein", 'ADMIN_ACCOUNT_FIRST_CREATION_LOGIN' => "Geben Sie einen Administrator-Loginnamen ein", - 'ADMIN_ACCOUNT_FIRST_CREATION_PASS1' => "Vergeben Sie dazu ein Passwort", - 'ADMIN_ACCOUNT_FIRST_CREATION_PASS2' => "Das Passwort erneut eingeben", + 'ADMIN_ACCOUNT_FIRST_CREATION_PASSWORD1' => "Vergeben Sie dazu ein Passwort", + 'ADMIN_ACCOUNT_FIRST_CREATION_PASSWORD2' => "Das Passwort erneut eingeben", 'ADMIN_NO_PASS' => "Kein Passwort eingegeben!", 'CLEAR_FORM' => "Nochmal eingeben", 'ADMIN_ACCOUNT_FIRST_CREATION_SUBMIT' => "Admin-Account erstellen", 'ADMIN_NO_LOGIN' => "Sie haben keinen Loginnamen eingegeben.", - 'ADMIN_NO_PASS1' => "Sie haben kein Passwort eingegeben.", - 'ADMIN_NO_PASS2' => "Sie haben keine Passwortwiederholung eingegeben.", - 'ADMIN_SHORT_PASS1' => "Das Passwort ist zu kurz! Mindestens {?minium_admin_pass_length?} Zeichen.", - 'ADMIN_SHORT_PASS2' => "Die Passwortwiederholung ist zu kurz! Mindestens {?minium_admin_pass_length?} Zeichen.", + 'ADMIN_NO_PASSWORD1' => "Sie haben kein Passwort eingegeben.", + 'ADMIN_NO_PASSWORD2' => "Sie haben keine Passwortwiederholung eingegeben.", + 'ADMIN_SHORT_PASSWORD1' => "Das Passwort ist zu kurz! Mindestens {?minium_admin_pass_length?} Zeichen.", + 'ADMIN_SHORT_PASSWORD2' => "Die Passwortwiederholung ist zu kurz! Mindestens {?minium_admin_pass_length?} Zeichen.", 'ADMIN_SHORT_PASS' => "Ihr Administratorpasswort ist zu kurz! Mindestens {?minium_admin_pass_length?} Zeichen", - 'ADMIN_PASS1_MISMATCH' => "Das Passwort stimmt nicht mit der Wiederholung überein.", - 'ADMIN_PASS2_MISMATCH' => "Die Passwortwiederholung stimmt nicht mit dem Passwort überein.", + 'ADMIN_PASSWORD1_MISMATCH' => "Das Passwort stimmt nicht mit der Wiederholung überein.", + 'ADMIN_PASSWORD2_MISMATCH' => "Die Passwortwiederholung stimmt nicht mit dem Passwort überein.", 'ADMIN_LOGIN_ALREADY_REG' => "Das von Ihnen eingegebene Admin-Login existiert bereits.", 'ADMIN_REGISTER_FAILED' => "Bei der Registrierung eines Admin-Accounts ist ein unerwarteter Fehler unterlaufen.", 'ADMIN_REGISTER_DONE' => "Das Admin-Account wurde soeben erstellt. Sie können sich nun mit den eingegeben Login-Daten einloggen.", @@ -191,8 +191,8 @@ addMessages(array( 'SUBMIT_REGISTER' => "Anmeldedaten abschicken", 'HAVE_TO_AGREE' => "Sie müssen unseren AGBs zustimmen, damit Sie an diesem {?mt_word?} teilnehmen können.", 'ENTER_BOTH_PASSWORDS' => "Bitte geben Sie ein Passwort und das selbe Passwort noch einmal ein.", - 'ENTER_PASS1' => "Bitte geben Sie ein Passwort ein.", - 'ENTER_PASS2' => "Bitte geben Sie noch die Bestätigung Ihres Passwortes ein.", + 'ENTER_PASSWORD1' => "Bitte geben Sie ein Passwort ein.", + 'ENTER_PASSWORD2' => "Bitte geben Sie noch die Bestätigung Ihres Passwortes ein.", 'ENTER_EMAIL' => "Bitte geben Sie Ihre Email-Adresse ein! Diese muss auch erreichbar sein.", 'ENTER_SURNAME' => "Bitte geben Sie Ihren Vornamen ein.", 'ENTER_FAMILY' => "Bitte geben Sie Ihren Nachnamen ein.", @@ -400,7 +400,7 @@ addMessages(array( 'EMAIL_PAYMENT' => "Mailart", 'EMAIL_CATEGORY' => "Gebuchte Kategorie", 'EMAIL_RECEIVERS' => "Anzahl Empfänger", - 'EMAIL_RUIDS' => "Mitglieder-Ids", + 'EMAIL_RUIDS' => "Mitglied-Ids", 'EMAIL_POOL_TYPE' => "Derzeitiger Status", 'EMAIL_TSEND' => "Noch zu sendene Mails", 'EMAIL_URL' => "Beworbene URL", @@ -444,7 +444,7 @@ addMessages(array( 'MAIL_STATS_404' => "Konnte Daten aus der Statistik-Tabelle nicht laden.", 'USER_404' => "Mitgliedsdaten nicht gefunden! Sind Sie noch angemeldet?", 'ADMIN_UNCONFIRMED_ACCOUNTS' => "Hier alle Accounts, deren Email-Adresse nicht bestätigt ist", - '_USERID' => "Mitglieder-Id", + '_USERID' => "Mitglied-Id", 'REMOTE_IP' => "IP-Nummer", 'REFERAL_USERID' => "Werber-Id", 'ACCOUNT_STATUS' => "Account-Status", @@ -718,8 +718,8 @@ addMessages(array( 'ADMIN_CONFIG_POINT_SETTINGS_TITLE' => "Einstellungen an {?POINTS?}vergütungen", 'ADMIN_CONFIG_DIRECT_PAY' => "Sollen die eingestellte Anzahl an mindest zubestätigener Mails bei {?POINTS?}gutschriften berücksichtig werden oder immer gutgeschrieben werden?", 'ADMIN_CHANGE_PROFILE' => "Profil ändern", - 'ADMIN_PASS1' => "Passwort eingeben", - 'ADMIN_PASS2' => "Passwortbestätigung", + 'ADMIN_ENTER_PASSWORD1' => "Passwort eingeben", + 'ADMIN_ENTER_PASSWORD2' => "Passwortbestätigung", 'ADMIN_EDIT_USER_PROFILE' => "Editieren eines Mitgliederaccountes", 'ADMIN_EDIT_USER_PASSWORD_NOTE' => "Geben Sie nur zweimal das Passwort ein, wenn Sie es ändern wollen. Wollen Sie nur Daten ändern, geben Sie bitte keines ein.", 'LOCKED_POINTS' => "Noch wartende {?POINTS?}", @@ -880,7 +880,7 @@ addMessages(array( 'ADMIN_SELECT_REFERAL_BANNER_ACTIVE' => "Ist der Werbebanner aktiv?", 'ADMIN_LIST_REFERALS' => "Referal-Übersicht des Mitgliedes {%%pipe,generateUserProfileLink=%s%%} in allen Ebenen:", 'ADMIN_LIST_REFERALS_LEVEL' => "Referals in Ebene %s:", - 'ADMIN_LIST_REFERALS_NOTE' => "Änderung: Klicken Sie die Mitglieder-Id an und gelangen Sie zum Mitgliederprofil. Klicken Sie Anzahl Referals an, werden die Referals des jeweiligen Mitgliedes aufgelistet.", + 'ADMIN_LIST_REFERALS_NOTE' => "Änderung: Klicken Sie die Mitglied-Id an und gelangen Sie zum Mitgliederprofil. Klicken Sie Anzahl Referals an, werden die Referals des jeweiligen Mitgliedes aufgelistet.", 'ADMIN_NORMAL_MAIL_ALREADY_DELETED' => "Mitglieder-Mail bereits gelöscht.", 'INITIAL_RELEASE' => "Erstes Release fertiggestellt.", 'DEVELOPER_RELEASE' => "Entwickler-Version zum Testen.", @@ -978,8 +978,8 @@ addMessages(array( 'ADMIN_ENTER_EMAIL' => "Geben Sie Ihre Email-Adresse ein, die Ihrem Adminlogin hinterlegt ist:", 'ADMIN_ENTER_LOGIN' => "Bitte geben Sie Ihr Administratorlogin ein, dass Sie in der Mail erhalten haben:", - 'ADMIN_ENTER_PASSWORD1' => "Geben Sie Ihr neues Administratorkennwort ein:", - 'ADMIN_ENTER_PASSWORD2' => "Wiederholen Sie das Passwort zur Bestätigung:", + 'ADMIN_ENTER_NEW_PASSWORD1' => "Geben Sie Ihr neues Administratorkennwort ein:", + 'ADMIN_ENTER_NEW_PASSWORD2' => "Wiederholen Sie das Passwort zur Bestätigung:", 'ADMIN_RESET_PASS' => "Ihr Administratorkennwort zurücksetzen?", 'ADMIN_NO_LOGIN_WITH_EMAIL' => "Kein Administrator-Account mit der angegebenen Email-Adresse gefunden.", @@ -1039,7 +1039,7 @@ addMessages(array( 'FATAL_EXTENSION_LOADED' => "Erweiterung %s bereits geladen.", 'ADMIN_ACCESS_DENIED' => "Zugriff auf den Adminmenüpunkt %s nicht gestattet.", 'ADMIN_URL_BLACKLIST_DISABLED' => "URL-Sperrliste ist deaktiviert.", - 'ADMIN_MENU_IS_EMPTY' => "Das von Ihnen ausgewählte Menü {%pipe,getAction%} ist leer.", + 'ADMIN_MENU_EMPTY' => "Das von Ihnen ausgewählte Menü {%pipe,getAction%} ist leer.", 'ADMIN_EXTENSION_TEXT_FILE_MISSING' => "Die Erweiterung %s hat keinen Beschreibungstext. Bitte melden Sie dies uns im Bug-Tracker.", 'GUEST_STATS_NO_CLICKS' => "Keine Klicks in Ihrem {?mt_word?} verzeichnet.", 'ADMIN_EXTENSIONS_REMOVED' => "Es wurden %s Erweiterungen aus Ihrem {?mt_word?} entfernt.", diff --git a/inc/language/earning_de.php b/inc/language/earning_de.php new file mode 100644 index 0000000000..96a721c987 --- /dev/null +++ b/inc/language/earning_de.php @@ -0,0 +1,78 @@ + "Es wurden noch keine Zusatzverdienste durch die Administratoren eingerichtet. Bitte kommen Sie später hier erneut vorbei.", + 'MEMBER_EARNING_POPUP_FORM_TITLE' => "Zusatzverdienst durch PopUps - Kategorie: {%%pipe,translateEarningName=%s%%}", + 'MEMBER_EARNING_ENTER_DAILY_POPUP_AMOUNT' => "Wie viele PopUps wollen Sie im Login täglich maximal sehen?", + 'MEMBER_EARNING_SUBSCRIBE_SUBMIT' => "Zusatzverdienst aktivieren", + 'MEMBER_EARNING_DATA_MIN_POINTS' => "Mindestens verdienbar:", + 'MEMBER_EARNING_DATA_MAX_POINTS' => "Maximal verdienbar:", + 'MEMBER_EARNING_DATA_COUNT' => "Anzahl Verdiensteinträge:", + 'MEMBER_EARNING_DATA_EXCLUDE_USERID' => "Ausgeschlossene Mitgliedsnummer:", + 'MEMBER_EARNING_DATA_GROUP' => "Gruppe Zusatzverdienst:", + 'MEMBER_EARNING_DATA_NAME' => "Bezeichnung Zusatzverdienst:", + 'MEMBER_EARNING_CHANGE_DAILY_POPUP_AMOUNT' => "Ändern von täglich maximal eingeblendeten PopUps:", + 'MEMBER_EARNING_CHANGE_IS_ACTIVE' => "Zusatzverdienst aktiv?", + 'MEMBER_EARNING_POINTS' => "Bereits erzielter Zusatzverdienst:", + 'MEMBER_EARNING_CHANGE_SUBMIT' => "Zusatzverdienst ändern", + + // Titles/notes for displaying earning data + 'MEMBER_EARNING_TITLE' => "Zusatzverdienste bei {?MAIN_TITLE?}", + 'MEMBER_EARNING_NOTE' => "Das Team von {?MAIN_TITLE?} wünscht Ihnen gute Verdienste!", + 'MEMBER_EARNING_DATA_INVALID_TITLE' => "Ungültigen Zusatzverdienst oder Scriptefehler!", + 'MEMBER_EARNING_DATA_INVALID_NOTE' => "Es liegt vermutlich ein Scriptefehler vor. Bitte teilen Sie die oben stehenden Daten dem Support mit.", + + // Earning groups + 'EARNING_GROUP_INVALID' => "Ungültig", + + // Subject lines + 'MEMBER_EARNING_ADDED_SUBJECT' => "Zusatzverdienst hinzugefügt", + 'ADMIN_EARNING_INSERTED_SUBJECT' => "Mitglied hat Zusatzverdienst hinzugefügt", + 'MEMBER_EARNING_UPDATED_SUBJECT' => "Zusatzverdienst aktualisiert", + 'ADMIN_EARNING_UPDATED_SUBJECT' => "Mitglied hat Zusatzverdienst aktualisiert", +)); + +// [EOF] +?> diff --git a/inc/language/forced_de.php b/inc/language/forced_de.php index f2f4d13f25..cad4041102 100644 --- a/inc/language/forced_de.php +++ b/inc/language/forced_de.php @@ -66,6 +66,9 @@ addMessages(array( 'ADMIN_FORCED_ADS_CLICKS_COUNTER' => "Anzahl Forced-Klicks", 'ADMIN_FORCED_ADS_HAS_FRAMEBREAKER' => "Framekiller?", 'ADMIN_FORCED_ADS_ADDED' => "Hinzugefügt", + + // Earning names + 'EARNING_NAME_FORCED_POPUP' => "Forced-PopUp", )); // [EOF] diff --git a/inc/language/holiday_de.php b/inc/language/holiday_de.php index d9c07f2cb3..a8d280b9c4 100644 --- a/inc/language/holiday_de.php +++ b/inc/language/holiday_de.php @@ -78,7 +78,7 @@ addMessages(array( 'MEMBER_HOLIDAY_TIME_LOCK' => "Urlaubsschaltung eingerichtet", 'MEMBER_HOLIDAY_LOCKED' => "Sie können derzeit Ihre Urlaubsschaltung nicht wieder deaktivieren, da Sie diese erst vor Kurzem aktiviert haben.", 'MEMBER_HOLIDAY_ORDER' => "Sie können derzeit Ihre Urlaubsschaltung nicht verändern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: %s", - 'MEMBER_HOLIDAY_NOT_STOPPED_404' => "Beim Beenden Ihres Urlaubes ist ein unerwarteter Fehler aufgetreten: Ihre Mitglieder-Id {%pipe,getMemberId%} wurde nicht gefunden.", + 'MEMBER_HOLIDAY_NOT_STOPPED_404' => "Beim Beenden Ihres Urlaubes ist ein unerwarteter Fehler aufgetreten: Ihre Mitglied-Id {%pipe,getMemberId%} wurde nicht gefunden.", // Subject lines // - Admin diff --git a/inc/language/install_de.php b/inc/language/install_de.php index 04a132f8ea..4ffe2a1276 100644 --- a/inc/language/install_de.php +++ b/inc/language/install_de.php @@ -73,16 +73,16 @@ addMessages(array( 'INSTALLER_TABLE_TYPE_MYISAM' => "MyISAM (langsamer, da Tabelle gelockt wird)", 'INSTALLER_TABLE_TYPE_INNODB' => "InnoDB (schneller, da zweilenweis gelockt wird)", 'INSTALLER_MYSQL_LOGIN' => "Ihr Loginname", - 'INSTALLER_MYSQL_PASS1' => "Ihr Passwort", - 'INSTALLER_MYSQL_PASS2' => "Passwortwiederholung", + 'INSTALLER_MYSQL_PASSWORD1' => "Ihr Passwort", + 'INSTALLER_MYSQL_PASSWORD2' => "Passwortwiederholung", 'INSTALLER_CSS_URL' => "URL zur CSS-Datei (relativ)", 'INSTALLER_FATAL_NO' => "Fataler Fehler im Installer Nr. #", 'INSTALLER_FATAL_NO_MHOST' => "Sie haben keinen Hostnamen eingeben.", 'INSTALLER_FATAL_NO_MDBASE' => "Bitte geben Sie einen Datenbankname ein.", 'INSTALLER_FATAL_NO_MLOGIN' => "Bitte geben Sie Ihr Loginname zum Datenbank-Server ein.", - 'INSTALLER_FATAL_NO_MPASS1' => "Sie haben kein Passwort eingegeben! Dies ist sehr unsicher und wird daher als Fehler gewertet.", - 'INSTALLER_FATAL_NO_MPASS2' => "Bitte geben Sie noch die Passwortbestätigung ein.", - 'INSTALLER_FATAL_MPASS1_MPASS2' => "Ihre beiden Passwörter sind nicht identisch.", + 'INSTALLER_FATAL_NO_MPASSWORD1' => "Sie haben kein Passwort eingegeben! Dies ist sehr unsicher und wird daher als Fehler gewertet.", + 'INSTALLER_FATAL_NO_MPASSWORD2' => "Bitte geben Sie noch die Passwortbestätigung ein.", + 'INSTALLER_FATAL_MPASSWORD1_MPASSWORD2' => "Ihre beiden Passwörter sind nicht identisch.", 'INSTALLER_OUTPUT_MODE' => "Ausgabemodus des HTML-Codes", 'INSTALLER_MODE_RENDER' => "HTML-Code wird vom Server komplett erzeugt und dann ausgegeben", 'INSTALLER_MODE_DIRECT' => "HTML-Code wird sofort ausgegegeben. (Langsam)", @@ -102,11 +102,11 @@ addMessages(array( // SMTP input 'INSTALLER_TEXT_SMTP_HOST' => "SMTP-Servername (z.B. mail.provider.tld)", 'INSTALLER_TEXT_SMTP_USER' => "SMTP-Benutzername", - 'INSTALLER_TEXT_SMTP_PASS1' => "SMTP-Kennwort", - 'INSTALLER_TEXT_SMTP_PASS2' => "SMTP-Kennwortwiederholung", + 'INSTALLER_TEXT_SMTP_PASSWORD1' => "SMTP-Kennwort", + 'INSTALLER_TEXT_SMTP_PASSWORD2' => "SMTP-Kennwortwiederholung", 'INSTALLER_SMTP_HOSTNAME_EMPTY' => "SMTP-Servername leer gelassen.", - 'INSTALLER_SMTP_PASS1_EMPTY' => "SMTP-Passwort leer gelassen.", - 'INSTALLER_SMTP_PASS2_EMPTY' => "SMTP-Passwortwiederholung leer gelassen.", + 'INSTALLER_SMTP_PASSWORD1_EMPTY' => "SMTP-Passwort leer gelassen.", + 'INSTALLER_SMTP_PASSWORD2_EMPTY' => "SMTP-Passwortwiederholung leer gelassen.", 'INSTALLER_SMTP_PASS_MISMATCH' => "SMTP-Passwort und -wiederholung stimmen nicht überein.", )); diff --git a/inc/language/nickname_de.php b/inc/language/nickname_de.php index f26aee2bf5..de7d67a3fc 100644 --- a/inc/language/nickname_de.php +++ b/inc/language/nickname_de.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( 'MEMBER_NICKNAME_CHANGE_NICKNAME_TITLE' => "Einstellen Ihres Nicknames", - 'MEMBER_NICKNAME_CHANGE_NICKNAME_INTRO' => "Stellen Sie hier einen Nicknamen ein, der anstelle Ihrer Mitglieder-Id angezeigt wird! Dieser darf nur unten aufgeführte Zeichen enthalten und sollte nicht kürzer als {?nickname_len?} Zeichen sein.", + 'MEMBER_NICKNAME_CHANGE_NICKNAME_INTRO' => "Stellen Sie hier einen Nicknamen ein, der anstelle Ihrer Mitglied-Id angezeigt wird! Dieser darf nur unten aufgeführte Zeichen enthalten und sollte nicht kürzer als {?nickname_len?} Zeichen sein.", 'MEMBER_NICKNAME_ENTER_NICKNAME' => "Nickname eingeben", 'MEMBER_NICKNAME_CHANGE_SUBMIT' => "Nickname ändern", 'MEMBER_NICKNAME_ALREADY_IN_USE' => "Der von Ihnen eingegebene Nickname wird bereits verwendet.", @@ -52,7 +52,7 @@ addMessages(array( 'MEMBER_NICKNAME_ALLOWED_CHARS' => "Erlaubte Zeichen:", 'MEMBER_NICKNAME_IS_INVALID' => "Ungütige Zeichen im Nicknamen gefunden oder ist zu kurz.", 'MEMBER_NICKNAME_YOUR_REFERAL_LINK' => "Ihr Nickname-Reflink", - 'MEMBER_NO_NICKNAME_SET' => "Sie haben noch keinen Nickname eingerichtet! Damit können Sie sich alternativ zur Mitglieder-Id einloggen.", + 'MEMBER_NO_NICKNAME_SET' => "Sie haben noch keinen Nickname eingerichtet! Damit können Sie sich alternativ zur Mitglied-Id einloggen.", 'MEMBER_PLEASE_CLICK_NICKNAME_FORM' => "Hier können Sie sich nun einen einrichten...", 'ADMIN_CONFIG_NICKNAME_TITLE' => "Einstellungen am Nicknamen", 'ADMIN_CONFIG_NICKNAME_MIN_LENGTH' => "Minimale Länge", diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index e1a8b622dc..da1e6c2450 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -59,7 +59,7 @@ addMessages(array( 'MEMBER_REFBACK_EXAMPLE' => "Ein Rechenbeispiel: Ihr Referal X verdient 1.000 {?POINTS?}, es sind 10% in Ref-Ebene 1 eingestellt. Ohne Refback erhalten Sie 100 {?POINTS?} in Referal-Ebene 1 gutgeschrieben. Nun haben Sie einen Refback von 90% dem Referal X gegeben. Die 100 {?POINTS?} werden dann aufgeteilt: Ihrem Referal werden 90 und Ihnen die restlichen 10 von den ursprünglichen 100 {?POINTS?} gutgeschrieben.", 'MEMBER_REFBACK_NO_ENTRIES' => "Es gibt technische Probleme mit der Refback-Tabelle. Bitte Support benachrichtigen.", 'MEMBER_REFBACK_EDIT_SUBMIT' => "Refback einstellen", - 'MEMBER_REFBACK_REFID' => "Mitglieder-Id", + 'MEMBER_REFBACK_REFID' => "Mitglied-Id", 'MEMBER_REFBACK_LEVEL_REFID' => "Werber", 'MEMBER_REFBACK_STATUS' => "Referal-Status", 'MEMBER_REFBACK_PERCENTS' => "Refback-Prozente", diff --git a/inc/language/sponsor_de.php b/inc/language/sponsor_de.php index 65148a610b..3a281f061e 100644 --- a/inc/language/sponsor_de.php +++ b/inc/language/sponsor_de.php @@ -159,7 +159,7 @@ addMessages(array( 'SPONSOR_DELETE_PAY_ENTRIES' => "Buchungspakete löschen", 'SPONSOR_PAY_ENTRIES_CHANGED' => "Buchungspakete geändert.", 'SPONSOR_PAY_ENTRIES_REMOVED' => "Buchungspakete gelöscht.", - 'SPONSOR_PAYMENT_LIST_IS_EMPTY' => "Noch keine Buchungspakete eingerichtet.", + 'SPONSOR_PAYMENT_LIST_EMPTY' => "Noch keine Buchungspakete eingerichtet.", 'ADMIN_SPONSOR_UNKNOWN_STATUS' => "Unbekannter Status %s wurde bei der Anmeldung zurückgeliefert.", 'SPONSOR_REFERAL' => "Sponsoren-Referal", 'SPONSOR_REFID_WAS' => "Sie wurden vom Sponsor geworben", @@ -218,22 +218,22 @@ addMessages(array( 'SPONSOR_SETTINGS_SUBJECT' => "HINWEIS: Änderung Ihrer Einstellungen", // Sponsor registration errors - 'SPONSOR_SURNAME_IS_EMPTY' => "Sie haben keinen Vornamen eingegeben.", - 'SPONSOR_FAMILY_IS_EMPTY' => "Sie haben keinen Nachnamen eingegeben.", - 'SPONSOR_STREET_NR1_IS_EMPTY' => "Sie haben keine Straße eingegeben.", - 'SPONSOR_COUNTRY_IS_EMPTY' => "Sie haben nicht den 2-stelligen Ländercode eingegeben.", + 'SPONSOR_SURNAME_EMPTY' => "Sie haben keinen Vornamen eingegeben.", + 'SPONSOR_FAMILY_EMPTY' => "Sie haben keinen Nachnamen eingegeben.", + 'SPONSOR_STREET_NR1_EMPTY' => "Sie haben keine Straße eingegeben.", + 'SPONSOR_COUNTRY_EMPTY' => "Sie haben nicht den 2-stelligen Ländercode eingegeben.", 'SPONSOR_COUNTRY_IS_INVALID' => "Der von Ihnen eingegebene 2-stellige Ländercode ist nicht korrekt.", - 'SPONSOR_ZIP_IS_EMPTY' => "Sie haben keine Postleitzahl eingegeben.", - 'SPONSOR_CITY_IS_EMPTY' => "Sie haben keinen Wohnort/Firmensitz eingegeben.", - 'SPONSOR_PHONE_IS_EMPTY' => "Sie haben keine Telefonnummer eingegeben.", + 'SPONSOR_ZIP_EMPTY' => "Sie haben keine Postleitzahl eingegeben.", + 'SPONSOR_CITY_EMPTY' => "Sie haben keinen Wohnort/Firmensitz eingegeben.", + 'SPONSOR_PHONE_EMPTY' => "Sie haben keine Telefonnummer eingegeben.", 'SPONSOR_URL_IS_INVALID' => "Die von Ihnen eingegebene Homepage-Adresse ist nicht korrekt.", - 'SPONSOR_URL_IS_EMPTY' => "Sie haben keine Homepage-URL eingegeben.", + 'SPONSOR_URL_EMPTY' => "Sie haben keine Homepage-URL eingegeben.", 'SPONSOR_EMAIL_IS_INVALID' => "Die von Ihnen eingegebene EMail-Adresse ist nicht korrekt.", 'SPONSOR_PASSWORD1_EMPTY' => "Sie haben kein Passwort eingegeben.", 'SPONSOR_PASSWORD2_EMPTY' => "Sie haben keine Passwortbestätigung eingegeben.", - 'SPONSOR_COMPANY_IS_EMPTY' => "Sie haben keine Firmennamen eingegeben.", - 'SPONSOR_POSITION_IS_EMPTY' => "Sie haben keine Position eingegeben.", - 'SPONSOR_TAX_IDENT_IS_EMPTY' => "Sie haben keine Ust-Ident-Nr. eingegeben.", + 'SPONSOR_COMPANY_EMPTY' => "Sie haben keine Firmennamen eingegeben.", + 'SPONSOR_POSITION_EMPTY' => "Sie haben keine Position eingegeben.", + 'SPONSOR_TAX_IDENT_EMPTY' => "Sie haben keine Ust-Ident-Nr. eingegeben.", 'SPONSOR_REGISTER_SOMETHING_MISSING' => "Die Sponsorenanmeldung konnte wegen der folgenden Punkte nicht durchgeführt werden", 'SPONSOR_PASSWORDS_MISMATCH' => "Die beiden von Ihnen eingegebenen Passwörter stimmen nicht überein.", 'SPONSOR_TERMS_NOT_ACCEPTED' => "Bitte akzeptieren Sie unsere [AGBs] .", diff --git a/inc/language/yoomedia_de.php b/inc/language/yoomedia_de.php index dd35c9d006..d62d67e1e8 100644 --- a/inc/language/yoomedia_de.php +++ b/inc/language/yoomedia_de.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Admin config strings addMessages(array( 'ADMIN_CONFIG_YOOMEDIA_TITLE' => "Einstellungen für Yoo!Media Interface 2.0", - 'ADMIN_CONFIG_YOOMEDIA_ID' => "Ihre Mitglieder-Id:", + 'ADMIN_CONFIG_YOOMEDIA_ID' => "Ihre Mitglied-Id:", 'ADMIN_CONFIG_YOOMEDIA_SID' => "Seiten-Id:", 'ADMIN_CONFIG_YOOMEDIA_PASSWD' => "Interface-Passwort:", 'ADMIN_CONFIG_YOOMEDIA_TM_MAX_RELOAD' => "Maximale Reloadzeit der Kampagnen in Stunden:", diff --git a/inc/libs/earning_functions.php b/inc/libs/earning_functions.php new file mode 100644 index 0000000000..809fda2563 --- /dev/null +++ b/inc/libs/earning_functions.php @@ -0,0 +1,203 @@ + 0, + // Maximum points to get + 'earning_max_points' => 0, + // Count of all entries + 'earning_count' => 0, + // -- The following arry elements are "read-only": -- + // Exclude current userid + 'earning_exclude_userid' => getMemberId(), + // "earning group" + 'earning_group' => 'INVALID', + // "earning name" again + 'earning_name' => $earningName + ); + + // Run the filter chain to get the data + $filterData = runFilterChain('member_earning_table_data', $filterData); + + // Load the proper template and return it + $output = loadTemplate('member_earning_data_' . strtolower($filterData['earning_group']), true, $filterData); + + // Return it + return $output; +} + +// Handle earning id +function doMemberEarning ($earningId, $dailyAmount, $isActive = 'Y') { + // Does the user already have this earning? + $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS `cnt` FROM `{?_MYSQL_PREFIX?}_user_earning` WHERE `earning_id`=%s AND `earning_userid`=%s LIMIT 1", + array( + bigintval($earningId), + getMemberId() + ), __FUNCTION__, __LINE__); + + // Get the count + list($count) = SQL_FETCHROW($result); + + // Does the user have this? + if ($count == 1) { + // Then update it + $status = updateMemberEarning($earningId, $dailyAmount, $isActive); + } else { + // Not found, so add it + $status = insertMemberEarning($earningId, $dailyAmount, $isActive); + } + + // Free result + SQL_FREERESULT($result); + + // Return status + return $status; +} + +// Insert member earning entry +function insertMemberEarning ($earningId, $dailyAmount, $isActive = 'Y') { + // Insert the record + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_earning` (`earning_id`,`earning_userid`,`earning_daily_amount`,`earning_active`) VALUES(%s,%s,%s,'%s')", + array( + bigintval($earningId), + getMemberId(), + bigintval($dailyAmount), + $isActive + ), __FUNCTION__, __LINE__); + + // Prepare content + $content = array( + 'insert_id' => SQL_INSERTID(), + 'earning_id' => bigintval($earningId), + 'daily_amount' => bigintval($dailyAmount), + 'is_active' => $isActive + ); + + // Load email template + $message = loadEmailTemplate('member_earning_added', $content, getMemberId()); + + // Send email out + sendEmail(getMemberId(), '{--MEMBER_EARNING_ADDED_SUBJECT--}', $message); + + // Send admin notification + sendAdminNotification('{--ADMIN_EARNING_INSERTED_SUBJECT--}', 'admin_earning_added', $content, getMemberId()); + + // Return status + return ($content['insert_id'] > 0); +} + +// Update a given earning amount +function updateMemberEarning ($earningId, $dailyAmount, $isActive = 'Y') { + // By default the user does subscribe to an earning + $moreSql = ''; + + // Does the user cancel the earning? + if ($isActive == 'N') { + // Then update cancellation timestamp as well + $moreSql = ', `earning_cancelled`=NOW()'; + } // END - if + + // Update database record + SQL_QUERY_ESC("UPDATE + `{?_MYSQL_PREFIX?}_user_earning` +SET + `earning_daily_amount`=%s, + `earning_active`='%s' + " . $moreSql . " +WHERE + `earning_id`=%s AND + `earning_userid`=%s +LIMIT 1", array( + bigintval($dailyAmount), + $isActive, + bigintval($earningId), + getMemberId() + ), __FUNCTION__, __LINE__); + + // Determine wether something has changed + $status = (!SQL_HASZEROAFFECTED()); + + // Has the record changed? + if ($status === true) { + // Prepare content + $content = array( + 'earning_id' => bigintval($earningId), + 'daily_amount' => bigintval($dailyAmount), + 'is_active' => $isActive + ); + + // Then load email template for user + $message = loadEmailTemplate('member_earning_updated', $content, getMemberId()); + + // Send email out + sendEmail(getMemberId(), '{--MEMBER_EARNING_UPDATED_SUBJECT--}', $message); + + // Send admin notification + sendAdminNotification('{--ADMIN_EARNING_UPDATED_SUBJECT--}', 'admin_earning_updated', $content, getMemberId()); + } // END - if + + // Return status + return $status; +} + +// [EOF] +?> diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 7dac613834..0717d47b2c 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -55,7 +55,7 @@ function doNetworkHandleForm () { // Was the form sent? if ((isFormSent()) || (isFormSent('edit')) || (isFormSent('delete')) || (isFormSent('do_edit')) || (isFormSent('do_delete'))) { // Do we have a 'do'? - if (isGetRequestParameterSet('do')) { + if (isGetRequestElementSet('do')) { // Process the request doAdminNetworkProcessForm(); } else { @@ -72,19 +72,19 @@ function doAdminNetworkProcessForm () { // Abort here loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_FORM_NOT_SENT--}'); return; - } elseif (!isGetRequestParameterSet('do')) { + } elseif (!isGetRequestElementSet('do')) { // No 'do' found loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_DO_404--}'); return; } // Create function name - $functionName = sprintf("doAdminNetworkProcess%s", capitalizeUnderscoreString(getRequestParameter('do'))); + $functionName = sprintf("doAdminNetworkProcess%s", capitalizeUnderscoreString(getRequestElement('do'))); // Is the function valid? if (!function_exists($functionName)) { // Invalid function name - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestParameter('do') . ', function ' . $functionName .' does not exist.', false); + debug_report_bug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.', false); } // END - if // Call-back the method handling our request @@ -124,7 +124,7 @@ function isNetworkTypeHandleValid ($type, $networkId) { } // Checks wether the given network request parameter is already used (valid) -function isNetworkRequestParameterValid ($key, $type, $networkId) { +function isNetworkRequestElementValid ($key, $type, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_param_id` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE `network_id`=%s AND `network_type_id`=%s AND `request_param_key`='%s' LIMIT 1", array($networkId, $type, $key), __FUNCTION__, __LINE__); @@ -512,7 +512,7 @@ function generateNetworkTypeOptions ($id) { '', sprintf( "WHERE `network_id`=%s", - bigintval(getRequestParameter('network')) + bigintval(getRequestElement('network')) ), '', 'translateNetworkTypeHandler' @@ -601,7 +601,7 @@ function generateNetworkRequestKeyOptions () { '', '', '', $GLOBALS['network_params_disabled'], - 'translateNetworkRequestParameter' + 'translateNetworkRequestElement' ); } // END - if @@ -684,7 +684,7 @@ function translateNetworkRequestType ($type) { } // Translates request parameter -function translateNetworkRequestParameter ($param) { +function translateNetworkRequestElement ($param) { // Get the message id return '{--ADMIN_NETWORK_REQUEST_PARAMETER_' . strtoupper($param) . '--}'; } @@ -741,14 +741,14 @@ ORDER BY // Callback function to add new network function doAdminNetworkProcessAddNetwork () { // We can say here, the form is sent, so check if the network is already added - if (isNetworkNameValid(postRequestParameter('network_short_name'))) { + if (isNetworkNameValid(postRequestElement('network_short_name'))) { // Already there - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ALREADY_ADDED=' . postRequestParameter('network_short_name') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ALREADY_ADDED=' . postRequestElement('network_short_name') . '%}'); return false; } // END - if // Remove the 'ok' part - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); // Add the whole request to database SQL_QUERY('INSERT INTO @@ -760,7 +760,7 @@ function doAdminNetworkProcessAddNetwork () { )", __FUNCTION__, __LINE__); // Add the id for output only - setPostRequestParameter('network_id', SQL_INSERTID()); + setPostRequestElement('network_id', SQL_INSERTID()); // Output message if (!SQL_HASZEROAFFECTED()) { @@ -768,7 +768,7 @@ function doAdminNetworkProcessAddNetwork () { loadTemplate('admin_network_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_DATA_NOT_ADDED=' . postRequestParameter('network_short_name') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_DATA_NOT_ADDED=' . postRequestElement('network_short_name') . '%}'); } } @@ -778,7 +778,7 @@ function doAdminNetworkProcessHandleNetwork () { if (ifPostContainsSelections()) { // Something has been selected, so start displaying one by one $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Is this selected? if ($sel == 1) { // Load this network's data @@ -826,11 +826,11 @@ function doAdminNetworkProcessHandleNetworkType () { // Do we have selections? if (ifPostContainsSelections()) { // Load network data - $networkData = getNetworkDataById(getRequestParameter('network')); + $networkData = getNetworkDataById(getRequestElement('network')); // Something has been selected, so start displaying one by one $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Is this selected? if ($sel == 1) { // Load this network's data @@ -881,11 +881,11 @@ function doAdminNetworkProcessHandleRequestParams () { $GLOBALS['network_params_disabled'] = array(); // Load network data - $networkData = getNetworkDataById(getRequestParameter('network')); + $networkData = getNetworkDataById(getRequestElement('network')); // Something has been selected, so start displaying one by one $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Is this selected? if ($sel == 1) { // Load this network's data @@ -939,7 +939,7 @@ function doAdminNetworkProcessChangeNetwork () { $updated = 0; // Something has been selected, so start updating them - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Init data array @@ -984,7 +984,7 @@ function doAdminNetworkProcessRemoveNetwork () { $removed = 0; // Something has been selected, so start updating them - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Remove this entry @@ -1006,24 +1006,24 @@ function doAdminNetworkProcessRemoveNetwork () { // Add a network type handler if not yet found function doAdminNetworkProcessAddNetworkType () { // Is the network type handle already used with given network? - if (isNetworkTypeHandleValid(postRequestParameter('network_type_handle'), getRequestParameter('network'))) { + if (isNetworkTypeHandleValid(postRequestElement('network_type_handle'), getRequestElement('network'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED=' . postRequestParameter('network_type_handle') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED=' . postRequestElement('network_type_handle') . '%}'); // ... so abort here return false; } // END - if // Remove the 'ok' part - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); // Add id - setPostRequestParameter('network_id', bigintval(getRequestParameter('network'))); + setPostRequestElement('network_id', bigintval(getRequestElement('network'))); // Is network_type_banner_url set? - if (postRequestParameter('network_type_banner_url') == '') { + if (postRequestElement('network_type_banner_url') == '') { // Remove empty value to get a NULL for an optional entry - unsetPostRequestParameter('network_type_banner_url'); + unsetPostRequestElement('network_type_banner_url'); } // END - if // Add the whole request to database @@ -1041,7 +1041,7 @@ function doAdminNetworkProcessAddNetworkType () { loadTemplate('admin_network_type_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPES_NOT_ADDED=' . postRequestParameter('network_type_handle') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPES_NOT_ADDED=' . postRequestElement('network_type_handle') . '%}'); } } @@ -1053,7 +1053,7 @@ function doAdminNetworkProcessChangeNetworkType () { $updated = 0; // Something has been selected, so start updating them - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Init data array @@ -1104,7 +1104,7 @@ function doAdminNetworkProcessChangeNetworkParam () { $updated = 0; // Something has been selected, so start updating them - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Init data array @@ -1155,7 +1155,7 @@ function doAdminNetworkProcessRemoveNetworkType () { $removed = 0; // Something has been selected, so start updating them - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Remove this entry @@ -1182,7 +1182,7 @@ function doAdminNetworkProcessRemoveNetworkParam () { $removed = 0; // Something has been selected, so start updating them - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Remove this entry @@ -1204,24 +1204,24 @@ function doAdminNetworkProcessRemoveNetworkParam () { // Adds a request parameter to given network and type function doAdminNetworkProcessAddNetworkParam () { // Is the request parameter already used with given network? - if (isNetworkRequestParameterValid(postRequestParameter('request_param_key'), postRequestParameter('network_type_id'), getRequestParameter('network'))) { + if (isNetworkRequestElementValid(postRequestElement('request_param_key'), postRequestElement('network_type_id'), getRequestElement('network'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestParameter('request_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestElement('request_param_key') . '%}'); // ... so abort here return false; } // END - if // Remove the 'ok' part - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); // Add id - setPostRequestParameter('network_id', bigintval(getRequestParameter('network'))); + setPostRequestElement('network_id', bigintval(getRequestElement('network'))); // Is request_param_default set? - if (postRequestParameter('request_param_default') == '') { + if (postRequestElement('request_param_default') == '') { // Remove empty value to get a NULL for an optional entry - unsetPostRequestParameter('request_param_default'); + unsetPostRequestElement('request_param_default'); } // END - if // Add the whole request to database @@ -1239,35 +1239,35 @@ function doAdminNetworkProcessAddNetworkParam () { loadTemplate('admin_network_request_param_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED=' . postRequestParameter('request_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED=' . postRequestElement('request_param_key') . '%}'); } } // Adds a API response array entry function doAdminNetworkProcessAddNetworkApiTranslation () { // Is the request parameter already used with given network? - if (isNetworkApiTranslationValid(postRequestParameter('network_api_index'), postRequestParameter('network_type_id'), getRequestParameter('network'))) { + if (isNetworkApiTranslationValid(postRequestElement('network_api_index'), postRequestElement('network_type_id'), getRequestElement('network'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED=' . postRequestParameter('network_api_index') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED=' . postRequestElement('network_api_index') . '%}'); // ... so abort here return false; } // END - if // Remove the 'ok' part - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); // Add id - setPostRequestParameter('network_id', bigintval(getRequestParameter('network'))); + setPostRequestElement('network_id', bigintval(getRequestElement('network'))); // Add sorting - setPostRequestParameter('sort', (countSumTotalData( - postRequestParameter('network_id'), + setPostRequestElement('sort', (countSumTotalData( + postRequestElement('network_id'), 'network_api_translation', 'network_api_id', 'network_id', true, - sprintf(" AND `network_type_id`=%s", bigintval(postRequestParameter('network_type_id'))) + sprintf(" AND `network_type_id`=%s", bigintval(postRequestElement('network_type_id'))) ) + 1)); // Add the whole request to database @@ -1285,7 +1285,7 @@ function doAdminNetworkProcessAddNetworkApiTranslation () { loadTemplate('admin_network_api_translation_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_NOT_ADDED=' . postRequestParameter('network_api_index') . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_NOT_ADDED=' . postRequestElement('network_api_index') . '%}'); } } diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index 1cb6390749..0ed71014cc 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -128,7 +128,7 @@ function insertNewsletterUrls ($text) { // Wrapper for sending newsletter and wrapping URLs / HTML mail function sendNewsletter ($to, $subject, $message, $mode) { // Send mail away as HTML - if (postRequestParameter('auto_urls') == 'Y') { + if (postRequestElement('auto_urls') == 'Y') { // Automatically insert URLs into newsletter if ((isExtensionActive('html_mail')) && ($mode == 'html')) { // Send HTML mail diff --git a/inc/libs/primera_functions.php b/inc/libs/primera_functions.php index 029519f211..dff69b2222 100644 --- a/inc/libs/primera_functions.php +++ b/inc/libs/primera_functions.php @@ -237,7 +237,7 @@ class PrimeraApi { // is not false the API data is valid, else invalid function testPrimeraApi () { // Get new instance - $api = new PrimeraApi(postRequestParameter('primera_api_name'), postRequestParameter('primera_api_md5')); + $api = new PrimeraApi(postRequestElement('primera_api_name'), postRequestElement('primera_api_md5')); // Was that fine? return ($api->getPrimera() !== false); diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index c768ccfbbd..3851aa7109 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -71,18 +71,19 @@ function ifRequiredRegisterFieldsAreSet (&$array) { } // Generates a 'category table' for the registration form -function registerGenerateCategoryTable ($mode, $return=false) { +function registerGenerateCategoryTable ($mode) { + // Init output $OUT = ''; // Guests are mostly not interested in how many members has // choosen an individual category - $AND = "WHERE `visible`='Y' "; + $whereStatement = "WHERE `visible`='Y' "; // Admins are allowed to see every category... - if (isAdmin()) $AND = ''; + if (isAdmin()) $whereStatement = ''; // Look for categories - $result = SQL_QUERY('SELECT `id`,`cat`,`visible` FROM `{?_MYSQL_PREFIX?}_cats` ' . $AND . ' ORDER BY `sort` ASC', + $result = SQL_QUERY('SELECT `id`,`cat`,`visible` FROM `{?_MYSQL_PREFIX?}_cats` ' . $whereStatement . ' ORDER BY `sort` ASC', __FUNCTION__, __LINE__); if (!SQL_HASZERONUMS($result)) { @@ -94,7 +95,7 @@ function registerGenerateCategoryTable ($mode, $return=false) { $content['default_no'] = ''; // Mark categories - if ((postRequestParameter('cat', $content['id']) == 'Y') || ((isRegisterDefaultEnabled()) && (!isPostRequestParameterSet('cat', $content['id'])))) { + if ((postRequestElement('cat', $content['id']) == 'Y') || ((isRegisterDefaultEnabled()) && (!isPostRequestElementSet('cat', $content['id'])))) { $content['default_yes'] = ' checked="checked"'; } else { $content['default_no'] = ' checked="checked"'; @@ -112,13 +113,8 @@ function registerGenerateCategoryTable ($mode, $return=false) { $OUT .= displayMessage('{--NO_CATEGORIES_VISIBLE--}', true); } - if ($return === true) { - // Return generated HTML code - return $OUT; - } else { - // Output directly (default) - outputHtml($OUT); - } + // Return generated HTML code + return $OUT; } // Outputs a 'failed message' @@ -143,25 +139,25 @@ function isRegistrationDataComplete () { // First we only check the submitted data then we continue... :) // // Did he agree to our Terms Of Usage? - if (postRequestParameter('agree') != 'Y') { - setPostRequestParameter('agree', '!'); + if (postRequestElement('agree') != 'Y') { + setPostRequestElement('agree', '!'); $isOkay = false; } // END - if // Did he enter a valid email address? (we really don't care about // that, he has to click on a confirmation link :P ) - if ((!isPostRequestParameterSet('email')) || (!isEmailValid(postRequestParameter('email')))) { - setPostRequestParameter('email', '!'); + if ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email')))) { + setPostRequestElement('email', '!'); $isOkay = false; } // END - if // And what about surname and family's name? - if (!isPostRequestParameterSet('surname')) { - setPostRequestParameter('surname', '!'); + if (!isPostRequestElementSet('surname')) { + setPostRequestElement('surname', '!'); $isOkay = false; } // END - if - if (!isPostRequestParameterSet('family')) { - setPostRequestParameter('family', '!'); + if (!isPostRequestElementSet('family')) { + setPostRequestElement('family', '!'); $isOkay = false; } // END - if @@ -175,19 +171,19 @@ function isRegistrationDataComplete () { setPostRequestArray($postArray); // Are both passwords zero length? - if ((strlen(postRequestParameter('pass1')) == 0) && (strlen(postRequestParameter('pass2')) == 0) && ($isOkay === true)) { + if ((strlen(postRequestElement('pass1')) == 0) && (strlen(postRequestElement('pass2')) == 0) && ($isOkay === true)) { // Is the extension 'register' newer or equal 0.5.5? if ((isExtensionInstalledAndNewer('register', '0.5.5')) && (isRegisterGeneratePasswordEmptyEnabled())) { // Generate a random password $randomPassword = generatePassword(); // Set it in both entries - setPostRequestParameter('pass1', $randomPassword); - setPostRequestParameter('pass2', $randomPassword); + setPostRequestElement('pass1', $randomPassword); + setPostRequestElement('pass2', $randomPassword); } else { // Not allowed or no recent extension version - setPostRequestParameter('pass1', '!'); - setPostRequestParameter('pass2', '!'); + setPostRequestElement('pass1', '!'); + setPostRequestElement('pass2', '!'); // ... which is both not okay $isOkay = false; @@ -195,35 +191,35 @@ function isRegistrationDataComplete () { } // END - if // Did he enter his password twice? - if (((!isPostRequestParameterSet('pass1')) || (!isPostRequestParameterSet('pass2'))) || ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')))) { - if ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2'))) { - setPostRequestParameter('pass1', '!'); - setPostRequestParameter('pass2', '!'); + if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { + if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { + setPostRequestElement('pass1', '!'); + setPostRequestElement('pass2', '!'); } else { - if (!isPostRequestParameterSet('pass1')) { - setPostRequestParameter('pass1', '!'); + if (!isPostRequestElementSet('pass1')) { + setPostRequestElement('pass1', '!'); } else { - setPostRequestParameter('pass1', ''); + setPostRequestElement('pass1', ''); } - if (!isPostRequestParameterSet('pass2')) { - setPostRequestParameter('pass2', '!'); + if (!isPostRequestElementSet('pass2')) { + setPostRequestElement('pass2', '!'); } else { - setPostRequestParameter('pass2', ''); + setPostRequestElement('pass2', ''); } } $isOkay = false; } // END - if // Is the password long enouth? - if ((strlen(postRequestParameter('pass1')) < getPassLen()) && ($isOkay === true)) { + if ((strlen(postRequestElement('pass1')) < getPassLen()) && ($isOkay === true)) { $GLOBALS['registration_short_password'] = true; $isOkay = false; } // END - if // Do this check only when no admin is logged in - if (is_array(postRequestParameter('cat'))) { + if (is_array(postRequestElement('cat'))) { // Only continue with array - foreach (postRequestParameter('cat') as $id => $answer) { + foreach (postRequestElement('cat') as $id => $answer) { // Is this category choosen? if ($answer == 'Y') { $GLOBALS['registration_selected_cats']++; @@ -235,10 +231,10 @@ function isRegistrationDataComplete () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay='.intval($isOkay).',selected='.$GLOBALS['registration_selected_cats'].'/'.getLeastCats()); $isOkay = (($isOkay) && ($GLOBALS['registration_selected_cats'] >= getLeastCats())); - if ((postRequestParameter('email') != '!') && (isCheckDoubleEmailEnabled())) { + if ((postRequestElement('email') != '!') && (isCheckDoubleEmailEnabled())) { // Does the email address already exists in our database? - if ((isEmailTaken(postRequestParameter('email'))) && (!isAdmin())) { - setPostRequestParameter('email', '?'); + if ((isEmailTaken(postRequestElement('email'))) && (!isAdmin())) { + setPostRequestElement('email', '?'); $isOkay = false; } // END - if } // END - if @@ -260,8 +256,8 @@ function isRegistrationDataComplete () { // Do the registration function doRegistration () { // Prepapre month and day of birth - if (strlen(postRequestParameter('day')) == 1) setPostRequestParameter('day' , '0' . postRequestParameter('day')); - if (strlen(postRequestParameter('month')) == 1) setPostRequestParameter('month', '0' . postRequestParameter('month')); + if (strlen(postRequestElement('day')) == 1) setPostRequestElement('day' , '0' . postRequestElement('day')); + if (strlen(postRequestElement('month')) == 1) setPostRequestElement('month', '0' . postRequestElement('month')); // Generate hash which will be inserted into confirmation mail $hash = generateHash(sha1( @@ -271,9 +267,9 @@ function doRegistration () { getTotalUnconfirmedUser() . getEncryptSeperator() . // ... and locked users! getTotalLockedUser() . getEncryptSeperator() . - postRequestParameter('month') . '-' . - postRequestParameter('day') . '-' . - postRequestParameter('year') . getEncryptSeperator() . + postRequestElement('month') . '-' . + postRequestElement('day') . '-' . + postRequestElement('year') . getEncryptSeperator() . detectServerName() . getEncryptSeperator() . detectRemoteAddr() . getEncryptSeperator() . detectUserAgent() . '/' . @@ -284,7 +280,7 @@ function doRegistration () { // Old way with enterable two-char-code $countryRow = '`country`'; - $countryData = substr(postRequestParameter('cntry'), 0, 2); + $countryData = substr(postRequestElement('cntry'), 0, 2); // Add design when extension ext-theme is v0.0.8 or greater // @TODO Rewrite these all to a single filter @@ -314,7 +310,7 @@ function doRegistration () { if (isExtensionActive('country')) { // Save with new selectable country code $countryRow = '`country_code`'; - $countryData = bigintval(postRequestParameter('country_code')); + $countryData = bigintval(postRequestElement('country_code')); } // END - if // Create user's account... @@ -325,21 +321,21 @@ function doRegistration () { ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','{%%pipe,detectRemoteAddr%%}', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), {?ref_payout?}".$GLOBALS['register_sql_data'].")", array( $countryRow, - substr(postRequestParameter('gender'), 0, 1), - postRequestParameter('surname'), - postRequestParameter('family'), - postRequestParameter('street_nr'), + substr(postRequestElement('gender'), 0, 1), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), $countryData, - bigintval(postRequestParameter('zip')), - postRequestParameter('city'), - postRequestParameter('email'), - bigintval(postRequestParameter('day')), - bigintval(postRequestParameter('month')), - bigintval(postRequestParameter('year')), - generateHash(postRequestParameter('pass1')), - bigintval(postRequestParameter('max_mails')), - bigintval(postRequestParameter('max_mails')), - makeZeroToNull(postRequestParameter('refid')), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(postRequestElement('day')), + bigintval(postRequestElement('month')), + bigintval(postRequestElement('year')), + generateHash(postRequestElement('pass1')), + bigintval(postRequestElement('max_mails')), + bigintval(postRequestElement('max_mails')), + makeZeroToNull(postRequestElement('refid')), $hash ), __FUNCTION__, __LINE__); @@ -369,8 +365,8 @@ function doRegistration () { addPointsThroughReferalSystem('register_welcome', $userid, getPointsRegister()); // Write catgories - if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) { - foreach (postRequestParameter('cat') as $categoryId => $joined) { + if ((is_array(postRequestElement('cat'))) && (count(postRequestElement('cat')))) { + foreach (postRequestElement('cat') as $categoryId => $joined) { if ($joined == 'Y') { // Insert category entry SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`,`cat_id`) VALUES (%s, %s)", @@ -383,54 +379,54 @@ function doRegistration () { } // END - if // ... rewrite a zero referal id to the main title - if (!isValidUserId(postRequestParameter('refid'))) { - setPostRequestParameter('refid', getMainTitle()); + if (!isValidUserId(postRequestElement('refid'))) { + setPostRequestElement('refid', getMainTitle()); } // END - if // Is ZIP code set? - if (isPostRequestParameterSet('zip')) { + if (isPostRequestElementSet('zip')) { // Prepare data array for the email template // Start with the gender... $content = array( 'hash' => $hash, 'userid' => $userid, - 'gender' => SQL_ESCAPE(postRequestParameter('gender')), - 'surname' => SQL_ESCAPE(postRequestParameter('surname')), - 'family' => SQL_ESCAPE(postRequestParameter('family')), - 'email' => SQL_ESCAPE(postRequestParameter('email')), - 'street' => SQL_ESCAPE(postRequestParameter('street_nr')), - 'city' => SQL_ESCAPE(postRequestParameter('city')), - 'zip' => bigintval(postRequestParameter('zip')), + 'gender' => SQL_ESCAPE(postRequestElement('gender')), + 'surname' => SQL_ESCAPE(postRequestElement('surname')), + 'family' => SQL_ESCAPE(postRequestElement('family')), + 'email' => SQL_ESCAPE(postRequestElement('email')), + 'street' => SQL_ESCAPE(postRequestElement('street_nr')), + 'city' => SQL_ESCAPE(postRequestElement('city')), + 'zip' => bigintval(postRequestElement('zip')), 'country' => $countryData, - 'refid' => SQL_ESCAPE(postRequestParameter('refid')), - 'password' => SQL_ESCAPE(postRequestParameter('pass1')), + 'refid' => SQL_ESCAPE(postRequestElement('refid')), + 'password' => SQL_ESCAPE(postRequestElement('pass1')), ); } else { // No ZIP code entered $content = array( 'hash' => $hash, 'userid' => $userid, - 'gender' => SQL_ESCAPE(postRequestParameter('gender')), - 'surname' => SQL_ESCAPE(postRequestParameter('surname')), - 'family' => SQL_ESCAPE(postRequestParameter('family')), - 'email' => SQL_ESCAPE(postRequestParameter('email')), - 'street' => SQL_ESCAPE(postRequestParameter('street_nr')), - 'city' => SQL_ESCAPE(postRequestParameter('city')), + 'gender' => SQL_ESCAPE(postRequestElement('gender')), + 'surname' => SQL_ESCAPE(postRequestElement('surname')), + 'family' => SQL_ESCAPE(postRequestElement('family')), + 'email' => SQL_ESCAPE(postRequestElement('email')), + 'street' => SQL_ESCAPE(postRequestElement('street_nr')), + 'city' => SQL_ESCAPE(postRequestElement('city')), 'zip' => '', 'country' => $countryData, - 'refid' => SQL_ESCAPE(postRequestParameter('refid')), - 'password' => SQL_ESCAPE(postRequestParameter('pass1')), + 'refid' => SQL_ESCAPE(postRequestElement('refid')), + 'password' => SQL_ESCAPE(postRequestElement('pass1')), ); } // Continue with birthday... switch (getLanguage()) { case 'de': - $content['birthday'] = bigintval(postRequestParameter('day')) . '.' . bigintval(postRequestParameter('month')) . '.' . bigintval(postRequestParameter('year')); + $content['birthday'] = bigintval(postRequestElement('day')) . '.' . bigintval(postRequestElement('month')) . '.' . bigintval(postRequestElement('year')); break; default: - $content['birthday'] = bigintval(postRequestParameter('month')) . '/' . bigintval(postRequestParameter('day')) . '/' . bigintval(postRequestParameter('year')); + $content['birthday'] = bigintval(postRequestElement('month')) . '/' . bigintval(postRequestElement('day')) . '/' . bigintval(postRequestElement('year')); break; } // END - switch diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 48fabe24ea..c4d10ecb2f 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -135,7 +135,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Remove last ", " from SQL string $sql = substr($sql, 0, -2)." WHERE `id`=%s LIMIT 1"; - $DATA['values'][] = bigintval(getRequestParameter('id')); + $DATA['values'][] = bigintval(getRequestElement('id')); // Generate message $message = getMessageFromIndexedArray('{--ADMIN_SPONSOR_UPDATED--}', 'updated', $messageArray); @@ -567,7 +567,7 @@ function doProcessSponsorFormRequest ($messageArray = array()) { case 'added': // Sponsor successfully added with account status = UNCONFIRMED! // Check for his id number $result = SQL_QUERY_ESC("SELECT `id`,`hash` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE '%s' REGEXP `email` LIMIT 1", - array(postRequestParameter('email')), __FUNCTION__, __LINE__); + array(postRequestElement('email')), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // id found so let's load it for the confirmation email list($id, $hash) = SQL_FETCHROW($result); @@ -575,15 +575,15 @@ function doProcessSponsorFormRequest ($messageArray = array()) { // Prepare data for the email template $content['id'] = $id; $content['hash'] = $hash; - $content['email'] = postRequestParameter('email'); - $content['surname'] = postRequestParameter('surname'); - $content['family'] = postRequestParameter('family'); + $content['email'] = postRequestElement('email'); + $content['surname'] = postRequestElement('surname'); + $content['family'] = postRequestElement('family'); $content['timestamp'] = generateDateTime(time(), 0); - $content['password'] = postRequestParameter('pass1'); + $content['password'] = postRequestElement('pass1'); // Generate email and send it to the new sponsor $message = loadEmailTemplate('sponsor_confirm', $content, $id); - sendEmail(postRequestParameter('email'), '{--SPONSOR_PLEASE_CONFIRM_SUBJECT--}', $message); + sendEmail(postRequestElement('email'), '{--SPONSOR_PLEASE_CONFIRM_SUBJECT--}', $message); // Send mail to admin sendAdminNotification('{--ADMIN_NEW_SPONSOR--}', 'admin_sponsor_reg', $content); @@ -592,7 +592,7 @@ function doProcessSponsorFormRequest ($messageArray = array()) { $message = $messageArray['added']; } else { // Sponsor account not found??? - $message = '{%message,SPONSOR_EMAIL_404=' . postRequestParameter('email') . '%}'; + $message = '{%message,SPONSOR_EMAIL_404=' . postRequestElement('email') . '%}'; } // Free memory diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 0199f568c5..4885858be3 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -861,10 +861,10 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() { $templateName = 'surfbar_frameset'; // Any frame set? ;-) - if (isGetRequestParameterSet('frame')) { + if (isGetRequestElementSet('frame')) { // Use the frame as a template name part... ;-) $templateName = sprintf("surfbar_frame_%s", - getRequestParameter('frame') + getRequestElement('frame') ); } // END - if diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index 3fc35343e4..ef16f11f04 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -240,17 +240,17 @@ function getActualTheme () { // Fix it to default $ret = 'default'; } // END - if - } elseif ((!isInstalled()) && ((isInstalling()) || (isHtmlOutputMode())) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) { + } elseif ((!isInstalled()) && ((isInstalling()) || (isHtmlOutputMode())) && ((isGetRequestElementSet('theme')) || (isPostRequestElementSet('theme')))) { // Prepare filename for checking - $themeFile = sprintf("theme/%s/theme.php", getRequestParameter('theme')); + $themeFile = sprintf("theme/%s/theme.php", getRequestElement('theme')); // Installation mode active - if ((isGetRequestParameterSet('theme')) && (isIncludeReadable($theme))) { + if ((isGetRequestElementSet('theme')) && (isIncludeReadable($theme))) { // Set cookie from URL data - setTheme(getRequestParameter('theme')); - } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestParameter('theme')))) { + setTheme(getRequestElement('theme')); + } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme')))) { // Set cookie from posted data - setTheme(postRequestParameter('theme')); + setTheme(postRequestElement('theme')); } // Set return value diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index e4cd9e48b4..527ed293e1 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -44,8 +44,8 @@ if (!defined('__SECURITY')) { function alpha ($sortby) { $add = ''; foreach (array('page','offset','mode','status') as $param) { - if (isGetRequestParameterSet($param)) { - $add .= '&' . $param . '=' . getRequestParameter($param); + if (isGetRequestElementSet($param)) { + $add .= '&' . $param . '=' . getRequestElement($param); } // END - if } // END - foreach @@ -54,7 +54,7 @@ function alpha ($sortby) { $num = count($alphabet) - 1; $OUT = ''; while (list($counter, $ltr) = each($alphabet)) { - if (getRequestParameter('letter') == $ltr) { + if (getRequestElement('letter') == $ltr) { // Current letter is letter from URL $OUT .= '' . $ltr . ''; } else { @@ -84,16 +84,16 @@ function alpha ($sortby) { // Add links for sorting function addSortLinks ($letter, $sortby) { $OUT = ''; - if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', 0); - if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 0); + if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', 0); + if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 0); // Add page and offset - $add = '&page=' . getRequestParameter('page') . '&offset=' . getRequestParameter('offset'); + $add = '&page=' . getRequestElement('page') . '&offset=' . getRequestElement('offset'); // Add status/ mode foreach (array('mode','status') as $param) { - if (isGetRequestParameterSet($param)) { - $add .= '&' . $param . '=' . getRequestParameter($param); + if (isGetRequestElementSet($param)) { + $add .= '&' . $param . '=' . getRequestElement($param); } // END - if } // END - foreach @@ -142,29 +142,29 @@ function addPageNavigation ($numPages) { if ($numPages > 1) { // Create navigation links for every page for ($page = 1; $page <= $numPages; $page++) { - if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { $OUT .= '-'; } else { - if (!isGetRequestParameterSet('letter')) setGetRequestParameter('letter', ''); - if (!isGetRequestParameterSet('sortby')) setGetRequestParameter('sortby', 'userid'); + if (!isGetRequestElementSet('letter')) setGetRequestElement('letter', ''); + if (!isGetRequestElementSet('sortby')) setGetRequestElement('sortby', 'userid'); // Base link $OUT .= ''; + $OUT .= '&letter=' . getRequestElement('letter') . '&sortby=' . getRequestElement('sortby') . '&page=' . $page . '&offset=' . getConfig('user_limit') . '%}">'; } $OUT .= $page; - if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { $OUT .= '-'; } else { $OUT .= ''; @@ -765,12 +765,12 @@ function doTemplateAdminListUserTitle ($template, $clear = false) { $code = '{--ADMIN_LIST_ALL_ACCOUNTS--}'; // Do we have a 'status' or 'mode' set? - if (isGetRequestParameterSet('status')) { + if (isGetRequestElementSet('status')) { // Set title according to the 'status' - $code = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter('status'))); - } elseif (isGetRequestParameterSet('mode')) { + $code = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestElement('status'))); + } elseif (isGetRequestElementSet('mode')) { // Set title according to the "mode" - $code = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestParameter('mode'))); + $code = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestElement('mode'))); } // Return the code diff --git a/inc/load_config.php b/inc/load_config.php index 9cce5eac41..63d7a2b2b6 100644 --- a/inc/load_config.php +++ b/inc/load_config.php @@ -82,7 +82,7 @@ if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadab } // Check if the user setups his database login stuff... -if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallationPhase()) && (!isGetRequestParameterSet('installing')) && (isInstalled())) { +if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallationPhase()) && (!isGetRequestElementSet('installing')) && (isInstalled())) { // No login entered and outside installation mode outputHtml('{--MAILER_WARNING--}:'); if (isInstalled()) { diff --git a/inc/loader/load-earning.php b/inc/loader/load-earning.php index 74ae2c1a4f..5dc576e206 100644 --- a/inc/loader/load-earning.php +++ b/inc/loader/load-earning.php @@ -44,10 +44,10 @@ if (!defined('__SECURITY')) { } // Let's start with the admins table... -if (($GLOBALS['cache_instance']->loadCacheFile('earning')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { +if (($GLOBALS['cache_instance']->loadCacheFile('earning')) && ($GLOBALS['cache_instance']->extensionVersionMatches('earning'))) { // Load cache $GLOBALS['cache_array']['earning'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((isHtmlOutputMode()) && (isExtensionInstalledAndNewer('sql_patches', '0.8.5'))) { +} elseif (isHtmlOutputMode()) { // Create cache file $GLOBALS['cache_instance']->init(); @@ -62,7 +62,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('earning')) && ($GLOBALS['cache_i SQL_FREERESULT($result); // Close cache - $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); + $GLOBALS['cache_instance']->storeExtensionVersion('earning'); $GLOBALS['cache_instance']->finalize(); } diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index b7ac0e243e..e25ee43b20 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -63,8 +63,8 @@ if ($DOUBLER_POINTS == '0') { } // END - if // If not currently doubled set it to zero -unsetGetRequestParameter('DOUBLER_USERID'); -unsetPostRequestParameter('DOUBLER_USERID'); +unsetGetRequestElement('DOUBLER_USERID'); +unsetPostRequestElement('DOUBLER_USERID'); setSession('DOUBLER_USERID', ''); if (empty($GLOBALS['local_doubler_userid'])) $GLOBALS['local_doubler_userid'] = '0'; diff --git a/inc/modules/admin.php b/inc/modules/admin.php index a7e7831afa..889af1f25d 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -52,22 +52,22 @@ $ret = 'init'; // Is no admin registered? if (!isAdminRegistered()) { // Admin is not registered so we have to inform the user - if ((isFormSent()) && ((!isPostRequestParameterSet('admin_login')) || (!isPostRequestParameterSet('admin_pass1')) || (strlen(postRequestParameter('admin_pass1')) < getConfig('minium_admin_pass_length')) || (!isPostRequestParameterSet('admin_pass2')) || (strlen(postRequestParameter('admin_pass2')) < getConfig('minium_admin_pass_length')) || (postRequestParameter('admin_pass1') != postRequestParameter('admin_pass2')))) { - setPostRequestParameter('ok', '***'); + if ((isFormSent()) && ((!isPostRequestElementSet('admin_login')) || (!isPostRequestElementSet('admin_pass1')) || (strlen(postRequestElement('admin_pass1')) < getConfig('minium_admin_pass_length')) || (!isPostRequestElementSet('admin_pass2')) || (strlen(postRequestElement('admin_pass2')) < getConfig('minium_admin_pass_length')) || (postRequestElement('admin_pass1') != postRequestElement('admin_pass2')))) { + setPostRequestElement('ok', '***'); } // END - if // Clear error message $errorMessage = ''; - if ((isFormSent()) && (postRequestParameter('ok') != '***')) { + if ((isFormSent()) && (postRequestElement('ok') != '***')) { // Hash the password with the old function because we are here in install mode - $hashedPass = md5(postRequestParameter('admin_pass1')); + $hashedPass = md5(postRequestElement('admin_pass1')); // Kill maybe existing session variables destroyAdminSession(false); // Do registration - $ret = addAdminAccount(postRequestParameter('admin_login'), $hashedPass, getWebmaster()); + $ret = addAdminAccount(postRequestElement('admin_login'), $hashedPass, getWebmaster()); // Check if registration wents fine switch ($ret) { @@ -84,7 +84,7 @@ if (!isAdminRegistered()) { $errorMessage = '{--ADMIN_CANNOT_COMPLETE--}'; // Set this to have our error message displayed - setPostRequestParameter('ok', '***'); + setPostRequestElement('ok', '***'); } break; @@ -92,14 +92,14 @@ if (!isAdminRegistered()) { $errorMessage = '{--ADMIN_REGISTER_FAILED--}'; // Set this to have our error message displayed - setPostRequestParameter('ok', '***'); + setPostRequestElement('ok', '***'); break; case 'already': // Admin does already exists! $errorMessage = '{--ADMIN_LOGIN_ALREADY_REG--}'; // Set this to have our error message displayed - setPostRequestParameter('ok', '***'); + setPostRequestElement('ok', '***'); break; default: @@ -108,7 +108,7 @@ if (!isAdminRegistered()) { logDebugMessage(__FILE__, __LINE__, $errorMessage); // Set this to have our error message displayed - setPostRequestParameter('ok', '***'); + setPostRequestElement('ok', '***'); break; } // END - switch } // END - if @@ -117,8 +117,8 @@ if (!isAdminRegistered()) { if ($ret != 'done') { // Init login name $content['admin_login'] = ''; - if (isPostRequestParameterSet('admin_login')) { - $content['admin_login'] = postRequestParameter('admin_login'); + if (isPostRequestElementSet('admin_login')) { + $content['admin_login'] = postRequestElement('admin_login'); } // END - if // Init array elements @@ -128,7 +128,7 @@ if (!isAdminRegistered()) { $content['error_message'] = ''; // Yet-another notice-fix - if ((isFormSent()) && (postRequestParameter('ok') == '***')) { + if ((isFormSent()) && (postRequestElement('ok') == '***')) { // Init variables $loginMessage = ''; $pass1Message = ''; @@ -145,24 +145,24 @@ if (!isAdminRegistered()) { } // END - if // No password 1 entered or to short? - if (!isPostRequestParameterSet('admin_pass1')) { - $pass1Message = '{--ADMIN_NO_PASS1--}'; - } elseif (strlen(postRequestParameter('admin_pass1')) < getConfig('minium_admin_pass_length')) { - $pass1Message = '{--ADMIN_SHORT_PASS1--}'; + if (!isPostRequestElementSet('admin_pass1')) { + $pass1Message = '{--ADMIN_NO_PASSWORD1--}'; + } elseif (strlen(postRequestElement('admin_pass1')) < getConfig('minium_admin_pass_length')) { + $pass1Message = '{--ADMIN_SHORT_PASSWORD1--}'; } // No password 2 entered or to short? - if (!isPostRequestParameterSet('admin_pass2')) { - $pass2Message = '{--ADMIN_NO_PASS2--}'; - } elseif (strlen(postRequestParameter('admin_pass2')) < getConfig('minium_admin_pass_length')) { - $pass2Message = '{--ADMIN_SHORT_PASS2--}'; + if (!isPostRequestElementSet('admin_pass2')) { + $pass2Message = '{--ADMIN_NO_PASSWORD2--}'; + } elseif (strlen(postRequestElement('admin_pass2')) < getConfig('minium_admin_pass_length')) { + $pass2Message = '{--ADMIN_SHORT_PASSWORD2--}'; } // Both didn't match? - if (postRequestParameter('admin_pass1') != postRequestParameter('admin_pass2')) { + if (postRequestElement('admin_pass1') != postRequestElement('admin_pass2')) { // No match - if (empty($pass1Message)) $pass1Message = '{--ADMIN_PASS1_MISMATCH--}'; - if (empty($pass2Message)) $pass2Message = '{--ADMIN_PASS2_MISMATCH--}'; + if (empty($pass1Message)) $pass1Message = '{--ADMIN_PASSWORD1_MISMATCH--}'; + if (empty($pass2Message)) $pass2Message = '{--ADMIN_PASSWORD2_MISMATCH--}'; } // END - if // Output error messages @@ -178,24 +178,24 @@ if (!isAdminRegistered()) { // Load register template loadTemplate('admin_reg_form', false, $content); } // END - if -} elseif (isGetRequestParameterSet('reset_pass')) { +} elseif (isGetRequestElementSet('reset_pass')) { // Is the form submitted? - if ((isPostRequestParameterSet('send_link')) && (isPostRequestParameterSet('email'))) { + if ((isPostRequestElementSet('send_link')) && (isPostRequestElementSet('email'))) { // Output result - displayMessage(sendAdminPasswordResetLink(postRequestParameter('email'))); - } elseif (isGetRequestParameterSet('hash')) { + displayMessage(sendAdminPasswordResetLink(postRequestElement('email'))); + } elseif (isGetRequestElementSet('hash')) { // Output form for hash validation - loadTemplate('admin_validate_reset_hash_form', false, getRequestParameter('hash')); - } elseif ((isPostRequestParameterSet('validate_hash')) && (isPostRequestParameterSet('admin_login')) && (isPostRequestParameterSet('hash'))) { + loadTemplate('admin_validate_reset_hash_form', false, getRequestElement('hash')); + } elseif ((isPostRequestElementSet('validate_hash')) && (isPostRequestElementSet('admin_login')) && (isPostRequestElementSet('hash'))) { // Validate the login data and hash - $valid = adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('admin_login')); + $valid = adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('admin_login')); // Valid? if ($valid === true) { // Prepare content first $content = array( - 'hash' => postRequestParameter('hash'), - 'admin_login' => postRequestParameter('admin_login') + 'hash' => postRequestElement('hash'), + 'admin_login' => postRequestElement('admin_login') ); // Validation okay so display form for final password change @@ -204,11 +204,11 @@ if (!isAdminRegistered()) { // Cannot validate the login data and hash displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED--}'); } - } elseif ((isPostRequestParameterSet('reset_pass')) && (isPostRequestParameterSet('hash')) && (isPostRequestParameterSet('admin_login')) && (isPostRequestParameterSet('admin_pass1')) && (postRequestParameter('admin_pass1') == postRequestParameter('admin_pass2'))) { + } elseif ((isPostRequestElementSet('reset_pass')) && (isPostRequestElementSet('hash')) && (isPostRequestElementSet('admin_login')) && (isPostRequestElementSet('admin_pass1')) && (postRequestElement('admin_pass1') == postRequestElement('admin_pass2'))) { // Okay, we shall the admin password here. So first revalidate the hash - if (adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('admin_login'))) { + if (adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('admin_login'))) { // Output result - loadTemplate('admin_reset_password_done', false, doResetAdminPassword(postRequestParameter('admin_login'), postRequestParameter('admin_pass1'))); + loadTemplate('admin_reset_password_done', false, doResetAdminPassword(postRequestElement('admin_login'), postRequestElement('admin_pass1'))); } else { // Validation failed displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2--}'); @@ -224,22 +224,22 @@ if (!isAdminRegistered()) { redirectToUrl('modules.php?module=admin&logout=1'); } // END - if - if (isGetRequestParameterSet('register')) { + if (isGetRequestElementSet('register')) { // Registration of first admin is done - if (getRequestParameter('register') == 'done') { + if (getRequestElement('register') == 'done') { // Regisration done! displayMessage('{--ADMIN_REGISTER_DONE--}'); } // END - if } // END - if // Check if the admin has submitted data or not - if ((isFormSent()) && ((!isPostRequestParameterSet('admin_login')) || (!isPostRequestParameterSet('admin_password')) || (strlen(postRequestParameter('admin_password')) < getConfig('minium_admin_pass_length')))) { - setPostRequestParameter('ok', '***'); + if ((isFormSent()) && ((!isPostRequestElementSet('admin_login')) || (!isPostRequestElementSet('admin_password')) || (strlen(postRequestElement('admin_password')) < getConfig('minium_admin_pass_length')))) { + setPostRequestElement('ok', '***'); } // END - if - if ((isFormSent()) && (postRequestParameter('ok') != '***')) { + if ((isFormSent()) && (postRequestElement('ok') != '***')) { // All required data was entered so we check his account - $ret = ifAdminLoginDataIsValid(postRequestParameter('admin_login'), postRequestParameter('admin_password')); + $ret = ifAdminLoginDataIsValid(postRequestElement('admin_login'), postRequestElement('admin_password')); // Which status do we have? switch ($ret) { @@ -257,8 +257,8 @@ if (!isAdminRegistered()) { $url .= 'what=' . getWhat(); } elseif (isActionSet()) { $url .= 'action=' . getAction(); - } elseif (isGetRequestParameterSet('area')) { - $url .= 'area=' . getRequestParameter('area'); + } elseif (isGetRequestElementSet('area')) { + $url .= 'area=' . getRequestElement('area'); } // Load URL @@ -266,13 +266,13 @@ if (!isAdminRegistered()) { break; case '404': // Administrator login not found - setPostRequestParameter('ok', $ret); - $ret = '{%message,ADMIN_ACCOUNT_404=' . postRequestParameter('admin_login') . '%}'; + setPostRequestElement('ok', $ret); + $ret = '{%message,ADMIN_ACCOUNT_404=' . postRequestElement('admin_login') . '%}'; destroyAdminSession(); break; case 'password': // Wrong password - setPostRequestParameter('ok', $ret); + setPostRequestElement('ok', $ret); $ret = '{--WRONG_PASS--} [{--ADMIN_RESET_PASS--}]'; destroyAdminSession(); break; @@ -286,8 +286,8 @@ if (!isAdminRegistered()) { // Error detected? if ($ret != 'done') { $content['admin_login'] = ''; - if (isPostRequestParameterSet('admin_login')) { - $content['admin_login'] = postRequestParameter('admin_login'); + if (isPostRequestElementSet('admin_login')) { + $content['admin_login'] = postRequestElement('admin_login'); } // END - if // Init array elements @@ -300,22 +300,22 @@ if (!isAdminRegistered()) { $passwdMessage = ''; // Check for login - if (!isPostRequestParameterSet('admin_login')) { + if (!isPostRequestElementSet('admin_login')) { // No login entered? $loginMessage = '{--ADMIN_NO_LOGIN--}'; - } elseif ((!empty($ret)) && (postRequestParameter('ok') == '404')) { + } elseif ((!empty($ret)) && (postRequestElement('ok') == '404')) { // An error comes back from login? $loginMessage = $ret; } // Check for password - if (!isPostRequestParameterSet('admin_password')) { + if (!isPostRequestElementSet('admin_password')) { // No password entered? $passwdMessage = '{--ADMIN_NO_PASS--}'; - } elseif (strlen(postRequestParameter('admin_password')) < getConfig('minium_admin_pass_length')) { + } elseif (strlen(postRequestElement('admin_password')) < getConfig('minium_admin_pass_length')) { // Or password too short? $passwdMessage = '{--ADMIN_SHORT_PASS--}'; - } elseif ((!empty($ret)) && (postRequestParameter('ok') == 'password')) { + } elseif ((!empty($ret)) && (postRequestElement('ok') == 'password')) { // An error comes back from login? $passwdMessage = $ret; } @@ -341,13 +341,13 @@ if (!isAdminRegistered()) { // Set default values $content = merge_array($content, array('target' => 'action', 'value' => 'login')); } - } elseif (isGetRequestParameterSet('area')) { + } elseif (isGetRequestElementSet('area')) { // Restore old area value $content = merge_array( $content, array( 'target' => 'area', - 'value' => getRequestParameter('area') + 'value' => getRequestElement('area') ) ); } else { @@ -358,19 +358,19 @@ if (!isAdminRegistered()) { // Load login form template loadTemplate('admin_login_form', false, $content); } // END - if -} elseif (isGetRequestParameterSet('logout')) { +} elseif (isGetRequestElementSet('logout')) { // Only try to remove cookies if (destroyAdminSession()) { // Load logout template - if (isGetRequestParameterSet('register')) { + if (isGetRequestElementSet('register')) { // Secure input - $register = getRequestParameter('register'); + $register = getRequestElement('register'); // Special logout redirect for installation of given extension loadTemplate(sprintf("admin_logout_%s_install", $register)); - } elseif (isGetRequestParameterSet('remove')) { + } elseif (isGetRequestElementSet('remove')) { // Secure input - $remove = getRequestParameter('remove'); + $remove = getRequestElement('remove'); // Special logout redirect for removal of given extension loadTemplate(sprintf("admin_logout_%s_remove", $remove)); @@ -401,7 +401,7 @@ if (!isAdminRegistered()) { $area = 'entrance'; // Check for similar URL variable - if (isGetRequestParameterSet('area')) $area = getRequestParameter('area'); + if (isGetRequestElementSet('area')) $area = getRequestElement('area'); // Load logical-area menu-system file loadIncludeOnce('inc/modules/admin/lasys-inc.php'); @@ -416,13 +416,13 @@ if (!isAdminRegistered()) { break; case '404': // Administrator login not found - setPostRequestParameter('ok', $ret); + setPostRequestElement('ok', $ret); displayMessage('{%message,ADMIN_ACCOUNT_404=' . getCurrentAdminId() . '%}'); destroyAdminSession(); break; case 'password': // Wrong password - setPostRequestParameter('ok', $ret); + setPostRequestElement('ok', $ret); displayMessage('{--WRONG_PASS--}'); destroyAdminSession(); break; diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php index 17e3e35a66..fa1d048e6a 100644 --- a/inc/modules/admin/action-logout.php +++ b/inc/modules/admin/action-logout.php @@ -43,10 +43,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isPostRequestParameterSet('no')) { +if (isPostRequestElementSet('no')) { // Do not logout now redirectToUrl('admin.php'); -} elseif ((isPostRequestParameterSet('yes')) && (getAction() == 'logout')) { +} elseif ((isPostRequestElementSet('yes')) && (getAction() == 'logout')) { // Redirect to logout link redirectToUrl('modules.php?module=admin&logout=1'); } diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 850cc853eb..21f8bb21ab 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -771,7 +771,7 @@ function sendAdminBuildMails ($mode, $tableName, $content, $id, $subjectPart = ' } // END - if // Is the raw userid set? - if (postRequestParameter($userIdColumn[0], $id) > 0) { + if (postRequestElement($userIdColumn[0], $id) > 0) { // Load email template if (!empty($subjectPart)) { $mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $tableName[0], $content); @@ -780,7 +780,7 @@ function sendAdminBuildMails ($mode, $tableName, $content, $id, $subjectPart = ' } // Send email out - sendEmail(postRequestParameter($userIdColumn[0], $id), strtoupper('{--MEMBER_' . $subject . '_' . $tableName[0] . '_SUBJECT--}'), $mail); + sendEmail(postRequestElement($userIdColumn[0], $id), strtoupper('{--MEMBER_' . $subject . '_' . $tableName[0] . '_SUBJECT--}'), $mail); } // END - if // Generate subject @@ -788,9 +788,9 @@ function sendAdminBuildMails ($mode, $tableName, $content, $id, $subjectPart = ' // Send admin notification out if (!empty($subjectPart)) { - sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $tableName[0], $content, postRequestParameter($userIdColumn[0], $id)); + sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $tableName[0], $content, postRequestElement($userIdColumn[0], $id)); } else { - sendAdminNotification($subject, 'admin_' . $mode . '_' . $tableName[0], $content, postRequestParameter($userIdColumn[0], $id)); + sendAdminNotification($subject, 'admin_' . $mode . '_' . $tableName[0], $content, postRequestElement($userIdColumn[0], $id)); } } @@ -813,7 +813,7 @@ function adminListBuilder ($listType, $tableName, $columns, $filterFunctions, $e // "Walk" through all entries //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, 'listType=
'.print_r($listType,true).'
,tableName
'.print_r($tableName,true).'
,columns=
'.print_r($columns,true).'
,filterFunctions=
'.print_r($filterFunctions,true).'
,extraValues=
'.print_r($extraValues,true).'
,idColumn=
'.print_r($idColumn,true).'
,userIdColumn=
'.print_r($userIdColumn,true).'
,rawUserId=
'.print_r($rawUserId,true).'
'); - foreach (postRequestParameter($idColumn[0]) as $id => $selected) { + foreach (postRequestElement($idColumn[0]) as $id => $selected) { // Secure id number $id = bigintval($id); @@ -892,7 +892,7 @@ function adminBuilderStatusHandler ($mode, $tableName, $columns, $filterFunction // All valid entries? (We hope so here!) if ((count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && (count($statusArray) > 0)) { // "Walk" through all entries - foreach (postRequestParameter($idColumn[0]) as $id => $sel) { + foreach (postRequestElement($idColumn[0]) as $id => $sel) { // Construct SQL query $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}_%s` SET", SQL_ESCAPE($tableName[0])); @@ -1006,9 +1006,9 @@ function adminDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunct // Delete them all $idList = ''; - foreach (postRequestParameter($idColumn[0]) as $id => $sel) { + foreach (postRequestElement($idColumn[0]) as $id => $sel) { // Is there a userid? - if (isPostRequestParameterSet($rawUserId[0], $id)) { + if (isPostRequestElementSet($rawUserId[0], $id)) { // Load all data from that id $result = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`=%s LIMIT 1", array( @@ -1035,12 +1035,12 @@ function adminDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunct SQL_QUERY_ESC($sql, array($tableName[0], $idColumn[0], substr($idList, 0, -1)), __FUNCTION__, __LINE__); // Was this fine? - if (SQL_AFFECTEDROWS() == count(postRequestParameter($idColumn[0]))) { + if (SQL_AFFECTEDROWS() == count(postRequestElement($idColumn[0]))) { // All deleted displayMessage('{--ADMIN_ALL_ENTRIES_REMOVED--}'); } else { // Some are still there :( - displayMessage(sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count(postRequestParameter($idColumn[0])))); + displayMessage(sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count(postRequestElement($idColumn[0])))); } } else { // List for deletion confirmation @@ -1073,7 +1073,7 @@ function adminEditEntriesConfirm ($tableName, $columns = array(), $filterFunctio if ($editNow[0] === true) { // Change them all $affected = '0'; - foreach (postRequestParameter($idColumn[0]) as $id => $sel) { + foreach (postRequestElement($idColumn[0]) as $id => $sel) { // Prepare content array (new values) $content = array(); @@ -1144,12 +1144,12 @@ function adminEditEntriesConfirm ($tableName, $columns = array(), $filterFunctio } // END - foreach // Was this fine? - if ($affected == count(postRequestParameter($idColumn[0]))) { + if ($affected == count(postRequestElement($idColumn[0]))) { // All deleted displayMessage('{--ADMIN_ALL_ENTRIES_EDITED--}'); } else { // Some are still there :( - displayMessage(sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count(postRequestParameter($idColumn[0])))); + displayMessage(sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count(postRequestElement($idColumn[0])))); } } else { // List for editing @@ -1235,7 +1235,7 @@ function adminAddEntries ($tableName, $columns = array(), $filterFunctions = arr foreach ($columns as $key=>$columnName) { // Copy entry to final arrays $sqlColumns[$key] = $columnName; - $sqlValues[$key] = postRequestParameter($columnName); + $sqlValues[$key] = postRequestElement($columnName); //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key='.$key.',columnName='.$columnName.',filterFunctions='.$filterFunctions[$key].',extraValues='.intval(isset($extraValues[$key])).',extraValuesName='.intval(isset($extraValues[$columnName . '_list'])).'
'); // Send data through the filter function if found @@ -1614,7 +1614,7 @@ function doVerifyExpertSettings () { // Ask for them if (isFormSent()) { // Is the element set, then we need to change the admin - if (isPostRequestParameterSet('expert_settings')) { + if (isPostRequestElementSet('expert_settings')) { // Get it and prepare final post data array $postData['login'][getCurrentAdminId()] = getCurrentAdminLogin(); $postData['expert_warning'][getCurrentAdminId()] = 'N'; @@ -1623,7 +1623,7 @@ function doVerifyExpertSettings () { adminsChangeAdminAccount($postData, 'expert_warning'); // Clear form - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } // END - if // All fine! @@ -1689,7 +1689,7 @@ function addEmailNavigation ($numPages, $offset, $show_form, $colspan, $return=f $NAV = ''; for ($page = 1; $page <= $numPages; $page++) { // Is the page currently selected or shall we generate a link to it? - if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { // Is currently selected, so only highlight it $NAV .= '-'; } else { @@ -1697,13 +1697,13 @@ function addEmailNavigation ($numPages, $offset, $show_form, $colspan, $return=f $NAV .= ''; } $NAV .= $page; - if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { // Is currently selected, so only highlight it $NAV .= '-'; } else { @@ -1738,7 +1738,7 @@ function addEmailNavigation ($numPages, $offset, $show_form, $colspan, $return=f // Process menu editing form function adminProcessMenuEditForm ($type, $subMenu) { // An action is done... - foreach (postRequestParameter('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { $AND = "(`what` = '' OR `what` IS NULL)"; $sel = bigintval($sel); @@ -1747,15 +1747,15 @@ function adminProcessMenuEditForm ($type, $subMenu) { $AND = "`action`='" . $subMenu . "'"; } // END - if - switch (postRequestParameter('ok')) { + switch (postRequestElement('ok')) { case 'edit': // Edit menu - if (postRequestParameter('sel_what', $sel) == '') { + if (postRequestElement('sel_what', $sel) == '') { // Update with 'what'=null SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_%s_menu` SET `title`='%s', `action`='%s', `what`=NULL WHERE ".$AND." AND `id`=%s LIMIT 1", array( $type, $menu, - postRequestParameter('sel_action', $sel), + postRequestElement('sel_action', $sel), $sel ), __FILE__, __LINE__); } else { @@ -1764,8 +1764,8 @@ function adminProcessMenuEditForm ($type, $subMenu) { array( $type, $menu, - postRequestParameter('sel_action', $sel), - postRequestParameter('sel_what', $sel), + postRequestElement('sel_action', $sel), + postRequestElement('sel_what', $sel), $sel ), __FILE__, __LINE__); } @@ -1778,12 +1778,12 @@ function adminProcessMenuEditForm ($type, $subMenu) { case 'status': // Change status of menus SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_%s_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array($type, postRequestParameter('visible', $sel), postRequestParameter('locked', $sel), $sel), __FILE__, __LINE__); + array($type, postRequestElement('visible', $sel), postRequestElement('locked', $sel), $sel), __FILE__, __LINE__); break; default: // Unexpected action - logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); - displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestParameter('ok') . '%}'); + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok'))); + displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestElement('ok') . '%}'); break; } // END - switch } // END - foreach @@ -1795,26 +1795,26 @@ function adminProcessMenuEditForm ($type, $subMenu) { // Handle weightning function doAdminProcessMenuWeightning ($type, $AND) { // Are there all required (generalized) GET parameter? - if ((isGetRequestParameterSet('act')) && (isGetRequestParameterSet('tid')) && (isGetRequestParameterSet('fid'))) { + if ((isGetRequestElementSet('act')) && (isGetRequestElementSet('tid')) && (isGetRequestElementSet('fid'))) { // Init variables $tid = ''; $fid = ''; // Get ids - if (isGetRequestParameterSet('w')) { + if (isGetRequestElementSet('w')) { // Sub menus selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `sort`=%s LIMIT 1", array( $type, - getRequestParameter('act'), - bigintval(getRequestParameter('tid')) + getRequestElement('act'), + bigintval(getRequestElement('tid')) ), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `sort`=%s LIMIT 1", array( $type, - getRequestParameter('act'), - bigintval(getRequestParameter('fid')) + getRequestElement('act'), + bigintval(getRequestElement('fid')) ), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -1823,14 +1823,14 @@ function doAdminProcessMenuWeightning ($type, $AND) { $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`=%s LIMIT 1", array( $type, - bigintval(getRequestParameter('tid')) + bigintval(getRequestElement('tid')) ), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`=%s LIMIT 1", array( $type, - bigintval(getRequestParameter('fid')) + bigintval(getRequestElement('fid')) ), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -1841,13 +1841,13 @@ function doAdminProcessMenuWeightning ($type, $AND) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_%s_menu` SET `sort`=%s WHERE ".$AND." AND `id`=%s LIMIT 1", array( $type, - bigintval(getRequestParameter('tid')), + bigintval(getRequestElement('tid')), bigintval($fid) ), __FILE__, __LINE__); SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_%s_menu` SET `sort`=%s WHERE ".$AND." AND `id`=%s LIMIT 1", array( $type, - bigintval(getRequestParameter('fid')), + bigintval(getRequestElement('fid')), bigintval($tid) ), __FILE__, __LINE__); } // END - if diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 3ab13856dd..3afba091ea 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -43,11 +43,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (getRequestParameter('userid') == 'all') { +if (getRequestElement('userid') == 'all') { // Add points to all accounts - if ((isFormSent()) && (postRequestParameter('points') > 0)) { + if ((isFormSent()) && (postRequestElement('points') > 0)) { // Points - $content['points'] = bigintval(postRequestParameter('points')); + $content['points'] = bigintval(postRequestElement('points')); // Select all users $result_main = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", @@ -64,12 +64,12 @@ if (getRequestParameter('userid') == 'all') { $GLOBALS['ref_level'] = -1; // Ok, add points and send an email to him... - addPointsDirectly('admin_all', $content['userid'], bigintval(postRequestParameter('points'))); + addPointsDirectly('admin_all', $content['userid'], bigintval(postRequestElement('points'))); // Prepare content $content = array( - 'reason' => SQL_ESCAPE(postRequestParameter('reason')), - 'points' => bigintval(postRequestParameter('points')), + 'reason' => SQL_ESCAPE(postRequestElement('reason')), + 'points' => bigintval(postRequestElement('points')), 'userid' => $row['userid'] ); @@ -87,37 +87,37 @@ if (getRequestParameter('userid') == 'all') { // Display form add points loadTemplate('admin_add_points_all'); } -} elseif (isGetRequestParameterSet('userid')) { +} elseif (isGetRequestElementSet('userid')) { // User id found in URL so we use this give him some credits - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Selected user does exist $content = getUserDataArray(); - if ((isFormSent()) && (isPostRequestParameterSet('points'))) { + if ((isFormSent()) && (isPostRequestElementSet('points'))) { // Add points and send an email to him... - addPointsDirectly('admin_single', bigintval(getRequestParameter('userid')), bigintval(postRequestParameter('points'))); + addPointsDirectly('admin_single', bigintval(getRequestElement('userid')), bigintval(postRequestElement('points'))); // Prepare content $content = array( - 'reason' => SQL_ESCAPE(postRequestParameter('reason')), - 'points' => bigintval(postRequestParameter('points')) + 'reason' => SQL_ESCAPE(postRequestElement('reason')), + 'points' => bigintval(postRequestElement('points')) ); // Message laden - $message = loadEmailTemplate('member_add_points', $content, bigintval(getRequestParameter('userid'))); + $message = loadEmailTemplate('member_add_points', $content, bigintval(getRequestElement('userid'))); - sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_ADD_SUBJECT--}', $message); + sendEmail(bigintval(getRequestElement('userid')), '{--ADMIN_ADD_SUBJECT--}', $message); displayMessage('{--ADMIN_POINTS_ADDED--}'); } else { // Prepare content - $content['userid'] = bigintval(getRequestParameter('userid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Output template loadTemplate('admin_add_points', false, $content); } } else { // User not found - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')) . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index aafcac4b0d..8286c6e260 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -45,8 +45,8 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // Generate timestamps - $START = mktime(postRequestParameter('start_hour'), postRequestParameter('start_min'), postRequestParameter('start_sec'), postRequestParameter('start_month'), postRequestParameter('start_day'), postRequestParameter('start_year')); - $END = mktime(postRequestParameter('end_hour') , postRequestParameter('end_min') , postRequestParameter('end_sec') , postRequestParameter('end_month') , postRequestParameter('end_day') , postRequestParameter('end_year') ); + $START = mktime(postRequestElement('start_hour'), postRequestElement('start_min'), postRequestElement('start_sec'), postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); + $END = mktime(postRequestElement('end_hour') , postRequestElement('end_min') , postRequestElement('end_sec') , postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); // Is there already a rallye running? $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", @@ -58,14 +58,14 @@ if (isFormSent()) { VALUES (%s,'%s','%s','%s',%s,%s,'%s','%s','%s')", array( getCurrentAdminId(), - postRequestParameter('title'), - postRequestParameter('descr'), - postRequestParameter('template'), + postRequestElement('title'), + postRequestElement('descr'), + postRequestElement('template'), $START, $END, - postRequestParameter('auto_add'), - postRequestParameter('active'), - postRequestParameter('notify'), + postRequestElement('auto_add'), + postRequestElement('active'), + postRequestElement('notify'), ), __FILE__, __LINE__); // Load id diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index 1df52561c4..ed671d7ee2 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Was an URL added? -if ((isFormSent('add')) && (isPostRequestParameterSet('url'))) { +if ((isFormSent('add')) && (isPostRequestElementSet('url'))) { // Initialize variables $content = array(); $id = 'reload_ye'; @@ -52,7 +52,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('url'))) { $postData = postRequestArray(); // Convert the "reload selections" - // @TODO Find all convertSelectionsToEpocheTime() calls and rewrite postRequestParameter() calls to $postData + // @TODO Find all convertSelectionsToEpocheTime() calls and rewrite postRequestElement() calls to $postData convertSelectionsToEpocheTime($postData, $content, $id, $skip); // Then add this URL diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 8363be5858..21d3273cae 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -44,8 +44,8 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if ((isFormSent()) && ((!isPostRequestParameterSet('title')) || (!isPostRequestParameterSet('menu')) || (!isPostRequestParameterSet('descr')))) { - unsetPostRequestParameter('ok'); +if ((isFormSent()) && ((!isPostRequestElementSet('title')) || (!isPostRequestElementSet('menu')) || (!isPostRequestElementSet('descr')))) { + unsetPostRequestElement('ok'); } // END - if if (!isFormSent()) { @@ -161,25 +161,25 @@ if (!isFormSent()) { loadTemplate('admin_add_admin_menu', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry - if (isPostRequestParameterSet('menu')) { + if (isPostRequestElementSet('menu')) { // Add sub menu SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( - postRequestParameter('menu'), - postRequestParameter('name'), - postRequestParameter('title'), - postRequestParameter('descr'), - bigintval(postRequestParameter('sort')), + postRequestElement('menu'), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('descr'), + bigintval(postRequestElement('sort')), ), __FILE__, __LINE__ ); } else { // Add main menu SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", array( - postRequestParameter('name'), - postRequestParameter('title'), - postRequestParameter('descr'), - bigintval(postRequestParameter('sort')), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('descr'), + bigintval(postRequestElement('sort')), ), __FILE__, __LINE__ ); } diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index d418ba4fc9..a40d0a5652 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -45,9 +45,9 @@ addYouAreHereLink('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $subMenu = ''; -if (isGetRequestParameterSet('sub')) { - $AND = sprintf("`action`='%s' AND `what` != '' AND `what` IS NOT NULL", getRequestParameter('sub')); - $subMenu = getRequestParameter('sub'); +if (isGetRequestElementSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` != '' AND `what` IS NOT NULL", getRequestElement('sub')); + $subMenu = getRequestElement('sub'); } // END - if // List all menu points and make them editable @@ -57,7 +57,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['sub'] = $subMenu; $content['chk'] = countPostSelection(); $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title`,`action`,`what`,`descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -107,7 +107,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() // Del menu entries with or without confirmation $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -143,9 +143,9 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() loadTemplate('admin_delete_admin_menu', false, $content); } elseif ((isFormSent()) && (!isDemoModeActive())) { // An action is done... - switch (postRequestParameter('ok')) { + switch (postRequestElement('ok')) { case 'edit': // Edit menu - foreach (postRequestParameter('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { // Secure id $sel = bigintval($sel); @@ -163,9 +163,9 @@ WHERE LIMIT 1", array( $menu, - postRequestParameter('sel_action', $sel), - postRequestParameter('sel_what', $sel), - postRequestParameter('sel_desc', $sel), + postRequestElement('sel_action', $sel), + postRequestElement('sel_what', $sel), + postRequestElement('sel_desc', $sel), $sel, ), __FILE__, __LINE__); } @@ -175,7 +175,7 @@ LIMIT 1", break; case 'delete': // Delete menu - foreach (postRequestParameter('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); } // END - foreach @@ -185,8 +185,8 @@ LIMIT 1", break; default: // Unexpected action - logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); - displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestParameter('ok') . '%}'); + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok'))); + displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestElement('ok') . '%}'); break; } // END - switch } else { diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index 07055e416c..7d0cfaf549 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -49,9 +49,9 @@ $FORM = true; // Is the form sent? if (isFormSent('add')) { // Check all - if ((isPostRequestParameterSet('login')) && (isPostRequestParameterSet('email')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) { + if ((isPostRequestElementSet('login')) && (isPostRequestElementSet('email')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { // Add admin when not added already - if (addAdminAccount(postRequestParameter('login'), generateHash(postRequestParameter('pass1')), postRequestParameter('email')) == 'done') { + if (addAdminAccount(postRequestElement('login'), generateHash(postRequestElement('pass1')), postRequestElement('email')) == 'done') { // Do not ouput any form! $FORM = false; diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index a84cdcdd4c..97a1c843dc 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -43,20 +43,20 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if ((isFormSent()) && (isGetRequestParameterSet('admin'))) { +if ((isFormSent()) && (isGetRequestElementSet('admin'))) { // Send mail or message // Load admin's email address - $email = getAdminEmail(bigintval(getRequestParameter('admin'))); + $email = getAdminEmail(bigintval(getRequestElement('admin'))); // Load email template and send the mail to the admin - $message = loadEmailTemplate('admins_mail_contct_admin', postRequestParameter('text'), 0); + $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), 0); sendEmail($email, '{--ADMIN_ADMINS_MESSAGE_FROM_ADMIN--}', $message); // Mail / message dropped displayMessage('{--ADMIN_ADMINS_ADMIN_CONTACTED--}'); -} elseif (isGetRequestParameterSet('admin')) { +} elseif (isGetRequestElementSet('admin')) { // Load contact form template - $content['admin'] = getRequestParameter('admin'); + $content['admin'] = getRequestElement('admin'); // Load main form loadTemplate('admin_admins_contct_form', false, $content); diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index cc6320ec70..48b112458e 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -44,24 +44,24 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Set selection data to empty array when it is empty -if (!isPostRequestParameterSet('sel')) { - setPostRequestParameter('sel', array()); +if (!isPostRequestElementSet('sel')) { + setPostRequestElement('sel', array()); } // END - if // Check if direct admin account was selected -if (isGetRequestParameterSet('admin')) { +if (isGetRequestElementSet('admin')) { // Secure id number - $adminId = bigintval(getRequestParameter('admin')); + $adminId = bigintval(getRequestElement('admin')); // Set required fields - setPostRequestParameter('edit', 1); - setPostRequestParameter('sel', array($adminId => 1)); + setPostRequestElement('edit', 1); + setPostRequestElement('sel', array($adminId => 1)); } // END - if if ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit account(s) adminsEditAdminAccount(postRequestArray()); -} elseif ((isFormSent('do_edit')) && (count(postRequestParameter('login')) > 0)) { +} elseif ((isFormSent('do_edit')) && (count(postRequestElement('login')) > 0)) { // Change admin accounts adminsChangeAdminAccount(postRequestArray()); } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 2bcea27674..877022ce49 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -49,7 +49,7 @@ if (isFormSent('edit')) { // Add option for events $adminsList = generateOptionList('admins', 'id', 'login', '', 'email'); $rows = ''; - foreach (postRequestParameter('sel') as $template => $sel) { + foreach (postRequestElement('sel') as $template => $sel) { // 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__); @@ -123,7 +123,7 @@ ORDER BY initSqls(); // Ok, update database - foreach (postRequestParameter('admin_id') as $id => $content['admin_id']) { + foreach (postRequestElement('admin_id') as $id => $content['admin_id']) { // Secure ids $id = bigintval($id); $content['admin_id'] = bigintval($content['admin_id']); @@ -132,16 +132,16 @@ ORDER BY addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET `admin_id`=%s WHERE `id`=%s ORDER BY `id` LIMIT 1", array($content['admin_id'], $id), __FILE__, __LINE__, false)); - if (($content['admin_id'] < 1) && (isPostRequestParameterSet('template', $id))) { + if (($content['admin_id'] < 1) && (isPostRequestElementSet('template', $id))) { // Remove any other admin entries addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'", - array(postRequestParameter('template', $id), $id), __FILE__, __LINE__, false)); + array(postRequestElement('template', $id), $id), __FILE__, __LINE__, false)); } // END - if - if (postRequestParameter('admin_new', postRequestParameter('template', $id)) > 0) { + if (postRequestElement('admin_new', postRequestElement('template', $id)) > 0) { // Add new admin addSql(SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')", - array($content['admin_id'], postRequestParameter('template', $id)), __FILE__, __LINE__, false)); + array($content['admin_id'], postRequestElement('template', $id)), __FILE__, __LINE__, false)); } // END - if } // END - foreach diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index a2a6bb93a2..ff57d9b827 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -51,9 +51,9 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('beg_rallye' , postRequestParameter('beg_rallye')); - setConfigEntry('beg_rallye_enable_notify' , postRequestParameter('beg_rallye_enable_notify')); - setConfigEntry('beg_rallye_disable_notify', postRequestParameter('beg_rallye_disable_notify')); + setConfigEntry('beg_rallye' , postRequestElement('beg_rallye')); + setConfigEntry('beg_rallye_enable_notify' , postRequestElement('beg_rallye_enable_notify')); + setConfigEntry('beg_rallye_disable_notify', postRequestElement('beg_rallye_disable_notify')); } else { // Prepare constants for the template $content['timeout'] = createConfigurationTimeSelections('beg_timeout' , 'Dhm'); diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 143885c699..f2176b4866 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -48,27 +48,27 @@ if (isFormSent()) { convertCommaToDotInPostDataArray(array('login_bonus', 'turbo_bonus', 'bonus_ref', 'bonus_order', 'bonus_notify_points')); // Generate string for saving ranks - setPostRequestParameter('turbo_rates', ''); + setPostRequestElement('turbo_rates', ''); $RATES = array(); - foreach (postRequestParameter('rate') as $rate) { + foreach (postRequestElement('rate') as $rate) { $rate = trim(convertCommaToDot($rate)); if (!empty($rate)) $RATES[] = $rate; } // END - foreach - setPostRequestParameter('turbo_rates', trim(implode(';', $RATES))); - unsetPostRequestParameter('rate'); + setPostRequestElement('turbo_rates', trim(implode(';', $RATES))); + unsetPostRequestElement('rate'); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (!isPostRequestParameterSet('turbo_rates')) { - setPostRequestParameter('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); + if (!isPostRequestElementSet('turbo_rates')) { + setPostRequestElement('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); } // END - if // Save data adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('bonus_active' , postRequestParameter('bonus_active')); - setConfigEntry('bonus_enable_notify' , postRequestParameter('bonus_enable_notify')); - setConfigEntry('bonus_disable_notify', postRequestParameter('bonus_disable_notify')); + setConfigEntry('bonus_active' , postRequestElement('bonus_active')); + setConfigEntry('bonus_enable_notify' , postRequestElement('bonus_enable_notify')); + setConfigEntry('bonus_disable_notify', postRequestElement('bonus_disable_notify')); } else { // Transfer options to template $content['bonus_userid'] = addMemberSelectionBox(getBonusUserid(), false, true, true, 'bonus_userid'); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index afcb7f53f1..afd0edfd2b 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -50,14 +50,14 @@ $CATS = ''; if (isFormSent('add')) { // Add a new category $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `cat`='%s' LIMIT 1", - array(postRequestParameter('catname')), __FILE__, __LINE__); + array(postRequestElement('catname')), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Category does not exists, we simply add it... SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`,`visible`,`sort`) VALUES ('%s','%s','%s')", array( - postRequestParameter('catname'), - postRequestParameter('visible'), - bigintval(postRequestParameter('parent') + 1) + postRequestElement('catname'), + postRequestElement('visible'), + bigintval(postRequestElement('parent') + 1) ), __FILE__, __LINE__); $content = '{--CATEGORY_ADDED--}'; } else { @@ -70,22 +70,22 @@ if (isFormSent('add')) { // Display message displayMessage($content); -} elseif ((isFormSent()) && (isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))) { +} elseif ((isFormSent()) && (isPostRequestElementSet('id')) && (is_array(postRequestElement('id')))) { // Change or delete categories... $TEXT = ''; - foreach (postRequestParameter('id') as $id => $cat) { + foreach (postRequestElement('id') as $id => $cat) { // Secure id $id = bigintval($id); // Is the entry set? if (!empty($cat)) { - switch (getRequestParameter('do')) { + switch (getRequestElement('do')) { case 'edit': // Change categories SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_cats` SET `cat`='%s', `visible`='%s', `sort`=%s WHERE `id`=%s LIMIT 1", array( $cat, - postRequestParameter('visible', $id), - postRequestParameter('sort', $id), + postRequestElement('visible', $id), + postRequestElement('sort', $id), $id ), __FILE__, __LINE__); $TEXT = '{--ADMIN_CATEGORIES_SAVED--}'; @@ -112,7 +112,7 @@ if (isFormSent('add')) { } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete categories $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Load row template and switch colors $OUT .= loadTemplate('admin_delete_cats_row', true, $id); } // END - foreach @@ -122,7 +122,7 @@ if (isFormSent('add')) { } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit categories $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Load data from the category $result = SQL_QUERY_ESC("SELECT `id`,`visible`,`sort` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index fb80c90ea2..f65e7a8f9a 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -45,8 +45,8 @@ addYouAreHereLink('admin', __FILE__); // Init 'sub' value $sub = ''; -if (isGetRequestParameterSet('sub')) { - $sub = getRequestParameter('sub'); +if (isGetRequestElementSet('sub')) { + $sub = getRequestElement('sub'); } // END - if switch ($sub) { @@ -71,9 +71,9 @@ switch ($sub) { break; case 'target': // Set which what-file will be placed in home-page (only modules.php?module=index) - if (isGetRequestParameterSet('home')) { + if (isGetRequestElementSet('home')) { // Set new home - updateConfiguration('index_home', getRequestParameter('home')); + updateConfiguration('index_home', getRequestElement('home')); } // END - if // Load all what menu points diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 8cc45de27c..47b005288e 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -45,25 +45,25 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // Test timestamp - $STAMP = mktime(0, 0, 0, bigintval(postRequestParameter('month')), bigintval(postRequestParameter('day')), bigintval(postRequestParameter('year'))); + $STAMP = mktime(0, 0, 0, bigintval(postRequestElement('month')), bigintval(postRequestElement('day')), bigintval(postRequestElement('year'))); if ($STAMP > time()) { // Date is in the future! - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } else { // Remove entries - unsetPostRequestParameter('day'); - unsetPostRequestParameter('month'); - unsetPostRequestParameter('year'); + unsetPostRequestElement('day'); + unsetPostRequestElement('month'); + unsetPostRequestElement('year'); // Remember timestamp - setPostRequestParameter('mt_start', $STAMP); + setPostRequestElement('mt_start', $STAMP); } // Convert some data - setPostRequestParameter('mt_stage', bigintval(postRequestParameter('mt_stage'))); - if (postRequestParameter('mt_stage') <= getTotalConfirmedUser()) { + setPostRequestElement('mt_stage', bigintval(postRequestElement('mt_stage'))); + if (postRequestElement('mt_stage') <= getTotalConfirmedUser()) { // Not enougth! - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } // END - if } // END - if diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index 5f6040be70..e352214c20 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -50,7 +50,7 @@ if (isFormSent('edit')) { $OUT = ''; // Edit selected modules - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load module data // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function $result = SQL_QUERY_ESC("SELECT `id`,`module`,`title`,`locked`,`hidden`,`admin_only`,`mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1", @@ -79,26 +79,26 @@ if (isFormSent('edit')) { displayMessage('{--ADMIN_MODS_NOTHING_SELECTED--}'); // Remove maybe confusing data - unsetPostRequestParameter('edit'); - unsetPostRequestParameter('do_edit'); + unsetPostRequestElement('edit'); + unsetPostRequestElement('do_edit'); } } elseif (isFormSent('do_edit')) { // Init SQLs initSqls(); // Change modules - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure id number $id = bigintval($id); // Update module addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='%s', `locked`='%s', `hidden`='%s', `admin_only`='%s', `mem_only`='%s' WHERE `id`=%s LIMIT 1", array( - postRequestParameter('title', $id), - postRequestParameter('locked', $id), - postRequestParameter('hidden', $id), - postRequestParameter('admin', $id), - postRequestParameter('member', $id), + postRequestElement('title', $id), + postRequestElement('locked', $id), + postRequestElement('hidden', $id), + postRequestElement('admin', $id), + postRequestElement('member', $id), $id ), __FILE__, __LINE__, false)); } diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index c1a24294b8..561ea167c6 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -46,25 +46,25 @@ addYouAreHereLink('admin', __FILE__); // Stop saving data if one input field is !isset if (isFormSent()) { // Calculate stamps and set calculated stamps - setPostRequestParameter('online_timeout' , createEpocheTimeFromSelections('online_timeout' , postRequestArray())); - setPostRequestParameter('url_tlock' , createEpocheTimeFromSelections('url_tlock' , postRequestArray())); - setPostRequestParameter('profile_lock' , createEpocheTimeFromSelections('profile_lock' , postRequestArray())); - setPostRequestParameter('profile_update' , createEpocheTimeFromSelections('profile_update' , postRequestArray())); - setPostRequestParameter('resend_profile_update', createEpocheTimeFromSelections('resend_profile_update', postRequestArray())); + setPostRequestElement('online_timeout' , createEpocheTimeFromSelections('online_timeout' , postRequestArray())); + setPostRequestElement('url_tlock' , createEpocheTimeFromSelections('url_tlock' , postRequestArray())); + setPostRequestElement('profile_lock' , createEpocheTimeFromSelections('profile_lock' , postRequestArray())); + setPostRequestElement('profile_update' , createEpocheTimeFromSelections('profile_update' , postRequestArray())); + setPostRequestElement('resend_profile_update', createEpocheTimeFromSelections('resend_profile_update', postRequestArray())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... - if (!isPostRequestParameterSet('online_timeout')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } // Chedck other timestamps (which can be zero!) - if (!isPostRequestParameterSet('profile_lock')) { unsetPostRequestParameter('ok'); } - if (!isPostRequestParameterSet('url_tlock')) { unsetPostRequestParameter('ok'); } - if (!isPostRequestParameterSet('profile_update')) { unsetPostRequestParameter('ok'); } - if (!isPostRequestParameterSet('resend_profile_update')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestElementSet('profile_lock')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('profile_update')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('resend_profile_update')) { unsetPostRequestElement('ok'); } // Check other settings - if (!isPostRequestParameterSet('max_send')) { unsetPostRequestParameter('ok'); } - if (!isPostRequestParameterSet('code_length')) { unsetPostRequestParameter('ok'); } - if (!isPostRequestParameterSet('reject_url')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestElementSet('max_send')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('code_length')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('reject_url')) { unsetPostRequestElement('ok'); } } // END - if if (isFormSent()) { diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 12d4efd351..6b5994dbba 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -44,14 +44,14 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Convert 'rate' if set -if (isPostRequestParameterSet('rate')) { +if (isPostRequestElementSet('rate')) { convertCommaToDotInPostData('rate'); } // END - if -if ((isFormSent('add')) && (isPostRequestParameterSet('title')) && (postRequestParameter('rate') > 0)) { +if ((isFormSent('add')) && (isPostRequestElementSet('title')) && (postRequestElement('rate') > 0)) { // Add new payout type $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1", - array(postRequestParameter('title')), __FILE__, __LINE__); + array(postRequestElement('title')), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Add now SQL_QUERY_ESC("INSERT INTO @@ -62,16 +62,16 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('title')) && (postRequestP '%s', %s, %s,'%s','%s','%s','%s','%s','%s','%s' )", array( - postRequestParameter('title'), - bigintval(postRequestParameter('rate')), - bigintval(postRequestParameter('min_points')), - postRequestParameter('yacc'), - postRequestParameter('ypass'), - postRequestParameter('yurl'), - postRequestParameter('yrdone'), - postRequestParameter('yrfailed'), - postRequestParameter('ytrans'), - postRequestParameter('allow_url'), + postRequestElement('title'), + bigintval(postRequestElement('rate')), + bigintval(postRequestElement('min_points')), + postRequestElement('yacc'), + postRequestElement('ypass'), + postRequestElement('yurl'), + postRequestElement('yrdone'), + postRequestElement('yrfailed'), + postRequestElement('ytrans'), + postRequestElement('allow_url'), ), __FILE__, __LINE__); // Get message @@ -93,7 +93,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { // Make payouts configurable $display = false; //Suppress any other outputs $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load data $result = SQL_QUERY_ESC("SELECT `id`,`type`,`rate`,`min_points`,`allow_url` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -115,12 +115,12 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { initSqls(); // Edit entries - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure id $id = bigintval($id); // Edit only if something is entered - if ((isPostRequestParameterSet('title', $id)) && (postRequestParameter('rate', $id) > 0)) { + if ((isPostRequestElementSet('title', $id)) && (postRequestElement('rate', $id) > 0)) { // Update entry addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_payout_types` SET `type`='%s', @@ -131,10 +131,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('type', $id), - convertCommaToDot(postRequestParameter('rate', $id)), - convertCommaToDot(postRequestParameter('min_points' , $id)), - postRequestParameter('allow_url', $id), + postRequestElement('type', $id), + convertCommaToDot(postRequestElement('rate', $id)), + convertCommaToDot(postRequestElement('min_points' , $id)), + postRequestElement('allow_url', $id), bigintval($id) ),__FILE__, __LINE__, false)); } @@ -148,7 +148,7 @@ LIMIT 1", } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { $display = false; //Suppress any other outputs $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure id number $id = bigintval($id); @@ -169,7 +169,7 @@ LIMIT 1", initSqls(); // Delete entries - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); } // END - foreach diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index f64589d016..c07306a005 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -47,58 +47,58 @@ addYouAreHereLink('admin', __FILE__); $message = ''; // Is the 'sub' parameter set? -if (isGetRequestParameterSet('sub')) { +if (isGetRequestElementSet('sub')) { // Yes, then do some sanity-checks - switch (getRequestParameter('sub')) { + switch (getRequestElement('sub')) { case 'points': - if ((!isPostRequestParameterSet('points_register')) || (!isPostRequestParameterSet('points_ref'))) { - unsetPostRequestParameter('ok'); + if ((!isPostRequestElementSet('points_register')) || (!isPostRequestElementSet('points_ref'))) { + unsetPostRequestElement('ok'); } // END - if break; case 'ref': - if (isGetRequestParameterSet('do')) { - if (((!isPostRequestParameterSet('level')) || (!isPostRequestParameterSet('percents'))) && (getRequestParameter('do') == 'add')) { - unsetPostRequestParameter('ok'); + if (isGetRequestElementSet('do')) { + if (((!isPostRequestElementSet('level')) || (!isPostRequestElementSet('percents'))) && (getRequestElement('do') == 'add')) { + unsetPostRequestElement('ok'); } } break; } // END - switch } else { // Display overview - setGetRequestParameter('sub', 'overview'); + setGetRequestElement('sub', 'overview'); } if (isFormSent()) { initSqls(); - switch (getRequestParameter('sub')) { + switch (getRequestElement('sub')) { case 'points': adminSaveSettingsFromPostData(); break; case 'ref': - switch (getRequestParameter('do')) { + switch (getRequestElement('do')) { case 'add': - addSql("INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES ('".bigintval(postRequestParameter('level'))."','".bigintval(postRequestParameter('percents'))."')"); + addSql("INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES ('".bigintval(postRequestElement('level'))."','".bigintval(postRequestElement('percents'))."')"); break; case 'edit': // Change entries - foreach (postRequestParameter('level') as $id => $value) { + foreach (postRequestElement('level') as $id => $value) { // Secure id $id = bigintval($id); // Revert german commata - setPostRequestParameter('percents', array($id => convertCommaToDot(postRequestParameter('percents', $id)))); + setPostRequestElement('percents', array($id => convertCommaToDot(postRequestElement('percents', $id)))); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`=%s, `percents`=%s WHERE `id`=%s LIMIT 1", - array(bigintval($value), convertCommaToDot(postRequestParameter('percents', $id)), $id), __FILE__, __LINE__); + array(bigintval($value), convertCommaToDot(postRequestElement('percents', $id)), $id), __FILE__, __LINE__); } // END - foreach $message = '{--ADMIN_REFERAL_DEPTHS_SAVED--}'; break; case 'delete': - foreach (postRequestParameter('id') as $id => $value) { + foreach (postRequestElement('id') as $id => $value) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // END - foreach @@ -114,17 +114,17 @@ if (isFormSent()) { break; case 'settings': - $REF = bigintval(postRequestParameter('ref_payout')); + $REF = bigintval(postRequestElement('ref_payout')); updateConfiguration( array('allow_direct_pay', 'ref_payout'), - array(postRequestParameter('allow_direct_pay'), $REF) + array(postRequestElement('allow_direct_pay'), $REF) ); - if ((getConfig('ref_payout') == '0') && (postRequestParameter('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) && (postRequestParameter('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"); @@ -137,7 +137,7 @@ WHERE // Is INSERT there? if (isInString('INSERT', $GLOBALS['sqls'][0])) { $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`=%s LIMIT 1", - array(bigintval(postRequestParameter('level'))), __FILE__, __LINE__); + array(bigintval(postRequestElement('level'))), __FILE__, __LINE__); SQL_FREERESULT($result); } // END - if @@ -164,7 +164,7 @@ WHERE // When do so... displayMessage($message); } // END - if -} elseif (getRequestParameter('sub') == 'settings') { +} elseif (getRequestElement('sub') == 'settings') { // Setup some settings like direct pay and so on // Including new add-mode for one-time referal bonus foreach (array('allow_direct_pay') as $entry) { @@ -175,12 +175,12 @@ WHERE // Load template loadTemplate('admin_config_point_settings', false, $content); -} elseif (getRequestParameter('sub') == 'ref') { +} elseif (getRequestElement('sub') == 'ref') { // 12 3 32 2 3321 if ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete entries $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT `id`,`level`,`percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); @@ -195,7 +195,7 @@ WHERE } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit entries $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT `id`,`level`,`percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); @@ -230,7 +230,7 @@ WHERE // Form for adding new referal levels loadTemplate('admin_add_reflevel'); } -} elseif (getRequestParameter('sub') == 'points') { +} elseif (getRequestElement('sub') == 'points') { // Load template loadTemplate('admin_config_sub_points'); } else { diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index f8f5bbb1e9..f6bd9ab961 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -48,10 +48,10 @@ if (isFormSent()) { mergeConfig(postRequestArray()); // Is the password set? - if (isPostRequestParameterSet('password')) { + if (isPostRequestElementSet('password')) { // Then hash and remove it - setPostRequestParameter('primera_api_md5', md5(postRequestParameter('password'))); - unsetPostRequestParameter('password'); + setPostRequestElement('primera_api_md5', md5(postRequestElement('password'))); + unsetPostRequestElement('password'); } // END - if // Let's test the API first (hold your horses here, cowboy! Thank you. :) ) diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 1c90f6a420..486411ae38 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -43,13 +43,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('rallye')) { +if (isGetRequestElementSet('rallye')) { // Price submitted? if (isFormSent('add')) { - if ((isPostRequestParameterSet('level')) && ((isPostRequestParameterSet('points')) || (isPostRequestParameterSet('info')))) { + if ((isPostRequestElementSet('level')) && ((isPostRequestElementSet('points')) || (isPostRequestElementSet('info')))) { // Submitted data is valid, but maybe we already have this price level? $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1", - array(bigintval(getRequestParameter('rallye')), bigintval(postRequestParameter('level'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Ok, new price level entered! @@ -59,10 +59,10 @@ if (isGetRequestParameterSet('rallye')) { VALUES (%s, %s, '%s', '%s')", array( - bigintval(getRequestParameter('rallye')), - bigintval(postRequestParameter('level')), - postRequestParameter('points'), - postRequestParameter('info') + bigintval(getRequestElement('rallye')), + bigintval(postRequestElement('level')), + postRequestElement('points'), + postRequestElement('info') ), __FILE__, __LINE__); displayMessage('{--RALLYE_PRICE_LEVEL_SAVED--}'); } else { @@ -77,7 +77,7 @@ if (isGetRequestParameterSet('rallye')) { // Check if at last one line is selected if (ifPostContainsSelections()) { // Delete selected entries - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // END - foreach @@ -89,7 +89,7 @@ if (isGetRequestParameterSet('rallye')) { } } elseif (isFormSent('do_edit')) { // Change entries - foreach (postRequestParameter('level') as $id => $level) { + foreach (postRequestElement('level') as $id => $level) { // Secure id $id = bigintval($id); @@ -105,10 +105,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('rallye_id', $id), + postRequestElement('rallye_id', $id), bigintval($level), - postRequestParameter('points', $id), - postRequestParameter('infos', $id), + postRequestElement('points', $id), + postRequestElement('infos', $id), $id ), __FILE__, __LINE__); } @@ -122,7 +122,7 @@ LIMIT 1", if (ifPostContainsSelections()) { // Make selected editable $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load data to selected rallye $result = SQL_QUERY_ESC("SELECT `rallye_id`,`price_level`,`points`,`info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -140,13 +140,13 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestParameter('rallye'); + $content['rallye'] = getRequestElement('rallye'); // Load main template loadTemplate('admin_config_rallye_edit', false, $content); } else { // Nothing selected - $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; + $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; displayMessage($content); } } elseif (isFormSent('delete')) { @@ -154,7 +154,7 @@ LIMIT 1", if (ifPostContainsSelections()) { // List all prices $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load data to selected rallye $result = SQL_QUERY_ESC("SELECT `rallye_id`,`price_level`,`points`,`info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -167,19 +167,19 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestParameter('rallye'); + $content['rallye'] = getRequestElement('rallye'); // Load main template loadTemplate('admin_config_rallye_del', false, $content); } else { // Nothing selected - $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; + $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; displayMessage($content); } } else { // a rallye was selected, so check if there are already prices assigned... $result = SQL_QUERY_ESC("SELECT `id`,`price_level`,`points`,`info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // Load all prices for the selected rallye @@ -196,7 +196,7 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestParameter('rallye'); + $content['rallye'] = getRequestElement('rallye'); // Load main template loadTemplate('admin_config_rallye_prices', false, $content); @@ -205,7 +205,7 @@ LIMIT 1", // Add form for adding new price level if (!isFormSent('edit')) { - loadTemplate('admin_add_rallye_prices', false, getRequestParameter('rallye')); + loadTemplate('admin_add_rallye_prices', false, getRequestElement('rallye')); } // END - if } else { // No rallye selected so display all available without prices diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index dec1610b6d..9f412f053f 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -49,7 +49,7 @@ if (isFormSent()) { $count = 0; // Update all entries - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Update database SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_must_register` SET `field_required`='%s' WHERE `id`=%s AND `field_required` != '%s' LIMIT 1", array($value, bigintval($id), $value),__FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 32f87c17ed..c7838d3795 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -47,8 +47,8 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // Calculate timestamp from selections... - setPostRequestParameter('ip_timeout', createEpocheTimeFromSelections('ip_timeout', postRequestArray())); - setPostRequestParameter('least_cats', round(postRequestParameter('least_cats'))); + setPostRequestElement('ip_timeout', createEpocheTimeFromSelections('ip_timeout', postRequestArray())); + setPostRequestElement('least_cats', round(postRequestElement('least_cats'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index 09722f2e70..51e575a856 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -46,7 +46,7 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // Generate string $MODs = array(); - foreach (postRequestParameter('mod') as $mod => $sel) { + foreach (postRequestElement('mod') as $mod => $sel) { // Now you can never deselect the admin module, bah!!! ;-) if (($sel == 'Y') || ($mod == 'admin')) { // Add module to queue @@ -55,8 +55,8 @@ if (isFormSent()) { } // Implode array to string and remove posted mod array - setPostRequestParameter('rewrite_skip', implode(':', $MODs)); - unsetPostRequestParameter('mod'); + setPostRequestElement('rewrite_skip', implode(':', $MODs)); + unsetPostRequestElement('mod'); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index 5f0941fbe9..855fcd45d2 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -45,12 +45,12 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // If salt length is empty or null then we shall generate new passwords - if (!isPostRequestParameterSet('salt_length') || (postRequestParameter('salt_length') == '0')) { + if (!isPostRequestElementSet('salt_length') || (postRequestElement('salt_length') == '0')) { // Generate new passwords for all! loadInclude('inc/gen_sql_patches.php'); // Forget the wrong number! - unsetPostRequestParameter('salt_length'); + unsetPostRequestElement('salt_length'); // Redirect to logout link redirectToUrl('modules.php?module=admin&logout=1'); diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index 37c010d4ab..17e449c90b 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // Test Path - if ((!isPostRequestParameterSet('session_save_path')) || ((isDirectory(postRequestParameter('session_save_path'))) && (is_writeable(postRequestParameter('session_save_path'))))) { + if ((!isPostRequestElementSet('session_save_path')) || ((isDirectory(postRequestElement('session_save_path'))) && (is_writeable(postRequestElement('session_save_path'))))) { // Save configuration adminSaveSettingsFromPostData(); } else { diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 437d1b2319..805e5e8aff 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -51,12 +51,12 @@ if (isFormSent()) { if (WERNIS_TEST_API()) { // Revert german commata foreach (array('payout_factor', 'withdraw_factor', 'payout_fee_percent', 'withdraw_fee_percent') as $revert) { - setPostRequestParameter('wernis_' . $revert, postRequestParameter('wernis_' . $revert)); + setPostRequestElement('wernis_' . $revert, postRequestElement('wernis_' . $revert)); } // END - if // Hash the password and remove clear-text - setPostRequestParameter('wernis_pass_md5', md5(postRequestParameter('wernis_pass'))); - unsetPostRequestParameter('wernis_pass'); + setPostRequestElement('wernis_pass_md5', md5(postRequestElement('wernis_pass'))); + unsetPostRequestElement('wernis_pass'); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index b08722f2a6..b0022bd6cf 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -46,10 +46,10 @@ addYouAreHereLink('admin', __FILE__); // Init counter for deleted mails $count = '0'; -if (isGetRequestParameterSet('mid')) { +if (isGetRequestElementSet('mid')) { // Load email data $result = SQL_QUERY_ESC("SELECT `id`,`sender`,`subject`,`url`,`timestamp`,`cat_id`,`payment_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -82,7 +82,7 @@ ON WHERE s.`pool_id`=%s LIMIT 1", - array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_pool) == 1) { // Fetch stats id list($stats_id) = SQL_FETCHROW($result_pool); @@ -91,7 +91,7 @@ LIMIT 1", $links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', true); // Reset sent mails for recipient(s) - reduceRecipientReceivedMails('stats_id', getRequestParameter('mid'), $links); + reduceRecipientReceivedMails('stats_id', getRequestElement('mid'), $links); // Calc total points and pay them back $totalPoints = $links * $content['price']; @@ -131,7 +131,7 @@ LIMIT 1", $count += SQL_AFFECTEDROWS(); // Load template for link - displayMessage('{--ADMIN_REMOVE_STATS_ENTRY--}'); + displayMessage('{--ADMIN_REMOVE_STATS_ENTRY--}'); } // END - if // Free the result @@ -139,7 +139,7 @@ LIMIT 1", // Delete mail from queue SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); $count += SQL_AFFECTEDROWS(); // Output link for manually removing stats entry @@ -151,17 +151,17 @@ LIMIT 1", // Free result SQL_FREERESULT($result); -} elseif (isGetRequestParameterSet('pid')) { +} elseif (isGetRequestElementSet('pid')) { // Remove stats entries SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1", - array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Output message displayMessage('{--ADMIN_USER_STATS_REMOVED--}'); -} elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) { +} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { // Load data from bonus mail $result = SQL_QUERY_ESC("SELECT `id`,`subject`,`url`,`timestamp`,`mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -169,17 +169,17 @@ LIMIT 1", $content = SQL_FETCHARRAY($result); // Reset sent mails for recipient(s) - reduceRecipientReceivedMails('bonus_id', getRequestParameter('bid'), $content['mails_sent']); + reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $content['mails_sent']); // Init counter for deleted mails $count = '0'; // Delete bonus mail entirely from database SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); $count += SQL_AFFECTEDROWS(); SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", - array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); $count += SQL_AFFECTEDROWS(); // Prepare data for the template @@ -195,10 +195,10 @@ LIMIT 1", // Free result SQL_FREERESULT($result); -} elseif ((isGetRequestParameterSet('nid')) && (isExtensionInstalledAndNewer('bonus', '0.8.7'))) { +} elseif ((isGetRequestElementSet('nid')) && (isExtensionInstalledAndNewer('bonus', '0.8.7'))) { // Load data from bonus mail $result = SQL_QUERY_ESC("SELECT `id`,`subject`,`url`,`timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -210,10 +210,10 @@ LIMIT 1", // Delete bonus mail entirely from database SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); $count += SQL_AFFECTEDROWS(); SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", - array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); $count += SQL_AFFECTEDROWS(); // Prepare data for the template diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index 49e85a0c1e..01a4d4fdd8 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); if (ifPostContainsSelections()) { // Delete multiple holiday requests (for list_holiday) $count = '0'; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Get the userid $result = SQL_QUERY_ESC("SELECT `userid`,`holiday_start`,`holiday_end` @@ -92,7 +92,7 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Display final message displayMessage('{%message,ADMIN_HOLIDAY_MULTI_DELETE=' . $count . '%}'); -} elseif (isGetRequestParameterSet('userid')) { +} elseif (isGetRequestElementSet('userid')) { // Set default message $message = '{--ADMIN_HOLIDAY_SINGLE_404--}'; @@ -104,7 +104,7 @@ FROM WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_load) == 1) { // Load data $content = SQL_FETCHARRAY($result_load); @@ -114,11 +114,11 @@ LIMIT 1", `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s -LIMIT 1", array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); +LIMIT 1", array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Send email to user - $message = loadEmailTemplate('member_holiday_removed', $content, getRequestParameter('userid')); - sendEmail(getRequestParameter('userid'), '{--ADMIN_HOLIDAY_REMOVED_SUBJECT--}', $message); + $message = loadEmailTemplate('member_holiday_removed', $content, getRequestElement('userid')); + sendEmail(getRequestElement('userid'), '{--ADMIN_HOLIDAY_REMOVED_SUBJECT--}', $message); // Set message $message = '{--ADMIN_HOLIDAY_SINGLE_DELETED--}'; diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index d1afe3cbb1..2f565e4ad7 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -43,10 +43,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('id')) { +if (isGetRequestElementSet('id')) { // Check for selected sponsor $result = SQL_QUERY_ESC("SELECT `id`,`email`,`gender`,`surname`,`family` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Remove sponsor if (isFormSent()) { @@ -54,38 +54,38 @@ if (isGetRequestParameterSet('id')) { $content = SQL_FETCHARRAY($result); // Prepare data for the template - $content['reason'] = postRequestParameter('reason'); + $content['reason'] = postRequestElement('reason'); // Prepare message and send it away - $message = loadEmailTemplate('del_sponsor', $content, bigintval(getRequestParameter('id'))); + $message = loadEmailTemplate('del_sponsor', $content, bigintval(getRequestElement('id'))); sendEmail($content['email'], '{--ADMIN_SPONSOR_DELETE_SUBJECT--}', $message); // Remove account SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Remove orders SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `sponsor_id`='%s' LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Output message - displayMessage('{%message,ADMIN_SPONSOR_DELETED=' . bigintval(getRequestParameter('id')) . '%}'); - } elseif (isPostRequestParameterSet('no')) { + displayMessage('{%message,ADMIN_SPONSOR_DELETED=' . bigintval(getRequestElement('id')) . '%}'); + } elseif (isPostRequestElementSet('no')) { // Do not delete him... - redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(getRequestParameter('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(getRequestElement('id'))); } else { // Load data $content = SQL_FETCHARRAY($result); // Transfer data to constants for the template - $content['userid'] = bigintval(getRequestParameter('id')); + $content['userid'] = bigintval(getRequestElement('id')); // Display form loadTemplate('admin_delete_sponsor', false, $content); } } else { // Sponsor not found - displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('id')) . '%}'); + displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'); } // Free result diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index ef3962bf70..cec0385713 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -50,7 +50,7 @@ if (isFormSent('delete')) { initSqls(); // Delete entries... - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { addSql(SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `trans_id`=%s LIMIT 1', array(bigintval($id)), __FILE__, __LINE__, false)); addSql(SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE `trans_id`=%s LIMIT 1', diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 7ce0dedf6d..2224021eb0 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -44,38 +44,38 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // User exists.. -if ((isFormSent()) || ((isFormSent('delete')) && (isPostRequestParameterSet('reason')))) { +if ((isFormSent()) || ((isFormSent('delete')) && (isPostRequestElementSet('reason')))) { // Is the account there? - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Delete user account - deleteUserAccount(getRequestParameter('userid'), postRequestParameter('reason')); + deleteUserAccount(getRequestElement('userid'), postRequestElement('reason')); // Output message displayMessage('{--ADMIN_DELETE_COMPLETED--}'); } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')) . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } -} elseif (isPostRequestParameterSet('no')) { +} elseif (isPostRequestElementSet('no')) { // Do not delete him... - redirectToUrl(adminCreateUserLink(getRequestParameter('userid'))); -} elseif (!isGetRequestParameterSet('userid')) { + redirectToUrl(adminCreateUserLink(getRequestElement('userid'))); +} elseif (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed addMemberSelectionBox(); } else { // Realy want to delete? - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Prepare content $content = array( 'email' => generateEmailLink(getUserData('email'), 'user_data'), - 'userid' => bigintval(getRequestParameter('userid')) + 'userid' => bigintval(getRequestElement('userid')) ); // Display form loadTemplate('admin_delete_user', false, $content); } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')), '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); } } diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 0a18126ecd..a3013890fe 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -43,12 +43,12 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if ((isFormSent()) && (!isPostRequestParameterSet('id'))) { - unsetPostRequestParameter('ok'); +if ((isFormSent()) && (!isPostRequestElementSet('id'))) { + unsetPostRequestElement('ok'); } // END - if // Form sent or anything else? ;-) -if ((isFormSent()) && (isPostRequestParameterSet('mid'))) { +if ((isFormSent()) && (isPostRequestElementSet('mid'))) { // Make mail editable... $result = SQL_QUERY_ESC("SELECT `id`,`sender` AS `userid`,`subject`,`text`,`url` @@ -57,7 +57,7 @@ FROM WHERE `id`=%s LIMIT 1", - array(bigintval(postRequestParameter('mid'))), __FILE__, __LINE__); + array(bigintval(postRequestElement('mid'))), __FILE__, __LINE__); // Fetch row $content = SQL_FETCHARRAY($result); @@ -67,7 +67,7 @@ LIMIT 1", // Load template loadTemplate('admin_edit_email', false, $content); -} elseif (isGetRequestParameterSet('mid')) { +} elseif (isGetRequestElementSet('mid')) { // Make also this email editable $result = SQL_QUERY_ESC("SELECT `id`,`sender` AS `userid`,`subject`,`text`,`url` @@ -76,7 +76,7 @@ FROM WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); // Fetch row $content = SQL_FETCHARRAY($result); @@ -86,7 +86,7 @@ LIMIT 1", // Load template loadTemplate('admin_edit_email', false, $content); -} elseif (isGetRequestParameterSet('bid')) { +} elseif (isGetRequestElementSet('bid')) { // Make also this email editable $result = SQL_QUERY_ESC("SELECT `id`,`subject`,`text`,`url` @@ -95,7 +95,7 @@ FROM WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); // Fetch row $content = SQL_FETCHARRAY($result); @@ -107,7 +107,7 @@ LIMIT 1", loadTemplate('admin_edit_bonus_email', false, $content); } elseif (isFormSent('save')) { // Save changes - if (isPostRequestParameterSet('mid')) { + if (isPostRequestElementSet('mid')) { // Update pool SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` @@ -119,10 +119,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('subject'), - postRequestParameter('text'), - postRequestParameter('url'), - bigintval(postRequestParameter('mid')), + postRequestElement('subject'), + postRequestElement('text'), + postRequestElement('url'), + bigintval(postRequestElement('mid')), ), __FILE__, __LINE__); if (!SQL_HASZEROAFFECTED()) { @@ -130,7 +130,7 @@ LIMIT 1", } else { $content = '{--ADMIN_EMAIL_CHANGES_NOT_SAVED--}'; } - } elseif (isPostRequestParameterSet('bid')) { + } elseif (isPostRequestElementSet('bid')) { // Update pool SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` @@ -142,10 +142,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('subject'), - postRequestParameter('text'), - postRequestParameter('url'), - bigintval(postRequestParameter('bid')), + postRequestElement('subject'), + postRequestElement('text'), + postRequestElement('url'), + bigintval(postRequestElement('bid')), ), __FILE__, __LINE__); if (!SQL_HASZEROAFFECTED()) { diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index d0699a3f32..0603a9dea7 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if ((isGetRequestParameterSet('id')) && (isGetRequestParameterSet('mode'))) { +if ((isGetRequestElementSet('id')) && (isGetRequestElementSet('mode'))) { // Check for selected sponsor $result_main = SQL_QUERY_ESC("SELECT `id`,`company`,`position`,`gender`,`surname`,`family`, @@ -55,7 +55,7 @@ FROM WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load sponsor details $content = SQL_FETCHARRAY($result_main); @@ -65,25 +65,25 @@ LIMIT 1", $content['warning_interval'] = createTimeSelections($content['warning_interval'], 'warning_interval', 'MWDh'); // Init variables here - $TPL = sprintf("admin_edit_sponsor_%s", getRequestParameter('mode')); + $TPL = sprintf("admin_edit_sponsor_%s", getRequestElement('mode')); initSqls(); // Sponsor was found if ((isFormSent()) || (isFormSent('edit'))) { // Perform action on mode - switch (getRequestParameter('mode')) { + switch (getRequestElement('mode')) { case 'add_points': // Add points - if (bigintval(postRequestParameter('points')) > 0) { + if (bigintval(postRequestElement('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $points = bigintval(convertCommaToDot(postRequestParameter('points'))); + $points = bigintval(convertCommaToDot(postRequestElement('points'))); // Add points to account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`=%s LIMIT 1", - array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Remember points /reason for the template $content['points'] = $points; - $content['reason'] = postRequestParameter('reason'); + $content['reason'] = postRequestElement('reason'); // Send email $message = loadEmailTemplate('sponsor_add_points', $content); @@ -96,17 +96,17 @@ LIMIT 1", break; case 'sub_points': // Subtract points - if (bigintval(postRequestParameter('points')) > 0) { + if (bigintval(postRequestElement('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $points = bigintval(convertCommaToDot(postRequestParameter('points'))); + $points = bigintval(convertCommaToDot(postRequestElement('points'))); // Add points to account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_used`=`points_used`+%s WHERE `id`=%s LIMIT 1", - array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Remember points /reason for the template $content['points'] = $points; - $content['reason'] = postRequestParameter('reason'); + $content['reason'] = postRequestElement('reason'); // Send email $message = loadEmailTemplate('sponsor_sub_points', $content); @@ -120,10 +120,10 @@ LIMIT 1", case 'edit': // Edit sponsor account $PASS = true; - if ((postRequestParameter('pass1') != postRequestParameter('pass2')) || ((!isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass1')))) { + if ((postRequestElement('pass1') != postRequestElement('pass2')) || ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass1')))) { // Remove passwords - unsetPostRequestParameter('pass1'); - unsetPostRequestParameter('pass2'); + unsetPostRequestElement('pass1'); + unsetPostRequestElement('pass2'); $PASS = false; } // END - if @@ -135,19 +135,19 @@ LIMIT 1", handleSponsorRequest(postRequestArray()); // Convert some data for the email template - postRequestParameter('gender' , '{%pipe,translateGender=' . postRequestParameter('gender') . '%}'); - postRequestParameter('warning_interval', '{%pipe,createFancyTime=' . postRequestParameter('warning_interval') . '%}'); + postRequestElement('gender' , '{%pipe,translateGender=' . postRequestElement('gender') . '%}'); + postRequestElement('warning_interval', '{%pipe,createFancyTime=' . postRequestElement('warning_interval') . '%}'); - if ($PASS === false) setPostRequestParameter('pass1', '{--SPONSOR_PASS_UNCHANGED--}'); + if ($PASS === false) setPostRequestElement('pass1', '{--SPONSOR_PASS_UNCHANGED--}'); // Load email template and send the mail away $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), false); - sendEmail(postRequestParameter('email'), '{--ADMIN_SPONSOR_EDIT_SUBJECT--}', $message); + sendEmail(postRequestElement('email'), '{--ADMIN_SPONSOR_EDIT_SUBJECT--}', $message); break; default: // Unknown mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestParameter('mode'))); - $message = '{%message,ADMIN_SPONSOR_INVALID_MODE=' . getRequestParameter('mode') . '%}'; + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('mode'))); + $message = '{%message,ADMIN_SPONSOR_INVALID_MODE=' . getRequestElement('mode') . '%}'; break; } @@ -163,11 +163,11 @@ LIMIT 1", loadTemplate($TPL, false, $content); } else { // Template not found - displayMessage('{%message,ADMIN_SPONSOR_MODUS_TPL_404', getRequestParameter('mode') . '%}'); + displayMessage('{%message,ADMIN_SPONSOR_MODUS_TPL_404', getRequestElement('mode') . '%}'); } } else { // Sponsor not found - displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('id')) . '%}'); + displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'); } // Free result diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 4c52c95b58..b3bf8ec2a0 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); // Fix a notice $result_main = false; -if (isGetRequestParameterSet('userid')) { +if (isGetRequestElementSet('userid')) { // Load user entry $result_main = SQL_QUERY_ESC("SELECT `userid`,`gender`,`surname`,`family`,`street_nr`,`zip`,`city`,`country`, @@ -60,25 +60,25 @@ WHERE `userid`=%s LIMIT 1", array( - bigintval(getRequestParameter('userid')) + bigintval(getRequestElement('userid')) ), __FILE__, __LINE__); } // END - if -if ((!isGetRequestParameterSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { +if ((!isGetRequestElementSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { // User found - if (!isGetRequestParameterSet('userid')) { + if (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed addMemberSelectionBox(); } elseif (isFormSent('edit')) { // Ok, change the account... $updateUser = false; $add = ''; - if ((!isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass2'))) { + if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) { // Don't change the password $updateUser = true; - } elseif ((postRequestParameter('pass1') == postRequestParameter('pass2'))) { + } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) { // Change the password $updateUser = true; - $add = ", `password`='" . generateHash(postRequestParameter('pass1')) . "'"; + $add = ", `password`='" . generateHash(postRequestElement('pass1')) . "'"; } if ($updateUser === true) { @@ -99,15 +99,15 @@ WHERE `userid`=%s LIMIT 1", array( - substr(postRequestParameter('gender'), 0, 1), - postRequestParameter('surname'), - postRequestParameter('family'), - postRequestParameter('street_nr'), - postRequestParameter('country'), - bigintval(postRequestParameter('zip')), - postRequestParameter('city'), - postRequestParameter('email'), - bigintval(getRequestParameter('userid')), + substr(postRequestElement('gender'), 0, 1), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + postRequestElement('country'), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(getRequestElement('userid')), ), __FILE__, __LINE__); $content = '{--ADMIN_USER_ACCOUNT_SAVED--}'; } else { @@ -126,7 +126,7 @@ LIMIT 1", } } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')) . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } // Free the result diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index df2f81324e..8e5dd7b548 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -60,11 +60,11 @@ ORDER BY $result_maximum = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1); -if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getMailsPage()); +if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); +if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getMailsPage()); // Add limitation to SQL string -$sql .= ' LIMIT ' . (getRequestParameter('offset') * getRequestParameter('page') - getRequestParameter('offset')) . ', ' . getRequestParameter('offset'); +$sql .= ' LIMIT ' . (getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')) . ', ' . getRequestElement('offset'); // Run SQL query for normal mails $result = SQL_QUERY($sql, __FILE__, __LINE__); diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 59d3cf340c..e0b4b4a566 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -63,7 +63,7 @@ ORDER BY $WHO = ''; $SQL2 = ''; -if (isGetRequestParameterSet('mid')) { +if (isGetRequestElementSet('mid')) { // Only a specific mail shall be displayed $sql = sprintf("SELECT `id`,`sender`,`subject`,`text`,`receivers`,`payment_id`,`data_type`,`timestamp`,`url`,`target_send`,`mails_sent`,`cat_id` @@ -72,10 +72,10 @@ FROM WHERE `id`=%s LIMIT 1", - bigintval(getRequestParameter('mid')) + bigintval(getRequestElement('mid')) ); - $WHO = '{--MAIL_ID--}' . ': ' . getRequestParameter('mid'); -} elseif (isGetRequestParameterSet('userid')) { + $WHO = '{--MAIL_ID--}' . ': ' . getRequestElement('mid'); +} elseif (isGetRequestElementSet('userid')) { // All mails by a specific member shall be displayed $sql = sprintf("SELECT `id`,`sender`,`subject`,`text`,`receivers`,`payment_id`,`data_type`,`timestamp`,`url`,`target_send`,`mails_sent`,`cat_id` @@ -85,9 +85,9 @@ WHERE `sender`=%s ORDER BY `timestamp` DESC", - bigintval(getRequestParameter('userid')) + bigintval(getRequestElement('userid')) ); - $WHO = '{--USER_ID--}' . ': ' . getRequestParameter('userid'); + $WHO = '{--USER_ID--}' . ': ' . getRequestElement('userid'); } // Init result_bonus @@ -110,22 +110,22 @@ ORDER BY $result_normal = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!isGetRequestParameterSet('page')) setGetRequestParameter('page', 1); +if (!isGetRequestElementSet('page')) setGetRequestElement('page', 1); -if (!isGetRequestParameterSet('offset')) { +if (!isGetRequestElementSet('offset')) { if (isConfigEntrySet('mails_page')) { // Set config entry - setGetRequestParameter('offset', getMailsPage()); + setGetRequestElement('offset', getMailsPage()); } else { // Set default one - setGetRequestParameter('offset', 10); + setGetRequestElement('offset', 10); } } // END - if // Add limitation to SQL string -if (!isGetRequestParameterSet('mid')) { +if (!isGetRequestElementSet('mid')) { // Create limitation line - $add = ' LIMIT ' . (bigintval(getRequestParameter('offset')) * bigintval(getRequestParameter('page')) - bigintval(getRequestParameter('offset'))) . ', ' . bigintval(getRequestParameter('offset')); + $add = ' LIMIT ' . (bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))) . ', ' . bigintval(getRequestElement('offset')); // For normal mails $sql .= $add; diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index bb8c4ded75..98e1a6d420 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -46,15 +46,15 @@ addYouAreHereLink('admin', __FILE__); // Normally we want the overview of all registered extensions $do = 'overview'; -if (isGetRequestParameterSet('reg_ext')) { +if (isGetRequestElementSet('reg_ext')) { // We are about to register a new extension $do = 'register'; - $taskId = determineExtensionTaskId(getRequestParameter('reg_ext')); + $taskId = determineExtensionTaskId(getRequestElement('reg_ext')); // The id comes from task management and it is - of course - *not* the extension's name! } elseif ((isFormSent('change')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // De-/activate extensions - foreach (postRequestParameter('sel') as $ext_id => $ext_active) { + foreach (postRequestElement('sel') as $ext_id => $ext_active) { // Shall we keep the extension always active? if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)] == 'Y') && ($ext_active == 'Y')) { // Keep this extension active! @@ -82,12 +82,12 @@ if (isGetRequestParameterSet('reg_ext')) { // Redirect to prevent missing cache in js.php redirectToUrl('modules.php?module=admin&what=extensions&changed=' . countPostSelection()); -} elseif (((isFormSent('edit')) || (isPostRequestParameterSet('modify'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) { +} elseif (((isFormSent('edit')) || (isPostRequestElementSet('modify'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Change settings like CSS file load - if (isPostRequestParameterSet('modify')) { + if (isPostRequestElementSet('modify')) { // Change entries $cache_update = '0'; - foreach (postRequestParameter('sel') as $ext_id => $sel) { + foreach (postRequestElement('sel') as $ext_id => $sel) { // Secure id $ext_id = bigintval($ext_id); @@ -97,13 +97,13 @@ if (isGetRequestParameterSet('reg_ext')) { setExtensionMode('modify'); // Get entry for 'active' - $active = postRequestParameter('active', $ext_id); + $active = postRequestElement('active', $ext_id); // Update extension's record if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) { // Update also CSS column when extensions sql_patches is newer or exact v0.0.6 SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1", - array(postRequestParameter('css', $ext_id), $active, $ext_id), __FILE__, __LINE__); + array(postRequestElement('css', $ext_id), $active, $ext_id), __FILE__, __LINE__); } else { // When extension is older than v0.0.6 there is no column for the CSS information SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1", @@ -126,7 +126,7 @@ if (isGetRequestParameterSet('reg_ext')) { } else { // Edit selected entries $OUT = ''; - foreach (postRequestParameter('sel') as $ext_id => $sel) { + foreach (postRequestElement('sel') as $ext_id => $sel) { // Edit this extension? if (($sel == 'Y') || ($sel != 'Y')) { // Default is no CSS for non-updated mailers @@ -169,10 +169,10 @@ if (isGetRequestParameterSet('reg_ext')) { loadTemplate('admin_extensions_edit', false, $OUT); $do = 'edit'; } -} elseif ((isPostRequestParameterSet('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { +} elseif ((isPostRequestElementSet('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // List extensions and when verbose is enabled SQL statements which will be executed $OUT = ''; - foreach (postRequestParameter('sel') as $ext_id => $sel) { + foreach (postRequestElement('sel') as $ext_id => $sel) { // Init variables $VERBOSE_OUT = ''; initSqls(); @@ -220,7 +220,7 @@ if (isGetRequestParameterSet('reg_ext')) { } elseif ((isFormSent('do_delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Remove extensions from DB (you have to delete all files manually!) $cache_update = '0'; - foreach (postRequestParameter('sel') as $ext_id => $active) { + foreach (postRequestElement('sel') as $ext_id => $active) { // Secure id number $ext_id = bigintval($ext_id); @@ -233,15 +233,15 @@ if (isGetRequestParameterSet('reg_ext')) { // Redirect to prevent missing cache in js.php redirectToUrl('modules.php?module=admin&what=extensions&removed=' . countPostSelection()); -} elseif ((isGetRequestParameterSet('do')) && (!isDemoModeActive())) { +} elseif ((isGetRequestElementSet('do')) && (!isDemoModeActive())) { // Other things to do - $do = SQL_ESCAPE(secureString(getRequestParameter('do'))); -} elseif (isGetRequestParameterSet('do')) { + $do = SQL_ESCAPE(secureString(getRequestElement('do'))); +} elseif (isGetRequestElementSet('do')) { // Demo mode active! $do = 'demo'; -} elseif (isGetRequestParameterSet('registered')) { +} elseif (isGetRequestElementSet('registered')) { // Extensions changed - displayMessage('{%message,ADMIN_EXTENSION_REGISTERED=' . getExtensionName(getRequestParameter('registered')) . '%}'); + displayMessage('{%message,ADMIN_EXTENSION_REGISTERED=' . getExtensionName(getRequestElement('registered')) . '%}'); // Show next link if (isExtensionActive('task')) { @@ -255,21 +255,21 @@ if (isGetRequestParameterSet('reg_ext')) { 'title' => '{--ADMIN_EXTENSION_REGISTER_NEXT_LINK--}' )); } -} elseif (isGetRequestParameterSet('changed')) { +} elseif (isGetRequestElementSet('changed')) { // Extensions changed - displayMessage('{%message,ADMIN_EXTENSION_CHANGED=' . bigintval(getRequestParameter('changed')) . '%}'); -} elseif (isGetRequestParameterSet('edited')) { + displayMessage('{%message,ADMIN_EXTENSION_CHANGED=' . bigintval(getRequestElement('changed')) . '%}'); +} elseif (isGetRequestElementSet('edited')) { // Extensions changed - displayMessage('{%message,ADMIN_EXTENSION_EDITED=' . bigintval(getRequestParameter('edited')) . '%}'); -} elseif (isGetRequestParameterSet('removed')) { + displayMessage('{%message,ADMIN_EXTENSION_EDITED=' . bigintval(getRequestElement('edited')) . '%}'); +} elseif (isGetRequestElementSet('removed')) { // Extensions changed - displayMessage('{%message,ADMIN_EXTENSIONS_REMOVED=' . bigintval(getRequestParameter('removed')) . '%}'); + displayMessage('{%message,ADMIN_EXTENSIONS_REMOVED=' . bigintval(getRequestElement('removed')) . '%}'); } // Shall we display active/inactive extensions? $where = ''; -if (isGetRequestParameterSet('active')) { - $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestParameter('active')))); +if (isGetRequestElementSet('active')) { + $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestElement('active')))); } // END - if // Case selection diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 5583435d13..b1e4a4ac06 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -44,9 +44,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!isPostRequestParameterSet('title')) || (!isPostRequestParameterSet('menu'))) && (isFormSent())) { +if (((!isPostRequestElementSet('title')) || (!isPostRequestElementSet('menu'))) && (isFormSent())) { // Abort adding the menu entry - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } // END - if if (!isFormSent()) { @@ -180,24 +180,24 @@ ORDER BY `sort` ASC", loadTemplate('admin_add_guest_menu', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry - if (isPostRequestParameterSet('menu')) { + if (isPostRequestElementSet('menu')) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')", array( - postRequestParameter('menu'), - postRequestParameter('name'), - postRequestParameter('title'), - bigintval(postRequestParameter('sort')), - postRequestParameter('visible'), - postRequestParameter('active'), + postRequestElement('menu'), + postRequestElement('name'), + postRequestElement('title'), + bigintval(postRequestElement('sort')), + postRequestElement('visible'), + postRequestElement('active'), ), __FILE__, __LINE__); } else { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s')", array( - postRequestParameter('name'), - postRequestParameter('title'), - bigintval(postRequestParameter('sort')), - postRequestParameter('visible'), - postRequestParameter('active'), + postRequestElement('name'), + postRequestElement('title'), + bigintval(postRequestElement('sort')), + postRequestElement('visible'), + postRequestElement('active'), ), __FILE__, __LINE__); } displayMessage('{--SETTINGS_SAVED--}'); diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index db713cff50..3d7609cdea 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -46,9 +46,9 @@ addYouAreHereLink('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $subMenu = ''; -if (isGetRequestParameterSet('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestParameter('sub')); - $subMenu = getRequestParameter('sub'); +if (isGetRequestElementSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); + $subMenu = getRequestElement('sub'); } // END - if // List all menu points and make them editable @@ -58,7 +58,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['chk'] = countPostSelection(); $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title`,`action`,`what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -107,7 +107,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -139,14 +139,14 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() // Load template loadTemplate('admin_delete_guest_menu', false, $content); -} elseif ((isPostRequestParameterSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { +} elseif ((isPostRequestElementSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $subMenu; $content['chk'] = countPostSelection(); // Load template $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title`,`visible`,`locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-list_admins_acls.php b/inc/modules/admin/what-list_admins_acls.php index 76b1232bad..a5bbe08847 100644 --- a/inc/modules/admin/what-list_admins_acls.php +++ b/inc/modules/admin/what-list_admins_acls.php @@ -46,7 +46,7 @@ addYouAreHereLink('admin', __FILE__); if ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit ACLs $OUT = ''; - foreach (postRequestParameter('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Load data for the id $result = SQL_QUERY_ESC("SELECT `id`,`admin_id`,`action_menu`,`what_menu`,`access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -80,7 +80,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { loadTemplate('admin_edit_admins_acls', false, $OUT); } elseif ((isFormSent('do_edit')) && (ifPostContainsSelections())) { // Change entries - foreach (postRequestParameter('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Secure id $id = bigintval($id); @@ -96,10 +96,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('admin', $id), - postRequestParameter('action_menu', $id), - postRequestParameter('what_menu', $id), - postRequestParameter('mode', $id), + postRequestElement('admin', $id), + postRequestElement('action_menu', $id), + postRequestElement('what_menu', $id), + postRequestElement('mode', $id), $id ),__FILE__, __LINE__); } // END - foreach @@ -115,7 +115,7 @@ LIMIT 1", } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete ACLs $OUT = ''; - foreach (postRequestParameter('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Load data for the id $result = SQL_QUERY_ESC("SELECT `id`,`admin_id`,`action_menu`,`what_menu`,`access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -134,7 +134,7 @@ LIMIT 1", } elseif ((isFormSent('do_delete')) && (ifPostContainsSelections())) { // Remove entries // @TODO Rewrite this to filter 'run_sqls' - foreach (postRequestParameter('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); } // END - foreach @@ -148,37 +148,37 @@ LIMIT 1", displayMessage('{--ADMIN_ADMINS_ENTRIES_DELETED--}'); } elseif (isFormSent('add')) { // Check if everything is fine... - $mode = getAdminDefaultAcl(bigintval(postRequestParameter('admin_id'))); + $mode = getAdminDefaultAcl(bigintval(postRequestElement('admin_id'))); // Default ACL is false $ACL = false; - if (isPostRequestParameterSet('what_menu')) { + if (isPostRequestElementSet('what_menu')) { // Check parent ACL - $ACL = isAdminsAllowedByAcl(getActionFromModuleWhat('admin', postRequestParameter('what_menu')), ''); + $ACL = isAdminsAllowedByAcl(getActionFromModuleWhat('admin', postRequestElement('what_menu')), ''); } // END - if - if (($mode != postRequestParameter('mode')) || (($ACL === true) && (postRequestParameter('mode') == 'deny'))) { + if (($mode != postRequestElement('mode')) || (($ACL === true) && (postRequestElement('mode') == 'deny'))) { // Mode is fine - $BOTH = ((isPostRequestParameterSet('action_menu')) && (isPostRequestParameterSet('what_menu')) && (postRequestParameter('action_menu') != '') && (postRequestParameter('what_menu') != '')); + $BOTH = ((isPostRequestElementSet('action_menu')) && (isPostRequestElementSet('what_menu')) && (postRequestElement('action_menu') != '') && (postRequestElement('what_menu') != '')); // Check if one has been selected - if ((((isPostRequestParameterSet('action_menu')) && (postRequestParameter('action_menu') != '')) || ((isPostRequestParameterSet('what_menu')) && (postRequestParameter('what_menu') != ''))) && ($BOTH === false)) { + if ((((isPostRequestElementSet('action_menu')) && (postRequestElement('action_menu') != '')) || ((isPostRequestElementSet('what_menu')) && (postRequestElement('what_menu') != ''))) && ($BOTH === false)) { // 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(postRequestParameter('admin_id')), - postRequestParameter('action_menu'), - postRequestParameter('what_menu') + bigintval(postRequestElement('admin_id')), + postRequestElement('action_menu'), + postRequestElement('what_menu') ), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // 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')", array( - bigintval(postRequestParameter('admin_id')), - postRequestParameter('action_menu'), - postRequestParameter('what_menu'), - postRequestParameter('mode') + bigintval(postRequestElement('admin_id')), + postRequestElement('action_menu'), + postRequestElement('what_menu'), + postRequestElement('mode') ), __FILE__, __LINE__); $content = '{--ADMIN_ADMINS_ACL_SAVED--}'; diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 121c006f86..72cce2f7f5 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -45,17 +45,17 @@ addYouAreHereLink('admin', __FILE__); // Check if there is enougth selected $show = true; -if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) { +if ((isPostRequestElementSet('id')) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { // Okay, which button was pressed? if (isFormSent('change')) { // Change permissions - adminChangeActivationStatus(postRequestParameter('id'), 'bank_packages', 'package_active'); + adminChangeActivationStatus(postRequestElement('id'), 'bank_packages', 'package_active'); } elseif (isFormSent('edit')) { // Delete entries (with confirmation) adminEditEntriesConfirm( array('id'), array('bank_packages'), - postRequestParameter('id'), + postRequestElement('id'), array( 'id', 'title', @@ -114,7 +114,7 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) adminEditEntriesConfirm( array('id'), array('bank_packages'), - postRequestParameter('id'), + postRequestElement('id'), array(), array(), array(), @@ -125,7 +125,7 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) adminDeleteEntriesConfirm( array('id'), array('bank_packages'), - postRequestParameter('id'), + postRequestElement('id'), array( 'id', 'title', @@ -151,7 +151,7 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) adminDeleteEntriesConfirm( array('id'), array('bank_packages'), - postRequestParameter('id'), + postRequestElement('id'), array(), array(), array(), diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index f3dae48c99..0ca6ad1722 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); if (isBegRallyeEnabled()) { // Shall I withdraw now? - if (isPostRequestParameterSet('withdraw')) { + if (isPostRequestElementSet('withdraw')) { // Okay, let's prepare... $curr = getMonth() - 1; if (strlen($curr) == 1) $curr = '0' . $curr; diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index b692cba7b3..e876b7a1fc 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); if (isBonusRallyeActive()) { // Shall I withdraw now? - if (isPostRequestParameterSet('withdraw')) { + if (isPostRequestElementSet('withdraw')) { // Okay, let's prepare... $curr = getMonth() - 1; if (strlen($curr) == 1) $curr = '0' . $curr; diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index d17404da55..6888278f9d 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -44,9 +44,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('userid')) { +if (isGetRequestElementSet('userid')) { // Check if the user already exists - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Loads surname, family's name and the email address $content = getUserDataArray(); @@ -67,7 +67,7 @@ if (isGetRequestParameterSet('userid')) { // Check user's selection // @TODO Rewrite this to countSum.....() function $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", - array(bigintval(getRequestParameter('userid')), bigintval($content['id'])), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid')), bigintval($content['id'])), __FILE__, __LINE__); // Set selection $selection = '{--NO--}'; diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index e37051099d..96a45b9056 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -44,42 +44,42 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Add new code? -if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequestParameterSet('descr'))) { +if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestElementSet('descr'))) { // Check if country code does already exist $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE `code`='%s' LIMIT 1", - array(strtoupper(postRequestParameter('code'))), __FILE__, __LINE__); + array(strtoupper(postRequestElement('code'))), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Save entry SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (`code`,`descr`,`is_active`) VALUES ('%s','%s','%s')", array( - strtoupper(substr(postRequestParameter('code'), 0, 2)), - postRequestParameter('descr'), - postRequestParameter('is_active') + strtoupper(substr(postRequestElement('code'), 0, 2)), + postRequestElement('descr'), + postRequestElement('is_active') ), __FILE__, __LINE__); // Country added - $message = '{%message,ADMIN_COUNTRY_ADDED=' . strtoupper(postRequestParameter('descr')) . '%}'; + $message = '{%message,ADMIN_COUNTRY_ADDED=' . strtoupper(postRequestElement('descr')) . '%}'; } else { // Free memory SQL_FREERESULT($result); // Does already exist - $message = '{%message,ADMIN_COUNTRY_ALREADY=' . strtoupper(postRequestParameter('code')) . '%}'; + $message = '{%message,ADMIN_COUNTRY_ALREADY=' . strtoupper(postRequestElement('code')) . '%}'; } // Display message displayMessage($message); -} elseif ((isFormSent('do_edit')) && (isPostRequestParameterSet('id'))) { +} elseif ((isFormSent('do_edit')) && (isPostRequestElementSet('id'))) { // Change all status - adminChangeActivationStatus(postRequestParameter('id'), 'countries', 'is_active'); + adminChangeActivationStatus(postRequestElement('id'), 'countries', 'is_active'); // Show next link loadTemplate('admin_next_link', false, array( 'url' => 'modules.php?module=admin&what=list_country', 'title' => '{--ADMIN_COUNTRY_ACTIVATION_NEXT_LINK--}' )); -} elseif (((isFormSent('edit')) || (isPostRequestParameterSet('delete'))) && (isPostRequestParameterSet('id'))) { - if (count(postRequestParameter('id')) > 0) { +} elseif (((isFormSent('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) { + if (count(postRequestElement('id')) > 0) { if (isFormSent('edit')) { // Edit template $row = 'admin_edit_country_row'; @@ -100,7 +100,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest // Edit all selected country codes $OUT = ''; - foreach (postRequestParameter('id') as $id => $isActive) { + foreach (postRequestElement('id') as $id => $isActive) { // Load data from DB $result = SQL_QUERY_ESC("SELECT `id`,`code`,`descr` FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -136,18 +136,18 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest // Shall we modify / remove entries now? $message = ''; initSqls(); - if ((isPostRequestParameterSet('modify')) && (isPostRequestParameterSet('id'))) { + if ((isPostRequestElementSet('modify')) && (isPostRequestElementSet('id'))) { // Modify - foreach (postRequestParameter('id') as $id => $sel) { - addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='" . postRequestParameter('code', $id) . "', `descr`='" . postRequestParameter('descr', $id) . "', `is_active`='" . postRequestParameter('is_active', $id) . "' WHERE `id`=" . bigintval($id) . " LIMIT 1"); + foreach (postRequestElement('id') as $id => $sel) { + addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='" . postRequestElement('code', $id) . "', `descr`='" . postRequestElement('descr', $id) . "', `is_active`='" . postRequestElement('is_active', $id) . "' WHERE `id`=" . bigintval($id) . " LIMIT 1"); } // END - foreach // Create message $message = '{--ADMIN_COUNTRIES_MODIFIED--}'; - } elseif ((isFormSent('do_delete')) && (isPostRequestParameterSet('id'))) { + } elseif ((isFormSent('do_delete')) && (isPostRequestElementSet('id'))) { // Remove - $IDs = implode(',', array_keys(postRequestParameter('id'))); - addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestParameter('id')).""); + $IDs = implode(',', array_keys(postRequestElement('id'))); + addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestElement('id')).""); // Create message $message = '{--ADMIN_COUNTRIES_REMOVED--}'; diff --git a/inc/modules/admin/what-list_coupon.php b/inc/modules/admin/what-list_coupon.php index 2f6f89c79a..216e0261da 100644 --- a/inc/modules/admin/what-list_coupon.php +++ b/inc/modules/admin/what-list_coupon.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('coupon_id')) { +if (isGetRequestElementSet('coupon_id')) { // List userids for given coupon $result = SQL_QUERY_ESC('SELECT u.`coupon_id`, @@ -63,7 +63,7 @@ WHERE ORDER BY u.`cashed_on` DESC', array( - bigintval(getRequestParameter('coupon_id')) + bigintval(getRequestElement('coupon_id')) ), __FILE__, __LINE__); // Do we have entries? diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index 39fbab603b..e4cf4b4452 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -43,21 +43,21 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (!isGetRequestParameterSet('mode')) { +if (!isGetRequestElementSet('mode')) { // Chosse the overview page as default - setGetRequestParameter('mode', 'overview'); + setGetRequestElement('mode', 'overview'); } else { // Set table title automatically - if (!isGetRequestParameterSet('select')) { - setGetRequestParameter('select', 'all'); + if (!isGetRequestElementSet('select')) { + setGetRequestElement('select', 'all'); } // END - if // Prepare header - $content['list_' . strtolower(getRequestParameter('mode'))] = strtoupper('{--ADMIN_DOUBLER_LIST_' . getRequestParameter('mode') . '_' . getRequestParameter('select') . '--}'); + $content['list_' . strtolower(getRequestElement('mode'))] = strtoupper('{--ADMIN_DOUBLER_LIST_' . getRequestElement('mode') . '_' . getRequestElement('select') . '--}'); } // Load data for the template -switch (getRequestParameter('mode')) { +switch (getRequestElement('mode')) { case 'already': // Already payed out points break; @@ -113,7 +113,7 @@ switch (getRequestParameter('mode')) { } // END - switch // Load mode template -loadTemplate('admin_list_doubler_' . getRequestParameter('mode'), false, $content); +loadTemplate('admin_list_doubler_' . getRequestElement('mode'), false, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-list_email_max_rec.php b/inc/modules/admin/what-list_email_max_rec.php index 55d1506b24..2b689d84d9 100644 --- a/inc/modules/admin/what-list_email_max_rec.php +++ b/inc/modules/admin/what-list_email_max_rec.php @@ -44,18 +44,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Remove empty array index -if (!isPostRequestParameterSet('max')) { - unsetPostRequestParameter('add_max'); +if (!isPostRequestElementSet('max')) { + unsetPostRequestElement('add_max'); } // END - if -if (isPostRequestParameterSet('add_max')) { +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(postRequestParameter('max'))), __FILE__, __LINE__); + array(bigintval(postRequestElement('max'))), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Add this value (including comment) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`,`comment`) VALUES ('%s','%s')", - array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__); + array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__); $content = '{--ADMIN_MAX_VALUE_SAVED--}'; } else { // Value does alread exists! @@ -67,19 +67,19 @@ if (isPostRequestParameterSet('add_max')) { // Display message displayMessage($content); -} elseif ((isFormSent()) && (isGetRequestParameterSet('do'))) { +} elseif ((isFormSent()) && (isGetRequestElementSet('do'))) { // Change or delete entries... $TEXT = ''; - foreach (postRequestParameter('id') as $id => $value) { + foreach (postRequestElement('id') as $id => $value) { // Secure id $id = bigintval($id); - switch (postRequestParameter('do')) { + switch (postRequestElement('do')) { case 'edit': // Change entries SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1", array( - bigintval(postRequestParameter('val', $id)), - postRequestParameter('comm', $id), + bigintval(postRequestElement('val', $id)), + postRequestElement('comm', $id), $id ),__FILE__, __LINE__); $TEXT = '{--ADMIN_MAX_RECEIVE_SAVED--}'; @@ -100,7 +100,7 @@ if (isPostRequestParameterSet('add_max')) { } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete entries $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Load data $result = SQL_QUERY_ESC("SELECT `id`,`value`,`comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -117,7 +117,7 @@ if (isPostRequestParameterSet('add_max')) { } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit entries $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Load data $result = SQL_QUERY_ESC("SELECT `id`,`value`,`comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_forced_ads.php b/inc/modules/admin/what-list_forced_ads.php index 0045c24957..102137e201 100644 --- a/inc/modules/admin/what-list_forced_ads.php +++ b/inc/modules/admin/what-list_forced_ads.php @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = true; // Check for 'url_id' element -if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('forced_ads_id')) || (!is_array(postRequestParameter('forced_ads_id'))) || (count(postRequestParameter('forced_ads_id')) == 0))) { +if ((countRequestPost() > 0) && ((!isPostRequestElementSet('forced_ads_id')) || (!is_array(postRequestElement('forced_ads_id'))) || (count(postRequestElement('forced_ads_id')) == 0))) { // Not found so output message displayMessage('{--ADMIN_FORCED_ADS_NO_SELECTIONS--}'); diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 0726c0b131..d26a01ac2e 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -48,31 +48,31 @@ if (!isExtensionActive('mailid')) { return; } // END - if -if (isGetRequestParameterSet('userid')) { +if (isGetRequestElementSet('userid')) { // Check if the user already exists - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Grab user's all unconfirmed mails // @TODO Try to rewrite this to a filter if (isExtensionActive('bonus')) { // Load bonus id $result = SQL_QUERY_ESC("SELECT `stats_id`,`bonus_id`,`link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", - array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } else { // Load stats id (2nd will be ignored later! But it is needed for the same fetchrow command) $result = SQL_QUERY_ESC("SELECT `stats_id`,`stats_id`,`link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", - array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } // Do we have some entries? if (!SQL_HASZERONUMS($result)) { // Some unconfirmed mails left - if (getRequestParameter('delete') == "all") { + if (getRequestElement('delete') == "all") { // Delete all unconfirmed mails by this user SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s LIMIT %s", - array(bigintval(getRequestParameter('userid')), SQL_NUMROWS($result)), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid')), SQL_NUMROWS($result)), __FILE__, __LINE__); // Prepare mail and send it away - $message = loadEmailTemplate('member_delete_links', SQL_NUMROWS($result), bigintval(getRequestParameter('userid'))); + $message = loadEmailTemplate('member_delete_links', SQL_NUMROWS($result), bigintval(getRequestElement('userid'))); sendEmail(getUserData('userid'), '{--ADMIN_DELETE_LINK_SUBJECT--}', $message); // Display message @@ -96,14 +96,14 @@ if (isGetRequestParameterSet('userid')) { $result_data = SQL_QUERY_ESC("SELECT `subject`,`timestamp_ordered` AS `timestamp`,`cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $type = 'mailid'; $mailId = $id; $problemMessage = '{--NORMAL_MAIL_PROBLEM--}'; - $LINK = '' . $id . ''; + $LINK = '' . $id . ''; break; case 'BONUS': $result_data = SQL_QUERY_ESC("SELECT `subject`,`timestamp`,`cat_id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", array(bigintval($id2)), __FILE__, __LINE__); $type = 'bonusid'; $mailId = $id2; $problemMessage = '{--BONUS_MAIL_PROBLEM--}'; - $LINK = '' . $id2 . ''; + $LINK = '' . $id2 . ''; break; default: // Problem in application detected! @@ -144,7 +144,7 @@ if (isGetRequestParameterSet('userid')) { $content['email'] = '' . getUserData('email') . ''; $content['rows'] = $OUT; $content['nums'] = SQL_NUMROWS($result); - $content['userid'] = bigintval(getRequestParameter('userid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Free memory SQL_FREERESULT($result); @@ -154,11 +154,11 @@ if (isGetRequestParameterSet('userid')) { } } else { // No mails left to confirm - displayMessage('{%message,ADMIN_NO_UNCONFIRMED_MAILS_LEFT=' . bigintval(getRequestParameter('userid')) . '%}'); + displayMessage('{%message,ADMIN_NO_UNCONFIRMED_MAILS_LEFT=' . bigintval(getRequestElement('userid')) . '%}'); } } else { // User not found - displayMessage('{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')) . '%}'); + displayMessage('{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_network_api_translation.php b/inc/modules/admin/what-list_network_api_translation.php index b33d521533..e855790ba3 100644 --- a/inc/modules/admin/what-list_network_api_translation.php +++ b/inc/modules/admin/what-list_network_api_translation.php @@ -62,9 +62,9 @@ if ($GLOBALS['network_display'] === false) { } // END - if // Do we have a network selected? -if (isGetRequestParameterSet('network')) { +if (isGetRequestElementSet('network')) { // Get its data for template - $networkData = getNetworkDataById(getRequestParameter('network')); + $networkData = getNetworkDataById(getRequestElement('network')); // Init type $networkData['network_type_id'] = 0; @@ -74,12 +74,12 @@ if (isGetRequestParameterSet('network')) { // Only show params from given type handler if choosen $ADD = ''; - if ((isPostRequestParameterSet('network_type_id')) && (!is_array(postRequestParameter('network_type_id')))) { + if ((isPostRequestElementSet('network_type_id')) && (!is_array(postRequestElement('network_type_id')))) { // Only show from current type handler - $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestParameter('network_type_id'))); + $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestElement('network_type_id'))); // Overwrite type - $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id')); + $networkData['network_type_id'] = bigintval(postRequestElement('network_type_id')); // Display message displayMessage('{--ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE--}'); @@ -101,7 +101,7 @@ ORDER BY t.`network_type_handle` ASC, p.`network_api_id` ASC", array( - bigintval(getRequestParameter('network')) + bigintval(getRequestElement('network')) ), __FILE__, __LINE__); // Do we have entries? @@ -110,7 +110,7 @@ ORDER BY $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { // Add it to network if the type matches selected - if ($row['network_type_id'] == postRequestParameter('network_type_id')) { + if ($row['network_type_id'] == postRequestElement('network_type_id')) { // Matches, then add it for disabling this entry $GLOBALS['network_translation_disabled'][$row['network_api_index']] = true; } // END - if diff --git a/inc/modules/admin/what-list_network_params.php b/inc/modules/admin/what-list_network_params.php index 0e6fc606f1..c5da9e7a77 100644 --- a/inc/modules/admin/what-list_network_params.php +++ b/inc/modules/admin/what-list_network_params.php @@ -62,9 +62,9 @@ if ($GLOBALS['network_display'] === false) { } // END - if // Do we have a network selected? -if (isGetRequestParameterSet('network')) { +if (isGetRequestElementSet('network')) { // Get its data for template - $networkData = getNetworkDataById(getRequestParameter('network')); + $networkData = getNetworkDataById(getRequestElement('network')); $networkData['network_type_id'] = 0; // Init disabled list @@ -72,12 +72,12 @@ if (isGetRequestParameterSet('network')) { // Only show params from given type handler if choosen $ADD = ''; - if ((isPostRequestParameterSet('network_type_id')) && (!is_array(postRequestParameter('network_type_id')))) { + if ((isPostRequestElementSet('network_type_id')) && (!is_array(postRequestElement('network_type_id')))) { // Only show from current type handler - $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestParameter('network_type_id'))); + $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestElement('network_type_id'))); // Overwrite type id - $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id')); + $networkData['network_type_id'] = bigintval(postRequestElement('network_type_id')); // Display message displayMessage('{--ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE--}'); @@ -97,7 +97,7 @@ WHERE ORDER BY t.`network_type_handle` ASC, p.`network_param_id` ASC", - array(getRequestParameter('network')), __FILE__, __LINE__); + array(getRequestElement('network')), __FILE__, __LINE__); // Do we have entries? if (!SQL_HASZERONUMS($result)) { @@ -105,7 +105,7 @@ ORDER BY $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { // Add it to network if the type matches selected - if ($row['network_type_id'] == postRequestParameter('network_type_id')) { + if ($row['network_type_id'] == postRequestElement('network_type_id')) { // Matches, then add it for disabling this entry $GLOBALS['network_params_disabled'][$row['request_param_key']] = true; } // END - if diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index 9e505a9e9e..6f2ea15694 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -62,9 +62,9 @@ if ($GLOBALS['network_display'] === false) { } // END - if // Do we have a network selected? -if (isGetRequestParameterSet('network')) { +if (isGetRequestElementSet('network')) { // Get its data for template - $networkData = getNetworkDataById(getRequestParameter('network')); + $networkData = getNetworkDataById(getRequestElement('network')); // Init disabled list $GLOBALS['network_types_disabled'] = array(); @@ -78,7 +78,7 @@ WHERE `network_id`=%s ORDER BY `network_type_handle` ASC", - array(getRequestParameter('network')), __FILE__, __LINE__); + array(getRequestElement('network')), __FILE__, __LINE__); // Do we have entries? if (!SQL_HASZERONUMS($result)) { diff --git a/inc/modules/admin/what-list_nickname.php b/inc/modules/admin/what-list_nickname.php index bc3e13d8e5..b9e1dd16c1 100644 --- a/inc/modules/admin/what-list_nickname.php +++ b/inc/modules/admin/what-list_nickname.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check if 'userid' is set -if (isGetRequestParameterSet('userid')) { +if (isGetRequestElementSet('userid')) { // List all entries per user showEntriesByXmlCallback('admin_list_nickname_history'); } else { diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index 56668da124..43672bbde8 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -48,8 +48,8 @@ $SQL2 = ''; $result_max = false; // Set offset an current page to default values -if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1); -if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getMailsPage()); +if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); +if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getMailsPage()); if (isExtensionActive('bonus')) { // Bonus mails sent by you @@ -71,7 +71,7 @@ ORDER BY } // Create limitation line -$add = ' LIMIT ' . (bigintval(getRequestParameter('offset')) * bigintval(getRequestParameter('page')) - bigintval(getRequestParameter('offset'))) . ', ' . bigintval(getRequestParameter('offset')); +$add = ' LIMIT ' . (bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))) . ', ' . bigintval(getRequestElement('offset')); // Add limitation if (!empty($SQL2)) $SQL2 .= $add; diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index dcb186be05..fd368ebdee 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -43,15 +43,15 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('pid')) { +if (isGetRequestElementSet('pid')) { // First let's get the member's id $result = SQL_QUERY_ESC("SELECT `userid`, `target_account`, `payout_total`, `payout_timestamp`, `password` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1", - array(getRequestParameter('pid')), __FILE__, __LINE__); + array(getRequestElement('pid')), __FILE__, __LINE__); list($userid, $tuserid, $points, $tstamp, $tpass) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Obtain some data - if (!isGetRequestParameterSet('task') && (!empty($userid)) && (isValidUserId($userid))) { + if (!isGetRequestElementSet('task') && (!empty($userid)) && (isValidUserId($userid))) { // Get task id from database $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `userid`=%s AND `task_type`='PAYOUT_REQUEST' AND `task_created`=%s LIMIT 1", array(bigintval($userid), bigintval($tstamp)), __FILE__, __LINE__); @@ -63,7 +63,7 @@ if (isGetRequestParameterSet('pid')) { displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}'); } else { // Get task id from URL - $taskId = getRequestParameter('task'); + $taskId = getRequestElement('task'); } if ((!empty($taskId)) && (!empty($userid)) && (isValidUserId($userid))) { @@ -73,12 +73,12 @@ if (isGetRequestParameterSet('pid')) { debug_report_bug(__FILE__, __LINE__, 'No user account ' . $userid . ' found.'); } // END - if - if ((getRequestParameter('do') == 'accept') && (getUserData('email') != '')) { + if ((getRequestElement('do') == 'accept') && (getUserData('email') != '')) { // Ok, now we can output the form or execute accepting if (isFormSent()) { // Obtain payout type and other data $result = SQL_QUERY_ESC("SELECT `payout_id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Load ptype (id) list($ptype) = SQL_FETCHROW($result); @@ -135,10 +135,10 @@ LIMIT 1", // Clear payout request SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Send out mail - $message = loadEmailTemplate('member_payout_accepted', postRequestParameter('text'), $userid); + $message = loadEmailTemplate('member_payout_accepted', postRequestElement('text'), $userid); // Output message if ($data['allow_url'] == 'Y') { @@ -164,14 +164,14 @@ LIMIT 1", // Prepare content $content = array( 'task' => $taskId, - 'pid' => bigintval(getRequestParameter('pid')), + 'pid' => bigintval(getRequestElement('pid')), 'user' => '{%pipe,translateGender=' . getUserData('gender') . '%} ' . getUserData('surname') . ' ' . getUserData('family') . '', ); // Load template loadTemplate('admin_payout_accept_form', false, $content); } - } elseif ((getRequestParameter('do') == 'reject') && (getUserData('email') != '')) { + } elseif ((getRequestElement('do') == 'reject') && (getUserData('email') != '')) { // Ok, now we can output the form or execute rejecting if (isFormSent()) { if ($taskId > 0) { @@ -181,10 +181,10 @@ LIMIT 1", // Clear payout request SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='REJECTED' WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Send out mail - $message = loadEmailTemplate('member_payout_rejected', postRequestParameter('text'), $userid); + $message = loadEmailTemplate('member_payout_rejected', postRequestElement('text'), $userid); // Output message displayMessage('{--ADMIN_PAYOUT_REJECTED_NOTIFIED--}'); @@ -195,7 +195,7 @@ LIMIT 1", // Prepare content $content = array( 'task' => $taskId, - 'pid' => bigintval(getRequestParameter('pid')), + 'pid' => bigintval(getRequestElement('pid')), 'user' => '{%pipe,translateGender=' . getUserData('gender') . '%} ' . getUserData('surname') . ' ' . getUserData('family') . '', ); @@ -211,7 +211,7 @@ LIMIT 1", displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_TASK_ID--}'); } } else { - if (getRequestParameter('do') == 'delete') { + if (getRequestElement('do') == 'delete') { // Delete all requests $result = SQL_QUERY("TRUNCATE `{?_MYSQL_PREFIX?}_user_payouts`", __FILE__, __LINE__); } // END - if diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index f3ea8c077f..7b6a1b9f18 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -47,52 +47,52 @@ addYouAreHereLink('admin', __FILE__); $message = ''; // Quick actions on a rallye -if (isGetRequestParameterSet('rallye')) { +if (isGetRequestElementSet('rallye')) { // Init SQL queries initSqls(); - if (isGetRequestParameterSet('activate')) { + if (isGetRequestElementSet('activate')) { // Activate / deactivate - switch (getRequestParameter('activate')) { + switch (getRequestElement('activate')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='Y' WHERE `id`=%s AND `is_active`='N' LIMIT 1", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='N' WHERE `id`=%s AND `is_active`='Y' LIMIT 1", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) ); break; } // END - switch - } elseif (isGetRequestParameterSet('notify')) { + } elseif (isGetRequestElementSet('notify')) { // Automatic notification - switch (getRequestParameter('notify')) { + switch (getRequestElement('notify')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='Y' WHERE `id`=%s AND `send_notify`='N' LIMIT 1", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='N' WHERE `id`=%s AND `send_notify`='Y' LIMIT 1", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) ); break; } // END - switch - } elseif (isGetRequestParameterSet('auto')) { + } elseif (isGetRequestElementSet('auto')) { // Automatic adding of new members - switch (getRequestParameter('auto')) { + switch (getRequestElement('auto')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='Y' WHERE `id`=%s AND `auto_add_new_user`='N' LIMIT 1", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='N' WHERE `id`=%s AND `auto_add_new_user`='Y' LIMIT 1", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) ); break; } // END - switch @@ -107,7 +107,7 @@ if (isGetRequestParameterSet('rallye')) { initSqls(); // Delete selected rallyes and all it's data - foreach (postRequestParameter('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Remove selected rallye entirely... addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); @@ -133,13 +133,13 @@ if (isGetRequestParameterSet('rallye')) { initSqls(); // Change selected rallyes and all it's data - foreach (postRequestParameter('title') as $id => $title) { + foreach (postRequestElement('title') as $id => $title) { // Secure id number $id = bigintval($id); // Generate timestamps - $START = mktime(postRequestParameter('start_hour', $id), postRequestParameter('start_min', $id), postRequestParameter('start_sec', $id), postRequestParameter('start_month', $id), postRequestParameter('start_day', $id), postRequestParameter('start_year', $id)); - $END = mktime(postRequestParameter('end_hour', $id) , postRequestParameter('end_min', $id) , postRequestParameter('end_sec', $id) , postRequestParameter('end_month', $id) , postRequestParameter('end_day', $id) , postRequestParameter('end_year', $id) ); + $START = mktime(postRequestElement('start_hour', $id), postRequestElement('start_min', $id), postRequestElement('start_sec', $id), postRequestElement('start_month', $id), postRequestElement('start_day', $id), postRequestElement('start_year', $id)); + $END = mktime(postRequestElement('end_hour', $id) , postRequestElement('end_min', $id) , postRequestElement('end_sec', $id) , postRequestElement('end_month', $id) , postRequestElement('end_day', $id) , postRequestElement('end_year', $id) ); // Update entry addSql(SQL_QUERY_ESC("UPDATE @@ -157,12 +157,12 @@ WHERE LIMIT 1", array( $title, - postRequestParameter('descr', $id), - postRequestParameter('templ', $id), + postRequestElement('descr', $id), + postRequestElement('templ', $id), bigintval($START), bigintval($END), - bigintval(postRequestParameter('min_users', $id)), - bigintval(postRequestParameter('min_prices', $id)), + bigintval(postRequestElement('min_users', $id)), + bigintval(postRequestElement('min_prices', $id)), $id ), __FILE__, __LINE__, false)); } @@ -180,7 +180,7 @@ if (isFormSent('edit')) { if (ifPostContainsSelections()) { // Make all selected and deactivated rallyes editable $OUT = ''; - foreach (postRequestParameter('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Load rallye basic data $result = SQL_QUERY_ESC("SELECT `title`,`descr`,`template`,`start_time`,`end_time`,`min_users`,`min_prices` @@ -226,7 +226,7 @@ LIMIT 1", // Nothing selected to edit displayMessage('{--RALLYE_NO_RALLYES_SELECTED--}'); } -} elseif ((getRequestParameter('sub') == 'users') && (getRequestParameter('rallye') > 0)) { +} elseif ((getRequestElement('sub') == 'users') && (getRequestElement('rallye') > 0)) { // List users and their refs before start and current $result = SQL_QUERY_ESC("SELECT `userid`,`refs`,`curr_points` @@ -236,10 +236,10 @@ WHERE `rallye_id`=%s ORDER BY `userid` ASC", - array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { $OUT = ''; - $content['rallye'] = getRequestParameter('rallye'); + $content['rallye'] = getRequestElement('rallye'); while ($row = SQL_FETCHARRAY($result)) { // Check for referal count $count = getReferalRallyeRefsCount($row['userid'], $row['refs']); @@ -274,7 +274,7 @@ ORDER BY // Remember rows $content['rows'] = $OUT; - $content['rallye'] = getRequestParameter('rallye'); + $content['rallye'] = getRequestElement('rallye'); // Free memory SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 3f8f0e760a..2a1ce54f7f 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -46,9 +46,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('userid')) { +if (isGetRequestElementSet('userid')) { // Secure userid - $userid = bigintval(getRequestParameter('userid')); + $userid = bigintval(getRequestElement('userid')); // Fix missing variable $result_levels = false; @@ -60,7 +60,7 @@ if (isGetRequestParameterSet('userid')) { $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); // Output info message - displayMessage(sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestParameter('userid')), $menge, $menge_lck)); + displayMessage(sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestElement('userid')), $menge, $menge_lck)); // Load all referal levels $result_levels = SQL_QUERY("SELECT @@ -171,7 +171,7 @@ ORDER BY // Prepare content $content = array( 'rows' => $OUT, - 'userid' => getRequestParameter('userid') + 'userid' => getRequestElement('userid') ); // Load main template @@ -192,7 +192,7 @@ ORDER BY SQL_FREERESULT($result_levels); } else { // User not found - displayMessage('{%message,ADMIN_MEMBER_404=' . getRequestParameter('userid') . '%}'); + displayMessage('{%message,ADMIN_MEMBER_404=' . getRequestElement('userid') . '%}'); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 2eaa907205..cbcae48e4a 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('id')) { +if (isGetRequestElementSet('id')) { // Show detailed informations to a sponsor $result = SQL_QUERY_ESC("SELECT `company`,`position`,`gender`,`surname`,`family`,`street_nr1`,`street_nr2`,`zip`,`city`,`country`, @@ -58,7 +58,7 @@ FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load sponsor details @@ -71,7 +71,7 @@ WHERE // Prepare all data for the template // Sponsor's id - $content['id'] = getRequestParameter('id'); + $content['id'] = getRequestElement('id'); // Contact data $content['email_link'] = generateEmailLink($content['email'], 'sponsor_data'); // Epoche times @@ -79,21 +79,21 @@ WHERE $content['last_online'] = generateDateTime($content['last_online'], 2); $content['last_change'] = generateDateTime($content['last_change'], 2); // Orders total - $content['orders'] = countSumTotalData(bigintval(getRequestParameter('id')), 'sponsor_orders', 'id', 'sponsor_id', true); + $content['orders'] = countSumTotalData(bigintval(getRequestElement('id')), 'sponsor_orders', 'id', 'sponsor_id', true); // Load template loadTemplate('admin_list_sponsor_details', false, $content); } else { // Sponsor not found - displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('id')) . '%}'); + displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'); } // Free result SQL_FREERESULT($result); -} elseif (isGetRequestParameterSet('refid')) { +} elseif (isGetRequestElementSet('refid')) { // Search for sponsor $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('refid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('refid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Free memory SQL_FREERESULT($result); @@ -111,7 +111,7 @@ WHERE `refid`='%s' ORDER BY `id` ASC", - array(bigintval(getRequestParameter('refid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('refid'))), __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // List refs now @@ -119,11 +119,11 @@ ORDER BY SQL_FREERESULT($result); } else { // No refs made so far - displayMessage(getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestParameter('refid')) . '')); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestElement('refid')) . '')); } } else { // Sponsor not found - displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('refid')) . '%}'); + displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('refid')) . '%}'); } } else { // List all sponsors diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 61d759bff0..e2334d6d79 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -47,25 +47,25 @@ $message = ''; if (isFormSent('add')) { // Check input variables - if (!isPostRequestParameterSet('pay_name')) unsetPostRequestParameter('add'); - if ((round(postRequestParameter('pay_rate')) == 0) || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add'); + if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add'); + if ((round(postRequestElement('pay_rate')) == 0) || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add'); - setPostRequestParameter('pay_min_count', bigintval(postRequestParameter('pay_min_count'))); + setPostRequestElement('pay_min_count', bigintval(postRequestElement('pay_min_count'))); - if ((postRequestParameter('pay_min_count') == '0') || (!isPostRequestParameterSet('pay_min_count'))) unsetPostRequestParameter('add'); - if (!isPostRequestParameterSet('pay_currency')) unsetPostRequestParameter('add'); + if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add'); + if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add'); } elseif ((isFormSent('edit')) || (isFormSent('delete')) || (isFormSent('do_edit')) || (isFormSent('do_delete'))) { // Check if at least one entry was selected - if (!isPostRequestParameterSet('id')) { + if (!isPostRequestElementSet('id')) { // Nothing selected for editing / deleting??? - unsetPostRequestParameter('edit'); - unsetPostRequestParameter('delete'); - unsetPostRequestParameter('do_edit'); - unsetPostRequestParameter('do_delete'); + unsetPostRequestElement('edit'); + unsetPostRequestElement('delete'); + unsetPostRequestElement('do_edit'); + unsetPostRequestElement('do_delete'); } elseif (isFormSent('do_edit')) { // Change entries here... - foreach (postRequestParameter('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Secure id $id = bigintval($id); @@ -81,10 +81,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('name', $id), - postRequestParameter('rate', $id), - bigintval(postRequestParameter('min', $id)), - postRequestParameter('curr', $id), + postRequestElement('name', $id), + postRequestElement('rate', $id), + bigintval(postRequestElement('min', $id)), + postRequestElement('curr', $id), $id ), __FILE__, __LINE__); } @@ -93,7 +93,7 @@ LIMIT 1", $message = '{--SPONSOR_PAY_ENTRIES_CHANGED--}'; } elseif (isFormSent('do_delete')) { // Remove entries here... - foreach (postRequestParameter('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Remove entry SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -112,22 +112,22 @@ LIMIT 1", if (isFormSent('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(postRequestParameter('pay_name')), __FILE__, __LINE__); + array(postRequestElement('pay_name')), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // 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( - postRequestParameter('pay_name'), - convertCommaToDot(postRequestParameter('pay_rate')), - bigintval(postRequestParameter('pay_min_count')), - postRequestParameter('pay_currency') + postRequestElement('pay_name'), + convertCommaToDot(postRequestElement('pay_rate')), + bigintval(postRequestElement('pay_min_count')), + postRequestElement('pay_currency') ), __FILE__, __LINE__); // Payment type added! - $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ADDED=' . postRequestParameter('pay_name') . '%}'; + $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ADDED=' . postRequestElement('pay_name') . '%}'; } else { // Entry does already exists - $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ALREADY=' . postRequestParameter('pay_name') . '%}'; + $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ALREADY=' . postRequestElement('pay_name') . '%}'; } // Free memory @@ -138,7 +138,7 @@ if (isFormSent('add')) { } elseif ((isFormSent('edit')) || (isFormSent('delete'))) { // Load all data $OUT = ''; - foreach (postRequestParameter('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Load entry $result = SQL_QUERY_ESC("SELECT `id`,`pay_name`,`pay_rate`,`pay_min_count`,`pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_sponsor_pays.php b/inc/modules/admin/what-list_sponsor_pays.php index d0ec15b8b8..fa2073a9ae 100644 --- a/inc/modules/admin/what-list_sponsor_pays.php +++ b/inc/modules/admin/what-list_sponsor_pays.php @@ -43,17 +43,17 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('id')) { +if (isGetRequestElementSet('id')) { // Check for selected sponsor $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // ... // Free memory SQL_FREERESULT($result); } else { // Sponsor not found - displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('id')) . '%}'); + displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'); } } else { // Not called by what-list_sponsor.php diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index ad6c741db3..24c395acad 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = true; // Check for 'url_id' element -if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('url_id')) || (!is_array(postRequestParameter('url_id'))) || (count(postRequestParameter('url_id')) == 0))) { +if ((countRequestPost() > 0) && ((!isPostRequestElementSet('url_id')) || (!is_array(postRequestElement('url_id'))) || (count(postRequestElement('url_id')) == 0))) { // Not found so output message displayMessage('{--ADMIN_SURFBAR_NO_SELECTIONS--}'); diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 3a5138c64c..c8dfba9593 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -44,11 +44,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); $whereStatement = ''; -if (!isGetRequestParameterSet('type')) { - setGetRequestParameter('type', 'your'); +if (!isGetRequestElementSet('type')) { + setGetRequestElement('type', 'your'); } // END - if -switch (getRequestParameter('type')) { +switch (getRequestElement('type')) { case 'your': // List only your own open (new) tasks $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'"; break; @@ -74,13 +74,13 @@ switch (getRequestParameter('type')) { break; default: // Unknown type - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestParameter('type'))); - displayMessage('{%message,ADMIN_TASK_UNKNOWN_MODE' . getRequestParameter('type') . '%}'); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestElement('type'))); + displayMessage('{%message,ADMIN_TASK_UNKNOWN_MODE' . getRequestElement('type') . '%}'); break; } // END - switch if (!empty($whereStatement)) { - if ((isPostRequestParameterSet('assign')) && (ifPostContainsSelections())) { + if ((isPostRequestElementSet('assign')) && (ifPostContainsSelections())) { // Assign / do tasks loadIncludeOnce('inc/modules/admin/overview-inc.php'); if (empty($dmy)) $dmy = ''; @@ -101,16 +101,16 @@ ORDER BY __FILE__, __LINE__); if ((ifPostContainsSelections()) && (!isDemoModeActive())) { // Only unassign / delete tasks when there are selected tasks posted - if (isPostRequestParameterSet('unassign')) { + if (isPostRequestElementSet('unassign')) { // Unassign from tasks - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1", array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); } // END - foreach } elseif (isFormSent('delete')) { // Delete tasks - foreach (postRequestParameter('sel') as $id => $sel) { - if (getRequestParameter('type') == 'deleted') { + foreach (postRequestElement('sel') as $id => $sel) { + if (getRequestElement('type') == 'deleted') { // Delete task immediately SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); @@ -179,13 +179,13 @@ ORDER BY // Prepare content $content = array( - 'message' => '{--ADMIN_OVERVIEW_TASK_' . strtoupper(getRequestParameter('type')) . '_TYPE--}', - 'type' => getRequestParameter('type'), + 'message' => '{--ADMIN_OVERVIEW_TASK_' . strtoupper(getRequestElement('type')) . '_TYPE--}', + 'type' => getRequestElement('type'), 'rows' => $OUT ); // Load footer template - if (getRequestParameter('type') == 'deleted') { + if (getRequestElement('type') == 'deleted') { // Delete now button loadTemplate('admin_list_task_delete', false, $content); } else { diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 92cde69e48..2b0912fcd5 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -55,7 +55,7 @@ $listed = false; $sql = ''; // List confirmation links from normal or bonus mails -if (isGetRequestParameterSet('mid')) { +if (isGetRequestElementSet('mid')) { // SQL query for mail data $sql = sprintf("SELECT s.`id`, p.`sender`, p.`subject`, p.`text`, p.`url`, p.`timestamp`, s.`max_rec` @@ -68,7 +68,7 @@ ON WHERE p.`id`=%s LIMIT 1", - bigintval(getRequestParameter('mid')) + bigintval(getRequestElement('mid')) ); // Column, type and id for member's mail @@ -78,9 +78,9 @@ LIMIT 1", // Load admin_list_unconfirmed template $listed = true; - $DATA = getRequestParameter('mid'); + $DATA = getRequestElement('mid'); $mailType = 'mailid'; -} elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) { +} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}'); // SQL query for mail data (both ids are required for compatiblity to above normal mail @@ -91,13 +91,13 @@ FROM WHERE `id`=%s LIMIT 1", - bigintval(getRequestParameter('bid')) + bigintval(getRequestElement('bid')) ); // Column, type and id for member's mail $col = 'bonus_id'; $type = 'BONUS'; - $ID = getRequestParameter('bid'); + $ID = getRequestElement('bid'); // Load admin_list_unconfirmed template $listed = true; @@ -192,7 +192,7 @@ LIMIT %s", // Load final template loadTemplate('admin_list_unconfirmed', false, $content); - } elseif (getRequestParameter('mid') > 0) { + } elseif (getRequestElement('mid') > 0) { // Data in pool or in user_stats not found, so let's find out where data is missing if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', true) == 1) { // pool table @@ -204,7 +204,7 @@ LIMIT %s", // both or link is invalid displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}'); } - } elseif (isGetRequestParameterSet('bid')) { + } elseif (isGetRequestElementSet('bid')) { // Data in bonus table not found displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}'); } diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 91f225c556..ed2f5a9ffb 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -62,16 +62,16 @@ if (isExtensionActive('country')) { } // Init unset data -if (!isGetRequestParameterSet('letter')) { setGetRequestParameter('letter', ''); } -if (!isGetRequestParameterSet('sortby')) { setGetRequestParameter('sortby', 'userid'); } -if (!isGetRequestParameterSet('page')) { setGetRequestParameter('page' , 1); } +if (!isGetRequestElementSet('letter')) { setGetRequestElement('letter', ''); } +if (!isGetRequestElementSet('sortby')) { setGetRequestElement('sortby', 'userid'); } +if (!isGetRequestElementSet('page')) { setGetRequestElement('page' , 1); } // Set base URL $base = '[ postRequestParameter('reason')), bigintval(getRequestParameter('userid'))); + $message = loadEmailTemplate('member_user_locked', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid'))); // Send away... - sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_LOCKED_SUBJECT--}', $message); + sendEmail(bigintval(getRequestElement('userid')), '{--ADMIN_LOCKED_SUBJECT--}', $message); } // END - if // Prepare message - $message = '{%message,ADMIN_USER_ACCOUNT_LOCKED=' . bigintval(getRequestParameter('userid')) . '%}'; + $message = '{%message,ADMIN_USER_ACCOUNT_LOCKED=' . bigintval(getRequestElement('userid')) . '%}'; $isActive = true; - } elseif ((isPostRequestParameterSet('unlock')) && (getUserData('status') == 'LOCKED')) { + } elseif ((isPostRequestElementSet('unlock')) && (getUserData('status') == 'LOCKED')) { // Ok, unlock the account! if (isExtensionInstalledAndNewer('user', '0.3.5')) { // Reset lock reason as well @@ -88,40 +88,40 @@ SET WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } else { // No lock reason to reset SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED' WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } // Entry updated? if (!SQL_HASZEROAFFECTED()) { // Send an email to the user! In later version you can optionally switch this feature off - $message = loadEmailTemplate('member_user_unlocked', array('text' => postRequestParameter('reason')), bigintval(getRequestParameter('userid'))); + $message = loadEmailTemplate('member_user_unlocked', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid'))); // Send away... - sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_UNLOCKED_SUBJECT--}', $message); + sendEmail(bigintval(getRequestElement('userid')), '{--ADMIN_UNLOCKED_SUBJECT--}', $message); if (isExtensionActive('rallye')) { - addUserToReferalRallye(getRequestParameter('userid')); + addUserToReferalRallye(getRequestElement('userid')); } // END - if } // END - if // Prepare message - $message = '{%message,ADMIN_USER_ACCOUNT_UNLOCKED=' . bigintval(getRequestParameter('userid')) . '%}'; + $message = '{%message,ADMIN_USER_ACCOUNT_UNLOCKED=' . bigintval(getRequestElement('userid')) . '%}'; $isActive = true; } elseif (isFormSent('delete')) { // Delete the account $isActive = true; loadIncludeOnce('inc/modules/admin/what-del_user.php'); - } elseif (isPostRequestParameterSet('no')) { + } elseif (isPostRequestElementSet('no')) { // Do not lock him... - $url = adminCreateUserLink(getRequestParameter('userid')); + $url = adminCreateUserLink(getRequestElement('userid')); } else { // Load user data we need - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Transfer data to constants for the template - $content['userid'] = getRequestParameter('userid'); + $content['userid'] = getRequestElement('userid'); // Realy want to lock? switch (getUserData('status')) { @@ -148,7 +148,7 @@ LIMIT 1", loadTemplate('admin_lock_user', false, $content); } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')), '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); } } @@ -166,7 +166,7 @@ LIMIT 1", } } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')), '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); } } else { // List all users diff --git a/inc/modules/admin/what-logs.php b/inc/modules/admin/what-logs.php index 93e2d1c8f3..cf8fdb41da 100644 --- a/inc/modules/admin/what-logs.php +++ b/inc/modules/admin/what-logs.php @@ -43,9 +43,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestParameterSet('access')) { +if (isGetRequestElementSet('access')) { // Secure input and construct FQFN - $access = SQL_ESCAPE(secureString(getRequestParameter('access'))); + $access = SQL_ESCAPE(secureString(getRequestElement('access'))); $target = sprintf("%slogs/%s", getPath(), $access); // Is the file valid and readable? diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index e7b078f96a..eec2a28d00 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -45,8 +45,8 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if ((!isPostRequestParameterSet('title')) && (isFormSent())) { - unsetPostRequestParameter('ok'); +if ((!isPostRequestElementSet('title')) && (isFormSent())) { + unsetPostRequestElement('ok'); } // END - if if (!isFormSent()) { @@ -169,24 +169,24 @@ if (!isFormSent()) { loadTemplate('admin_add_member_menu', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry - if (isPostRequestParameterSet('menu')) { + if (isPostRequestElementSet('menu')) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", array( - postRequestParameter('menu'), - postRequestParameter('name'), - postRequestParameter('title'), - postRequestParameter('visible'), - postRequestParameter('active'), - bigintval(postRequestParameter('sort')), + postRequestElement('menu'), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('visible'), + postRequestElement('active'), + bigintval(postRequestElement('sort')), ), __FILE__, __LINE__); } else { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( - postRequestParameter('name'), - postRequestParameter('title'), - postRequestParameter('visible'), - postRequestParameter('active'), - bigintval(postRequestParameter('sort')), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('visible'), + postRequestElement('active'), + bigintval(postRequestElement('sort')), ), __FILE__, __LINE__); } displayMessage('{--SETTINGS_SAVED'); diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 64e8edaa99..837fd4de95 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -46,9 +46,9 @@ addYouAreHereLink('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $subMenu = ''; -if (isGetRequestParameterSet('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestParameter('sub')); - $subMenu = getRequestParameter('sub'); +if (isGetRequestElementSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); + $subMenu = getRequestElement('sub'); } // END - if // List all menu points and make them editable @@ -57,7 +57,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['sub'] = $subMenu; $content['chk'] = countPostSelection(); $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title`,`action`,`what` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -99,7 +99,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['sub'] = $subMenu; $content['chk'] = countPostSelection(); $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -135,12 +135,12 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() // Load template loadTemplate('admin_delete_member_menu', false, $content); -} elseif ((isPostRequestParameterSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { +} elseif ((isPostRequestElementSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $subMenu; $content['chk'] = countPostSelection(); $count = '0'; $OUT = ''; - foreach (postRequestParameter('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $count++; $result = SQL_QUERY_ESC("SELECT `title`,`visible`,`locked` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-overview.php b/inc/modules/admin/what-overview.php index 04be6624f6..be13ac2a1f 100644 --- a/inc/modules/admin/what-overview.php +++ b/inc/modules/admin/what-overview.php @@ -70,7 +70,7 @@ if (getAction() == 'login') { // Are we in 'welcome' page and are there jobs to be done? if (!ifAdminMenuHasEntries(getAction())) { // This menu is empty and so no content is displayed - displayMessage('{--ADMIN_MENU_IS_EMPTY--}'); + displayMessage('{--ADMIN_MENU_EMPTY--}'); } elseif ($jobsDone === true) { // Generate overview of all main menus if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) { diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index cc14ac4569..5c936a7ea7 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -43,28 +43,28 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (((!isPostRequestParameterSet('t_wait')) || (!isPostRequestParameterSet('payment'))) && (isGetRequestParameterSet('do')) && (getRequestParameter('do') == 'add')) { - unsetPostRequestParameter('ok'); +if (((!isPostRequestElementSet('t_wait')) || (!isPostRequestElementSet('payment'))) && (isGetRequestElementSet('do')) && (getRequestElement('do') == 'add')) { + unsetPostRequestElement('ok'); } // END - if if (isFormSent()) { - switch (getRequestParameter('do')) { + switch (getRequestElement('do')) { case 'add': - addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (`time`,`payment`,`mail_title`,`price`) VALUES ('".postRequestParameter('t_wait')."','".postRequestParameter('payment')."','".postRequestParameter('title')."','".postRequestParameter('price')."')"); - if (countSumTotalData(postRequestParameter('t_wait'), 'payments', 'id', 'time', true) == 1) { + addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (`time`,`payment`,`mail_title`,`price`) VALUES ('".postRequestElement('t_wait')."','".postRequestElement('payment')."','".postRequestElement('title')."','".postRequestElement('price')."')"); + if (countSumTotalData(postRequestElement('t_wait'), 'payments', 'id', 'time', true) == 1) { // Re-init the array here initSqls(); } // END - if break; case 'edit': - foreach (postRequestParameter('time') as $id => $value) { - addSql("UPDATE `{?_MYSQL_PREFIX?}_payments` SET `time`='" . $value . "', `payment`='".postRequestParameter('payment', $id)."', price='".postRequestParameter('price', $id)."', mail_title='".postRequestParameter('mail_title', $id)."' WHERE `id`='".$id."' LIMIT 1"); + foreach (postRequestElement('time') as $id => $value) { + addSql("UPDATE `{?_MYSQL_PREFIX?}_payments` SET `time`='" . $value . "', `payment`='".postRequestElement('payment', $id)."', price='".postRequestElement('price', $id)."', mail_title='".postRequestElement('mail_title', $id)."' WHERE `id`='".$id."' LIMIT 1"); } // END - foreach break; case 'delete': - foreach (postRequestParameter('id') as $id => $value) { + foreach (postRequestElement('id') as $id => $value) { addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=" . bigintval($id) . " LIMIT 1"); } // END - foreach break; @@ -85,7 +85,7 @@ if (isFormSent()) { } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) { // Delete entries here $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT `id`,`time`,`mail_title` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); @@ -102,7 +102,7 @@ if (isFormSent()) { } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit entries $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT `id`,`time`,`payment`,`mail_title`,`price` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index b9d65b7b1a..937996ee91 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -44,19 +44,19 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Some sanity-check -if ((!isPostRequestParameterSet('url')) || (!isPostRequestParameterSet('alternate'))) { - unsetPostRequestParameter('ok'); +if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet('alternate'))) { + unsetPostRequestElement('ok'); } // END - if if (isFormSent()) { // Fix older calls from add-new-banner-form - if (!isGetRequestParameterSet('mode')) setGetRequestParameter('mode', 'add'); + if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', 'add'); $sql = ''; - switch (getRequestParameter('mode')) { + switch (getRequestElement('mode')) { case 'add': // Check if banner is already added $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `url`='%s' LIMIT 1", - array(postRequestParameter('url')), __FILE__, __LINE__); + array(postRequestElement('url')), __FILE__, __LINE__); // Was the banner found? if (SQL_HASZERONUMS($result)) { @@ -64,9 +64,9 @@ if (isFormSent()) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (`url`,`alternate`,`visible`) VALUES ('%s','%s','%s')", array( - postRequestParameter('url'), - postRequestParameter('alternate'), - postRequestParameter('visible') + postRequestElement('url'), + postRequestElement('alternate'), + postRequestElement('visible') ), __FILE__, __LINE__); } // END - if @@ -75,16 +75,16 @@ VALUES ('%s','%s','%s')", break; case 'edit': // Update banner - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure id $id = bigintval($id); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `url`='%s', `alternate`='%s', `visible`='%s' WHERE `id`=%s LIMIT 1", array( - postRequestParameter('url', $id), - postRequestParameter('alternate', $id), - postRequestParameter('visible'), + postRequestElement('url', $id), + postRequestElement('alternate', $id), + postRequestElement('visible'), $id ), __FILE__, __LINE__); } @@ -105,7 +105,7 @@ VALUES ('%s','%s','%s')", } elseif ((ifPostContainsSelections()) && (isFormSent('edit'))) { // Edit banner $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load data $result = SQL_QUERY_ESC("SELECT `id`,`url`,`alternate`,`visible` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -124,7 +124,7 @@ VALUES ('%s','%s','%s')", } else { if ((ifPostContainsSelections()) && (isFormSent('delete'))) { // Delete banner - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // END - foreach diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 2f083fdf10..a82b7d2191 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -49,17 +49,17 @@ if (!isExtensionActive('order')) { } // END - if // 'mode' is not set by default -if (!isGetRequestParameterSet('mode')) { +if (!isGetRequestElementSet('mode')) { // Set empty mode to "select" - setGetRequestParameter('mode', 'select'); + setGetRequestElement('mode', 'select'); } // END - if if (isFormSent()) { // Deliver bonus mail - addNewBonusMail(postRequestArray(), getRequestParameter('mode')); + addNewBonusMail(postRequestArray(), getRequestElement('mode')); } else { // Store send mode - $content['mode'] = getRequestParameter('mode'); + $content['mode'] = getRequestElement('mode'); $content['html_select'] = ''; if (isExtensionActive('html_mail')) { @@ -68,7 +68,7 @@ if (isFormSent()) { } // END - if // Select template - switch(getRequestParameter('mode')) { + switch(getRequestElement('mode')) { case 'html': // HTML mails case 'normal': // Normal mails $template = 'admin_send_bonus_form'; diff --git a/inc/modules/admin/what-send_coupon.php b/inc/modules/admin/what-send_coupon.php index 76324a4dad..0f9c8ea4fe 100644 --- a/inc/modules/admin/what-send_coupon.php +++ b/inc/modules/admin/what-send_coupon.php @@ -46,10 +46,10 @@ addYouAreHereLink('admin', __FILE__); // Is the form sent? if (isFormSent()) { // Are all required fields set? - if (!isPostRequestParameterSet('points')) { + if (!isPostRequestElementSet('points')) { // Points not entered displayMessage('{--ADMIN_SEND_COUPON_POINTS_NOT_ENTERED--}'); - } elseif (!isPostRequestParameterSet('coupon_description')) { + } elseif (!isPostRequestElementSet('coupon_description')) { // Description not entered displayMessage('{--ADMIN_SEND_COUPON_DESCRIPTION_NOT_ENTERED--}'); } else { @@ -67,8 +67,8 @@ if (isFormSent()) { array( $expirationTime, SQL_NUMROWS($result), - bigintval(postRequestParameter('points')), - postRequestParameter('coupon_description') + bigintval(postRequestElement('points')), + postRequestElement('coupon_description') ), __FILE__, __LINE__ ); @@ -102,7 +102,7 @@ if (isFormSent()) { $content = array( 'coupon_id' => $couponId, 'userid' => $userid, - 'points' => bigintval(postRequestParameter('points')), + 'points' => bigintval(postRequestElement('points')), 'coupon_code' => $couponCode, 'coupon_expired' => generateDateTime($expirationTime, '0') ); @@ -122,8 +122,8 @@ if (isFormSent()) { 'userids' => implode(',', $adminUserids), 'userid_count' => count($adminUserids), 'coupon_id' => $couponId, - 'points' => bigintval(postRequestParameter('points')), - 'coupon_description' => postRequestParameter('coupon_description'), + 'points' => bigintval(postRequestElement('points')), + 'coupon_description' => postRequestElement('coupon_description'), 'coupon_expired' => generateDateTime($expirationTime, '0') ); diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index 7f295e1111..84a57f4144 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -59,22 +59,22 @@ ORDER BY $template = 'newsletter'; // Check for extension and sending-mode - if (!isExtensionActive('html_mail', true) && (postRequestParameter('mode') == 'html')) { + if (!isExtensionActive('html_mail', true) && (postRequestElement('mode') == 'html')) { // Set mode to text mode - postRequestParameter('mode') == 'text'; - } elseif (postRequestParameter('mode') == 'html') { + postRequestElement('mode') == 'text'; + } elseif (postRequestElement('mode') == 'html') { // Set HTML templates $template = 'newsletter_html'; } // Compile message - setPostRequestParameter('text', preCompileCode(postRequestParameter('text'))); + setPostRequestElement('text', preCompileCode(postRequestElement('text'))); // Load template - $message = loadEmailTemplate($template, array('text' => postRequestParameter('text')), $content['userid']); + $message = loadEmailTemplate($template, array('text' => postRequestElement('text')), $content['userid']); // ... and send it away! - sendNewsletter($content['email'], postRequestParameter('subject'), $message, postRequestParameter('mode')); + sendNewsletter($content['email'], postRequestElement('subject'), $message, postRequestElement('mode')); } // END - while // Output message diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php index 93cc0b4f08..4337e71db5 100644 --- a/inc/modules/admin/what-stats_mods.php +++ b/inc/modules/admin/what-stats_mods.php @@ -44,9 +44,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check if module was selected -if ((getRequestParameter('mod') == 'index') || (getRequestParameter('mod') == 'login')) { +if ((getRequestElement('mod') == 'index') || (getRequestElement('mod') == 'login')) { // Select menu system - $mod = mapModuleToTable(getRequestParameter('mod')); + $mod = mapModuleToTable(getRequestElement('mod')); // Load module's detail statistic $result = SQL_QUERY_ESC("SELECT `action`,`title`,`counter` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY `counter` DESC", diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 3ade43b940..bbbee2a2e1 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -43,11 +43,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (getRequestParameter('userid') == 'all') { +if (getRequestElement('userid') == 'all') { // Is the form sent? - if ((isFormSent()) && (postRequestParameter('points') > 0)) { + if ((isFormSent()) && (postRequestElement('points') > 0)) { // Add points to all accounts - $content['points'] = bigintval(postRequestParameter('points')); + $content['points'] = bigintval(postRequestElement('points')); // Load userid $result_main = SQL_QUERY("SELECT `userid`,`email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", @@ -57,12 +57,12 @@ if (getRequestParameter('userid') == 'all') { $content = merge_array($content, $row); // Ok, add points to used points, send an email to him and ignore return status - subtractPoints('admin_all', $content['userid'], postRequestParameter('points')); + subtractPoints('admin_all', $content['userid'], postRequestElement('points')); // Prepare content $content = array( - 'reason' => SQL_ESCAPE(postRequestParameter('reason')), - 'points' => bigintval(postRequestParameter('points')) + 'reason' => SQL_ESCAPE(postRequestElement('reason')), + 'points' => bigintval(postRequestElement('points')) ); // Load message and send it away @@ -79,38 +79,38 @@ if (getRequestParameter('userid') == 'all') { // Display form add points loadTemplate('admin_sub_points_all'); } -} elseif (isGetRequestParameterSet('userid')) { +} elseif (isGetRequestElementSet('userid')) { // User id found in URL so we use this give him some credits - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Selected user does exist $content = getUserDataArray(); - if ((isFormSent()) && (isPostRequestParameterSet('points'))) { + if ((isFormSent()) && (isPostRequestElementSet('points'))) { // Ok, add to used points, send an email to him and ignore return status - subtractPoints('admin_single', bigintval(getRequestParameter('userid')), postRequestParameter('points')); + subtractPoints('admin_single', bigintval(getRequestElement('userid')), postRequestElement('points')); // Prepare content $content = array( - 'reason' => SQL_ESCAPE(postRequestParameter('reason')), - 'points' => bigintval(postRequestParameter('points')) + 'reason' => SQL_ESCAPE(postRequestElement('reason')), + 'points' => bigintval(postRequestElement('points')) ); // Load email and send it away - $message = loadEmailTemplate('member_sub_points', $content, bigintval(getRequestParameter('userid'))); - sendEmail(getRequestParameter('userid'), '{--ADMIN_SUB_SUBJECT--}', $message); + $message = loadEmailTemplate('member_sub_points', $content, bigintval(getRequestElement('userid'))); + sendEmail(getRequestElement('userid'), '{--ADMIN_SUB_SUBJECT--}', $message); // Output message displayMessage('{--ADMIN_POINTS_SUBTRACTED--}'); } else { // Prepare content - $content['userid'] = bigintval(getRequestParameter('userid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Load form loadTemplate('admin_sub_points', false, $content); } } else { // User not found - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')) . '%}'); + loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index 3ab7526171..497c15eeaa 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Is the 'url_id' set? -if (isGetRequestParameterSet('url_id')) { +if (isGetRequestElementSet('url_id')) { // Generate general statistics $result = SQL_QUERY_ESC("SELECT `stats_userid`, @@ -56,7 +56,7 @@ WHERE `stats_url_id`=%s ORDER BY `stats_userid` ASC", - array(bigintval(getRequestParameter('url_id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('url_id'))), __FILE__, __LINE__); // Entries found? if (!SQL_HASZERONUMS($result)) { diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 6f761b2450..ac36496e27 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -46,12 +46,12 @@ addYouAreHereLink('admin', __FILE__); // Check for selected themes if (ifPostContainsSelections()) { $OUT = ''; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { $sql = ''; // Shall I de-/activate or delete themes? - if (isPostRequestParameterSet('status')) { + if (isPostRequestElementSet('status')) { // Change status - if (postRequestParameter('active', $id) == 'Y') { + if (postRequestElement('active', $id) == 'Y') { $sql = "UPDATE `{?_MYSQL_PREFIX?}_themes` SET `theme_active`='N' WHERE `id`=%s LIMIT 1"; } else { $sql = "UPDATE `{?_MYSQL_PREFIX?}_themes` SET `theme_active`='Y' WHERE `id`=%s LIMIT 1"; @@ -75,9 +75,9 @@ if (ifPostContainsSelections()) { // Output generated? if (empty($OUT)) $OUT = '{--ADMIN_THEME_NO_OUTPUT--}'; -} elseif (isGetRequestParameterSet('default_theme')) { +} elseif (isGetRequestElementSet('default_theme')) { // Escape string from input - $postData['default_theme'] = getRequestParameter('default_theme'); + $postData['default_theme'] = getRequestElement('default_theme'); // Set session setTheme($postData['default_theme']); diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index c3665f9881..f27b59a347 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -47,11 +47,11 @@ addYouAreHereLink('admin', __FILE__); $GLOBALS['theme_mode'] = 'test'; // Import selected theme if not present -if (isPostRequestParameterSet('theme')) { +if (isPostRequestElementSet('theme')) { // Check if theme is there - if (!ifThemeExists(postRequestParameter('theme'))) { + if (!ifThemeExists(postRequestElement('theme'))) { // Import theme - $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE(postRequestParameter('theme'))); + $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE(postRequestElement('theme'))); // Is the theme readable? if (isIncludeReadable($inc)) { @@ -62,7 +62,7 @@ if (isPostRequestParameterSet('theme')) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_themes` (`theme_path`,`theme_active`,`theme_ver`,`theme_name`) VALUES ('%s','N','%s','%s')", array( - postRequestParameter('theme'), + postRequestElement('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name'] ), __FILE__, __LINE__); @@ -71,14 +71,14 @@ VALUES ('%s','N','%s','%s')", rebuildCache('themes', 'them'); // Prepare message - $message = '{%message,ADMIN_THEME_IMPORTED=' . postRequestParameter('theme') . '%}'; + $message = '{%message,ADMIN_THEME_IMPORTED=' . postRequestElement('theme') . '%}'; } else { // Include file not found - $message = '{%message,ADMIN_THEME_INC_404=' . postRequestParameter('theme') . '%}'; + $message = '{%message,ADMIN_THEME_INC_404=' . postRequestElement('theme') . '%}'; } } else { // Theme already imported - $message = '{%message,ADMIN_THEME_ALREADY_INSTALLED=' . postRequestParameter('theme') . '%}'; + $message = '{%message,ADMIN_THEME_ALREADY_INSTALLED=' . postRequestElement('theme') . '%}'; } // Output message diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 555502ec79..6dafbbc4ac 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -57,7 +57,7 @@ if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { if (isFormSent('accept')) { if (ifPostContainsSelections()) { // Accept mail orders - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Secure id number $id = bigintval($id); @@ -121,11 +121,11 @@ LIMIT 1", // Mails unlocked for mail delivery displayMessage($message); - } elseif (isPostRequestParameterSet('reject')) { + } elseif (isPostRequestElementSet('reject')) { if (ifPostContainsSelections()) { // Reject mail orders $OUT = ''; - foreach (postRequestParameter('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Secure id number $id = bigintval($id); @@ -144,18 +144,18 @@ LIMIT 1", sendEmail($content['sender'], '{--MEMBER_ORDER_REJECTED--}', $message_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) { - setPostRequestParameter('redirect', getUrl()); + if ((!isPostRequestElementSet('redirect')) || (postRequestElement('redirect') == 'http://')) { + setPostRequestElement('redirect', getUrl()); } // END - if // Redirect URL SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `url`='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", - array(postRequestParameter('redirect'), $id),__FILE__, __LINE__); + array(postRequestElement('redirect'), $id),__FILE__, __LINE__); // Prepare data for the row template $content = array( 'id' => $id, - 'url' => postRequestParameter('url', $id), + 'url' => postRequestElement('url', $id), ); // Load row template and switch colors @@ -170,7 +170,7 @@ LIMIT 1", } } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (isUrlBlacklistEnabled())) { // Lock URLs - foreach (postRequestParameter('sel') as $id => $url) { + foreach (postRequestElement('sel') as $id => $url) { // Secure id number $id = bigintval($id); diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 25242a5380..9a558b5050 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -48,7 +48,7 @@ if (isFormSent()) { // Does he have selected at least one sponsor? if (ifPostContainsSelections('id')) { // At least one entry selected - foreach (postRequestParameter('id') as $id => $selected) { + foreach (postRequestElement('id') as $id => $selected) { // Secure id number and init $content $content = array( 'id' => bigintval($id), diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index 6e94af3dc8..374f564af2 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -44,18 +44,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Is the form sent? -if ((isPostRequestParameterSet('unlock')) && (is_array(postRequestParameter('url_id'))) && (count(postRequestParameter('url_id')) > 0)) { +if ((isPostRequestElementSet('unlock')) && (is_array(postRequestElement('url_id'))) && (count(postRequestElement('url_id')) > 0)) { // Unlock selected URLs - if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestParameter('url_id'))) { + if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestElement('url_id'))) { // Unlock done! :-) displayMessage('{--ADMIN_SURFBAR_UNLOCK_DONE--}'); } else { // Unlock failed! displayMessage('{--ADMIN_SURFBAR_UNLOCK_FAILED--}'); } -} elseif ((isPostRequestParameterSet('reject')) && (is_array(postRequestParameter('url_id'))) && (count(postRequestParameter('url_id')) > 0)) { +} elseif ((isPostRequestElementSet('reject')) && (is_array(postRequestElement('url_id'))) && (count(postRequestElement('url_id')) > 0)) { // Reject selected URLs - if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestParameter('url_id'))) { + if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestElement('url_id'))) { // Unlock done! :-) displayMessage('{--ADMIN_SURFBAR_UNLOCK_DONE--}'); } else { diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index ed7f4adfb2..57a3feeb32 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -52,21 +52,21 @@ $FQFN = sprintf("%s%s/index.html", getConfig('usage_base') ); -if (isGetRequestParameterSet('image')) { - if (getRequestParameter('type') == 'usage') { +if (isGetRequestElementSet('image')) { + if (getRequestElement('type') == 'usage') { $FQFN = sprintf("%s%s/usage.png", getPath(), getConfig('usage_base') ); } else { - if (strpos(getRequestParameter('image'), "\\") > 0) { - setGetRequestParameter('image', substr(getRequestParameter('image'), 0, strpos(getRequestParameter('image'), "\\"))); + if (strpos(getRequestElement('image'), "\\") > 0) { + setGetRequestElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), "\\"))); } // END - if $FQFN = sprintf("%s%s/%s_usage_%s.png", getPath(), getConfig('usage_base'), - getRequestParameter('type'), - getRequestParameter('image') + getRequestElement('type'), + getRequestElement('image') ); } @@ -77,11 +77,11 @@ if (isGetRequestParameterSet('image')) { imagedestroy($image); } // END - if shutdown(); -} elseif (isGetRequestParameterSet('usage')) { +} elseif (isGetRequestElementSet('usage')) { $FQFN = sprintf("%s%s/usage_%s.html", getPath(), getConfig('usage_base'), - getRequestParameter('usage') + getRequestElement('usage') ); } diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 03f6629995..8fd9adb472 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -44,22 +44,22 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Is a user id given? -if ((isGetRequestParameterSet('userid')) && (bigintval(getRequestParameter('userid')) > 0)) { +if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 0)) { // Is a user account found? - if (fetchUserData(getRequestParameter('userid'))) { + if (fetchUserData(getRequestElement('userid'))) { // Load the data $content = getUserDataArray(); // Including user id - $content['userid'] = bigintval(getRequestParameter('userid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Shall we send the email? if (isFormSent()) { // Insert text - $content['text'] = postRequestParameter('text'); + $content['text'] = postRequestElement('text'); // Load email template - $message = loadEmailTemplate('member_contct', $content, getRequestParameter('userid')); + $message = loadEmailTemplate('member_contct', $content, getRequestElement('userid')); // Send contact form out sendEmail($content['userid'], '{--ADMIN_CONTACT_USER_SUBJECT--}', $message); @@ -72,7 +72,7 @@ if ((isGetRequestParameterSet('userid')) && (bigintval(getRequestParameter('user } } else { // Not found? - displayMessage('{%message,ADMIN_USER_ACCOUNT_404=' . bigintval(getRequestParameter('userid')) . '%}'); + displayMessage('{%message,ADMIN_USER_ACCOUNT_404=' . bigintval(getRequestElement('userid')) . '%}'); } } else { // Display selection box diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 90437458c4..80d7f3beff 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -42,12 +42,12 @@ if (!defined('__SECURITY')) { $mode = 'guest'; -if (isGetRequestParameterSet('order')) { +if (isGetRequestElementSet('order')) { // Order number placed, is he also logged in? if (isMember()) { // Ok, test passed... :) $result = SQL_QUERY_ESC("SELECT `subject`,`url` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s AND `data_type`='TEMP' LIMIT 1", - array(bigintval(getRequestParameter('order')), getMemberId()), __FILE__, __LINE__); + array(bigintval(getRequestElement('order')), getMemberId()), __FILE__, __LINE__); // Finally is the entry valid? if (SQL_NUMROWS($result) == 1) { @@ -55,7 +55,7 @@ if (isGetRequestParameterSet('order')) { list($sub, $url) = SQL_FETCHROW($result); // This fixes a white page - setPostRequestParameter('url', $url); + setPostRequestElement('url', $url); // Mode is member $mode = 'member'; @@ -72,28 +72,28 @@ if (isGetRequestParameterSet('order')) { } } // END - if -if ((isPostRequestParameterSet('url')) || (isGetRequestParameterSet('url')) || (isGetRequestParameterSet('frame'))) { +if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGetRequestElementSet('frame'))) { // Default URL is ours $url = getUrl(); // Use URL from POST or GET data if set - if (isPostRequestParameterSet('url')) { + if (isPostRequestElementSet('url')) { // POST data comes first - $url = postRequestParameter('url'); - } elseif (isGetRequestParameterSet('url')) { + $url = postRequestElement('url'); + } elseif (isGetRequestElementSet('url')) { // Then GET data - $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestParameter('url'))))); + $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); } // Add missing element $frame = ''; - if (isGetRequestParameterSet('frame')) $frame = getRequestParameter('frame'); + if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame'); switch ($frame) { case '': switch ($mode) { case 'member': // Build frameset - $content['order'] = bigintval(getRequestParameter('order')); + $content['order'] = bigintval(getRequestElement('order')); $content['url'] = generateDerefererUrl($url); loadTemplate('member_order_frametester', false, $content); break; @@ -110,11 +110,11 @@ if ((isPostRequestParameterSet('url')) || (isGetRequestParameterSet('url')) || ( break; case 'back': // Back buttom - loadTemplate('member_order_back', false, getRequestParameter('order')); + loadTemplate('member_order_back', false, getRequestElement('order')); break; case 'send': // Send mail away - loadTemplate('member_order_send', false, getRequestParameter('order')); + loadTemplate('member_order_send', false, getRequestElement('order')); break; } // END - switch } else { diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 7c45f008c2..2ec20efbc3 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -48,12 +48,12 @@ if ((!isExtensionActive('user')) && (!isAdmin())) { return; } // END - if -if (isGetRequestParameterSet('hash')) { +if (isGetRequestElementSet('hash')) { // Do user account confirmation - doConfirmUserAccount(getRequestParameter('hash')); -} elseif ((isFormSent()) && (isPostRequestParameterSet('email'))) { + doConfirmUserAccount(getRequestElement('hash')); +} elseif ((isFormSent()) && (isPostRequestElementSet('email'))) { // Resend confirmation link - doResendUserConfirmationLink(postRequestParameter('email')); + doResendUserConfirmationLink(postRequestElement('email')); } else { // No hash found, the guest may want to enter his email address to re-get his confirmation link? loadTemplate('guest_confirm_link'); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 1129585e3b..a55b7b4909 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -60,29 +60,29 @@ $add = ''; if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $userid = getMemberId(); -} elseif ((isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password')) && (isFormSent())) { +} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent())) { // Set userid and crypt password when login data was submitted - if (isNicknameUsed(postRequestParameter('id'))) { + if (isNicknameUsed(postRequestElement('id'))) { // Nickname entered - $userid = SQL_ESCAPE(postRequestParameter('id')); + $userid = SQL_ESCAPE(postRequestElement('id')); } else { // Direct userid entered - $userid = bigintval(postRequestParameter('id')); + $userid = bigintval(postRequestElement('id')); } -} elseif (isPostRequestParameterSet('new_pass')) { +} elseif (isPostRequestElementSet('new_pass')) { // New password requested $userid = NULL; - if (isPostRequestParameterSet('email')) { + if (isPostRequestElementSet('email')) { // Email is set - $userid = SQL_ESCAPE(postRequestParameter('email')); - } elseif (isPostRequestParameterSet('id')) { + $userid = SQL_ESCAPE(postRequestElement('email')); + } elseif (isPostRequestElementSet('id')) { // Do we have nickname or userid? - if (isNicknameUsed(postRequestParameter('id'))) { + if (isNicknameUsed(postRequestElement('id'))) { // Nickname entered - $userid = SQL_ESCAPE(postRequestParameter('id')); + $userid = SQL_ESCAPE(postRequestElement('id')); } else { // Direct userid entered - $userid = bigintval(postRequestParameter('id')); + $userid = bigintval(postRequestElement('id')); } } // END - if } else { @@ -94,21 +94,21 @@ if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { if (isMember()) { // Login immidiately... $url = 'modules.php?module=login'; -} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestParameter('id') . '')) { +} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestElement('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); } elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) - $url = doUserLogin(postRequestParameter('id'), postRequestParameter('password')); -} elseif ((isPostRequestParameterSet('new_pass')) && (isset($userid))) { + $url = doUserLogin(postRequestElement('id'), postRequestElement('password')); +} elseif ((isPostRequestElementSet('new_pass')) && (isset($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) - $errorCode = doNewUserPassword(postRequestParameter('email'), $userid); + $errorCode = doNewUserPassword(postRequestElement('email'), $userid); } // Login problems? -if (isGetRequestParameterSet('login')) { +if (isGetRequestElementSet('login')) { // Use code from URL - $errorCode = getRequestParameter('login'); + $errorCode = getRequestElement('login'); } // END - if // No problems, no output by detault diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 5ea1ecd0ab..1cf1ea0402 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -62,34 +62,34 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { } else { // Do this only if form is sent if (isFormSent()) { - if (postRequestParameter('agree') == '!') { + if (postRequestElement('agree') == '!') { registerOutputFailedMessage('HAVE_TO_AGREE'); } // END - if - if (postRequestParameter('email') == '!') { + if (postRequestElement('email') == '!') { registerOutputFailedMessage('ENTER_EMAIL'); - setPostRequestParameter('email', ''); - } elseif (postRequestParameter('email') == '?') { + setPostRequestElement('email', ''); + } elseif (postRequestElement('email') == '?') { registerOutputFailedMessage('GUEST_EMAIL_IS_ALREADY_REGISTERED'); - setPostRequestParameter('email', ''); + setPostRequestElement('email', ''); } - if (postRequestParameter('surname') == '!') { + if (postRequestElement('surname') == '!') { registerOutputFailedMessage('ENTER_SURNAME'); - setPostRequestParameter('surname', ''); + setPostRequestElement('surname', ''); } // END - if - if (postRequestParameter('family') == '!') { + if (postRequestElement('family') == '!') { registerOutputFailedMessage('ENTER_FAMILY'); - setPostRequestParameter('family', ''); + setPostRequestElement('family', ''); } // END - if - if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) { + if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) { registerOutputFailedMessage('ENTER_BOTH_PASSWORDS'); - } elseif (postRequestParameter('pass1') == '!') { - registerOutputFailedMessage('ENTER_PASS1'); - } elseif (postRequestParameter('pass2') == '!') { - registerOutputFailedMessage('ENTER_PASS2'); + } elseif (postRequestElement('pass1') == '!') { + registerOutputFailedMessage('ENTER_PASSWORD1'); + } elseif (postRequestElement('pass2') == '!') { + registerOutputFailedMessage('ENTER_PASSWORD2'); } if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === true)) { @@ -108,17 +108,14 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { // Generate birthday selection switch (getLanguage()) { case 'de': // German date format - $content['birthday_selection'] = addSelectionBox('day', postRequestParameter('day')).addSelectionBox('month', postRequestParameter('month')).addSelectionBox('year', postRequestParameter('year')); + $content['birthday_selection'] = addSelectionBox('day', postRequestElement('day')).addSelectionBox('month', postRequestElement('month')).addSelectionBox('year', postRequestElement('year')); break; default: // Default is the US date format... :) - $content['birthday_selection'] = addSelectionBox('month', postRequestParameter('month')).addSelectionBox('day', postRequestParameter('day')).addSelectionBox('year', postRequestParameter('year')); + $content['birthday_selection'] = addSelectionBox('month', postRequestElement('month')).addSelectionBox('day', postRequestElement('day')).addSelectionBox('year', postRequestElement('year')); break; } // END - switch - // Adds a table for the guests with all visible categories - $content['category_selection'] = registerGenerateCategoryTable('guest', true); - // Adds maximum receiveable mails list... :) $content['max_receive_list'] = addMaxReceiveList('guest', '', true); @@ -136,13 +133,13 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { // ZIP codes are numerical values $content['zip'] = ''; - if ((isPostRequestParameterSet('zip')) && (postRequestParameter('zip') > 0)) { - $content['zip'] = bigintval(postRequestParameter('zip')); + if ((isPostRequestElementSet('zip')) && (postRequestElement('zip') > 0)) { + $content['zip'] = bigintval(postRequestElement('zip')); } // END - if // Other values foreach (array('gender', 'surname', 'family', 'street_nr', 'city', 'email') as $entry) { - $content[$entry] = SQL_ESCAPE(postRequestParameter($entry)); + $content[$entry] = SQL_ESCAPE(postRequestElement($entry)); } // END - foreach // The admin may see all @@ -153,7 +150,7 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { // Prepare country selection box $OUT = ''; $content['country'] = $OUT; diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index d58af71f6e..6c8726452a 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -52,16 +52,16 @@ if ((!isExtensionActive('sponsor'))) { } $mode = ''; -if (isGetRequestParameterSet('mode')) { +if (isGetRequestElementSet('mode')) { // A "special" mode of the login system was requested - switch (getRequestParameter('mode')) { + switch (getRequestElement('mode')) { case 'activate' : $mode = 'activate'; break; // Activation link requested case 'lost_pass': $mode = 'lost_pass'; break; // Request new password } // END - switch } // END - if // Check if hash for confirmation of email address is given... -if (isGetRequestParameterSet('hash')) { +if (isGetRequestElementSet('hash')) { // Lookup sponsor $result = SQL_QUERY_ESC("SELECT `id`,`status`,`gender`,`surname`,`family`, @@ -75,7 +75,7 @@ WHERE `status`='UNCONFIRMED' OR `status`='EMAIL' ) -LIMIT 1", array(getRequestParameter('hash')), __FILE__, __LINE__); +LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Sponsor found, load his data... $data = SQL_FETCHARRAY($result); @@ -95,7 +95,7 @@ WHERE LIMIT 1", array( bigintval($data['id']), - getRequestParameter('hash') + getRequestElement('hash') ), __FILE__, __LINE__); // Check on success @@ -125,7 +125,7 @@ WHERE `hash`='%s' AND `status`='EMAIL' LIMIT 1", - array(bigintval($data['id']), getRequestParameter('hash')), __FILE__, __LINE__); + array(bigintval($data['id']), getRequestElement('hash')), __FILE__, __LINE__); // Check on success if (!SQL_HASZEROAFFECTED()) { @@ -141,7 +141,7 @@ LIMIT 1", } } else { // No sponsor found - displayMessage('{%message,SPONSOR_ACCOUNT_404=' . getRequestParameter('hash') . '%}'); + displayMessage('{%message,SPONSOR_ACCOUNT_404=' . getRequestElement('hash') . '%}'); } // Free memory @@ -150,7 +150,7 @@ LIMIT 1", // Send activation link again if (isFormSent()) { // Check submitted data - if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok'); + if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); } if (isFormSent()) { @@ -164,7 +164,7 @@ WHERE '%s' REGEXP `email` AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", - array(postRequestParameter('email')), __FILE__, __LINE__); + array(postRequestElement('email')), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -182,7 +182,7 @@ LIMIT 1", // Confirmed email address $message_sponsor = loadEmailTemplate('sponsor_email', $data); } - sendEmail(postRequestParameter('email'), '{--SPONSOR_ACTIVATION_LINK_SUBJECT--}', $message_sponsor); + sendEmail(postRequestElement('email'), '{--SPONSOR_ACTIVATION_LINK_SUBJECT--}', $message_sponsor); // Output message displayMessage('{--SPONSOR_ACTIVATION_LINK_SENT--}'); @@ -201,7 +201,7 @@ LIMIT 1", // Send new password if (isFormSent()) { // Check submitted data - if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok'); + if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); } // END - if if (isFormSent()) { @@ -216,7 +216,7 @@ WHERE `id`=%s AND `status`='CONFIRMED' LIMIT 1", - array(postRequestParameter('email'), bigintval(postRequestParameter('id'))), __FILE__, __LINE__); + array(postRequestElement('email'), bigintval(postRequestElement('id'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -229,7 +229,7 @@ LIMIT 1", // Prepare email and send it to the sponsor $message_sponsor = loadEmailTemplate('sponsor_lost', $content); - sendEmail(postRequestParameter('email'), '{--SPONSOR_LOST_PASSWORD_SUBJECT--}', $message_sponsor); + sendEmail(postRequestElement('email'), '{--SPONSOR_LOST_PASSWORD_SUBJECT--}', $message_sponsor); // Update password SQL_QUERY_ESC("UPDATE @@ -265,8 +265,8 @@ WHERE `password`='%s' LIMIT 1", array( - bigintval(postRequestParameter('sponsor_id')), - md5(postRequestParameter('password')) + bigintval(postRequestElement('sponsor_id')), + md5(postRequestElement('password')) ), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -274,8 +274,8 @@ LIMIT 1", list($status) = SQL_FETCHROW($result); if ($status == 'CONFIRMED') { // Is confirmed so both is fine and we can continue with login procedure - $login = ((setSession('sponsor_id' , bigintval(postRequestParameter('sponsor_id')))) && - (setSession('sponsor_pass', md5(postRequestParameter('password')) )) + $login = ((setSession('sponsor_id' , bigintval(postRequestElement('sponsor_id')))) && + (setSession('sponsor_pass', md5(postRequestElement('password')) )) ); if ($login === true) { diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index ee9d1494dd..06319fc276 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -56,145 +56,145 @@ if (isFormSent()) { // Check submitted form data // // 1. Salutation / Surname / family name - if (!isPostRequestParameterSet('gender')) { + if (!isPostRequestElementSet('gender')) { // Surname is empty $formErrors[] = '{--SPONSOR_NO_GENDER_SELECTED--}'; } // END - if - if (!isPostRequestParameterSet('surname')) { + if (!isPostRequestElementSet('surname')) { // Surname is empty - $formErrors[] = '{--SPONSOR_SURNAME_IS_EMPTY--}'; + $formErrors[] = '{--SPONSOR_SURNAME_EMPTY--}'; } // END - if - if (!isPostRequestParameterSet('family')) { + if (!isPostRequestElementSet('family')) { // Surname is empty - $formErrors[] = '{--SPONSOR_FAMILY_IS_EMPTY--}'; + $formErrors[] = '{--SPONSOR_FAMILY_EMPTY--}'; } // END - if // 2. Company name // 012 3 32 23 4 43 3 4 4321 12 3 32 2 3 3210 - if (((!isPostRequestParameterSet('company')) && ((isPostRequestParameterSet('tax_ident')) || (isPostRequestParameterSet('position')))) || ((isPostRequestParameterSet('company')) && (!isPostRequestParameterSet('tax_ident')))) { - if (!isPostRequestParameterSet('company')) { + if (((!isPostRequestElementSet('company')) && ((isPostRequestElementSet('tax_ident')) || (isPostRequestElementSet('position')))) || ((isPostRequestElementSet('company')) && (!isPostRequestElementSet('tax_ident')))) { + if (!isPostRequestElementSet('company')) { // Company name is empty - $formErrors[] = '{--SPONSOR_COMPANY_IS_EMPTY--}'; - } elseif (!isPostRequestParameterSet('tax_ident')) { + $formErrors[] = '{--SPONSOR_COMPANY_EMPTY--}'; + } elseif (!isPostRequestElementSet('tax_ident')) { // Tax ident number name is empty - $formErrors[] = '{--SPONSOR_TAX_IDENT_IS_EMPTY--}'; + $formErrors[] = '{--SPONSOR_TAX_IDENT_EMPTY--}'; } - if (!isPostRequestParameterSet('position')) { + if (!isPostRequestElementSet('position')) { // Not fatal but not nice: position in company is empty - $formErrors[] = '{--SPONSOR_POSITION_IS_EMPTY--}'; + $formErrors[] = '{--SPONSOR_POSITION_EMPTY--}'; } // END - if } // END - if // 3. Street and number - if (!isPostRequestParameterSet('street_nr1')) { + if (!isPostRequestElementSet('street_nr1')) { // Street name and house number are empty - $formErrors[] = '{--SPONSOR_STREET_NR1_IS_EMPTY--}'; - } elseif ((isPostRequestParameterSet('street_nr2')) && (!isPostRequestParameterSet('street_nr1'))) { + $formErrors[] = '{--SPONSOR_STREET_NR1_EMPTY--}'; + } elseif ((isPostRequestElementSet('street_nr2')) && (!isPostRequestElementSet('street_nr1'))) { // 1st line for street is empty, but 2nd line not - $formErrors[] = '{--SPONSOR_STREET_NR1_IS_EMPTY_2_NOT--}'; + $formErrors[] = '{--SPONSOR_STREET_NR1_EMPTY_2_NOT--}'; } // 4. Country code - if (!isPostRequestParameterSet('country')) { + if (!isPostRequestElementSet('country')) { // Country code is empty - $formErrors[] = '{--kSPONSOR_COUNTRY_IS_EMPTY--}'; - } elseif (strlen(postRequestParameter('country')) != 2) { + $formErrors[] = '{--kSPONSOR_COUNTRY_EMPTY--}'; + } elseif (strlen(postRequestElement('country')) != 2) { // Country code is invalid $formErrors[] = '{--SPONSOR_COUNTRY_IS_INVALID--}'; } // 3. ZIP code - if (!isPostRequestParameterSet('zip')) { + if (!isPostRequestElementSet('zip')) { // ZIP code is empty - $formErrors[] = '{--SPONSOR_ZIP_IS_EMPTY--}'; - } elseif (bigintval(postRequestParameter('zip')) != postRequestParameter('zip')) { + $formErrors[] = '{--SPONSOR_ZIP_EMPTY--}'; + } elseif (bigintval(postRequestElement('zip')) != postRequestElement('zip')) { // ZIP is invalid $formErrors[] = '{--SPONSOR_ZIP_IS_INVALID--}'; - setPostRequestParameter('zip', ''); + setPostRequestElement('zip', ''); } // 4. City - if (!isPostRequestParameterSet('city')) { + if (!isPostRequestElementSet('city')) { // City is empty - $formErrors[] = '{--SPONSOR_CITY_IS_EMPTY--}'; + $formErrors[] = '{--SPONSOR_CITY_EMPTY--}'; } // END - if // 5. Phone number - if (!isPostRequestParameterSet('phone')) { + if (!isPostRequestElementSet('phone')) { // City is empty - $formErrors[] = '{--SPONSOR_PHONE_IS_EMPTY--}'; + $formErrors[] = '{--SPONSOR_PHONE_EMPTY--}'; } // END - if // 6. Homepage URL - if (!isPostRequestParameterSet('url')) { + if (!isPostRequestElementSet('url')) { // Homepage URL is empty - $formErrors[] = '{--SPONSOR_URL_IS_EMPTY--}'; - } elseif (!isUrlValid(postRequestParameter('url'))) { + $formErrors[] = '{--SPONSOR_URL_EMPTY--}'; + } elseif (!isUrlValid(postRequestElement('url'))) { // Homepage URL is invalid $formErrors[] = '{--SPONSOR_URL_IS_INVALID--}'; - setPostRequestParameter('url', ''); + setPostRequestElement('url', ''); } // 7. Light validation of email address - if ((!isPostRequestParameterSet('email')) || (postRequestParameter('email') == '@')) { + if ((!isPostRequestElementSet('email')) || (postRequestElement('email') == '@')) { // Email is invalid/empty $formErrors[] = '{--SPONSOR_EMAIL_IS_INVALID--}'; - } elseif (isSponsorRegisteredWithEmail(postRequestParameter('email'))) { + } elseif (isSponsorRegisteredWithEmail(postRequestElement('email'))) { // Email already found in database! $formErrors[] = '{--SPONSOR_EMAIL_IS_ALREADY_REGISTERED--}'; - setPostRequestParameter('email', ''); + setPostRequestElement('email', ''); } // 8. Pay type selected? - if (!isPostRequestParameterSet('pay_type')) { + if (!isPostRequestElementSet('pay_type')) { // Not pay type selected $formErrors[] = '{--SPONSOR_NO_PAYTYPE_SELECTED--}'; } // END - if // 9. Interval of mails - if (!isPostRequestParameterSet('warning_interval')) { + if (!isPostRequestElementSet('warning_interval')) { // No warning interval selected $formErrors[] = '{--SPONSOR_NO_WARNING_INTERVAL_SELECTED--}'; } // END - if // 10. Mail notifications disabled/enabled - if (!isPostRequestParameterSet('receive_warnings')) { + if (!isPostRequestElementSet('receive_warnings')) { // Option not selected! $formErrors[] = '{--SPONSOR_NO_RECEIVE_WARNINGS_SELECTED--}'; } // END - if // Did he enter his password twice? - if (((!isPostRequestParameterSet('pass1')) || (!isPostRequestParameterSet('pass2'))) || ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')))) { - if ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2'))) { + if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { + if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { // Passwords missmatch $formErrors[] = '{--SPONSOR_PASSWORDS_MISMATCH--}'; } else { - if (!isPostRequestParameterSet('pass1')) { + if (!isPostRequestElementSet('pass1')) { // Password 1 is empty $formErrors[] = '{--SPONSOR_PASSWORD1_EMPTY--}'; } - if (!isPostRequestParameterSet('pass2')) { + if (!isPostRequestElementSet('pass2')) { // Password 2 is empty $formErrors[] = '{--SPONSOR_PASSWORD2_EMPTY--}'; } } - } elseif (strlen(postRequestParameter('pass1')) < getPassLen()) { + } elseif (strlen(postRequestElement('pass1')) < getPassLen()) { // Password is to short! $formErrors[] = '{--SPONSOR_PASSWORD_TOO_SHORT--}'; } // Check if he has accepted the terms&conditions - if (!isPostRequestParameterSet('terms')) { + if (!isPostRequestElementSet('terms')) { // Homepage URL is empty $formErrors[] = '{--SPONSOR_TERMS_NOT_ACCEPTED--}'; } // END - if // If there is something wrong/missing stop registration - if (count($formErrors) > 0) unsetPostRequestParameter('ok'); + if (count($formErrors) > 0) unsetPostRequestElement('ok'); } // END - if if ((isFormSent()) && (count($formErrors) == 0)) { @@ -205,24 +205,26 @@ if ((isFormSent()) && (count($formErrors) == 0)) { ); // Calulate points - $result = SQL_QUERY_ESC("SELECT - (`pay_rate` * `pay_min_count`) AS `points`,`pay_min_count`,`pay_currency` + $result = SQL_QUERY_ESC('SELECT + (`pay_rate` * `pay_min_count`) AS `points`, + `pay_min_count`, + `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s -LIMIT 1", - array(postRequestParameter('pay_type')), __FILE__, __LINE__); +LIMIT 1', + array(postRequestElement('pay_type')), __FILE__, __LINE__); list($points, $pay, $curr) = SQL_FETCHROW($result); // Free memory SQL_FREERESULT($result); // Add points to array - postRequestParameter('points_amount', $points); - postRequestParameter('points_used' , '0.00000'); - postRequestParameter('last_payment' , $pay); - postRequestParameter('last_currency', $curr); + postRequestElement('points_amount', $points); + postRequestElement('points_used' , '0.00000'); + postRequestElement('last_payment' , $pay); + postRequestElement('last_currency', $curr); // Register sponsor but never ever update here! $message = doProcessSponsorFormRequest($messageArray); @@ -260,7 +262,7 @@ ORDER BY if (count($formErrors) > 0) { // Some found... :-( foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fax','cell','email','url') as $entry) { - $content[$entry] = postRequestParameter($entry); + $content[$entry] = postRequestElement($entry); } // END - foreach // Init receive selection @@ -268,7 +270,7 @@ ORDER BY $content['receive_warnings_n'] = ''; // Check for receive_warnings - $content['receive_warnings_' . strtolower(postRequestParameter('receive_warnings'))] = ' selected="selected"'; + $content['receive_warnings_' . strtolower(postRequestElement('receive_warnings'))] = ' selected="selected"'; $OUT = ''; // Errors found? @@ -288,9 +290,9 @@ ORDER BY $content['refid'] = 0; // Is the referal id valid? - if ((isPostRequestParameterSet('refid')) && (isValidUserId(postRequestParameter('refid')))) { + if ((isPostRequestElementSet('refid')) && (isValidUserId(postRequestElement('refid')))) { // Transfer referal id - $content['refid'] = bigintval(postRequestParameter('refid')); + $content['refid'] = bigintval(postRequestElement('refid')); } // END - if } // END - if @@ -298,7 +300,7 @@ ORDER BY loadTemplate('guest_sponsor_reg', false, $content); } else { // Nothing added so far - displayMessage('{--SPONSOR_PAYMENT_LIST_IS_EMPTY--}'); + displayMessage('{--SPONSOR_PAYMENT_LIST_EMPTY--}'); } // Free memory diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index 944337f45c..e2378951f3 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -50,14 +50,14 @@ if ((!isExtensionActive('user')) && (!isAdmin())) { } // END - if // Determine which stats we want and set mode and title for the link below stats block -if (!isGetRequestParameterSet('mode')) { - setGetRequestParameter('mode', strtolower(getConfig('guest_stats'))); +if (!isGetRequestElementSet('mode')) { + setGetRequestElement('mode', strtolower(getConfig('guest_stats'))); } // END - if // Set config temporarily -setConfigEntry('guest_stats', strtoupper(getRequestParameter('mode'))); +setConfigEntry('guest_stats', strtoupper(getRequestElement('mode'))); -switch (getRequestParameter('mode')) { +switch (getRequestElement('mode')) { case 'members' : $lmode = 'modules'; break; @@ -72,7 +72,7 @@ switch (getRequestParameter('mode')) { default: // Unsupported mode - debug_report_bug(__FILE__, __LINE__, sprintf("Unsupported mode %s detected.", secureString(getRequestParameter('mode')))); + debug_report_bug(__FILE__, __LINE__, sprintf("Unsupported mode %s detected.", secureString(getRequestElement('mode')))); break; } diff --git a/inc/modules/loader.php b/inc/modules/loader.php index dfcae4e7c6..3bc8c46d82 100644 --- a/inc/modules/loader.php +++ b/inc/modules/loader.php @@ -41,9 +41,9 @@ if (!defined('__SECURITY')) { } // END - if // Is an URL specified? -if (isGetRequestParameterSet('url')) { +if (isGetRequestElementSet('url')) { // Decode URL - $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestParameter('url'))))); + $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); // Validate the URL if (isUrlValid($url)) { diff --git a/inc/modules/member/what-book_surfbar.php b/inc/modules/member/what-book_surfbar.php index ff0f6c78ac..63ee0ceda2 100644 --- a/inc/modules/member/what-book_surfbar.php +++ b/inc/modules/member/what-book_surfbar.php @@ -55,18 +55,18 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) { if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more URLs allowed to book! displayMessage('{--MEMBER_SURFBAR_NO_MORE_ALLOWED--}'); -} elseif ((isFormSent()) && (isPostRequestParameterSet('limited'))) { +} elseif ((isFormSent()) && (isPostRequestElementSet('limited'))) { // Is limitation "no" and "limit" is > 0? - if (postRequestParameter('limited') == 'N') { + if (postRequestElement('limited') == 'N') { // Set it to unlimited - setPostRequestParameter('limit', 0); + setPostRequestElement('limit', 0); } // END - if // By default something went wrong $message = '{--MEMBER_SURFBAR_URL_NOT_ADDED--}'; // Register the new URL - $insertId = SURFBAR_MEMBER_ADD_URL(postRequestParameter('url'), postRequestParameter('limit')); + $insertId = SURFBAR_MEMBER_ADD_URL(postRequestElement('url'), postRequestElement('limit')); // Was this fine? if ($insertId > 0) { diff --git a/inc/modules/member/what-cash_coupon.php b/inc/modules/member/what-cash_coupon.php index 925b0587a5..ca5d409786 100644 --- a/inc/modules/member/what-cash_coupon.php +++ b/inc/modules/member/what-cash_coupon.php @@ -54,7 +54,7 @@ if ((!isExtensionActive('coupon')) && (!isAdmin())) { // Is the form sent? if (isFormSent()) { // Is the coupon code entered? - if (isPostRequestParameterSet('coupon_code')) { + if (isPostRequestElementSet('coupon_code')) { // Search for the coupon $result = SQL_QUERY_ESC("SELECT c.`coupon_id`, @@ -80,7 +80,7 @@ WHERE UNIX_TIMESTAMP(d.`coupon_expired`) > UNIX_TIMESTAMP() LIMIT 1", array( - postRequestParameter('coupon_code'), + postRequestElement('coupon_code'), getMemberId() ), __FILE__, __LINE__); @@ -103,7 +103,7 @@ WHERE `userid`=%s LIMIT 1", array( - postRequestParameter('coupon_code'), + postRequestElement('coupon_code'), getMemberId() ), __FILE__, __LINE__); diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 026a0e6a6f..8c9113bb60 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -56,12 +56,12 @@ if (!SQL_HASZERONUMS($result)) { $LEAST = false; if (isFormSent()) { $count = '0'; - foreach (postRequestParameter('cat') as $categoryId => $joined) { + foreach (postRequestElement('cat') as $categoryId => $joined) { if ($joined != 'Y') $count++; } // END - foreach if ((SQL_NUMROWS($result) - $count) < getLeastCats()) { - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); $LEAST = true; } // END - if } // END - if @@ -72,7 +72,7 @@ if (!SQL_HASZERONUMS($result)) { $count = '0'; // Go through all entries - foreach (postRequestParameter('cat') as $categoryId => $joined) { + foreach (postRequestElement('cat') as $categoryId => $joined) { // Ini sql here $sql = ''; @@ -136,9 +136,9 @@ if (!SQL_HASZERONUMS($result)) { $content['jy'] = ''; // When we found an entry don't read it, just change the jx elements - if ((isFormSent()) && (isPostRequestParameterSet('cat'))) { + if ((isFormSent()) && (isPostRequestElementSet('cat'))) { // Form sent? - if (postRequestParameter('cat', $content['id']) =='Y') { + if (postRequestElement('cat', $content['id']) =='Y') { $content['jy'] = ' checked="checked"'; $content['jn'] = ''; } // END - if diff --git a/inc/modules/member/what-earnings.php b/inc/modules/member/what-earnings.php index 4e651427a6..3842cd7709 100644 --- a/inc/modules/member/what-earnings.php +++ b/inc/modules/member/what-earnings.php @@ -45,5 +45,67 @@ if (!defined('__SECURITY')) { // Add description as navigation point addYouAreHereLink('member', __FILE__); +// Is the form sent? +if (isFormSent()) { + // Then handle the extra earning request + doMemberEarning( + postRequestElement('earning_id'), + postRequestElement('earning_daily_amount'), + postRequestElement('earning_active') + ); +} // END - if + +// Check for all earnings +$result = SQL_QUERY_ESC('SELECT + d.`earning_id`, + d.`earning_group`, + d.`earning_name`, + u.`earning_active`, + UNIX_TIMESTAMP(u.`earning_added`) AS `earning_added`, + UNIX_TIMESTAMP(u.`earning_cancelled`) AS `earning_cancelled`, + u.`earning_daily_amount`, + u.`earning_points` +FROM + `{?_MYSQL_PREFIX?}_earning_data` AS d +LEFT JOIN + `{?_MYSQL_PREFIX?}_user_earning` AS u +ON + d.`earning_id`=u.`earning_id` +WHERE + u.`earning_userid` IS NULL OR + u.`earning_userid`=%s +ORDER BY + d.`earning_sorting` ASC', + array( + getMemberId() + ), __FILE__, __LINE__); + +// Do we have entries? +if (SQL_NUMROWS($result) > 0) { + // Init output + $OUT = ''; + + // List all entries + while ($content = SQL_FETCHARRAY($result)) { + // Do we have user_earning data available? + if (is_null($content['earning_active'])) { + // Load row template "open subscription" + $OUT .= loadTemplate('member_earning_' . strtolower($content['earning_group']) . '_form_row', true, $content); + } else { + // Load row template "already subscribed" + $OUT .= loadTemplate('member_earning_' . strtolower($content['earning_group']) . '_row', true, $content); + } + } // END - while + + // Load main template + loadTemplate('member_earning', false, $OUT); +} else { + // Display message + displayMessage('{--MEMBER_EARNINGS_404--}'); +} + +// Free result +SQL_FREERESULT($result); + // [EOF] ?> diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index dd7c7a5731..082004c4d9 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -86,8 +86,8 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { if ((($content['timestamp'] + getConfig('holiday_lock')) > time()) || (($content['timestamp_ordered'] + getConfig('holiday_lock')) > time())) { // Mail order is to close away! - unsetPostRequestParameter('ok'); - unsetPostRequestParameter('stop'); + unsetPostRequestElement('ok'); + unsetPostRequestElement('stop'); if (($content['timestamp'] + getConfig('holiday_lock')) > time()) { // Mail found in pool @@ -109,18 +109,18 @@ SQL_FREERESULT($result2); if (isFormSent()) { // Check holiday request... - $START = mktime(0, 0, 0, postRequestParameter('start_month'), postRequestParameter('start_day'), postRequestParameter('start_year')); - $content['holiday_end'] = mktime(0, 0, 0, postRequestParameter('end_month') , postRequestParameter('end_day') , postRequestParameter('end_year') ); + $START = mktime(0, 0, 0, postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); + $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); // Test both values $TEST = $content['holiday_end'] - $START; if (($TEST < 0) || ($TEST > (getOneDay() * getConfig('holiday_max'))) || ($START < time()) || ($content['holiday_end'] < time())) { // Time test failed - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } else { // Everything went okay so let's store his request and send mails SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`,`holiday_start`,`holiday_end`,`comments`) VALUES ('%s','%s','%s','%s')", - array(getMemberId(), $START, $content['holiday_end'], postRequestParameter('comments')), __FILE__, __LINE__); + array(getMemberId(), $START, $content['holiday_end'], postRequestElement('comments')), __FILE__, __LINE__); // Activate holiday system SQL_QUERY_ESC("UPDATE @@ -133,13 +133,13 @@ LIMIT 1", array(getMemberId()), __FILE__, __LINE__); // Prepare constants - $content['start_day'] = bigintval(postRequestParameter('start_day')); - $content['start_month'] = $GLOBALS['month_descr'][postRequestParameter('start_month')]; - $content['start_year'] = bigintval(postRequestParameter('start_year')); - $content['end_day'] = bigintval(postRequestParameter('end_day')); - $content['end_month'] = $GLOBALS['month_descr'][postRequestParameter('end_month')]; - $content['end_year'] = bigintval(postRequestParameter('end_year')); - $content['comments'] = postRequestParameter('comments'); + $content['start_day'] = bigintval(postRequestElement('start_day')); + $content['start_month'] = $GLOBALS['month_descr'][postRequestElement('start_month')]; + $content['start_year'] = bigintval(postRequestElement('start_year')); + $content['end_day'] = bigintval(postRequestElement('end_day')); + $content['end_month'] = $GLOBALS['month_descr'][postRequestElement('end_month')]; + $content['end_year'] = bigintval(postRequestElement('end_year')); + $content['comments'] = postRequestElement('comments'); // Send mail to member $message = loadEmailTemplate('member_holiday_request', $content, getMemberId()); @@ -157,7 +157,7 @@ LIMIT 1", } // END - if // Holiday shall be ended now -if (isPostRequestParameterSet('stop')) { +if (isPostRequestElementSet('stop')) { // Okay, end the holiday here... $result = SQL_QUERY_ESC("SELECT `holiday_active`,`holiday_activated` @@ -233,7 +233,7 @@ LIMIT 1", } // END - if // If something is wrong or link in menu is just clicked display form -if ((!isFormSent()) && (!isPostRequestParameterSet('stop'))) { +if ((!isFormSent()) && (!isPostRequestElementSet('stop'))) { // Check if user is in holiday... $result = SQL_QUERY_ESC("SELECT `holiday_active`,`holiday_activated` diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index aec4b2c5f9..23526ffd18 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -54,7 +54,7 @@ if ((!isExtensionActive('html_mail')) && (!isAdmin())) { if (isFormSent()) { // Save settings SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1", - array(postRequestParameter('html'), getMemberId()), __FILE__, __LINE__); + array(postRequestElement('html'), getMemberId()), __FILE__, __LINE__); displayMessage('{--MEMBER_SETTINGS_SAVED--}'); } else { // Prepare it diff --git a/inc/modules/member/what-list_surfbar.php b/inc/modules/member/what-list_surfbar.php index 13175c5319..9955f44c16 100644 --- a/inc/modules/member/what-list_surfbar.php +++ b/inc/modules/member/what-list_surfbar.php @@ -54,11 +54,11 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) { $urlArray = SURFBAR_GET_USER_URLS(); // Are there entries or form is submitted? -if ((isFormSent()) && (isPostRequestParameterSet('action')) && (isPostRequestParameterSet('id'))) { +if ((isFormSent()) && (isPostRequestElementSet('action')) && (isPostRequestElementSet('id'))) { // Process the form if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $urlArray)) { // Action performed but shall we display it? - if (((postRequestParameter('action') != 'edit') && (postRequestParameter('action') != 'delete')) || (isPostRequestParameterSet('execute'))) { + if (((postRequestElement('action') != 'edit') && (postRequestElement('action') != 'delete')) || (isPostRequestElementSet('execute'))) { // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed displayMessage('{--MEMBER_SURFBAR_ACTION_DONE--}'); } // END - if diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index fc0d0f8d50..2e15c02dad 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -58,9 +58,9 @@ $url = ''; // Detect what the member wants to do $mode = 'show'; // Show his data -if (isPostRequestParameterSet('save')) $mode = 'save'; // Save entered data +if (isPostRequestElementSet('save')) $mode = 'save'; // Save entered data if (isFormSent('edit')) $mode = 'edit'; // Edit data -if (isPostRequestParameterSet('notify')) $mode = 'notify'; // Switch off notification +if (isPostRequestElementSet('notify')) $mode = 'notify'; // Switch off notification switch ($mode) { case 'show': // Show his data @@ -162,10 +162,12 @@ LIMIT 1", $content['max_receive_list'] = addMaxReceiveList('member', $content['max_mails'], true); if (isExtensionActive('country')) { - // Generate selection box - $OUT = ''; $OUT .= generateOptionList('countries', 'id', 'descr', $content['country_code'], 'code', $whereStatement); $OUT .= ''; $content['country'] = $OUT; @@ -192,16 +194,16 @@ LIMIT 1", $content['update_check'] = generateDateTime($content['update_check'] + getProfileLock(), 0); displayMessage($content['update_check']); - } elseif ((!isEmailValid(postRequestParameter('email'))) && (!isAdmin())) { + } elseif ((!isEmailValid(postRequestElement('email'))) && (!isAdmin())) { // Invalid email address! displayMessage('{--INVALID_EMAIL_ENTERED--}'); - } elseif ((isEmailTaken(postRequestParameter('email'))) && (isCheckDoubleEmailEnabled()) && (!isAdmin())) { + } elseif ((isEmailTaken(postRequestElement('email'))) && (isCheckDoubleEmailEnabled()) && (!isAdmin())) { // Email address is already registered displayMessage('{--MEMBER_EMAIL_IS_ALREADY_REGISTERED--}'); } else { // Generate hash - $hash = generateHash(postRequestParameter('pass1'), substr($content['password'], 0, -40)); - if ((($hash == $content['password']) || (postRequestParameter('pass1') == postRequestParameter('pass2'))) && (isPostRequestParameterSet('pass1'))) { + $hash = generateHash(postRequestElement('pass1'), substr($content['password'], 0, -40)); + if ((($hash == $content['password']) || (postRequestElement('pass1') == postRequestElement('pass2'))) && (isPostRequestElementSet('pass1'))) { // Only on simple changes normal mode is active = no email or password changed $mode = 'normal'; $AND = ''; @@ -213,14 +215,14 @@ LIMIT 1", } // END - if // Or did he changed his password? - if (postRequestParameter('email') != $content['email']) { + if (postRequestElement('email') != $content['email']) { // Jupp if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ';email'; } - setPostRequestParameter('old_email', $content['email']); + setPostRequestElement('old_email', $content['email']); } // END - if // Update member's profile @@ -242,18 +244,18 @@ WHERE `userid`=%s LIMIT 1", array( - postRequestParameter('gender'), - postRequestParameter('surname'), - postRequestParameter('family'), - postRequestParameter('street_nr'), - bigintval(postRequestParameter('country_code')), - bigintval(postRequestParameter('zip')), - postRequestParameter('city'), - postRequestParameter('email'), - bigintval(postRequestParameter('day')), - bigintval(postRequestParameter('month')), - bigintval(postRequestParameter('year')), - bigintval(postRequestParameter('max_mails')), + postRequestElement('gender'), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + bigintval(postRequestElement('country_code')), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(postRequestElement('day')), + bigintval(postRequestElement('month')), + bigintval(postRequestElement('year')), + bigintval(postRequestElement('max_mails')), getMemberId() ), __FILE__, __LINE__); } else { @@ -274,18 +276,18 @@ WHERE `userid`=%s LIMIT 1", array( - postRequestParameter('gender'), - postRequestParameter('surname'), - postRequestParameter('family'), - postRequestParameter('street_nr'), - postRequestParameter('cntry'), - bigintval(postRequestParameter('zip')), - postRequestParameter('city'), - postRequestParameter('email'), - bigintval(postRequestParameter('day')), - bigintval(postRequestParameter('month')), - bigintval(postRequestParameter('year')), - bigintval(postRequestParameter('max_mails')), + postRequestElement('gender'), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + postRequestElement('cntry'), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(postRequestElement('day')), + bigintval(postRequestElement('month')), + bigintval(postRequestElement('year')), + bigintval(postRequestElement('max_mails')), getMemberId() ), __FILE__, __LINE__); } diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index c8aa1b0d90..c4fb3d7a4b 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -54,11 +54,11 @@ $isValid = false; if (isFormSent()) { // Nickname was submitted so let's check if it is not already in use - if (isPostRequestParameterSet('nickname')) { + if (isPostRequestElementSet('nickname')) { // Check if nickname is valid - if (preg_match('/[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}/', postRequestParameter('nickname'), $array)) { + if (preg_match('/[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}/', postRequestElement('nickname'), $array)) { // Entered nickname is valid? - $isValid = (($array[0] == postRequestParameter('nickname')) && (isNicknameUsed(postRequestParameter('nickname')))); + $isValid = (($array[0] == postRequestElement('nickname')) && (isNicknameUsed(postRequestElement('nickname')))); } // END - if } // END - if } // END - if @@ -69,19 +69,19 @@ 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(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); // Is it not in use? if (SQL_HASZERONUMS($result)) { // 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(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); // Prepare array $filterData = array( 'history_subject' => 'NICKNAME_CHANGED', 'history_userid' => getMemberId(), - 'history_value' => postRequestParameter('nickname') + 'history_value' => postRequestElement('nickname') ); // Run filter chain @@ -98,7 +98,7 @@ if ($isValid === true) { displayMessage($content); } else { // Do we have already submit the form? - if (isPostRequestParameterSet('nickname')) { + if (isPostRequestElementSet('nickname')) { loadTemplate('admin_settings_unsaved', false, '{--MEMBER_NICKNAME_IS_INVALID--}'); } // END - if diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index eedeef39b2..282e85d8f8 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -59,7 +59,7 @@ $total = getTotalPoints(getMemberId()); if ((isExtensionInstalledAndNewer('holiday', '0.1.3')) && (isUserDataEnabled('holiday_active'))) { // Holiday is active! displayMessage('{--MEMBER_HOLIDAY_ORDER_NOT_POSSIBLE--}'); -} elseif ((isPostRequestParameterSet('frametester')) && ($ALLOWED > 0) && (postRequestParameter('receiver') > 0)) { +} elseif ((isPostRequestElementSet('frametester')) && ($ALLOWED > 0) && (postRequestElement('receiver') > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // // First we would like to store the data and get it's pool position back... @@ -73,7 +73,7 @@ WHERE LIMIT 1", array( getMemberId(), - postRequestParameter('url') + postRequestElement('url') ), __FILE__, __LINE__); $type = 'TEMP'; $id = '0'; @@ -92,13 +92,13 @@ LIMIT 1", $url = ''; if (getConfig('allow_url_in_text') == 'Y') { // Test submitted text against some filters (length, URLs in text etc.) - if ((isInStringIgnoreCase('https://', postRequestParameter('text'))) || (isInStringIgnoreCase('http://', postRequestParameter('text'))) || (isInStringIgnoreCase('www', postRequestParameter('text')))) { + if ((isInStringIgnoreCase('https://', postRequestElement('text'))) || (isInStringIgnoreCase('http://', postRequestElement('text'))) || (isInStringIgnoreCase('www', postRequestElement('text')))) { // URL found $url = 'modules.php?module=login&what=order&code=' . getCode('URL_FOUND'); } // END - if // Remove new-line and carriage-return characters - $TEST = str_replace("\n", '', str_replace("\r", '', postRequestParameter('text'))); + $TEST = str_replace("\n", '', str_replace("\r", '', postRequestElement('text'))); // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { @@ -110,8 +110,8 @@ LIMIT 1", // Shall I test the subject line against URLs? if (getConfig('allow_url_in_subject') == 'Y') { // Check the subject line for issues - setPostRequestParameter('subject', str_replace("\\", '[nl]', substr(postRequestParameter('subject'), 0, 200))); - if ((isInStringIgnoreCase('https://', postRequestParameter('subject'))) || (isInStringIgnoreCase('http://', postRequestParameter('subject'))) || (isInStringIgnoreCase('www', postRequestParameter('subject')))) { + setPostRequestElement('subject', str_replace("\\", '[nl]', substr(postRequestElement('subject'), 0, 200))); + if ((isInStringIgnoreCase('https://', postRequestElement('subject'))) || (isInStringIgnoreCase('http://', postRequestElement('subject'))) || (isInStringIgnoreCase('www', postRequestElement('subject')))) { // URL in subject found $url = 'modules.php?module=login&what=order&code=' . getCode('SUBJECT_URL'); } // END - if @@ -121,7 +121,7 @@ LIMIT 1", if (isUrlBlacklistEnabled()) { // Ok, I do that for you know... $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1", - array(postRequestParameter('url')), __FILE__, __LINE__); + array(postRequestElement('url')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Jupp, we got one listed @@ -136,13 +136,13 @@ LIMIT 1", } // END - if // Enougth receivers entered? - if ((postRequestParameter('receiver') < getConfig('order_min')) && (!isAdmin())) { + if ((postRequestElement('receiver') < getConfig('order_min')) && (!isAdmin())) { // Less than allowed receivers entered! $url = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS3'); } // END - if // Validate URL - if (!isUrlValid(postRequestParameter('url'))) { + if (!isUrlValid(postRequestElement('url'))) { // URL is invalid! $url = 'modules.php?module=login&what=order&code=' . getCode('INVALID_URL'); } // END - if @@ -150,20 +150,20 @@ LIMIT 1", // Probe for HTML extension if (isExtensionActive('html_mail')) { // HTML or regular text mail? - if (postRequestParameter('html') == 'Y') { + if (postRequestElement('html') == 'Y') { // Chek for valid HTML tags - setPostRequestParameter('text', checkHtmlTags(postRequestParameter('text'))); + setPostRequestElement('text', checkHtmlTags(postRequestElement('text'))); // Maybe invalid tags found? - if (!isPostRequestParameterSet('text')) $url = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; + if (!isPostRequestElementSet('text')) $url = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; } else { // Remove any HTML code - setPostRequestParameter('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestParameter('text')))); + setPostRequestElement('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestElement('text')))); } } // END - if // Is mail type set? - if ((!isPostRequestParameterSet('mail_type')) || (postRequestParameter('mail_type') < 1)) { + if ((!isPostRequestElementSet('mail_type')) || (postRequestElement('mail_type') < 1)) { // Not correctly set $url = 'modules.php?module=login&what=order&code=' . getCode('NO_MAIL_TYPE'); } // END - if @@ -176,10 +176,10 @@ LIMIT 1", if (empty($url)) { // Check if category and number of receivers is okay $add = ''; - if ((isOrderMultiPageEnabled()) && (isPostRequestParameterSet('zip')) && (postRequestParameter('zip') != '')) { + if ((isOrderMultiPageEnabled()) && (isPostRequestElementSet('zip')) && (postRequestElement('zip') != '')) { // Choose recipients by ZIP code $add = sprintf(" AND d.zip LIKE '%s%%'", - bigintval(postRequestParameter('zip')) + bigintval(postRequestElement('zip')) ); } // END - if @@ -201,12 +201,12 @@ WHERE ORDER BY d.{?order_select?} {?order_mode?}", array( - bigintval(postRequestParameter('cat')), + bigintval(postRequestElement('cat')), getMemberId() ), __FILE__, __LINE__); // Do we enougth receivers left? - if (SQL_NUMROWS($result) >= postRequestParameter('receiver')) { + if (SQL_NUMROWS($result) >= postRequestElement('receiver')) { // Load receivers from database $TEST = array(); $count = '0'; while ($holidayContent = SQL_FETCHARRAY($result)) { @@ -255,16 +255,16 @@ LIMIT 1", ), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it - if ($content['target_send'] > postRequestParameter('receiver')) { - $content['target_send'] = bigintval(postRequestParameter('receiver')); + if ($content['target_send'] > postRequestElement('receiver')) { + $content['target_send'] = bigintval(postRequestElement('receiver')); } // END - if // Calculate used points - $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestParameter('mail_type'))); + $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('mail_type'))); // Fix empty zip code - if (!isPostRequestParameterSet('zip')) { - setPostRequestParameter('zip', 0); + if (!isPostRequestElementSet('zip')) { + setPostRequestElement('zip', 0); } // END - if // Check if he has enougth points for this order and selected more than 0 receivers @@ -306,15 +306,15 @@ LIMIT 1", )", array( getMemberId(), - postRequestParameter('subject'), - postRequestParameter('text'), + postRequestElement('subject'), + postRequestElement('text'), $receiver, - bigintval(postRequestParameter('mail_type')), - postRequestParameter('url'), - bigintval(postRequestParameter('cat')), + bigintval(postRequestElement('mail_type')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), bigintval($content['target_send']), - bigintval(postRequestParameter('zip'), true, false), - postRequestParameter('html') + bigintval(postRequestElement('zip'), true, false), + postRequestElement('html') ), __FILE__, __LINE__); } else { // No HTML extension is active @@ -347,14 +347,14 @@ LIMIT 1", )", array( getMemberId(), - postRequestParameter('subject'), - postRequestParameter('text'), + postRequestElement('subject'), + postRequestElement('text'), $receiver, - bigintval(postRequestParameter('mail_type')), - postRequestParameter('url'), - bigintval(postRequestParameter('cat')), + bigintval(postRequestElement('mail_type')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), bigintval($content['target_send']), - bigintval(postRequestParameter('zip'), true, false), + bigintval(postRequestElement('zip'), true, false), ), __FILE__, __LINE__); } } else { @@ -378,15 +378,15 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('subject'), - postRequestParameter('text'), + postRequestElement('subject'), + postRequestElement('text'), $receiver, - bigintval(postRequestParameter('mail_type')), - postRequestParameter('url'), - bigintval(postRequestParameter('cat')), + bigintval(postRequestElement('mail_type')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), $content['target_send'], - bigintval(postRequestParameter('zip')), - postRequestParameter('html'), + bigintval(postRequestElement('zip')), + postRequestElement('html'), bigintval($id) ), __FILE__, __LINE__); } else { @@ -407,14 +407,14 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('subject'), - postRequestParameter('text'), + postRequestElement('subject'), + postRequestElement('text'), $receiver, - bigintval(postRequestParameter('mail_type')), - postRequestParameter('url'), - bigintval(postRequestParameter('cat')), + bigintval(postRequestElement('mail_type')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), $content['target_send'], - bigintval(postRequestParameter('zip')), + bigintval(postRequestElement('zip')), bigintval($id) ), __FILE__, __LINE__); } @@ -426,8 +426,8 @@ LIMIT 1", $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( getMemberId(), - postRequestParameter('subject'), - bigintval(postRequestParameter('mail_type')) + postRequestElement('subject'), + bigintval(postRequestElement('mail_type')) ), __FILE__, __LINE__); // Get pool id @@ -451,7 +451,7 @@ LIMIT 1", $url = 'modules.php?module=login&what=order&code=' . getCode('NO_RECS_LEFT'); } } // END - if -} elseif (postRequestParameter('receiver') == '0') { +} elseif (postRequestElement('receiver') == '0') { // Not enougth receivers selected $url = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1'); } elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) { @@ -484,7 +484,7 @@ ORDER BY // Enable HTML checking // @TODO Rewrite this to a filter $HTML = ''; $HOL_STRING = ''; - if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) { + if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) { $HTML = " AND `html`='Y'"; } // END - if if (isExtensionInstalledAndNewer('holiday', '0.1.3')) { @@ -540,10 +540,10 @@ LIMIT 1", $result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s".$HTML." AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestParameterSet('zip')) && (isOrderMultiPageEnabled())) { + if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestElementSet('zip')) && (isOrderMultiPageEnabled())) { // Get zip code list($zip) = SQL_FETCHROW($result_ver); - if (substr($zip, 0, strlen(postRequestParameter('zip'))) == postRequestParameter('zip')) { + if (substr($zip, 0, strlen(postRequestElement('zip'))) == postRequestElement('zip')) { // Ok, ZIP code part is found $userid_cnt++; } // END - if @@ -571,7 +571,7 @@ LIMIT 1", $types = array(); if (!SQL_HASZERONUMS($result)) { // Check for message id in URL - $message = getMessageFromErrorCode(getRequestParameter('code')); + $message = getMessageFromErrorCode(getRequestElement('code')); if (!empty($message)) { // We got system message so we drop it out to the user @@ -648,13 +648,13 @@ LIMIT 1", // Free result SQL_FREERESULT($result); - if ((isPostRequestParameterSet('data')) || ((getOrderMultiPage() != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) { + if ((isPostRequestElementSet('data')) || ((getOrderMultiPage() != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) { // Pre-output categories $content['category_selection'] = ''; foreach ($categories['id'] as $key => $value) { $content['category_selection'] .= ' '; } // END - foreach // Mail type @@ -671,13 +671,13 @@ LIMIT 1", // No content is default $content['zip_content'] = ''; - if (isPostRequestParameterSet('zip')) { + if (isPostRequestElementSet('zip')) { // Output entered ZIP code - $content['zip_content'] = loadTemplate('member_order-zip2', true, postRequestParameter('zip')); + $content['zip_content'] = loadTemplate('member_order-zip2', true, postRequestElement('zip')); } // END - if // HTML extension - if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) { + if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) { // Extension is active so output valid HTML tags $content['html_extension'] = loadTemplate('member_order-html_ext', true, addValidHtmlTags()); } else { @@ -703,9 +703,9 @@ LIMIT 1", // Do we want ZIP code or not? if ((isOrderMultiPageEnabled()) || (isAdmin())) { // Yes - if (postRequestParameter('zip') > 0) { + if (postRequestElement('zip') > 0) { $data = array( - 'zip' => bigintval(postRequestParameter('zip')) + 'zip' => bigintval(postRequestElement('zip')) ); } else { $data = array( diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 8db1add8ee..e25a83acae 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -55,7 +55,7 @@ if ((!isExtensionActive('payout')) && (!isAdmin())) { // Translate point into comma $payoutPoints = getPayoutPoints(getMemberId()); -if (!isGetRequestParameterSet('payout')) { +if (!isGetRequestElementSet('payout')) { // Load payout types $result = SQL_QUERY_ESC("SELECT `id`,`type`,`rate`,`min_points`,`allow_url` @@ -124,7 +124,7 @@ ORDER BY } else { // Chedk if he can get paid by selected type $result = SQL_QUERY_ESC("SELECT `type`,`rate`,`min_points`,`allow_url` AS allow FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('payout'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('payout'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // id is valid so load the data @@ -136,8 +136,8 @@ ORDER BY // Calulcate points from submitted amount $points = '0'; - if (isPostRequestParameterSet('payout')) { - $points = bigintval(postRequestParameter('payout')) / $content['rate']; + if (isPostRequestElementSet('payout')) { + $points = bigintval(postRequestElement('payout')) / $content['rate']; $PAY_MAX = $max / $content['rate']; } @@ -146,8 +146,8 @@ ORDER BY // Ok, he can get be paid if ((isFormSent()) && ($points <= $PAY_MAX) && ($points >= $content['min_points'])) { // Remember points in array - setPostRequestParameter('payout_points', $points); - setPostRequestParameter('type' , $content['type']); + setPostRequestElement('payout_points', $points); + setPostRequestElement('type' , $content['type']); // Subtract points from member's account and ignore return status subtractPoints('payout', getMemberId(), $points); @@ -159,11 +159,11 @@ ORDER BY VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')", array( getMemberId(), - bigintval(postRequestParameter('payout')), - bigintval(getRequestParameter('payout')), - postRequestParameter('turl'), - postRequestParameter('link_text'), - postRequestParameter('banner') + bigintval(postRequestElement('payout')), + bigintval(getRequestElement('payout')), + postRequestElement('turl'), + postRequestElement('link_text'), + postRequestElement('banner') ), __FILE__, __LINE__); // Load templates @@ -179,11 +179,11 @@ VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')", VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", array( getMemberId(), - bigintval(postRequestParameter('payout')), - bigintval(postRequestParameter('account')), - postRequestParameter('bank'), - bigintval(getRequestParameter('payout')), - postRequestParameter('password') + bigintval(postRequestElement('payout')), + bigintval(postRequestElement('account')), + postRequestElement('bank'), + bigintval(getRequestElement('payout')), + postRequestElement('password') ), __FILE__, __LINE__); // Load templates @@ -213,7 +213,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", $content = array( 'max' => $max, 'type' => $content['type'], - 'payout' => bigintval(getRequestParameter('payout')) + 'payout' => bigintval(getRequestElement('payout')) ); // Generate banner order form @@ -223,7 +223,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", $content = array( 'max' => $max, 'type' => $content['type'], - 'payout' => bigintval(getRequestParameter('payout')) + 'payout' => bigintval(getRequestElement('payout')) ); // Generate normal form diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index cf4a196098..13a2a62c4a 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -64,11 +64,11 @@ $content = array(); $points = false; // Is the mode set (payout only) -if (!isGetRequestParameterSet('mode')) { +if (!isGetRequestElementSet('mode')) { // Is there an id? - if ((!empty($content['primera_nickname'])) && (!isGetRequestParameterSet('mode'))) { + if ((!empty($content['primera_nickname'])) && (!isGetRequestElementSet('mode'))) { // Then use an other "mode" - setGetRequestParameter('mode', 'list'); + setGetRequestElement('mode', 'list'); // And load all rows! $result = SQL_QUERY_ESC("SELECT `id`,`primera_account`,`primera_amount`,`primera_timestamp`,`primera_type` FROM `{?_MYSQL_PREFIX?}_user_primera` WHERE `userid`=%s ORDER BY `primera_timestamp` DESC", @@ -88,11 +88,11 @@ if (!isGetRequestParameterSet('mode')) { SQL_FREERESULT($result); } else { // Mode pay - setGetRequestParameter('mode', 'pay'); + setGetRequestElement('mode', 'pay'); } } // END - if -if (getRequestParameter('mode') == 'pay') { +if (getRequestElement('mode') == 'pay') { // Get total points and check if the user can request a payout $points = getTotalPoints(getMemberId()); @@ -114,37 +114,37 @@ if (getRequestParameter('mode') == 'pay') { $content['points'] = $points; } else { // Invalid mode! - displayMessage('{%message,MEMBER_PRIMERA_MODE_INVALID=' . getRequestParameter('mode') . '%}'); + displayMessage('{%message,MEMBER_PRIMERA_MODE_INVALID=' . getRequestElement('mode') . '%}'); return; } // Is the formular sent? -if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { +if ((isFormSent()) && (isGetRequestElementSet('mode'))) { // Check input data depending on the mode and execute the requested mode - switch (getRequestParameter('mode')) { + switch (getRequestElement('mode')) { case 'pay': // Payout this exchange -> Primus // Is the user id and password set? - if (!isPostRequestParameterSet('primera_nickname')) { + if (!isPostRequestElementSet('primera_nickname')) { // Nothing entered in Primus nickname displayMessage('{--MEMBER_PRIMERA_EMPTY_USERNAME--}'); - } elseif (!isPostRequestParameterSet('primera_password')) { + } elseif (!isPostRequestElementSet('primera_password')) { // Nothing entered in Primera password displayMessage('{--MEMBER_PRIMERA_EMPTY_PASSWORD--}'); - } elseif (!isPostRequestParameterSet('amount')) { + } elseif (!isPostRequestElementSet('amount')) { // Nothing entered in amount displayMessage('{--MEMBER_PRIMERA_EMPTY_AMOUNT--}'); - } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) { + } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) { // Only numbers in amount! displayMessage('{--MEMBER_PRIMERA_INVALID_AMOUNT--}'); - } elseif (postRequestParameter('amount') < getConfig('primera_min_payout')) { + } elseif (postRequestElement('amount') < getConfig('primera_min_payout')) { // Not enougth entered! displayMessage('{--MEMBER_PRIMERA_AMOUNT_SMALLER_MIN--}'); - } elseif (postRequestParameter('amount') > $points) { + } elseif (postRequestElement('amount') > $points) { // Not enougth points left! - displayMessage(sprintf(getMessage('MEMBER_PRIMERA_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points))); + displayMessage(sprintf(getMessage('MEMBER_PRIMERA_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points))); } else { // All is fine here so do the payout - $success = executePrimeraPayout(postRequestParameter('primera_nickname'), md5(postRequestParameter('primera_password')), postRequestParameter('amount')); + $success = executePrimeraPayout(postRequestElement('primera_nickname'), md5(postRequestElement('primera_password')), postRequestElement('amount')); if ($success) { // Default is locked! $locked = true; @@ -156,11 +156,11 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { } // END - if // Subtract points from account and ignore return status - subtractPoints('primera_payout', getMemberId(), postRequestParameter('amount')); + subtractPoints('primera_payout', getMemberId(), postRequestElement('amount')); // Update primera nickname SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `primera_nickname`=%s WHERE `userid`=%s LIMIT 1", - array(postRequestParameter('primera_nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestElement('primera_nickname'), getMemberId()), __FILE__, __LINE__); // All done! displayMessage('{--MEMBER_PRIMERA_PAYOUT_DONE--}'); @@ -176,14 +176,14 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { break; default: // Invalid mode! - logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestParameter('mode'))); - displayMessage('{%message,MEMBER_PRIMERA_MODE_INVALID=' . getRequestParameter('mode') . '%}'); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode'))); + displayMessage('{%message,MEMBER_PRIMERA_MODE_INVALID=' . getRequestElement('mode') . '%}'); return; } } // END - if // Prepare mode for template name -$mode = sprintf("member_primera_mode_%s", getRequestParameter('mode')); +$mode = sprintf("member_primera_mode_%s", getRequestElement('mode')); // Load the template loadTemplate($mode, false, $content); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 67e2a3013c..728b143559 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -58,16 +58,16 @@ if ((!isExtensionActive('refback')) && (!isAdmin())) { } // END - if // Was the form submitted? -if ((isFormSent('edit')) && (isPostRequestParameterSet('id'))) { +if ((isFormSent('edit')) && (isPostRequestElementSet('id'))) { // Okay, has the user entered some values? - if (isPostRequestParameterSet('refback_percents')) { + if (isPostRequestElementSet('refback_percents')) { // Revert german commta for testing - $percents = convertCommaToDot(postRequestParameter('refback_percents')); + $percents = convertCommaToDot(postRequestElement('refback_percents')); // Validate percents if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) { // Change ref-back for this direct id - $status = updateMemberRefbackPercents(postRequestParameter('id'), postRequestParameter('refback_percents'), postRequestParameter('refback_note')); + $status = updateMemberRefbackPercents(postRequestElement('id'), postRequestElement('refback_percents'), postRequestElement('refback_note')); // Check status if (isset($status['ok'])) { @@ -88,7 +88,7 @@ if ((isFormSent('edit')) && (isPostRequestParameterSet('id'))) { // Insert line } else { // Read data from refback table - $content = getArrayFromUserRefbackData(postRequestParameter('id')); + $content = getArrayFromUserRefbackData(postRequestElement('id')); // Load form for editing loadTemplate('member_edit_refback', false, $content); diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index a7066b1426..bb4b521714 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -50,20 +50,20 @@ if ((!isExtensionActive('support')) && (!isAdmin())) { return; } // END - if -if ((!isFormSent()) || (!isPostRequestParameterSet('qsummary'))) { +if ((!isFormSent()) || (!isPostRequestElementSet('qsummary'))) { // Output form loadTemplate('member_support_form', false, getUserDataArray()); } else { // Load mail template based on your member's decision if (isExtensionInstalledAndNewer('admins', '0.4.1')) { - $a_tpl = 'admin_support-' . postRequestParameter('qsummary'); + $a_tpl = 'admin_support-' . postRequestElement('qsummary'); } else { - $message_a = loadEmailTemplate('admin_support-' . postRequestParameter('qsummary'), array('text' => postRequestParameter('qdetails')), getMemberId()); + $message_a = loadEmailTemplate('admin_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getMemberId()); } - $message_m = loadEmailTemplate('member_support-' . postRequestParameter('qsummary'), array('text' => postRequestParameter('qdetails')), getMemberId()); + $message_m = loadEmailTemplate('member_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getMemberId()); // Select right subject - switch (postRequestParameter('qsummary')) { + switch (postRequestElement('qsummary')) { case 'ordr': $subj_a = '{--ADMIN_SUPPORT_ORDER_SUBJECT--}'; $subj_m = '{--MEMBER_SUPPORT_ORDER_SUBJECT--}'; @@ -81,13 +81,13 @@ if ((!isFormSent()) || (!isPostRequestParameterSet('qsummary'))) { } // END - switch // Send mail to admin - sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestParameter('qdetails')), getMemberId()); + sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getMemberId()); // Send mail to user sendEmail(getMemberId(), $subj_m, $message_m); // Drop a message in the admin's area (we ignore the task id here) - createNewTask($subj_a, postRequestParameter('qsummary') . ' : ' . postRequestParameter('qdetails'), 'MEMBER_SUPPORT', getMemberId()); + createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'MEMBER_SUPPORT', getMemberId()); // Form sent loadTemplate('member_support_contcted'); diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 0dad311230..f9c6f8d8fb 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -50,16 +50,16 @@ if ((!isExtensionActive('theme')) && (!isAdmin())) { return; } // END - if -if (isPostRequestParameterSet('member_theme')) { +if (isPostRequestElementSet('member_theme')) { // Save theme to member's profile SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `curr_theme`='%s' WHERE `userid`=%s LIMIT 1", array( - postRequestParameter('member_theme'), + postRequestElement('member_theme'), getMemberId() ), __FILE__, __LINE__); // Set new theme for guests - $newTheme = SQL_ESCAPE(postRequestParameter('member_theme')); + $newTheme = SQL_ESCAPE(postRequestElement('member_theme')); // Change to new theme setTheme($newTheme); diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index cd9e8a25ed..98679b4a47 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -53,8 +53,8 @@ if ((!isExtensionActive('transfer')) && (!isAdmin())) { // Check for mode in GET $mode = ''; -if (isGetRequestParameterSet('mode')) { - $mode = getRequestParameter('mode'); +if (isGetRequestElementSet('mode')) { + $mode = getRequestElement('mode'); } // END - if // Check for "faker" @@ -74,30 +74,30 @@ switch ($mode) { // Add new transfer if (getTransferCode() > 0) { // Check for code - $code = generateRandomCode(getTransferCode(), postRequestParameter('code_chk'), getMemberId(), $content['max_transferable']); - $valid_code = ($code == postRequestParameter('code')); + $code = generateRandomCode(getTransferCode(), postRequestElement('code_chk'), getMemberId(), $content['max_transferable']); + $valid_code = ($code == postRequestElement('code')); } else { // Zero length (= disabled) is always valid! $valid_code = true; } // Test password - $valid_pass = ($pass == generateHash(postRequestParameter('password'), $pass)); + $valid_pass = ($pass == generateHash(postRequestElement('password'), $pass)); // Test transfer amount - $valid_amount = ((isPostRequestParameterSet('points')) && (postRequestParameter('points') <= $content['max_transferable'])); + $valid_amount = ((isPostRequestElementSet('points')) && (postRequestElement('points') <= $content['max_transferable'])); // Test reason for transfer - $valid_reason = (isPostRequestParameterSet('reason')); + $valid_reason = (isPostRequestElementSet('reason')); // Test if a recipient is selected - $valid_recipient = isValidUserId(postRequestParameter('to_userid')); + $valid_recipient = isValidUserId(postRequestElement('to_userid')); // Re-check receivers and own personal data $result = SQL_QUERY_ESC("SELECT `userid`,`gender`,`surname`,`family`,`email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN ('%s','%s') AND `status`='CONFIRMED' LIMIT 2", array( getMemberId(), - bigintval(postRequestParameter('to_userid')) + bigintval(postRequestElement('to_userid')) ), __FILE__, __LINE__); // Do we have two entries? @@ -122,7 +122,7 @@ switch ($mode) { // Default is userids for subject line $SENDER = getMemberId(); - $RECIPIENT = bigintval(postRequestParameter('to_userid')); + $RECIPIENT = bigintval(postRequestElement('to_userid')); // If nickname is installed we can set the nickname // @TODO Rewrite this to a filter @@ -131,44 +131,44 @@ switch ($mode) { $SENDER = $content['sender']['nickname']; } // END - if - if (($TEST_NICK_REC != postRequestParameter('to_userid')) && (!empty($TEST_NICK_REC))) { + if (($TEST_NICK_REC != postRequestElement('to_userid')) && (!empty($TEST_NICK_REC))) { $RECIPIENT = $content['recipient']['nickname']; } // END - if } // END - if // Remember transfer reason - $content['reason'] = postRequestParameter('reason'); + $content['reason'] = postRequestElement('reason'); // Generate tranafer id - $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getMemberId(), postRequestParameter('reason'))); + $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getMemberId(), postRequestElement('reason'))); // Add entries to both tables SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_in` (`userid`,`from_userid`,`points`,`reason`,`time_trans`,`trans_id`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(),%s)", array( - bigintval(postRequestParameter('to_userid')), + bigintval(postRequestElement('to_userid')), getMemberId(), - bigintval(postRequestParameter('points')), - postRequestParameter('reason'), + bigintval(postRequestElement('points')), + postRequestElement('reason'), $content['trans_id'] ), __FILE__, __LINE__); SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_out` (`userid`,`to_userid`,`points`,`reason`,`time_trans`,`trans_id`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(),%s)", array( getMemberId(), - bigintval(postRequestParameter('to_userid')), - bigintval(postRequestParameter('points')), - postRequestParameter('reason'), + bigintval(postRequestElement('to_userid')), + bigintval(postRequestElement('points')), + postRequestElement('reason'), $content['trans_id'] ), __FILE__, __LINE__); // Add points to account *directly* ... initReferalSystem(); - addPointsThroughReferalSystem('transfer', bigintval(postRequestParameter('to_userid')), bigintval(postRequestParameter('points'))); + addPointsThroughReferalSystem('transfer', bigintval(postRequestElement('to_userid')), bigintval(postRequestElement('points'))); // ... and add it to current user's used points and ignore return status - subtractPoints('transfer', getMemberId(), postRequestParameter('points')); + subtractPoints('transfer', getMemberId(), postRequestElement('points')); // First send email to recipient - $message = loadEmailTemplate('member_transfer_recipient', $content, postRequestParameter('to_userid')); + $message = loadEmailTemplate('member_transfer_recipient', $content, postRequestElement('to_userid')); sendEmail($content['recipient']['userid'], '{--TRANSFER_MEMBER_RECIPIENT_SUBJECT--}' . ': ' . $SENDER, $message); // Second send email to sender @@ -184,27 +184,27 @@ switch ($mode) { } elseif ($valid_code === false) { // Invalid Touring code! loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_CODE--}'); - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } elseif ($valid_pass === false) { // Wrong password entered loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_PASSWORD--}'); - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } elseif ($valid_amount === false) { // Too much points entered loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_POINTS--}'); - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } elseif ($valid_reason === false) { // No transfer reason entered loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_REASON--}'); - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } elseif ($valid_recipient === false) { // No recipient selected loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_RECIPIENT--}'); - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } elseif ($valid_data === false) { // No recipient/sender selected loadTemplate('admin_settings_unsaved', false, '{--TRANSFER_INVALID_DATA--}'); - unsetPostRequestParameter('ok'); + unsetPostRequestElement('ok'); } // Free result @@ -222,7 +222,7 @@ switch ($mode) { '; while (list($userid) = SQL_FETCHROW($result)) { $OUT .= '
-
+
Es sind bereits folgende Erweiterungen zum {?MAIN_TITLE?} verfügbar: diff --git a/templates/de/html/guest/guest_register.tpl b/templates/de/html/guest/guest_register.tpl index 27c051f4de..a497f75e16 100644 --- a/templates/de/html/guest/guest_register.tpl +++ b/templates/de/html/guest/guest_register.tpl @@ -86,7 +86,7 @@ - $content[category_selection] + {%pipe,registerGenerateCategoryTable=guest%} diff --git a/templates/de/html/install/install_page2.tpl b/templates/de/html/install/install_page2.tpl index ab9911746d..27619a3265 100644 --- a/templates/de/html/install/install_page2.tpl +++ b/templates/de/html/install/install_page2.tpl @@ -45,13 +45,13 @@ - {--INSTALLER_MYSQL_PASS1--}: + {--INSTALLER_MYSQL_PASSWORD1--}: - {--INSTALLER_MYSQL_PASS2--}: + {--INSTALLER_MYSQL_PASSWORD2--}: diff --git a/templates/de/html/install/install_page3.tpl b/templates/de/html/install/install_page3.tpl index 172428c5d1..e25c17db0b 100644 --- a/templates/de/html/install/install_page3.tpl +++ b/templates/de/html/install/install_page3.tpl @@ -24,13 +24,13 @@ - {--INSTALLER_TEXT_SMTP_PASS1--}: + {--INSTALLER_TEXT_SMTP_PASSWORD1--}: - {--INSTALLER_TEXT_SMTP_PASS2--}: + {--INSTALLER_TEXT_SMTP_PASSWORD2--}: diff --git a/templates/de/html/member/member_book_surfbar_dynamic.tpl b/templates/de/html/member/member_book_surfbar_dynamic.tpl index 9c54eb4923..d448e67972 100644 --- a/templates/de/html/member/member_book_surfbar_dynamic.tpl +++ b/templates/de/html/member/member_book_surfbar_dynamic.tpl @@ -1,5 +1,6 @@
-
+
+ diff --git a/templates/de/html/member/member_book_surfbar_static.tpl b/templates/de/html/member/member_book_surfbar_static.tpl index f6079de42a..195cb14848 100644 --- a/templates/de/html/member/member_book_surfbar_static.tpl +++ b/templates/de/html/member/member_book_surfbar_static.tpl @@ -1,5 +1,6 @@ +
-
+
URL in Surfbar buchen - Statisch:
@@ -37,3 +38,4 @@ +
diff --git a/templates/de/html/member/member_doubler_list.tpl b/templates/de/html/member/member_doubler_list.tpl index 276f99cc9f..5aeea245e3 100644 --- a/templates/de/html/member/member_doubler_list.tpl +++ b/templates/de/html/member/member_doubler_list.tpl @@ -1,3 +1,4 @@ +
@@ -20,3 +21,4 @@
+
diff --git a/templates/de/html/member/member_earning.tpl b/templates/de/html/member/member_earning.tpl new file mode 100644 index 0000000000..beef9db4db --- /dev/null +++ b/templates/de/html/member/member_earning.tpl @@ -0,0 +1,13 @@ +
+ +
+ {--MEMBER_EARNING_TITLE--} +
+ +$content + + + +
diff --git a/templates/de/html/member/member_earning_data_invalid.tpl b/templates/de/html/member/member_earning_data_invalid.tpl new file mode 100644 index 0000000000..303357540f --- /dev/null +++ b/templates/de/html/member/member_earning_data_invalid.tpl @@ -0,0 +1,32 @@ +
+
+ {--MEMBER_EARNING_DATA_INVALID_TITLE--} +
+
+ {--MEMBER_EARNING_DATA_MIN_POINTS--}
+ {%pipe,translateComma=$content[earning_min_points]%} +
+
+ {--MEMBER_EARNING_DATA_MAX_POINTS--}
+ {%pipe,translateComma=$content[earning_max_points]%} +
+
+ {--MEMBER_EARNING_DATA_COUNT--}
+ {%pipe,translateComma=$content[earning_count]%} +
+
+ {--MEMBER_EARNING_DATA_EXCLUDE_USERID--}
+ $content[earning_exclude_userid] +
+
+ {--MEMBER_EARNING_DATA_GROUP--}
+ {%pipe,translateEarningGroup=$content[earning_group]%} +
+
+ {--MEMBER_EARNING_DATA_NAME--}
+ {%pipe,translateEarningName=$content[earning_name]%} +
+ +
diff --git a/templates/de/html/member/member_earning_data_popup.tpl b/templates/de/html/member/member_earning_data_popup.tpl new file mode 100644 index 0000000000..072448e941 --- /dev/null +++ b/templates/de/html/member/member_earning_data_popup.tpl @@ -0,0 +1,12 @@ +
+ {--MEMBER_EARNING_DATA_MIN_POINTS--}
+ {%pipe,translateComma=$content[earning_min_points]%} {?POINTS?} +
+
+ {--MEMBER_EARNING_DATA_MAX_POINTS--}
+ {%pipe,translateComma=$content[earning_max_points]%} {?POINTS?} +
+
+ {--MEMBER_EARNING_DATA_COUNT--}
+ {%pipe,translateComma=$content[earning_count]%} +
diff --git a/templates/de/html/member/member_earning_popup_form_row.tpl b/templates/de/html/member/member_earning_popup_form_row.tpl new file mode 100644 index 0000000000..e6599d2524 --- /dev/null +++ b/templates/de/html/member/member_earning_popup_form_row.tpl @@ -0,0 +1,22 @@ +
+
+
+
+ {%message,MEMBER_EARNING_POPUP_FORM_TITLE=$content[earning_name]%} +
+
+ {--MEMBER_EARNING_ENTER_DAILY_POPUP_AMOUNT--} + +
+
+ {%pipe,generateMemberEarningDataTable=$content[earning_name]%} +
+ +
+
+
diff --git a/templates/de/html/member/member_earning_popup_row.tpl b/templates/de/html/member/member_earning_popup_row.tpl new file mode 100644 index 0000000000..6510c7072b --- /dev/null +++ b/templates/de/html/member/member_earning_popup_row.tpl @@ -0,0 +1,28 @@ +
+
+
+
+ {%message,MEMBER_EARNING_POPUP_FORM_TITLE=$content[earning_name]%} +
+
+ {--MEMBER_EARNING_CHANGE_DAILY_POPUP_AMOUNT--} + +
+
+ {--MEMBER_EARNING_CHANGE_IS_ACTIVE--} + +
+
+ {--MEMBER_EARNING_POINTS--}
+ {%pipe,translateComma=$content[earning_points]%} {?POINTS?} +
+ +
+
+
diff --git a/templates/de/html/member/member_start_surfbar_dynamic.tpl b/templates/de/html/member/member_start_surfbar_dynamic.tpl index 5df1807086..9ce8f3e1d4 100644 --- a/templates/de/html/member/member_start_surfbar_dynamic.tpl +++ b/templates/de/html/member/member_start_surfbar_dynamic.tpl @@ -1,4 +1,5 @@ -
+
+
Dynamisch vergütete Surfbar ist aktiv
@@ -40,3 +41,4 @@ {%config,createFancyTime=surfbar_static_time%}.
+
diff --git a/templates/de/html/member/member_start_surfbar_static.tpl b/templates/de/html/member/member_start_surfbar_static.tpl index 3bedea1733..0b81cb967e 100644 --- a/templates/de/html/member/member_start_surfbar_static.tpl +++ b/templates/de/html/member/member_start_surfbar_static.tpl @@ -1,4 +1,5 @@ -
+
+
Statisch vergütete Surfbar ist aktiv
@@ -14,3 +15,4 @@ $content[surfbar_total_urls] URLs in der Surfbar.
+
diff --git a/templates/de/html/member/member_surfbar_delete_action_form.tpl b/templates/de/html/member/member_surfbar_delete_action_form.tpl index 3ac8e3d6ae..33741866b1 100644 --- a/templates/de/html/member/member_surfbar_delete_action_form.tpl +++ b/templates/de/html/member/member_surfbar_delete_action_form.tpl @@ -1,5 +1,6 @@ +
-
+
URL in Surfbar löschen:
@@ -34,3 +35,4 @@ Hinweis: Irtümlich gelöschte URLs können nur durch unsere Administratoren wiederhergestellt werden.
+
diff --git a/templates/de/html/member/member_surfbar_edit_action_form.tpl b/templates/de/html/member/member_surfbar_edit_action_form.tpl index d04bd5af70..2bc8620dee 100644 --- a/templates/de/html/member/member_surfbar_edit_action_form.tpl +++ b/templates/de/html/member/member_surfbar_edit_action_form.tpl @@ -1,6 +1,6 @@
-
+
URL in Surfbar editieren:
diff --git a/theme/business/css/general.css b/theme/business/css/general.css index a7a29a6c89..fb7d077209 100644 --- a/theme/business/css/general.css +++ b/theme/business/css/general.css @@ -156,6 +156,12 @@ a.logout_box { margin: 5px; } +.table3 { + background-color: #ffffff; + width: 630px; + margin: 5px; +} + .warning_table { background-color: #ff8888; width: 660px; diff --git a/theme/default/css/general.css b/theme/default/css/general.css index f81a956c47..9d81babc0a 100644 --- a/theme/default/css/general.css +++ b/theme/default/css/general.css @@ -188,6 +188,12 @@ a.logout_box { margin: 5px; } +.table3 { + background-color: #eeffee; + width: 630px; + margin: 5px; +} + .warning_table { background-color: #ff8888; width: 660px; diff --git a/theme/desert/css/general.css b/theme/desert/css/general.css index 3d77fd31b4..976d5a07a5 100644 --- a/theme/desert/css/general.css +++ b/theme/desert/css/general.css @@ -157,6 +157,12 @@ a.logout_box { margin: 5px; } +.table3 { + background-color: #ffffcc; + width: 630px; + margin: 5px; +} + .warning_table { background-color: #ff8888; width: 660px; diff --git a/theme/org/css/general.css b/theme/org/css/general.css index 2ceec4cc2e..d7c14181be 100644 --- a/theme/org/css/general.css +++ b/theme/org/css/general.css @@ -150,7 +150,7 @@ pre { color : #ddeedd; } -.description_text, .table { +.description_text, .table, .table2, .table3 { background-color : #eeffee; } diff --git a/theme/schleuder/css/general.css b/theme/schleuder/css/general.css index 02940cf6bd..198b5b7c66 100644 --- a/theme/schleuder/css/general.css +++ b/theme/schleuder/css/general.css @@ -153,7 +153,7 @@ pre { color : #FFFFFF; } -.description_text, .table { +.description_text, .table, .table2, .table3 { text-align : center; align : center; background-color : #0571cc; diff --git a/theme/ship-simu/css/general.css b/theme/ship-simu/css/general.css index 08f154fabf..3d57147e76 100644 --- a/theme/ship-simu/css/general.css +++ b/theme/ship-simu/css/general.css @@ -148,7 +148,7 @@ pre { color : #000000; } -.description_text, .table { +.description_text, .table, .table2, .table3 { background-color : #FFFFFF; } diff --git a/view.php b/view.php index d4be2d0957..fd663ba02c 100644 --- a/view.php +++ b/view.php @@ -45,10 +45,10 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -if ((isGetRequestParameterSet('user')) && (isGetRequestParameterSet('banner'))) { +if ((isGetRequestElementSet('user')) && (isGetRequestElementSet('banner'))) { // For later things... ;-) $result = SQL_QUERY_ESC("SELECT `url` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('banner'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); // Do we have the banner? if (SQL_NUMROWS($result) == 1) { @@ -57,7 +57,7 @@ if ((isGetRequestParameterSet('user')) && (isGetRequestParameterSet('banner'))) // Update counter SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestParameter('banner'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); // Set header and ... setContentType('image/' . substr($data['url'], -3, 3)); @@ -66,7 +66,7 @@ if ((isGetRequestParameterSet('user')) && (isGetRequestParameterSet('banner'))) redirectToUrl($data['url'], false); } else { // @TODO No banner found, output some default banner - logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestParameter('banner')) . ' not dound.'); + logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestElement('banner')) . ' not dound.'); } // Free memory -- 2.39.2