From cca98f57dff720b174d21d071cee8303462485d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 19 Feb 2009 18:30:24 +0000 Subject: [PATCH] All database names are now 'back-ticked' and constant _MYSQL_PREFIX is wrapped. Partly resolves #83 --- DOCS/de/CSS-PATCHES_05092004.txt | 4 +- DOCS/en/CSS-PATCHES_05092004.txt | 4 +- beg.php | 12 +- birthday_confirm.php | 6 +- click.php | 2 +- doubler.php | 12 +- inc/autopurge/purge-general.php | 18 +- inc/autopurge/purge-inact.php | 6 +- inc/autopurge/purge-mails.php | 16 +- inc/autopurge/purge-tsks.php | 2 +- inc/autopurge/purge-unconfirmed.php | 2 +- inc/db/lib-mysql3.php | 17 +- inc/doubler_send.php | 12 +- inc/extensions.php | 34 +- inc/extensions/ext-active.php | 14 +- inc/extensions/ext-admins.php | 56 +-- inc/extensions/ext-admintheme1.php | 8 +- inc/extensions/ext-admintheme_default.php | 8 +- inc/extensions/ext-autopurge.php | 44 +- inc/extensions/ext-bank.php | 76 ++-- inc/extensions/ext-beg.php | 88 ++-- inc/extensions/ext-birthday.php | 22 +- inc/extensions/ext-bonus.php | 168 ++++---- inc/extensions/ext-booking.php | 24 +- inc/extensions/ext-cache.php | 36 +- inc/extensions/ext-country.php | 16 +- inc/extensions/ext-debug.php | 70 +-- inc/extensions/ext-doubler.php | 76 ++-- inc/extensions/ext-holiday.php | 54 +-- inc/extensions/ext-html_mail.php | 20 +- inc/extensions/ext-iso3166.php | 12 +- inc/extensions/ext-logs.php | 6 +- inc/extensions/ext-mailid.php | 4 +- inc/extensions/ext-maintenance.php | 6 +- inc/extensions/ext-mediadata.php | 18 +- inc/extensions/ext-mods.php | 10 +- inc/extensions/ext-newsletter.php | 26 +- inc/extensions/ext-nickname.php | 36 +- inc/extensions/ext-online.php | 20 +- inc/extensions/ext-optimize.php | 8 +- inc/extensions/ext-order.php | 42 +- inc/extensions/ext-other.php | 16 +- inc/extensions/ext-payout.php | 60 +-- inc/extensions/ext-primera.php | 34 +- inc/extensions/ext-rallye.php | 60 +-- inc/extensions/ext-refback.php | 28 +- inc/extensions/ext-register.php | 26 +- inc/extensions/ext-removeip.php | 22 +- inc/extensions/ext-repair.php | 12 +- inc/extensions/ext-rewrite.php | 10 +- inc/extensions/ext-sponsor.php | 260 +++++------ inc/extensions/ext-sql_patches.php | 406 +++++++++--------- inc/extensions/ext-surfbar.php | 166 +++---- inc/extensions/ext-task.php | 10 +- inc/extensions/ext-theme.php | 32 +- inc/extensions/ext-top10.php | 14 +- inc/extensions/ext-transfer.php | 54 +-- inc/extensions/ext-usage.php | 6 +- inc/extensions/ext-user.php | 62 +-- inc/extensions/ext-wernis.php | 64 +-- inc/extensions/ext-yoomedia.php | 32 +- inc/filters.php | 12 +- inc/functions.php | 28 +- inc/gen_mediadata.php | 12 +- inc/gen_refback.php | 12 +- inc/gen_sql_patches.php | 6 +- inc/install-inc.php | 30 +- inc/language/bank_de.php | 2 +- inc/language/en.ph | 8 +- inc/language/install_de.php | 2 +- inc/libs/admins_functions.php | 22 +- inc/libs/autopurge_functions.php | 4 +- inc/libs/beg_functions.php | 2 +- inc/libs/bonus_functions.php | 14 +- inc/libs/booking_functions.php | 2 +- inc/libs/country_functions.php | 2 +- inc/libs/doubler_functions.php | 4 +- inc/libs/holiday_functions.php | 6 +- inc/libs/mediadata_functions.php | 10 +- inc/libs/nickname_functions.php | 4 +- inc/libs/online_functions.php | 8 +- inc/libs/optimize_functions.php | 4 +- inc/libs/payout_functions.php | 2 +- inc/libs/rallye_functions.php | 64 +-- inc/libs/refback_functions.php | 26 +- inc/libs/register_functions.php | 8 +- inc/libs/sponsor_functions.php | 16 +- inc/libs/surfbar_functions.php | 70 +-- inc/libs/task_functions.php | 65 +-- inc/libs/theme_functions.php | 6 +- inc/libs/transfer_functions.php | 12 +- inc/libs/user_functions.php | 26 +- inc/libs/wernis_functions.php | 2 +- inc/libs/yoomedia_functions.php | 10 +- inc/load_extensions.php | 8 +- inc/loader/load_cache-admin.php | 4 +- inc/loader/load_cache-config.php | 2 +- inc/loader/load_cache-modreg.php | 4 +- inc/loader/load_cache-refdepths.php | 2 +- inc/loader/load_cache-refsystem.php | 2 +- inc/loader/load_cache-them.php | 4 +- inc/mails/beg_mails.php | 4 +- inc/mails/birthday_mails.php | 6 +- inc/mails/bonus_mails.php | 4 +- inc/modules/admin/admin-inc.php | 56 +-- inc/modules/admin/overview-inc.php | 24 +- inc/modules/admin/what-add_points.php | 4 +- inc/modules/admin/what-add_rallye.php | 6 +- inc/modules/admin/what-admin_add.php | 8 +- inc/modules/admin/what-adminedit.php | 24 +- inc/modules/admin/what-admins_mails.php | 14 +- inc/modules/admin/what-chk_regs.php | 2 +- inc/modules/admin/what-config_admins.php | 14 +- inc/modules/admin/what-config_bonus.php | 4 +- inc/modules/admin/what-config_cats.php | 16 +- inc/modules/admin/what-config_email.php | 14 +- inc/modules/admin/what-config_home.php | 2 +- inc/modules/admin/what-config_mods.php | 6 +- inc/modules/admin/what-config_payouts.php | 16 +- inc/modules/admin/what-config_points.php | 26 +- .../admin/what-config_rallye_prices.php | 18 +- inc/modules/admin/what-config_register.php | 4 +- inc/modules/admin/what-config_rewrite.php | 2 +- inc/modules/admin/what-del_email.php | 24 +- inc/modules/admin/what-del_holiday.php | 10 +- inc/modules/admin/what-del_sponsor.php | 6 +- inc/modules/admin/what-del_transfer.php | 8 +- inc/modules/admin/what-del_user.php | 4 +- inc/modules/admin/what-edit_emails.php | 6 +- inc/modules/admin/what-edit_sponsor.php | 6 +- inc/modules/admin/what-edit_user.php | 4 +- inc/modules/admin/what-email_archiv.php | 4 +- inc/modules/admin/what-email_details.php | 18 +- inc/modules/admin/what-extensions.php | 18 +- inc/modules/admin/what-guest_add.php | 8 +- inc/modules/admin/what-guestedit.php | 28 +- inc/modules/admin/what-list_autopurge.php | 2 +- inc/modules/admin/what-list_bank_package.php | 2 +- inc/modules/admin/what-list_beg.php | 2 +- inc/modules/admin/what-list_bonus.php | 2 +- inc/modules/admin/what-list_cats.php | 10 +- inc/modules/admin/what-list_country.php | 14 +- inc/modules/admin/what-list_doubler.php | 8 +- inc/modules/admin/what-list_holiday.php | 4 +- inc/modules/admin/what-list_links.php | 12 +- inc/modules/admin/what-list_newsletter.php | 2 +- inc/modules/admin/what-list_notifications.php | 2 +- inc/modules/admin/what-list_payouts.php | 18 +- inc/modules/admin/what-list_primera.php | 2 +- inc/modules/admin/what-list_rallyes.php | 32 +- inc/modules/admin/what-list_refs.php | 22 +- inc/modules/admin/what-list_sponsor.php | 10 +- inc/modules/admin/what-list_sponsor_pay.php | 12 +- inc/modules/admin/what-list_sponsor_pays.php | 2 +- .../admin/what-list_surfbar_actions.php | 2 +- inc/modules/admin/what-list_surfbar_urls.php | 2 +- inc/modules/admin/what-list_task.php | 8 +- inc/modules/admin/what-list_transfer.php | 2 +- inc/modules/admin/what-list_unconfirmed.php | 14 +- inc/modules/admin/what-list_user.php | 6 +- inc/modules/admin/what-list_wernis.php | 2 +- inc/modules/admin/what-lock_sponsor.php | 4 +- inc/modules/admin/what-lock_user.php | 12 +- inc/modules/admin/what-mem_add.php | 8 +- inc/modules/admin/what-memedit.php | 28 +- inc/modules/admin/what-payments.php | 14 +- inc/modules/admin/what-refbanner.php | 12 +- inc/modules/admin/what-repair_amenu.php | 10 +- inc/modules/admin/what-repair_cats.php | 6 +- inc/modules/admin/what-repair_gmenu.php | 10 +- inc/modules/admin/what-repair_mmenu.php | 10 +- inc/modules/admin/what-send_newsletter.php | 2 +- inc/modules/admin/what-stats_mods.php | 5 +- inc/modules/admin/what-sub_points.php | 6 +- inc/modules/admin/what-surfbar_stats.php | 4 +- inc/modules/admin/what-theme_edit.php | 8 +- inc/modules/admin/what-theme_import.php | 6 +- inc/modules/admin/what-unlock_emails.php | 18 +- inc/modules/admin/what-unlock_sponsor.php | 14 +- .../admin/what-unlock_surfbar_urls.php | 2 +- inc/modules/admin/what-user_contct.php | 2 +- inc/modules/admin/what-usr_online.php | 8 +- inc/modules/chk_login.php | 6 +- inc/modules/frametester.php | 2 +- inc/modules/guest/action-online.php | 6 +- inc/modules/guest/action-themes.php | 2 +- inc/modules/guest/what-active.php | 2 +- inc/modules/guest/what-confirm.php | 10 +- inc/modules/guest/what-mediadata.php | 30 +- inc/modules/guest/what-rallyes.php | 2 +- inc/modules/guest/what-register.php | 14 +- inc/modules/guest/what-sponsor_infos.php | 8 +- inc/modules/guest/what-sponsor_login.php | 14 +- inc/modules/guest/what-sponsor_reg.php | 10 +- inc/modules/guest/what-stats.php | 32 +- inc/modules/guest/what-top10.php | 8 +- inc/modules/guest/what-welcome.php | 2 +- inc/modules/member/action-themes.php | 2 +- inc/modules/member/what-beg.php | 2 +- inc/modules/member/what-beg2.php | 2 +- inc/modules/member/what-bonus.php | 2 +- inc/modules/member/what-categories.php | 10 +- inc/modules/member/what-holiday.php | 24 +- inc/modules/member/what-html_mail.php | 4 +- inc/modules/member/what-mydata.php | 18 +- inc/modules/member/what-newsletter.php | 6 +- inc/modules/member/what-nickname.php | 4 +- inc/modules/member/what-order.php | 44 +- inc/modules/member/what-payout.php | 20 +- inc/modules/member/what-points.php | 12 +- inc/modules/member/what-primera.php | 8 +- inc/modules/member/what-rallyes.php | 2 +- inc/modules/member/what-refback.php | 2 +- inc/modules/member/what-reflinks.php | 4 +- inc/modules/member/what-reflist.php | 2 +- inc/modules/member/what-stats.php | 4 +- inc/modules/member/what-support.php | 2 +- inc/modules/member/what-themes.php | 4 +- inc/modules/member/what-transfer.php | 40 +- inc/modules/member/what-unconfirmed.php | 18 +- inc/modules/member/what-welcome.php | 2 +- inc/modules/member/what-wernis.php | 12 +- inc/modules/order.php | 6 +- inc/modules/sponsor/account.php | 2 +- inc/modules/sponsor/settings.php | 2 +- inc/modules/sponsor/welcome.php | 2 +- inc/monthly/monthly_beg.php | 4 +- inc/monthly/monthly_bonus.php | 4 +- inc/monthly/monthly_newsletter.php | 4 +- inc/mysql-manager.php | 204 ++++----- inc/pool/pool-bonus.php | 14 +- inc/pool/pool-user.php | 32 +- inc/profile-updte.php | 2 +- inc/reset/reset_beg.php | 2 +- inc/reset/reset_bonus.php | 2 +- inc/reset/reset_daily.php | 10 +- inc/reset/reset_holiday.php | 6 +- inc/security.php | 16 +- inc/stats_bonus.php | 6 +- lead-confirm.php | 2 +- mailid.php | 28 +- mailid_top.php | 28 +- modules.php | 2 +- ref.php | 4 +- show_bonus.php | 4 +- .../de/html/admin/admin_add_bank_package.tpl | 26 +- templates/de/html/admin/admin_add_banner.tpl | 8 +- templates/de/html/admin/admin_add_cat.tpl | 10 +- templates/de/html/admin/admin_add_country.tpl | 8 +- templates/de/html/admin/admin_add_max.tpl | 8 +- templates/de/html/admin/admin_add_payment.tpl | 12 +- templates/de/html/admin/admin_add_points.tpl | 6 +- .../de/html/admin/admin_add_points_all.tpl | 6 +- templates/de/html/admin/admin_add_rallye.tpl | 10 +- .../de/html/admin/admin_add_rallye_prices.tpl | 10 +- templates/de/html/admin/admin_add_reflvl.tpl | 8 +- templates/de/html/admin/admin_add_sponsor.tpl | 38 +- .../html/admin/admin_add_sponsor_already.tpl | 2 +- .../html/admin/admin_add_sponsor_paytype.tpl | 12 +- templates/de/html/admin/admin_admin_add.tpl | 6 +- templates/de/html/admin/admin_admins_add.tpl | 12 +- .../de/html/admin/admin_admins_add_acl.tpl | 4 +- .../admin/admin_admins_contct_default.tpl | 2 +- .../html/admin/admin_admins_contct_form.tpl | 4 +- .../html/admin/admin_admins_contct_select.tpl | 4 +- .../de/html/admin/admin_admins_mails_edit.tpl | 4 +- .../admin/admin_admins_mails_edit_row.tpl | 2 +- .../de/html/admin/admin_admins_mails_list.tpl | 4 +- .../admin/admin_admins_mails_list_row.tpl | 2 +- .../de/html/admin/admin_amenu_delete.tpl | 6 +- .../de/html/admin/admin_amenu_delete_row.tpl | 2 +- templates/de/html/admin/admin_amenu_edit.tpl | 6 +- .../de/html/admin/admin_amenu_edit_form.tpl | 8 +- .../de/html/admin/admin_amenu_edit_row.tpl | 2 +- .../de/html/admin/admin_config_active.tpl | 6 +- .../de/html/admin/admin_config_admin.tpl | 8 +- .../de/html/admin/admin_config_admins.tpl | 6 +- .../de/html/admin/admin_config_admins_del.tpl | 4 +- .../admin/admin_config_admins_del_row.tpl | 2 +- .../html/admin/admin_config_admins_edit.tpl | 4 +- .../admin/admin_config_admins_edit_row.tpl | 2 +- .../de/html/admin/admin_config_admins_row.tpl | 2 +- .../de/html/admin/admin_config_autopurge.tpl | 8 +- templates/de/html/admin/admin_config_beg.tpl | 40 +- .../de/html/admin/admin_config_birthday.tpl | 14 +- .../de/html/admin/admin_config_bonus.tpl | 60 +-- .../de/html/admin/admin_config_cache.tpl | 42 +- templates/de/html/admin/admin_config_cats.tpl | 6 +- .../de/html/admin/admin_config_cats_row.tpl | 4 +- .../de/html/admin/admin_config_doubler.tpl | 34 +- .../de/html/admin/admin_config_email.tpl | 6 +- .../de/html/admin/admin_config_email_del.tpl | 4 +- .../html/admin/admin_config_email_del_row.tpl | 2 +- .../de/html/admin/admin_config_email_edit.tpl | 4 +- .../admin/admin_config_email_edit_row.tpl | 6 +- .../de/html/admin/admin_config_email_row.tpl | 2 +- .../de/html/admin/admin_config_extensions.tpl | 8 +- .../de/html/admin/admin_config_holiday.tpl | 10 +- .../de/html/admin/admin_config_home_main.tpl | 4 +- .../html/admin/admin_config_home_settings.tpl | 4 +- .../admin/admin_config_home_settings_pro.tpl | 4 +- .../de/html/admin/admin_config_mediadata.tpl | 10 +- .../de/html/admin/admin_config_newsletter.tpl | 6 +- .../de/html/admin/admin_config_nickname.tpl | 10 +- .../de/html/admin/admin_config_order.tpl | 26 +- .../de/html/admin/admin_config_order_form.tpl | 10 +- .../de/html/admin/admin_config_other.tpl | 66 +-- .../de/html/admin/admin_config_payouts.tpl | 6 +- .../html/admin/admin_config_payouts_del.tpl | 2 +- .../admin/admin_config_payouts_del_row.tpl | 2 +- .../html/admin/admin_config_payouts_edit.tpl | 4 +- .../admin/admin_config_payouts_edit_row.tpl | 8 +- .../html/admin/admin_config_payouts_row.tpl | 2 +- .../admin/admin_config_point_settings.tpl | 18 +- .../de/html/admin/admin_config_points.tpl | 6 +- .../de/html/admin/admin_config_primera.tpl | 14 +- .../de/html/admin/admin_config_proxy.tpl | 12 +- .../de/html/admin/admin_config_rallye_del.tpl | 2 +- .../admin/admin_config_rallye_del_row.tpl | 2 +- .../html/admin/admin_config_rallye_edit.tpl | 4 +- .../admin/admin_config_rallye_edit_row.tpl | 6 +- .../html/admin/admin_config_rallye_prices.tpl | 6 +- .../admin/admin_config_rallye_prices_row.tpl | 2 +- .../de/html/admin/admin_config_refback.tpl | 12 +- .../de/html/admin/admin_config_refid.tpl | 6 +- .../de/html/admin/admin_config_reg_pro.tpl | 6 +- .../de/html/admin/admin_config_register.tpl | 4 +- .../de/html/admin/admin_config_register2.tpl | 6 +- .../de/html/admin/admin_config_rewrite.tpl | 6 +- .../html/admin/admin_config_rewrite_rows.tpl | 4 +- .../de/html/admin/admin_config_secure.tpl | 8 +- .../de/html/admin/admin_config_sponsor.tpl | 8 +- .../de/html/admin/admin_config_stats.tpl | 12 +- .../de/html/admin/admin_config_sub_points.tpl | 8 +- .../de/html/admin/admin_config_title.tpl | 10 +- .../de/html/admin/admin_config_top10.tpl | 6 +- .../de/html/admin/admin_config_transfer.tpl | 10 +- templates/de/html/admin/admin_config_user.tpl | 8 +- .../de/html/admin/admin_config_wernis.tpl | 38 +- .../de/html/admin/admin_contct_user_form.tpl | 4 +- templates/de/html/admin/admin_del_admins.tpl | 4 +- .../de/html/admin/admin_del_admins_row.tpl | 2 +- .../de/html/admin/admin_del_bank_packages.tpl | 2 +- .../admin/admin_del_bank_packages_row.tpl | 2 +- templates/de/html/admin/admin_del_cats.tpl | 4 +- .../de/html/admin/admin_del_cats_row.tpl | 2 +- .../de/html/admin/admin_del_payments.tpl | 4 +- .../de/html/admin/admin_del_payments_row.tpl | 2 +- templates/de/html/admin/admin_del_sponsor.tpl | 6 +- .../html/admin/admin_del_surfbar_urls_row.tpl | 4 +- .../de/html/admin/admin_del_transfer_row.tpl | 2 +- templates/de/html/admin/admin_del_user.tpl | 4 +- templates/de/html/admin/admin_edit_admins.tpl | 4 +- .../de/html/admin/admin_edit_admins_row.tpl | 8 +- .../html/admin/admin_edit_bank_packages.tpl | 4 +- .../admin/admin_edit_bank_packages_row.tpl | 22 +- templates/de/html/admin/admin_edit_cats.tpl | 4 +- .../de/html/admin/admin_edit_cats_row.tpl | 4 +- templates/de/html/admin/admin_edit_email.tpl | 8 +- .../de/html/admin/admin_edit_email_row.tpl | 2 +- .../de/html/admin/admin_edit_email_select.tpl | 4 +- .../de/html/admin/admin_edit_payments.tpl | 4 +- .../de/html/admin/admin_edit_payments_row.tpl | 8 +- .../de/html/admin/admin_edit_rallyes.tpl | 4 +- .../de/html/admin/admin_edit_rallyes_row.tpl | 6 +- .../admin/admin_edit_sponsor_add_points.tpl | 6 +- .../de/html/admin/admin_edit_sponsor_edit.tpl | 36 +- .../admin/admin_edit_sponsor_sub_points.tpl | 6 +- templates/de/html/admin/admin_edit_user.tpl | 22 +- .../de/html/admin/admin_ext_reg_form.tpl | 2 +- templates/de/html/admin/admin_extensions.tpl | 8 +- .../de/html/admin/admin_extensions_delete.tpl | 2 +- .../admin/admin_extensions_delete_row.tpl | 2 +- .../de/html/admin/admin_extensions_edit.tpl | 4 +- .../html/admin/admin_extensions_edit_row.tpl | 2 +- .../de/html/admin/admin_extensions_row.tpl | 2 +- .../de/html/admin/admin_gmenu_delete.tpl | 6 +- .../de/html/admin/admin_gmenu_delete_row.tpl | 2 +- templates/de/html/admin/admin_gmenu_edit.tpl | 8 +- .../de/html/admin/admin_gmenu_edit_form.tpl | 8 +- .../de/html/admin/admin_gmenu_edit_row.tpl | 2 +- .../de/html/admin/admin_gmenu_status.tpl | 6 +- templates/de/html/admin/admin_guest_add.tpl | 6 +- templates/de/html/admin/admin_list_admins.tpl | 6 +- .../de/html/admin/admin_list_admins_row.tpl | 2 +- .../de/html/admin/admin_list_bank_package.tpl | 8 +- .../admin/admin_list_bank_package_row.tpl | 2 +- .../de/html/admin/admin_list_beg_form.tpl | 2 +- .../de/html/admin/admin_list_bonus_form.tpl | 2 +- .../de/html/admin/admin_list_country.tpl | 10 +- .../html/admin/admin_list_country_del_row.tpl | 2 +- .../admin/admin_list_country_edit_row.tpl | 6 +- .../de/html/admin/admin_list_country_form.tpl | 2 +- .../de/html/admin/admin_list_country_row.tpl | 2 +- .../de/html/admin/admin_list_holiday.tpl | 4 +- .../de/html/admin/admin_list_holiday_row.tpl | 2 +- .../de/html/admin/admin_list_payments.tpl | 6 +- .../html/admin/admin_list_rallye_prices.tpl | 6 +- .../de/html/admin/admin_list_rallyes.tpl | 6 +- .../de/html/admin/admin_list_sponsor_pay.tpl | 6 +- .../html/admin/admin_list_sponsor_pay_del.tpl | 4 +- .../admin/admin_list_sponsor_pay_del_row.tpl | 2 +- .../admin/admin_list_sponsor_pay_edit.tpl | 4 +- .../admin/admin_list_sponsor_pay_edit_row.tpl | 10 +- .../html/admin/admin_list_sponsor_pay_row.tpl | 2 +- .../html/admin/admin_list_task_ext_rows.tpl | 2 +- .../de/html/admin/admin_list_task_rows.tpl | 2 +- .../de/html/admin/admin_lock_sponsor.tpl | 4 +- templates/de/html/admin/admin_lock_user.tpl | 4 +- templates/de/html/admin/admin_login_form.tpl | 8 +- templates/de/html/admin/admin_logout_form.tpl | 4 +- .../de/html/admin/admin_maintenance_form.tpl | 2 +- templates/de/html/admin/admin_member_add.tpl | 6 +- .../html/admin/admin_member_selection_box.tpl | 8 +- .../de/html/admin/admin_menu_overview_row.tpl | 2 +- .../de/html/admin/admin_menu_status_row.tpl | 2 +- .../de/html/admin/admin_mmenu_delete.tpl | 6 +- .../de/html/admin/admin_mmenu_delete_row.tpl | 2 +- templates/de/html/admin/admin_mmenu_edit.tpl | 8 +- .../de/html/admin/admin_mmenu_edit_row.tpl | 2 +- .../de/html/admin/admin_mmenu_overview.tpl | 8 +- .../de/html/admin/admin_mmenu_status.tpl | 6 +- templates/de/html/admin/admin_mods_edit.tpl | 4 +- .../de/html/admin/admin_mods_edit_row.tpl | 4 +- templates/de/html/admin/admin_mods_list.tpl | 4 +- .../de/html/admin/admin_mods_list_row.tpl | 2 +- templates/de/html/admin/admin_newsletter.tpl | 14 +- .../de/html/admin/admin_newsletter_nohtml.tpl | 12 +- .../de/html/admin/admin_newsletter_tsk.tpl | 6 +- .../de/html/admin/admin_overview_footer.tpl | 10 +- .../html/admin/admin_overview_footer_task.tpl | 10 +- .../admin/admin_overview_list_ext_rows.tpl | 2 +- .../html/admin/admin_overview_list_rows.tpl | 2 +- .../de/html/admin/admin_overview_task.tpl | 2 +- .../de/html/admin/admin_payments_list_row.tpl | 2 +- .../html/admin/admin_payout_accept_form.tpl | 4 +- .../de/html/admin/admin_payout_add_new.tpl | 20 +- .../html/admin/admin_payout_overview_form.tpl | 4 +- .../html/admin/admin_payout_reject_form.tpl | 4 +- templates/de/html/admin/admin_points.tpl | 6 +- templates/de/html/admin/admin_points_del.tpl | 4 +- .../de/html/admin/admin_points_del_row.tpl | 2 +- templates/de/html/admin/admin_points_edit.tpl | 4 +- .../de/html/admin/admin_points_edit_row.tpl | 4 +- templates/de/html/admin/admin_points_row.tpl | 2 +- templates/de/html/admin/admin_refbanner.tpl | 6 +- .../de/html/admin/admin_refbanner_edit.tpl | 4 +- .../html/admin/admin_refbanner_edit_row.tpl | 6 +- .../de/html/admin/admin_refbanner_row.tpl | 4 +- templates/de/html/admin/admin_reg_form.tpl | 10 +- .../de/html/admin/admin_reset_password.tpl | 6 +- .../html/admin/admin_reset_password_form.tpl | 12 +- .../de/html/admin/admin_send_bonus_form.tpl | 14 +- .../de/html/admin/admin_send_bonus_select.tpl | 4 +- .../de/html/admin/admin_send_reset_link.tpl | 6 +- templates/de/html/admin/admin_sub_points.tpl | 6 +- .../de/html/admin/admin_sub_points_all.tpl | 6 +- templates/de/html/admin/admin_theme_edit.tpl | 6 +- .../de/html/admin/admin_theme_edit_row.tpl | 4 +- .../de/html/admin/admin_unlock_emails.tpl | 10 +- .../html/admin/admin_unlock_emails_redir.tpl | 4 +- .../admin/admin_unlock_emails_redir_row.tpl | 2 +- .../de/html/admin/admin_unlock_emails_row.tpl | 6 +- .../de/html/admin/admin_unlock_sponsor.tpl | 4 +- .../html/admin/admin_unlock_sponsor_row.tpl | 2 +- .../html/admin/admin_unlock_surfbar_urls.tpl | 6 +- .../admin/admin_unlock_surfbar_urls_row.tpl | 2 +- .../admin/admin_validate_reset_hash_form.tpl | 8 +- templates/de/html/doubler/doubler_index.tpl | 12 +- templates/de/html/guest/guest_cat_row.tpl | 4 +- .../de/html/guest/guest_confirm_link.tpl | 6 +- templates/de/html/guest/guest_frametester.tpl | 10 +- templates/de/html/guest/guest_header.tpl | 4 +- templates/de/html/guest/guest_login.tpl | 16 +- templates/de/html/guest/guest_menu_whats.tpl | 2 +- .../de/html/guest/guest_nickname_login.tpl | 16 +- templates/de/html/guest/guest_register.tpl | 24 +- .../de/html/guest/guest_register_refid.tpl | 2 +- .../html/guest/guest_register_refid_hide.tpl | 2 +- .../de/html/guest/guest_sponsor_activate.tpl | 10 +- .../de/html/guest/guest_sponsor_login.tpl | 10 +- .../de/html/guest/guest_sponsor_lost.tpl | 8 +- templates/de/html/guest/guest_sponsor_reg.tpl | 40 +- templates/de/html/index.tpl | 2 +- .../de/html/install/install_finished.tpl | 4 +- templates/de/html/install/install_page1.tpl | 12 +- templates/de/html/install/install_page2.tpl | 24 +- templates/de/html/install/install_page3.tpl | 32 +- templates/de/html/install/install_welcome.tpl | 4 +- templates/de/html/loader.tpl | 2 +- .../de/html/mailid/mailid_confirm_buttom.tpl | 4 +- .../de/html/mailid/mailid_enter_code.tpl | 4 +- .../de/html/mailid/mailid_points_done.tpl | 48 +-- templates/de/html/mailid/mailid_timer.tpl | 2 +- templates/de/html/member/member_cat_row.tpl | 4 +- .../de/html/member/member_cats_footer.tpl | 4 +- templates/de/html/member/member_header.tpl | 4 +- .../html/member/member_holiday_deactivate.tpl | 4 +- .../de/html/member/member_holiday_form.tpl | 4 +- .../html/member/member_html_mail_settings.tpl | 8 +- .../de/html/member/member_menu_whats.tpl | 2 +- .../de/html/member/member_mydata_button.tpl | 2 +- .../de/html/member/member_mydata_edit.tpl | 20 +- .../de/html/member/member_newsletter.tpl | 4 +- .../de/html/member/member_nickname_form.tpl | 6 +- .../de/html/member/member_order-back.tpl | 6 +- .../de/html/member/member_order-html_ext.tpl | 2 +- .../html/member/member_order-html_intro.tpl | 4 +- .../de/html/member/member_order-zip1.tpl | 2 +- .../de/html/member/member_order-zip2.tpl | 2 +- .../de/html/member/member_order_back.tpl | 6 +- .../html/member/member_order_frametester.tpl | 14 +- .../de/html/member/member_order_page1.tpl | 4 +- .../de/html/member/member_order_page2.tpl | 10 +- .../de/html/member/member_payout_form.tpl | 12 +- .../html/member/member_payout_form_banner.tpl | 12 +- .../de/html/member/member_primera_form.tpl | 10 +- .../html/member/member_primera_mode_pay.tpl | 10 +- .../de/html/member/member_reflinks_row.tpl | 2 +- .../html/member/member_support_contcted.tpl | 4 +- .../de/html/member/member_support_form.tpl | 8 +- templates/de/html/member/member_themes.tpl | 4 +- .../de/html/member/member_transfer_new.tpl | 10 +- .../html/member/member_transfer_settings.tpl | 8 +- templates/de/html/member/member_welcome.tpl | 2 +- templates/de/html/profile-update.tpl | 4 +- .../de/html/sponsor/sponsor_account_form.tpl | 38 +- .../de/html/sponsor/sponsor_fillup_form.tpl | 4 +- .../de/html/sponsor/sponsor_settings_form.tpl | 10 +- templates/de/html/sponsor/sponsor_what.tpl | 2 +- templates/de/html/theme_select_form.tpl | 2 +- view.php | 6 +- 532 files changed, 3391 insertions(+), 3370 deletions(-) diff --git a/DOCS/de/CSS-PATCHES_05092004.txt b/DOCS/de/CSS-PATCHES_05092004.txt index be3f16e410..99cd4c817d 100644 --- a/DOCS/de/CSS-PATCHES_05092004.txt +++ b/DOCS/de/CSS-PATCHES_05092004.txt @@ -79,7 +79,7 @@ templates/guest_menu_bottom.tpl.de $content [-- ADD BEFORE: --] -·  +·  [-- OPEN: --] templates/guest_menu_row.tpl.de @@ -88,6 +88,6 @@ templates/guest_menu_row.tpl.de $content [-- ADD BEFORE: --] -·  +·  [-- CLOSE/SAVE FILES --] diff --git a/DOCS/en/CSS-PATCHES_05092004.txt b/DOCS/en/CSS-PATCHES_05092004.txt index ec0c4a416e..4a636e3627 100644 --- a/DOCS/en/CSS-PATCHES_05092004.txt +++ b/DOCS/en/CSS-PATCHES_05092004.txt @@ -73,7 +73,7 @@ templates/guest_menu_bottom.tpl.de $content [-- ADD BEFORE: --] -·  +·  [-- OPEN: --] templates/guest_menu_row.tpl.de @@ -82,6 +82,6 @@ templates/guest_menu_row.tpl.de $content [-- ADD BEFORE: --] -·  +·  [-- CLOSE/SAVE FILES --] diff --git a/beg.php b/beg.php index f76da26f19..d1c103f611 100644 --- a/beg.php +++ b/beg.php @@ -70,7 +70,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if ("".($_GET['uid'] + 0)."" !== "".$_GET['uid']."") { if (EXT_IS_ACTIVE("nickname")) { // Maybe we have found a nickname? - $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array($_GET['uid']), __FILE__, __LINE__); } else { // Nickname entered but nickname is not active @@ -79,7 +79,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { } } else { // Direct userid - $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['uid'])), __FILE__, __LINE__); } @@ -121,11 +121,11 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // User id valid and not webmaster's id? if (($uid > 0) && (getConfig('beg_uid') != $uid)) { // Update counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array($uid), __FILE__, __LINE__); // Check for last entry for userid w/o IP number - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_timeout').") OR (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_uid_timeout').") AND userid=%s)) AND (remote_ip='%s' OR sid='%s') LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_beg_ips` WHERE (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_timeout').") OR (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_uid_timeout').") AND userid=%s)) AND (remote_ip='%s' OR sid='%s') LIMIT 1", array($uid, GET_REMOTE_ADDR(), session_id()), __FILE__, __LINE__); // Entry not found, points set and not logged in? @@ -136,7 +136,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Remember remote address, userid and timestamp for next click // but only when there is no admin begging. // Admins shall be able to test it! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_beg_ips (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_beg_ips` (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())", array($uid, GET_REMOTE_ADDR(), session_id()), __FILE__, __LINE__); // Was is successfull? @@ -211,7 +211,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { $msg = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status); } elseif (($uid == "0") || ($status == "failed")) { // Inalid or locked account, so let's find out - $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array($_GET['uid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Locked account diff --git a/birthday_confirm.php b/birthday_confirm.php index 23c81d7c08..75ea9aa846 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -60,8 +60,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Check if link is not clicked so far $result = SQL_QUERY_ESC("SELECT b.points, d.gender, d.surname, d.family, d.status, d.ref_payout -FROM "._MYSQL_PREFIX."_user_birthday AS b -INNER JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_birthday` AS b +INNER JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON b.userid=d.userid WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", array($uid, $chk), __FILE__, __LINE__); @@ -83,7 +83,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower(getConfig('birthday_mode'))); // Remove entry from table - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%s AND chk_value='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1", array($uid, $chk), __FILE__, __LINE__); // Update mediadata if version is 0.0.4 or newer diff --git a/click.php b/click.php index 13431b1f3e..2cb035d082 100644 --- a/click.php +++ b/click.php @@ -46,7 +46,7 @@ require("inc/config.php"); if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) { // Update clicks counter... - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_refbanner` SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { if (!empty($_GET['user'])) { LOAD_URL("ref.php?refid=".bigintval($_GET['user'])); diff --git a/doubler.php b/doubler.php index 3cf72bb08e..9af55bf61c 100644 --- a/doubler.php +++ b/doubler.php @@ -67,11 +67,11 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Do we have nickname or userid set? if ($probe_nickname) { // Nickname in URL, so load the ID - $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); } else { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); } @@ -103,11 +103,11 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { $probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($_POST['userid'])."") != $_POST['userid'])); if ($probe_nickname) { // Nickname in URL, so load the ID - $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array($_POST['userid']), __FILE__, __LINE__); } else { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_POST['userid'])), __FILE__, __LINE__); } @@ -136,7 +136,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if (($points - getConfig('doubler_left') - $_POST['points'] * getConfig('doubler_charge')) >= 0) // Enough points are left so let's continue with the doubling process // Create doubling "account" width *DOUBLED* points - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".GET_REMOTE_ADDR()."', UNIX_TIMESTAMP(), 'N','N')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".GET_REMOTE_ADDR()."', UNIX_TIMESTAMP(), 'N','N')", array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__); // Subtract entered points @@ -150,7 +150,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Add second line for the referal but only when uid != refid if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) { // Okay add a refid line and apply refid percents - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".GET_REMOTE_ADDR()."',UNIX_TIMESTAMP(),'N','Y')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".GET_REMOTE_ADDR()."',UNIX_TIMESTAMP(),'N','Y')", array( bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * getConfig('doubler_ref')) diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index d133ca7a7c..8e8f722ffc 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -53,8 +53,8 @@ if ((getConfig('auto_purge_active') == "Y") && (getConfig('auto_purge') > 0)) { // Then check for outdated mail order. We don't delete them just the confirmation links will be deleted. $result = SQL_QUERY_ESC("SELECT s.id, s.userid, s.pool_id, t.price -FROM "._MYSQL_PREFIX."_user_stats AS s -LEFT JOIN "._MYSQL_PREFIX."_payments AS t +FROM `{!MYSQL_PREFIX!}_user_stats` AS s +LEFT JOIN `{!MYSQL_PREFIX!}_payments` AS t ON s.payment_id=t.id WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", array(bigintval($PURGE)), __FILE__, __LINE__); @@ -63,7 +63,7 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", $uid = 0; $points = 0; while(list($mid, $sender, $pool, $price) = SQL_FETCHROW($result)) { // Check if confirmation links are purged or not - $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s LIMIT 1", + $result_links = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_links` WHERE stats_id=%s LIMIT 1", array(bigintval($mid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_links) == 1) { // Free memory @@ -80,11 +80,11 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", $uid = $sender; $points += $price; $admin_points += $price; // Remove confirmation links from queue - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE stats_id=%s", array(bigintval($mid)), __FILE__, __LINE__); // Update status of order - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='DELETED' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='DELETED' WHERE id=%s LIMIT 1", array(bigintval($pool)), __FILE__, __LINE__); } // END - if } // END - while @@ -99,14 +99,14 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", // Is the 'bonus' extension installed and activated? if (EXT_IS_ACTIVE("bonus", true)) { // Check for bonus campaigns - $result = SQL_QUERY_ESC("SELECT id, points FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND' AND timestamp <= %s ORDER BY id", + $result = SQL_QUERY_ESC("SELECT id, points FROM `{!MYSQL_PREFIX!}_bonus` WHERE data_type='SEND' AND timestamp <= %s ORDER BY id", array(bigintval($PURGE)), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start deleting procedure $points = 0; while (list($bid, $price) = SQL_FETCHROW($result)) { // Check if confirmation links are purged or not - $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s", + $result_links = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s", array(bigintval($bid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_links) > 0) { // At least one link was found, enougth to pay back the points @@ -116,11 +116,11 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", SQL_FREERESULT($result_links); // Remove confirmation links from queue - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s", array(bigintval($bid)), __FILE__, __LINE__); // Update status of order - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='DELETED' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_bonus` SET data_type='DELETED' WHERE id=%s LIMIT 1", array(bigintval($bid)), __FILE__, __LINE__); } // END - if } // END - while diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index 679bd906bc..65250b8a9d 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -67,7 +67,7 @@ if (getConfig('autopurge_inactive') == "Y") { // Check for all accounts $result_inactive = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.email, d.last_online -FROM `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_data` AS d WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s) ".$EXCLUDE_LIST." ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); @@ -91,7 +91,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); SEND_EMAIL($email, AUTOPURGE_MEMBER_INACTIVE_SUBJECT, $msg); // Update this account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } // END - while @@ -109,7 +109,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); // here for e.g. excluding holiday users $time = bigintval(getConfig('ap_in_time')); $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online -FROM `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_data` AS d WHERE status='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND last_online < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s) ".$EXCLUDE_LIST." ORDER BY userid", diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index c523c807ac..0adcd3e187 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -48,7 +48,7 @@ if (getConfig('ap_del_mails') == "Y") { // Okay, let's check for them... $since = bigintval(getConfig('ap_dm_timeout')); $result_mails = SQL_QUERY_ESC("SELECT sender\ -FROM "._MYSQL_PREFIX."_pool +FROM `{!MYSQL_PREFIX!}_pool` WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", array($since), __FILE__, __LINE__); @@ -61,18 +61,18 @@ ORDER BY sender ASC", // Okay, check for their sender's while(list($sender) = SQL_FETCHROW($result_mails)) { // Check now... - $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); if ($found == 0) { // Okay we found some mails! - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE sender=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_pool` WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__); $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... $since = bigintval(getConfig('ap_dm_timeout')); $result_mails = SQL_QUERY_ESC("SELECT sender -FROM "._MYSQL_PREFIX."_pool +FROM `{!MYSQL_PREFIX!}_pool` WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", array($since), __FILE__, __LINE__); @@ -86,7 +86,7 @@ ORDER BY sender ASC", // Now let's check for stats entries as well $since = bigintval(getConfig('ap_dm_timeout')); $result_mails = SQL_QUERY_ESC("SELECT sender -FROM "._MYSQL_PREFIX."_user_stats +FROM `{!MYSQL_PREFIX!}_user_stats` WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", array($since), __FILE__, __LINE__); @@ -96,16 +96,16 @@ ORDER BY sender ASC", // Okay, check for their sender's while(list($sender) = SQL_FETCHROW($result_mails)) { // Check now... - $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); + $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); if ($found == 0) { // Okay we found some mails! - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_stats` WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__); $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... $since = bigintval(getConfig('ap_dm_timeout')); $result_mails = SQL_QUERY_ESC("SELECT sender -FROM "._MYSQL_PREFIX."_user_stats +FROM `{!MYSQL_PREFIX!}_user_stats` WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", array($since), __FILE__, __LINE__); diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php index ed61827b87..470c7cb2ea 100644 --- a/inc/autopurge/purge-tsks.php +++ b/inc/autopurge/purge-tsks.php @@ -50,7 +50,7 @@ if ((GET_EXT_VERSION("task") > "0.0") && (getConfig('ap_tasks') == "Y")) { // Purge deleted tasks (no notification to admin) SQL_QUERY_ESC("DELETE LOW_PRIORITY -FROM "._MYSQL_PREFIX."_task_system +FROM `{!MYSQL_PREFIX!}_task_system` WHERE status='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)", array($since), __FILE__, __LINE__); $DELETED = SQL_AFFECTEDROWS(); diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index 2471dfcf27..5313b4dd7b 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -48,7 +48,7 @@ if (getConfig('autopurge_unconfirmed') == "Y") { // Init variables and find unconfirmed accounts which I shall auto-purge $time = bigintval(getConfig('ap_un_time')); $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) ORDER BY userid ASC", array($time), __FILE__, __LINE__); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index ada4e4795f..0767c5f162 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -313,14 +313,27 @@ function SQL_ESCAPE ($str, $secureString=true,$strip=true) { return addslashes($str); } } + // SELECT query string from table, columns and so on... ;-) function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { + // Is columns an array? + if (!is_array($columns) { + // No array + trigger_error(sprintf("columns is not array. %s!=array", gettype($columns))); + } + // Prepare the SQL statement - $SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%s LIMIT 1"; + $SQL = "SELECT `".implode("`, `", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE ``='%s' LIMIT 1"; // Return the result - return SQL_QUERY_ESC($SQL, array(bigintval($id)), $F, $L); + return SQL_QUERY_ESC($SQL, + array( + bigintval($id), + $table, + $idRow + ), $F, $L); } + // ALTER TABLE wrapper function function SQL_ALTER_TABLE ($sql, $F, $L) { // This is the default result... diff --git a/inc/doubler_send.php b/inc/doubler_send.php index d584f47f4b..7bc256c5a1 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -56,16 +56,16 @@ if (empty($DOUBLER_UID)) $DOUBLER_UID = 0; // Check for doubles which we can pay out $min = bigintval(getConfig('doubler_min') * 2); $result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark -FROM "._MYSQL_PREFIX."_doubler AS d -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS u +FROM `{!MYSQL_PREFIX!}_doubler` AS d +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS u ON d.userid=u.userid WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N' ORDER BY d.timemark", array($DOUBLER_POINTS, $min), __FILE__, __LINE__); // Check for accounts with limitation $result_main = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark -FROM "._MYSQL_PREFIX."_doubler AS d -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS u +FROM `{!MYSQL_PREFIX!}_doubler` AS d +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS u ON d.userid=u.userid WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N' ORDER BY d.timemark @@ -89,7 +89,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) if (($ref > 0) && ($DOUBLER_UID == $uid) && (!empty($ref))) { // Referal points found so add them and set line(s) to completed='Y' $points += $ref; - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'", array(bigintval($uid)), __FILE__, __LINE__); } else { // No referal points found @@ -103,7 +103,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) } // END - if // Set entry as "payed" - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $OK = false; diff --git a/inc/extensions.php b/inc/extensions.php index b6793eacac..c98644a484 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -216,7 +216,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr RUN_FILTER('pre_extension_installed', array('dry_run' => $dry_run, 'sqls' => $SQLs)); // Register extension - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_extensions` (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')", array($ext_name, $EXT_ALWAYS_ACTIVE, $EXT_VERSION), __FILE__, __LINE__); // Remove cache file(s) if extension is active @@ -243,7 +243,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr } } elseif (($task_id > 0) && (!empty($ext_name))) { // Remove task from system when id and extension's name is valid - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND status='NEW' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_task_system` WHERE id=%s AND status='NEW' LIMIT 1", array(bigintval($task_id)), __FILE__, __LINE__); } @@ -296,7 +296,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { // Removal mode? if ($load_mode == "remove") { // Delete this extension (remember to remove it from your server *before* you click on welcome! - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); } // END - if } // END - if @@ -337,7 +337,7 @@ function EXT_IS_ACTIVE ($ext_name) { } elseif (($ext_name == "cache") || (GET_EXT_VERSION("cache") == "")) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}"); // Load from database - $result = SQL_QUERY_ESC("SELECT ext_active FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT ext_active FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); // Entry found? @@ -383,7 +383,7 @@ function GET_EXT_VERSION ($ext_name) { incrementConfigEntry('cache_hits'); } elseif (!is_object($cacheInstance)) { // Load from database - $result = SQL_QUERY_ESC("SELECT ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT ext_version FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); // Is the extension there? @@ -479,7 +479,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { CREATE_EXTENSION_UPDATE_TASK(GET_CURRENT_ADMIN_ID(), $ext_name, $cacheArray['update_ver'][$ext_name], addslashes($NOTES)); // Update extension's version - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_version='%s' WHERE ext_name='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_version='%s' WHERE ext_name='%s' LIMIT 1", array($cacheArray['update_ver'][$ext_name], $ext_name), __FILE__, __LINE__); // Remove arrays @@ -568,7 +568,7 @@ function GET_EXT_NAME ($ext_id) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT ext_name FROM `{!MYSQL_PREFIX!}_extensions` WHERE id=%s LIMIT 1", array(bigintval($ext_id)), __FILE__, __LINE__); list($ret) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -590,7 +590,7 @@ function GET_EXT_ID ($ext_name) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); list($ret) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -603,7 +603,7 @@ function GET_EXT_ID ($ext_name) { // Activate given extension function ACTIVATE_EXTENSION ($ext_name) { // Activate the extension - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_active='Y' WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); // Extension has been activated? @@ -616,7 +616,7 @@ function ACTIVATE_EXTENSION ($ext_name) { // Deactivate given extension function DEACTIVATE_EXTENSION($ext_name) { // Activate the extension - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_active='N' WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); // Extension has been activated? @@ -648,14 +648,14 @@ function EXT_VERSION_IS_OLDER ($ext_name, $ext_ver) { // Creates a new task for updated extension function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $ext_name, $ext_ver, $notes) { // Create subject line - $subject = "[UPDATE-".$ext_name."-".$ext_ver.":] ".ADMIN_UPDATE_EXT_SUBJ; + $subject = "[UPDATE-".$ext_name."-".$ext_ver.":] {!ADMIN_UPDATE_EXT_SUBJ!}"; // Is the extension there? if (GET_EXT_VERSION($ext_name) != "") { // Check if task is not there if (DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) { // Task not created so it's a brand-new extension which we need to register and create a task for! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())", array($admin_id, $subject, $notes), __FILE__, __LINE__); } // END - if } // END - if @@ -682,7 +682,7 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) { } // Task not created so it's a brand-new extension which we need to register and create a task for! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())", array( $admin_id, @@ -701,7 +701,7 @@ function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) { // Not installed and do we have created a task for the admin? if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) != "")) { // Task not created so add it - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES (0,0,'NEW','EXTENSION_DEACTIVATION','%s','%s',UNIX_TIMESTAMP())", array( $subject, @@ -734,7 +734,7 @@ function MODULE_HAS_MENU ($mod, $forceDb = false) { } } elseif ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ((!EXT_IS_ACTIVE("cache")) || ($forceDb === true))) { // Check database for entry - $result = SQL_QUERY_ESC("SELECT has_menu FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT has_menu FROM `{!MYSQL_PREFIX!}_mod_reg` WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__); // Entry found? @@ -767,7 +767,7 @@ function DETERMINE_EXTENSION_TASK_ID ($ext_name) { $task_id = 0; // Search for extension task's id - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE task_type='EXTENSION' AND subject='[%s:]' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_task_system` WHERE task_type='EXTENSION' AND subject='[%s:]' LIMIT 1", array($ext_name), __FILE__, __LINE__); // Entry found? @@ -789,7 +789,7 @@ function DETERMINE_TASK_ID_BY_SUBJECT ($subject) { $task_id = 0; // Search for task id - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '%s%%' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_task_system` WHERE subject LIKE '%s%%' LIMIT 1", array($subject), __FILE__, __LINE__); // Entry found? diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index b9de7cb7a9..6939a6199c 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -50,7 +50,7 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')"; // Load CSS file? $EXT_CSS = "Y"; @@ -58,8 +58,8 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='active' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_active' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE what='active' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_active' LIMIT 1"; // Unregister filter UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run); @@ -67,12 +67,12 @@ case "remove": // Do stuff when removing extension case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='N' WHERE what='active' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='N' WHERE what='active' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='active' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='Y' WHERE what='active' LIMIT 1"; break; case "update": // Update an extension @@ -99,8 +99,8 @@ case "update": // Update an extension break; case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschränkbar."; diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 25d50767ae..a3624c8c1e 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -50,17 +50,17 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='admins' LIMIT 6"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_acls"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP default_acl"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='admins' LIMIT 6"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admins_acls`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admins_mails`"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` DROP default_acl"; // Remove filters UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run); @@ -80,7 +80,7 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.2": // SQL queries for v0.2 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Fügt den Menüpunkt "Admin kontaktieren" hinzu."; @@ -88,18 +88,18 @@ case "update": // Update an extension case "0.3": // SQL queries for v0.3 // Add admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')"; // Which is the default setting when you create a new admin login? - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"; // Default is deny everything - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"; // But allow current admin everything (THIS SHALL BE YOU!) - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admins SET default_acl='allow' WHERE login='".get_session('admin_login')."' LIMIT 1"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_acls"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_acls ( + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".get_session('admin_login')."' LIMIT 1"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admins_acls`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_admins_acls` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, action_menu VARCHAR(255) NOT NULL DEFAULT '', @@ -114,26 +114,26 @@ PRIMARY KEY (id) break; case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins_acls MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT"; break; case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_mails ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admins_mails`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_admins_mails` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mail_template VARCHAR(255) NOT NULL, KEY (admin_id), PRIMARY KEY (id) ) TYPE=MyISAM"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet."; break; case "0.4.1": // SQL queries for v0.4.1 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template LIKE '% %'"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Admins-Mails-Tabelle geleert."; @@ -199,7 +199,7 @@ PRIMARY KEY (id) break; case "0.5.6": // SQL queries for v0.5.6 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; @@ -211,7 +211,7 @@ PRIMARY KEY (id) break; case "0.5.8": // SQL queries for v0.5.8 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update."; @@ -253,14 +253,14 @@ PRIMARY KEY (id) break; case "0.6.6": // SQL queries for v0.5.6 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; break; case "0.6.7": // SQL queries for v0.6.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact. Beseitigung eines Fehlers HTTP_POSR_VARS beim Ändern von Administratoren."; @@ -272,7 +272,7 @@ PRIMARY KEY (id) break; case "0.6.9": // SQL queries for v0.6.9 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (what='' OR what IS NULL) LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (what='' OR what IS NULL) LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Verwaltung nach Management umbenannt."; @@ -295,10 +295,10 @@ PRIMARY KEY (id) break; case "0.7.2": // SQL queries for v0.7.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP login_failtures"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP last_failture"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` DROP login_failtures"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` DROP last_failture"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Schreibweise korregiert."; diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index 72b2300050..00957bdff4 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -50,10 +50,10 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Remove all other themes - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='usr_online' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='email_stats' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='misc' WHERE what='maintenance' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='usr_online' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='email_stats' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET action='misc' WHERE what='maintenance' LIMIT 1"; break; case "remove": // Do stuff when removing extension diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index 5934c04fd1..ceaf384697 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -50,10 +50,10 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Remove all other menu themes - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='misc' WHERE what='usr_online' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='email' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='setup' WHERE what='maintenance' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET action='misc' WHERE what='usr_online' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='email' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET action='setup' WHERE what='maintenance' LIMIT 1"; break; case "remove": // Do stuff when removing extension diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 3566621b66..095d4b38bc 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -50,22 +50,22 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'"; if (EXT_IS_ACTIVE("bonus")) { - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"; } break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'"; if (EXT_IS_ACTIVE("bonus")) { - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"; } - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what IN('config_autopurge','list_autopurge') LIMIT 2"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP ap_notified"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge') LIMIT 2"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP ap_notified"; break; case "activate": // Do stuff when admin activates this extension @@ -82,14 +82,14 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.1": // SQL queries for v0.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt."; @@ -127,17 +127,17 @@ case "update": // Update an extension break; case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

Bitte aktualisieren Sie auch die Admin-Templates!"; break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mail wird bei Löschung von Aufgaben ausgesendet.

Bitte aktualisieren Sie auch die Admin-Templates!"; @@ -204,9 +204,9 @@ case "update": // Update an extension break; case "0.3.3": // SQL queries for v0.3.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Von bereits gelöschten Mitgliedern die Mails löschen integriert."; diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index dee1883609..f34653cd4a 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_accounts ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_accounts`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_bank_accounts` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -77,8 +77,8 @@ INDEX (account_created), INDEX (account_locked), INDEX (last_tan_stamp) ) TYPE=MyISAM"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_transfers ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_transfers`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_bank_transfers` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -90,8 +90,8 @@ PRIMARY KEY (id), INDEX (to_account_id, from_account_id), INDEX (day_bookkeeping, day_available) ) TYPE=MyISAM"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_packages"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_packages ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_packages`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_bank_packages` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL DEFAULT '', description TINYTEXT, @@ -114,8 +114,8 @@ PRIMARY KEY (id) // what the member shall get for the specified income. output_system_mode // must be extended with the mode you get for free: output_system_mode:LOGIN // should be fine. More than one entry and not DISABLED ;) are not supported. - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_tanlist ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_tanlist`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_bank_tanlist` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -126,50 +126,50 @@ UNIQUE (account_id, tan) ) TYPE=MyISAM"; // Admin menu queries - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)"; // Member menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_packages"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='bank' LIMIT 14"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='bank' LIMIT 8"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_accounts`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_transfers`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_packages`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bank_tanlist`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='bank' LIMIT 14"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE action='bank' LIMIT 8"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE action='bank' LIMIT 8"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE action='bank' LIMIT 8"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE action='bank' LIMIT 8"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE action='bank' LIMIT 8"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index c070d2b991..4b209a3c93 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -50,15 +50,15 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Vergütung usw. können Sie hier einstellen.', 10)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_beg_ips`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_beg_ips` ( + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Vergütung usw. können Sie hier einstellen.', 10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_beg_ips`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_beg_ips` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', @@ -73,24 +73,24 @@ PRIMARY KEY(id) case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_beg' OR what='list_beg' LIMIT 2"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='beg' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='beg' OR what='beg2' LIMIT 2"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_beg_ips`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_beg' OR what='list_beg' LIMIT 2"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE what='beg' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='beg' OR what='beg2' LIMIT 2"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_beg_ips`"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='beg' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='beg' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='Y', locked='N' WHERE what='beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='beg' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='beg' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what IN('beg','beg2') LIMIT 2"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='Y' WHERE module='beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='Y' WHERE what='beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what IN('beg','beg2') LIMIT 2"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='Y' WHERE module='beg' LIMIT 1"; break; case "update": // Update an extension @@ -107,7 +107,7 @@ case "update": // Update an extension break; case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})"; @@ -124,14 +124,14 @@ case "update": // Update an extension break; case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."; break; case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Zeitsperre gegen die selbe IP-Nummer hinzugefügt."; @@ -154,15 +154,15 @@ case "update": // Update an extension case "0.1.2": // SQL queries for v0.1.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $VIS = "N"; $LOCKED = "Y"; if (EXT_IS_ACTIVE("beg")) { $VIS = "Y"; $LOCKED = "N"; } - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Optionale Bettel-Rallye möglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können."; @@ -179,7 +179,7 @@ case "update": // Update an extension break; case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE what='config_beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE what='config_beg' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!"; @@ -191,14 +191,14 @@ case "update": // Update an extension break; case "0.1.7": // SQL queries for v0.1.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."; @@ -225,7 +225,7 @@ case "update": // Update an extension break; case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Eigene User-ID von Bettel-Rallye ausschliessbar."; @@ -237,8 +237,8 @@ case "update": // Update an extension break; case "0.2.4": // SQL queries for v0.2.4 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='1' WHERE what='beg' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='extras', sort='1' WHERE what='beg' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; @@ -250,8 +250,8 @@ case "update": // Update an extension break; case "0.2.6": // SQL queries for v0.2.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll."; @@ -266,7 +266,7 @@ default: // Do stuff when extension is loaded // Remove old entries $OLD = getConfig('beg_timeout'); if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout'); - $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__); + $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__); // Check for beg rallye is active and send mails out if ((getConfig('beg_rallye') == "Y") && (getConfig('beg_new_mem_notify') == "Y")) { diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 4338ca9c54..fd74abf307 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -50,14 +50,14 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP birthday_sent"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_birthday' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP birthday_sent"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_birthday`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_birthday' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension @@ -79,9 +79,9 @@ case "update": // Update an extension break; case "0.2": // SQL queries for v0.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_birthday ( + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_birthday`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_birthday` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -89,7 +89,7 @@ chk_value VARCHAR(255) NOT NULL DEFAULT '', KEY(userid), PRIMARY KEY(id) ) Type=MyISAM"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben."; @@ -161,8 +161,8 @@ PRIMARY KEY(id) break; case "0.3.6": // SQL queries for v0.3.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Vergütungsmodus des Geburtstagsbonus einstellbar."; @@ -179,7 +179,7 @@ PRIMARY KEY(id) break; case "0.3.9": // SQL queries for v0.3.9 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970"; diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index e5b7b0711f..44133ab88a 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -50,10 +50,10 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus ( + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_bonus` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, subject VARCHAR(255) NOT NULL DEFAULT '', @@ -70,39 +70,39 @@ mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY(cat_id), PRIMARY KEY (id) )TYPE=MyISAM"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD INDEX (bonus_id)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)"; // Run this SQL when html or html_mail extension is installed - if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"; + if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='bonus' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='bonus' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links DROP bonus_id"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='bonus' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='bonus' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_links` DROP bonus_id"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus_urls`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus_customer`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus_turbo`"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='bonus' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE action='bonus' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='Y', locked='N' WHERE action='bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='bonus' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE action='bonus' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='show_bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what='bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='Y' WHERE action='bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='Y' WHERE module='show_bonus' LIMIT 1"; break; case "update": // Update an extension @@ -114,32 +114,32 @@ case "update": // Update an extension break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter."; break; case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_bonus' LIMIT 1"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Use actual month for this update - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Login-Bonus und Turbo-Klick-Bonus intergriert."; break; case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus_turbo ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus_turbo`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_bonus_turbo` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -158,8 +158,8 @@ KEY userid (userid) break; case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='bonus' LIMIT 1"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt."; @@ -171,11 +171,11 @@ KEY userid (userid) break; case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus_urls`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_bonus_customer`"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Tabellen "._MYSQL_PREFIX."_bonus_urls und "._MYSQL_PREFIX."_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."; + $UPDATE_NOTES = "Tabellen {!MYSQL_PREFIX!}_bonus_urls und {!MYSQL_PREFIX!}_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."; break; case "0.2.6": // SQL queries for v0.2.6 @@ -189,12 +189,12 @@ KEY userid (userid) break; case "0.2.8": // SQL queries for v0.2.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert"; @@ -226,15 +226,15 @@ KEY userid (userid) break; case "0.3.4": // SQL queries for v0.3.4 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Link Aktiv-Rallye-Teilnehmer hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."; break; case "0.3.5": // SQL queries for v0.3.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."; @@ -261,11 +261,11 @@ KEY userid (userid) break; case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."; + $UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."; break; case "0.4.1": // SQL queries for v0.4.1 @@ -284,14 +284,14 @@ KEY userid (userid) break; case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_stats` ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Bonus-{!POINTS!} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben."; @@ -308,7 +308,7 @@ KEY userid (userid) break; case "0.4.7": // SQL queries for v0.4.7 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden."; @@ -364,7 +364,7 @@ KEY userid (userid) $mark = mktime(0, 0, 0, $curr, 1, date('Y', time())); // Update accounts which are not active last months - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0 WHERE last_online < ".$mark." ORDER BY userid"; @@ -401,14 +401,14 @@ WHERE last_online < ".$mark." ORDER BY userid"; break; case "0.6.4": // SQL queries for v0.6.4 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden."; break; case "0.6.5": // SQL queries for v0.6.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Fehler mit bonus_stats beseitigt."; @@ -423,18 +423,18 @@ WHERE last_online < ".$mark." ORDER BY userid"; break; case "0.6.8": // SQL queries for v0.6.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt."; break; case "0.6.9": // SQL queries for v0.6.9 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht)."; @@ -469,14 +469,14 @@ WHERE last_online < ".$mark." ORDER BY userid"; break; case "0.7.7": // SQL queries for v0.7.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."; @@ -500,15 +500,15 @@ WHERE last_online < ".$mark." ORDER BY userid"; break; case "0.8.2": // SQL queries for v0.8.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."; break; case "0.8.3": // SQL queries for v0.8.3 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; @@ -527,14 +527,14 @@ WHERE last_online < ".$mark." ORDER BY userid"; break; case "0.8.7": // SQL queries for v0.8.7 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)"; // Update notes $UPDATE_NOTES = "Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."; break; case "0.8.8": // SQL queries for v0.8.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes $UPDATE_NOTES = "Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."; diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 73ea712ff2..821f70b150 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -50,12 +50,12 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Configuration entries - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3).""; // Drop/create table for user bookings - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_book`( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_book`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_book`( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT 'missing', @@ -66,27 +66,27 @@ PRIMARY KEY(`id`) ) TYPE=MyISAM COMMENT='Member points booking table'"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)"; // Member menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')"; break; case "remove": // Do stuff when removing extension - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN ('config_booking','list_booking') LIMIT 2"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `what`='booking' LIMIT 1"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_book`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking') LIMIT 2"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE `what`='booking' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='booking' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='booking' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='booking' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what='booking' LIMIT 1"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 8856b76a46..edf26ee900 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -51,15 +51,15 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2"; // Unregister all filters UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); @@ -124,9 +124,9 @@ case "update": // Update an extension break; case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Hits auf den Cache werden gezählt."; @@ -154,17 +154,17 @@ case "update": // Update an extension case "0.1.2": // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Tabelen "._MYSQL_PREFIX."_config, "._MYSQL_PREFIX."_refsystem, "._MYSQL_PREFIX."_refdepths und "._MYSQL_PREFIX."_mod_reg werden nun auch ausgelagert."; + $UPDATE_NOTES = "Die Tabelen {!MYSQL_PREFIX!}_config, {!MYSQL_PREFIX!}_refsystem, {!MYSQL_PREFIX!}_refdepths und {!MYSQL_PREFIX!}_mod_reg werden nun auch ausgelagert."; break; case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält."; @@ -191,14 +191,14 @@ case "update": // Update an extension break; case "0.1.8": // SQL queries for v0.1.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Daten von installierten Themes werden nun gecacht."; break; case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Administratormenü experimentell gecacht."; diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index d66dc454d5..5bed3a3d1e 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_countries ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_countries`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_countries` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, code CHAR(2) NOT NULL DEFAULT 'DE', descr VARCHAR(255) NOT NULL DEFAULT 'Deutschland', @@ -59,20 +59,20 @@ is_active ENUM('Y','N') NOT NULL DEFAULT 'N', KEY(code), PRIMARY KEY(id) ) TYPE=MyISAM"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('DE','Deutschland','Y')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"; // Add entry to user table - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='country' LIMIT 2"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_countries`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='country' LIMIT 2"; break; case "activate": // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 886c135548..f8e51a88ef 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Table for debug log entries - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_log` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_log`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_debug_log` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', @@ -66,8 +66,8 @@ PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Debug log data'"; // Table against debug log abuse - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log_abuse`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_log_abuse` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_log_abuse`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_debug_log_abuse` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', @@ -78,8 +78,8 @@ PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Debug log abuse'"; // Table on relay/server for client exchanges - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_client` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_client`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_debug_client` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `key` VARCHAR(255) NOT NULL DEFAULT 'SELF', `url` VARCHAR(255) NOT NULL DEFAULT '', @@ -95,11 +95,11 @@ PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Debug clients'"; // Add this exchange as first client - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')"; // Table for debug log <-> client connection - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client_log`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_client_log` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_client_log`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_debug_client_log` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1, `log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -109,48 +109,48 @@ PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Debug client <-> log connection'"; // Guest menus - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis inc/cache/ befindet.',10)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die debug.log wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis inc/cache/ befindet.',10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die debug.log wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)"; // Config entries - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client_log`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log_abuse`"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE `action`='debug' LIMIT 5"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `action`='debug' LIMIT 6"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_client_log`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_client`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_log`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_debug_log_abuse`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug' LIMIT 5"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug' LIMIT 6"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index bb18e8f22a..08e7087249 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Doubler table - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_doubler ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_doubler`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_doubler` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -69,72 +69,72 @@ PRIMARY KEY(id) // --- SETTINGS --- // // Minimum points to double - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; // Maximum points to double - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"; // Points left on users account after doubling - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"; // Charge for doubling points which goes to the webmaster (shreddered in fact!) - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"; // Referal percents - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"; // Shall I use the jackpot to take points from? (Y/N, default=Y) - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // A user account to take points from (default: 0->none) - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Total payed out points from your doublers - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Sending mode of mails (immediately/daily reset) // --> This also means who fast the doubled points will be payed out! - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"; // Timeout for entries to be purged (default: one week) - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""; // Number of newest entries to display - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Number of entries which will be payed out soon - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Number of entries which are already payed out - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Points used by every member - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Counter for usage of the doubler - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // // --- MENU SYSTEMS --- // // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)"; // Guest menu (informations / default doubler link) - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"; // Member menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='doubler' LIMIT 3"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='doubler' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='doubler' LIMIT 1"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_doubler`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='doubler' LIMIT 3"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE what='doubler' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='doubler' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='Y' WHERE module='doubler' LIMIT 1"; break; case "update": // Update an extension @@ -147,7 +147,7 @@ case "update": // Update an extension case "0.0.2": // SQL queries for v0.0.2 // Total used points - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Gebühr wird vom Verdoppler-Pott abgezogen."; @@ -160,7 +160,7 @@ case "update": // Update an extension case "0.0.4": // SQL queries for v0.0.4 // Shall I use the doubler's account to take points from? (Y/N, default=Y) - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."; @@ -172,9 +172,9 @@ case "update": // Update an extension break; case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.
Template admin_config_doubler_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"; @@ -216,7 +216,7 @@ case "update": // Update an extension break; case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='4' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='extras', sort='4' WHERE what='doubler' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 128a8ba22e..62e9b2c3e0 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Create database - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_holidays ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_holidays`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_holidays` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, holiday_start VARCHAR(10) NOT NULL DEFAULT 0, @@ -62,38 +62,38 @@ PRIMARY KEY(id) ) TYPE=MyISAM"; // Add default values to config - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; // Add member menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')"; // Add admin menus - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')"; // Remove 0 max mails per day - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='holiday' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='holiday' LIMIT 4"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_max_receive (value, comment) VALUES ('0','Urlaub')"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_holidays`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='holiday' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='holiday' LIMIT 4"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='holiday' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='holiday' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='holiday' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what='holiday' LIMIT 1"; break; case "update": // Update an extension @@ -155,30 +155,30 @@ case "update": // Update an extension break; case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"; break; case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden."; break; case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; break; case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Fehlende Tabellenspalte hinzugefügt."; @@ -190,9 +190,9 @@ case "update": // Update an extension break; case "0.1.8": // SQL queries for v0.1.8 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"; // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin $EXT_UPDATE_DEPENDS = "sql_patches"; @@ -202,14 +202,14 @@ case "update": // Update an extension break; case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (what='' OR what IS NULL) LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (what='' OR what IS NULL) LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index 9edf5a461b..7b9d75e805 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -50,28 +50,28 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP html"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus DROP html_msg"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool DROP html_msg"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='html_mail' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP html"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_bonus` DROP html_msg"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_pool` DROP html_msg"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='html_mail' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='html_mail' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='html_mail' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='html_mail' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what='html_mail' LIMIT 1"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-iso3166.php b/inc/extensions/ext-iso3166.php index eaab53f82b..c323d11509 100644 --- a/inc/extensions/ext-iso3166.php +++ b/inc/extensions/ext-iso3166.php @@ -53,26 +53,26 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE FROM `"._MYSQL_PREFIX."_countries` WHERE provider = 'ext-iso3166';"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_countries` DROP `provider`;"; + $SQLs[] = "DELETE FROM `{!MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_countries` DROP `provider`;"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_countries` SET is_active='N' WHERE provider = 'ext-iso3166';"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';"; break; case "update": // Update an extension switch ($EXT_VER) { case "0.0.1": // SQL queries for v0.0.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_countries` (`code` , `descr`, `provider`) + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_countries` (`code` , `descr`, `provider`) VALUES ('AD', 'Andorra', 'ext-iso3166'), ('AE', 'Vereinigte Arabische Emirate', 'ext-iso3166'), ('AF', 'Afghanistan', 'ext-iso3166'), diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index 74c5ee2ea5..d2a985499c 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -50,13 +50,13 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogbücher','Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogbücher','Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='logs' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='logs' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index 86649ecd10..5bd1ebe1ba 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -60,12 +60,12 @@ case "remove": // Do stuff when removing extension case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='mailid' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='mailid' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='mailid' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='Y' WHERE module='mailid' LIMIT 1"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 8a4a2583a6..aceafbfcb4 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -50,13 +50,13 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='maintenance' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='maintenance' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 389c454f04..7eb9b594c0 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -55,9 +55,9 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_mediadata"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_mediadata' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='mediadata' LIMIT 1"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_mediadata`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_mediadata' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE what='mediadata' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension @@ -90,8 +90,8 @@ case "update": // Update an extension case "0.0.4": // SQL queries for v0.0.4 // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_mediadata"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_mediadata ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_mediadata`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_mediadata` ( media_key VARCHAR(255) NOT NULL DEFAULT '', media_value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(media_key) @@ -112,9 +112,9 @@ PRIMARY KEY(media_key) break; case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)
@@ -127,7 +127,7 @@ Bitte stellen Sie diesen derzeit manuell unter hier die Verzögerungszeit in der Eingangsseite einstellen."; break; case "0.1.2": // SQL queries for v0.1.2 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"; break; case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"; @@ -239,20 +239,20 @@ case "update": // Update an extension break; case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP ext_has_admin"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_extensions` DROP ext_has_admin"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle "._MYSQL_PREFIX."_extensions entfernt, da sie keinen Sinn mehr macht."; + $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle {!MYSQL_PREFIX!}_extensions entfernt, da sie keinen Sinn mehr macht."; break; case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."; @@ -274,21 +274,21 @@ case "update": // Update an extension break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_points` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_points` CHANGE locked_points locked_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert"; break; case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."; @@ -300,9 +300,9 @@ case "update": // Update an extension break; case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."; @@ -314,30 +314,30 @@ case "update": // Update an extension // Switch to JPEG format $auto_type = "jpg"; } - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."; break; case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Spalten max_mails und receive_mails auf BIGINT(20) gesetzt."; break; case "0.2.6": // SQL queries for v0.2.6 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Abzug von {!POINTS!} nun möglich."; break; case "0.2.7": // SQL queries for v0.2.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "
    @@ -347,61 +347,61 @@ case "update": // Update an extension break; case "0.2.8": // SQL queries for v0.2.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_login VARCHAR(10) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD last_login VARCHAR(10) NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt."; break; case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; break; case "0.3.0": // SQL queries for v0.3.0 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title='Mailvergütungen...' WHERE `what`='payments' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title='Mailvergütungen...' WHERE `what`='payments' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Zwei Menüpunkte umbenannt."; break; case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD UNIQUE KEY (ext_name)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD UNIQUE KEY (login)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refdepths ADD UNIQUE KEY (level)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refsystem ADD INDEX (level)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD INDEX (data_type)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD UNIQUE KEY (module)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` ADD INDEX (action)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_type)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_created)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD FULLTEXT (subject)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD INDEX (ext_active)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD FULLTEXT (family)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (max_mails)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (password)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (action)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (sort)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (locked)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (sort)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (locked)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (sort)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD INDEX (status)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_refsystem` ADD INDEX (level)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_pool` ADD INDEX (data_type)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_task_system` ADD INDEX (status)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_task_system` ADD INDEX (subject)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD INDEX (status)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD FULLTEXT (family)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD INDEX (max_mails)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD INDEX (password)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` ADD INDEX (what)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_cats` ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_cats` ADD INDEX (sort)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."; @@ -409,8 +409,8 @@ case "update": // Update an extension case "0.3.2": // SQL queries for v0.3.2 // Connection table between the menu system and the "logical area" system - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admin_menu_las`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_admin_menu_las` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, la_id VARCHAR(255) NOT NULL DEFAULT '', la_action VARCHAR(255) NOT NULL DEFAULT '', @@ -421,8 +421,8 @@ INDEX (la_what), PRIMARY KEY(id) ) TYPE=MyISAM"; // All "logical areas" together - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las_data ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admin_menu_las`_data"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_admin_menu_las`_data ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, la_id VARCHAR(255) NOT NULL DEFAULT '', la_title VARCHAR(255) NOT NULL DEFAULT '', @@ -434,10 +434,10 @@ INDEX (la_posy), PRIMARY KEY(id) ) TYPE=MyISAM"; // Which menu do you like? - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"; // Insert menus - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird."; @@ -445,11 +445,11 @@ PRIMARY KEY(id) case "0.3.3": // SQL queries for v0.3.3 // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure... - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // The statistics table - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_stats ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_admin_menu_stats`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_admin_menu_stats` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, type ENUM('la','action','what') NOT NULL DEFAULT 'what', @@ -469,30 +469,30 @@ PRIMARY KEY (id) case "0.3.5": // SQL queries for v0.3.5 // List accounts with no referal - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; break; case "0.3.6": // SQL queries for v0.3.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"; @@ -503,84 +503,84 @@ PRIMARY KEY (id) break; case "0.3.8": // SQL queries for v0.3.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` CHANGE descr descr MEDIUMTEXT NULL"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool CHANGE `text` `text` LONGTEXT NOT NULL"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; break; case "0.3.9": // SQL queries for v0.3.9 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; break; case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR what IS NULL) LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR what IS NULL) LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Email-Verwaltung nach Email-Management umbenannt."; break; case "0.4.1": // SQL queries for v0.4.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP INDEX `status` , ADD INDEX `status` ( `status` , `max_mails` )"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP INDEX `status` , ADD INDEX `status` ( `status` , `max_mails` )"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet."; break; case "0.4.2": // SQL queries for v0.4.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_online` ADD INDEX `admin_member` (`is_admin`,`is_member`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_online` ADD INDEX `admin_member` (`is_admin`,`is_member`)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Neuen Schlüssel zur Online-Tabelle hinzugefügt."; break; case "0.4.3": // SQL queries for v0.4.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Proxy-Einstellungen hinzugefügt."; break; case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET `what`=NULL WHERE `what`=''"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET `what`=NULL WHERE `what`=''"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `what`=NULL WHERE `what`=''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX `action` (`action`)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."; break; case "0.4.5": // SQL queries for v0.4.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Täglichen/wöchentlichen/monatlichen Reset verbessert."; break; case "0.4.6": // SQL queries for v0.4.6 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET gender=sex WHERE sex != 'M'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP sex"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_data` SET gender=sex WHERE sex != 'M'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP sex"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Offensives Wort "Sex" gegen "Gender" ausgetauscht."; @@ -592,53 +592,53 @@ PRIMARY KEY (id) break; case "0.4.8": // SQL queries for v0.4.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_task_system` ADD INDEX (subject)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Index für Betreff eingefügt."; break; case "0.4.9": // SQL queries for v0.4.9 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET user_hash=NULL WHERE user_hash IS NOT NULL AND status='CONFIRMED'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD UNIQUE (`user_hash`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_data` SET user_hash=NULL WHERE user_hash IS NOT NULL AND status='CONFIRMED'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD UNIQUE (`user_hash`)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "User-Hash zum Bestätigen wird auf NULL gesetzt, wenn Account bestätigt wird."; break; case "0.5.0": // SQL queries for v0.5.0 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `level`"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `userid`, ADD UNIQUE `userid_level` (`userid`,`level`)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_refsystem` DROP INDEX `level`"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`, ADD UNIQUE `userid_level` (`userid`,`level`)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr."; break; case "0.5.1": // SQL queries for v0.5.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP `descr`"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_member_menu` DROP `descr`"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird."; break; case "0.5.2": // SQL queries for v0.5.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."; break; case "0.5.3": // SQL queries for v0.5.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig."; break; case "0.5.4": // SQL queries for v0.5.4 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')"; // Depends on refback extension $EXT_UPDATE_DEPENDS = "refback"; @@ -648,15 +648,15 @@ PRIMARY KEY (id) break; case "0.5.5": // SQL queries for v0.5.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Anzeige der {!POINTS!} unter den unbestätigten Mails kann nun optional abgeschaltet werden."; break; case "0.5.6": // SQL queries for v0.5.6 - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_stats_data` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_stats_data`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_stats_data` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown', @@ -672,47 +672,47 @@ INDEX (`stats_type`) break; case "0.5.7": // SQL queries for v0.5.7 - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='list_norefs' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='list_norefs' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben."; break; case "0.5.8": // SQL queries for v0.5.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_extensions` DROP `ext_lang_file`"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Sprachdateinamen werden nicht mehr in der Datenbank behalten."; break; case "0.5.9": // SQL queries for v0.5.9 - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_filters`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_filters` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_filters`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_filters` ( `filter_id` BIGINT(20) UNSIGNED AUTO_INCREMENT, `filter_name` VARCHAR(255) NOT NULL DEFAULT '', `filter_function` VARCHAR(255) NOT NULL DEFAULT '', `filter_active` ENUM('N','Y') NOT NULL DEFAULT 'Y', PRIMARY KEY (`filter_id`) ) TYPE=MyISAM COMMENT='Filter system'"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und lässt diese de- bzw. wieder aktivieren.', 17)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und lässt diese de- bzw. wieder aktivieren.', 17)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Tabellen für Filter-System hinzugefügt."; break; case "0.6.0": // SQL queries for v0.6.0 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_filters` ADD `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_filters` ADD `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte ausschliesslich zu Debugging-Zwecken eingesetzt werden."; break; case "0.6.1": // SQL queries for v0.6.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP login_failtures"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP last_failture"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP login_failtures"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP last_failture"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Falsche Schreibweise korregiert."; diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 7157b5e2aa..6b596810ee 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run (surfbar URLs) - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_urls` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_urls`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_surfbar_urls` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url` VARCHAR(255) NOT NULL DEFAULT '', @@ -71,8 +71,8 @@ INDEX `status_userid` (`status`,`userid`) ) TYPE=MyISAM COMMENT='Surfbar URLs'"; // Reload locks - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_locks` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_locks`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_surfbar_locks` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -83,8 +83,8 @@ INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar reload locks'"; // Surfbar salts - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_salts` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_salts`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_surfbar_salts` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -95,8 +95,8 @@ INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar last used salts'"; // Statistics - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_stats` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_stats`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_surfbar_stats` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -108,8 +108,8 @@ INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar Statistics'"; // Member actions pending on status - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_actions`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_actions` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_actions`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_surfbar_actions` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL, `action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL, @@ -119,76 +119,76 @@ UNIQUE KEY `status_action` (`status`,`action`) ) TYPE=MyISAM COMMENT='Surfbar Member Actions'"; // Member actions - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"; // Config entries - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"; // Extend user data - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; // Member menus - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"; // Admin menus - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. Vorsicht! Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. Vorsicht! Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)"; // Load CSS? $EXT_CSS = "Y"; @@ -196,25 +196,25 @@ UNIQUE KEY `status_action` (`status`,`action`) case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_actions`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 5"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `action`='surfbar' LIMIT 7"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_actions`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_locks`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_salts`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_stats`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_surfbar_urls`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar' LIMIT 5"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar' LIMIT 7"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='surfbar' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='surfbar' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='Y' WHERE module='surfbar' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='Y' WHERE module='surfbar' LIMIT 1"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index 55b4d421aa..618f496634 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -50,9 +50,9 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE status='CLOSED'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_task_system` SET status='SOLVED' WHERE status='CLOSED'"; // Enable CSS file? $EXT_CSS = "Y"; @@ -60,7 +60,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='task' LIMIT 2"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='task' LIMIT 2"; break; case "activate": // Do stuff when admin activates this extension @@ -77,7 +77,7 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.0.1": // SQL queries for v0.0.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='task' AND ext_has_css='N' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='task' AND ext_has_css='N' LIMIT 1"; // This update depends on sql_patches update! $EXT_UPDATE_DEPENDS = "sql_patches"; diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index c7b69c08f2..08ead8333d 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -54,16 +54,16 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // Drop theme table - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_themes`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_themes`"; // Delete admin menu - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `action`='theme' LIMIT 4"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme' LIMIT 4"; // Delete guest menu entries - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='themes' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='themes' LIMIT 1"; // Delete member menu entries - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='themes' OR `what`='themes' LIMIT 2"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE action='themes' OR `what`='themes' LIMIT 2"; break; case "activate": // Do stuff when admin activates this extension @@ -116,8 +116,8 @@ case "update": // Update an extension case "0.0.8": // SQL queries for v0.0.8 // Theme table - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_themes`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_themes` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_themes`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_themes` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, theme_path VARCHAR(255) NOT NULL DEFAULT '', theme_name VARCHAR(255) NOT NULL DEFAULT '', @@ -129,22 +129,22 @@ INDEX (`theme_active`) ) TYPE=MyISAM COMMENT='Themes'"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)"; // Guest menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"; // Memember menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='8' WHERE action='themes' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='account', sort='1', title='Designs' WHERE `what`='themes' LIMIT 1"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET sort='8' WHERE action='themes' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='account', sort='1', title='Designs' WHERE `what`='themes' LIMIT 1"; // User data - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Update von sql_patches übertragen. (Kann Fehlermeldungen verursacht haben!)"; diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index 3c4b23d5a2..cdb0cf93f1 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -50,9 +50,9 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Load CSS file? $EXT_CSS = "Y"; @@ -60,18 +60,18 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='top10' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_top10' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE what='top10' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='config_top10' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='top10' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='Y', locked='N' WHERE what='top10' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='top10' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='Y' WHERE what='top10' LIMIT 1"; break; case "update": // Update an extension diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index 2484f5d3b4..5dc29b8010 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -50,11 +50,11 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_transfers_in`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_transfers_out`"; // Transfer from a member - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_in ( + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_transfers_in` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -68,7 +68,7 @@ PRIMARY KEY(id) ) Type=MyISAM"; // Transfers to a member - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_out ( + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_transfers_out` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -82,42 +82,42 @@ PRIMARY KEY(id) ) Type=MyISAM"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)"; // Member menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)"; // Add config values - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"; // Add row(s) to user's data - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='transfer' LIMIT 4"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='transfer' LIMIT 1"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP opt_in"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_transfers_in`"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_transfers_out`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='transfer' LIMIT 4"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='transfer' LIMIT 1"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` DROP opt_in"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1"; break; case "update": // Update an extension @@ -139,7 +139,7 @@ case "update": // Update an extension break; case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"; @@ -231,9 +231,9 @@ case "update": // Update an extension break; case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"; // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin $EXT_UPDATE_DEPENDS = "sql_patches"; @@ -248,7 +248,7 @@ case "update": // Update an extension break; case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='5' WHERE what='transfer' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET action='extras', sort='5' WHERE what='transfer' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett geändert."; diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index 75d5e09e1f..d782e3b99e 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -50,13 +50,13 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='usage' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE what='usage' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 170ec8d0e4..cc7f2a1e61 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -47,16 +47,16 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied löschen','Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen prüfen','Prüfen Sie hier neue Anmeldungen zu Ihrem System. Hier können Sie im Falle einer Fehler-Mail den Mitglied gleich wieder löschen!',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie können dazu auch einen Kommentar mitsenden.',5)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Menüpunkt können Sie die generierten Referals eines Mitgliedes auflisten.',7)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbestätigte Mails','Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.',8)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgewählten Kategorien eines Mitgliedes auf.',9)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied löschen','Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.',1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen prüfen','Prüfen Sie hier neue Anmeldungen zu Ihrem System. Hier können Sie im Falle einer Fehler-Mail den Mitglied gleich wieder löschen!',2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.',3)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie können dazu auch einen Kommentar mitsenden.',5)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Menüpunkt können Sie die generierten Referals eines Mitgliedes auflisten.',7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbestätigte Mails','Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.',8)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgewählten Kategorien eines Mitgliedes auf.',9)"; // Load CSS-File? $EXT_CSS = "Y"; @@ -64,8 +64,8 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') LIMIT 3"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_del`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') LIMIT 3"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_del`"; break; case "activate": // Do stuff when admin activates this extension @@ -82,14 +82,14 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.1": // SQL queries for v0.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun möglich."; break; case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='user' AND `ext_has_css`='N' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='user' AND `ext_has_css`='N' LIMIT 1"; // This update depends on sql_patches update! $EXT_UPDATE_DEPENDS = "sql_patches"; @@ -98,7 +98,7 @@ case "update": // Update an extension $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."; case "0.1.2": // SQL queries for v0.1.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit."; @@ -110,10 +110,10 @@ case "update": // Update an extension break; case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"; + $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"; break; case "0.1.5": // SQL queries for v0.1.5 @@ -147,15 +147,15 @@ case "update": // Update an extension break; case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt."; break; case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; @@ -192,7 +192,7 @@ case "update": // Update an extension break; case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Admin-Kontaktformular hinzugefügt."; @@ -204,7 +204,7 @@ case "update": // Update an extension break; case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Verwaltung auf Management umgestellt"; @@ -221,21 +221,21 @@ case "update": // Update an extension break; case "0.3.4": // SQL queries for v0.3.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitglieder werden per Zufall als Referal-ID ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist."; break; case "0.3.5": // SQL queries for v0.3.5 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `lock_reason` TINYTEXT"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_del`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_del` ( + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_del`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_del` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `email` VARCHAR(255) NOT NULL DEFAULT '', diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 3bc9f01bf2..85268bee8b 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -50,8 +50,8 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_wernis ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_wernis`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_user_wernis` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, wernis_account VARCHAR(255) NOT NULL DEFAULT '', @@ -65,80 +65,80 @@ PRIMARY KEY(id) ) TYPE=MyISAM"; // Confiuration - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"; // User data - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"; // Member menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)"; // Guest menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)"; break; case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='wernis'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='wernis' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='wernis_portal' LIMIT 1"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_user_wernis`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='wernis'"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE what='wernis' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE what='wernis_portal' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='wernis_portal' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='Y', locked='N' WHERE what='wernis_portal' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='wernis_portal' LIMIT 1"; - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='N', locked='Y' WHERE what='wernis_portal' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1"; break; case "update": // Update an extension switch ($EXT_VER) { case "0.0.1": // SQL queries for v0.0.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist."; break; case "0.0.2": // SQL queries for v0.0.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden."; break; case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert."; break; case "0.0.4": // SQL queries for v0.0.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Fehlende Ref-Id hinzugetan."; diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index ec21cec859..4b31cda013 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -54,24 +54,24 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `{!MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; // Admin menu - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"; // Reload lock table - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_yoomedia_reload`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_yoomedia_reload` ( + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_yoomedia_reload`"; + $SQLs[] = "CREATE TABLE `{!MYSQL_PREFIX!}_yoomedia_reload` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', `y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -84,8 +84,8 @@ UNIQUE `y_type` (`type`,`y_id`) case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm') LIMIT 2"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_yoomedia_reload`"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm') LIMIT 2"; + $SQLs[] = "DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_yoomedia_reload`"; break; case "activate": // Do stuff when admin activates this extension diff --git a/inc/filters.php b/inc/filters.php index a1253c107a..6da430d5da 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -70,7 +70,7 @@ function INIT_FILTER_SYSTEM () { // Load all active filers $result = SQL_QUERY("SELECT `filter_name`, `filter_function`, `filter_active`".$ADD." -FROM `"._MYSQL_PREFIX."_filters` +FROM `{!MYSQL_PREFIX!}_filters` ORDER BY `filter_id` ASC", __FILE__, __LINE__); // Are there entries? @@ -264,8 +264,8 @@ function FILTER_FLUSH_FILTERS () { $inserted = 0; $removed = 0; // Prepare SQL queries - $insertSQL = "INSERT INTO `"._MYSQL_PREFIX."_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES"; - $removeSQL = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_filters` WHERE"; + $insertSQL = "INSERT INTO `{!MYSQL_PREFIX!}_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES"; + $removeSQL = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_filters` WHERE"; // Write all filters to database foreach ($filters as $filterName => $filterArray) { @@ -309,7 +309,7 @@ function FILTER_FLUSH_FILTERS () { // Walk through all filters foreach ($filterArray as $filterFunction => $cnt) { // Construct and add the query - $SQLs[] = sprintf("UPDATE `"._MYSQL_PREFIX."_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1", + $SQLs[] = sprintf("UPDATE `{!MYSQL_PREFIX!}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1", bigintval($cnt), $filterName, $filterFunction @@ -451,7 +451,7 @@ function FILTER_UPDATE_LOGIN_DATA () { $GLOBALS['userid'] = bigintval(get_session('userid')); // Load last module and last online time - $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Entry found? @@ -475,7 +475,7 @@ function FILTER_UPDATE_LOGIN_DATA () { } // END - if // Update last module / online time - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1", array($GLOBALS['what'], GET_REMOTE_ADDR(), $GLOBALS['userid']), __FILE__, __LINE__); } else { // Destroy session, we cannot update! diff --git a/inc/functions.php b/inc/functions.php index b326dab098..d293cc048a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -238,7 +238,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { // @DEPRECATED Try to rewrite the if() condition if ($template == "member_support_form") { // Support request of a member - $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Is content an array? @@ -392,7 +392,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") { return; } else { // Load email address - $result_email = SQL_QUERY_ESC("SELECT email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__); + $result_email = SQL_QUERY_ESC("SELECT email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):numRows=".SQL_NUMROWS($result_email)."
    \n"; // Does the user exist? @@ -795,12 +795,12 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") { if (EXT_IS_ACTIVE("nickname")) { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):NICKNAME!
    \n"; // Load nickname - $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($UID)), __FILE__, __LINE__); } else { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):NO-NICK!
    \n"; /// Load normal data - $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($UID)), __FILE__, __LINE__); } @@ -1213,9 +1213,9 @@ function ADD_SELECTION($type, $DEFAULT, $prefix="", $id="0") { case "yn": $OUT .= "\n"; break; } $OUT .= " \n"; @@ -1592,11 +1592,11 @@ function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) { } // END - if // Check which admin shall receive this mail - $result = SQL_QUERY_ESC("SELECT DISTINCT admin_id FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' ORDER BY admin_id", + $result = SQL_QUERY_ESC("SELECT DISTINCT admin_id FROM `{!MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY admin_id", array($template), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Create new entry (to all admins) - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_mails (admin_id, mail_template) VALUES (0, '%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES (0, '%s')", array($template), __FILE__, __LINE__); } else { // Load admin IDs... @@ -1616,10 +1616,10 @@ function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) { return; } elseif ($aid == "0") { // Select all email adresses - $result = SQL_QUERY("SELECT email FROM "._MYSQL_PREFIX."_admins ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT email FROM `{!MYSQL_PREFIX!}_admins` ORDER BY id", __FILE__, __LINE__); } else { // If Admin-ID is not "to-all" select - $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE id IN (%s) ORDER BY id", array($aid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT email FROM `{!MYSQL_PREFIX!}_admins` WHERE id IN (%s) ORDER BY id", array($aid), __FILE__, __LINE__); } } @@ -1963,7 +1963,7 @@ function MEMBER_ACTION_LINKS($uid, $status="") { $eval = "\$OUT = \"[ "; foreach ($TARGETS as $tar) { - $eval .= "\n"; if (($tar == "lock_user") && ($status == "LOCKED")) { // Locked accounts shall be unlocked @@ -1972,7 +1972,7 @@ function MEMBER_ACTION_LINKS($uid, $status="") { // All other status is fine $eval .= strtoupper($tar); } - $eval .= "_TITLE.\"\\\">\".ADMIN_"; + $eval .= "_TITLE!}\\\">{!ADMIN_"; if (($tar == "lock_user") && ($status == "LOCKED")) { // Locked accounts shall be unlocked $eval .= "UNLOCK_USER"; @@ -1980,7 +1980,7 @@ function MEMBER_ACTION_LINKS($uid, $status="") { // All other status is fine $eval .= strtoupper($tar); } - $eval .= ".\" | "; + $eval .= "!} | "; } // Finish navigation link @@ -2962,7 +2962,7 @@ function THEME_GET_ID ($name) { incrementConfigEntry('cache_hits'); } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Check if current theme is already imported or not - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1", array($name), __FILE__, __LINE__); // Entry found? diff --git a/inc/gen_mediadata.php b/inc/gen_mediadata.php index b2451b7479..a7bd796574 100644 --- a/inc/gen_mediadata.php +++ b/inc/gen_mediadata.php @@ -42,7 +42,7 @@ $bsent = 0; $bclicks = 0; $bcount = 0; // Check for normal mails $result_media = SQL_QUERY("SELECT SUM(max_rec) AS max_rec, SUM(clicks) AS clicks -FROM "._MYSQL_PREFIX."_user_stats", __FILE__, __LINE__); +FROM `{!MYSQL_PREFIX!}_user_stats`", __FILE__, __LINE__); list($nsent, $nclicks) = SQL_FETCHROW($result_media); if (empty($nsent)) $nsent = 0; if (empty($nclicks)) $nclicks = 0; @@ -51,20 +51,20 @@ if (empty($nclicks)) $nclicks = 0; SQL_FREERESULT($result_media); // Count mail orders -$result_media = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_user_stats", __FILE__, __LINE__); +$result_media = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_user_stats`", __FILE__, __LINE__); list($ncount) = SQL_FETCHROW($result_media); SQL_FREERESULT($result_media); // Check for bonus extension if (EXT_IS_ACTIVE("bonus")) { // Count bonus mails - $result_media = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_bonus", __FILE__, __LINE__); + $result_media = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_bonus`", __FILE__, __LINE__); list($bcount) = SQL_FETCHROW($result_media); SQL_FREERESULT($result_media); // Check for bonus mails $result_media = SQL_QUERY("SELECT SUM(mails_sent) AS bonus_sent, SUM(clicks) AS bonus_clicks -FROM "._MYSQL_PREFIX."_bonus", __FILE__, __LINE__); +FROM `{!MYSQL_PREFIX!}_bonus`", __FILE__, __LINE__); list($bsent, $bclicks) = SQL_FETCHROW($result_media); if (empty($bsent)) $bsent = 0; if (empty($bclicks)) $bclicks = 0; @@ -82,12 +82,12 @@ MEDIA_UPDATE_ENTRY(array("total_clicks", "bonus_clicks") , "init", $bclicks); MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders") , "init", $bcount); // Aquire total used points -$result = SQL_QUERY("SELECT SUM(used_points) AS used_points FROM "._MYSQL_PREFIX."_user_data", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT SUM(used_points) AS used_points FROM `{!MYSQL_PREFIX!}_user_data`", __FILE__, __LINE__); list($used) = SQL_FETCHROW($result); SQL_FREERESULT($result); // ... and total points -$result = SQL_QUERY("SELECT SUM(points) AS points FROM "._MYSQL_PREFIX."_user_points", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT SUM(points) AS points FROM `{!MYSQL_PREFIX!}_user_points`", __FILE__, __LINE__); list($points) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/gen_refback.php b/inc/gen_refback.php index 16dbc51d1d..766f315d39 100644 --- a/inc/gen_refback.php +++ b/inc/gen_refback.php @@ -41,16 +41,16 @@ if (!defined('__SECURITY')) { require_once(PATH."inc/libs/refback_functions.php"); // Sanity-check: Do we have ref level 0? -$result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_refsystem WHERE level=0", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_refsystem` WHERE level=0", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Remove index temporaly - SQL_ALTER_TABLE("ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `userid_level`", __FILE__, __LINE__); + SQL_ALTER_TABLE("ALTER TABLE `{!MYSQL_PREFIX!}_refsystem` DROP INDEX `userid_level`", __FILE__, __LINE__); // Upgrade refsystem, ref-level 0 is silly here - SQL_QUERY("UPDATE "._MYSQL_PREFIX."_refsystem SET level=level+1", __FILE__, __LINE__); + SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_refsystem` SET level=level+1", __FILE__, __LINE__); // Add it again - SQL_ALTER_TABLE("ALTER TABLE `"._MYSQL_PREFIX."_refsystem` ADD UNIQUE `userid_level` ( `userid` , `level` )", __FILE__, __LINE__); + SQL_ALTER_TABLE("ALTER TABLE `{!MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` ( `userid` , `level` )", __FILE__, __LINE__); // Rebuild cache REBUILD_CACHE("refsystem", "refsystem"); @@ -60,11 +60,11 @@ if (SQL_NUMROWS($result) > 0) { SQL_FREERESULT($result); // Reset the table -SQL_QUERY("TRUNCATE TABLE "._MYSQL_PREFIX."_user_refs", __FILE__, __LINE__); +SQL_QUERY("TRUNCATE TABLE `{!MYSQL_PREFIX!}_user_refs`", __FILE__, __LINE__); // Begin with all users in level one $result_direct = SQL_QUERY("SELECT u.userid -FROM `"._MYSQL_PREFIX."_user_data` AS u +FROM `{!MYSQL_PREFIX!}_user_data` AS u WHERE u.refid=0 ORDER BY u.userid ASC", __FILE__, __LINE__); diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 62ef9909e9..a12ead7b73 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -46,7 +46,7 @@ if (getConfig('pass_scramble') == "") { $scrambleString = genScrambleString(40); // ... and store it there for future usage - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1", array($scrambleString), __FILE__, __LINE__); // Also remember it in config @@ -61,7 +61,7 @@ if (getConfig('master_salt') == "") { $masterSalt = scrambleString(substr(sha1(GEN_PASS(mt_rand(128, 256))), 0, -40)); // ... and store it there for future usage - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET master_salt='%s' WHERE config=0 LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_config` SET master_salt='%s' WHERE config=0 LIMIT 1", array($masterSalt), __FILE__, __LINE__); // Also remember it in config @@ -91,7 +91,7 @@ if (getConfig('file_hash') == "") { //* DEBUG: */ die("Secret-Key: ".$secretKey."
    Cookie: ".get_session('u_hash')."
    Test: ".$test); // Write $file_hash to database - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET file_hash='%s' WHERE config=0 LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_config` SET file_hash='%s' WHERE config=0 LIMIT 1", array($file_hash), __FILE__, __LINE__); // Generate FQFN for .htaccess file diff --git a/inc/install-inc.php b/inc/install-inc.php index 3c92ccf635..6229a2b45c 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -312,17 +312,17 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT "); foreach ($mysql as $key => $value) { - OUTPUT_HTML(" "); + OUTPUT_HTML(" "); } - OUTPUT_HTML(" - - - - - - - - + OUTPUT_HTML(" + + + + + + + +   @@ -409,7 +409,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT define('__FATAL_ERROR_LI', $OUT); $OUT = ""; foreach ($mysql as $key => $value) { - $OUT .= " \n"; + $OUT .= " \n"; } // END foreach define('__MYSQL_DATA' , $OUT); define('__SPATH_VALUE' , $_POST['spath']); @@ -438,10 +438,10 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT ".__FATAL_ERROR_LI."
".__MYSQL_DATA." - - - - + + + +
diff --git a/inc/language/bank_de.php b/inc/language/bank_de.php index 5f1e7a2bbe..70e7bb9c4b 100644 --- a/inc/language/bank_de.php +++ b/inc/language/bank_de.php @@ -66,7 +66,7 @@ define('ADMIN_LIST_BANK_PACKAGES_STATUS', "Erwerbbar?"); define('ADMIN_LIST_BANK_PACKAGES_ACCOUNT_INTEREST_PLUS', "Zinsen f. Haben"); define('ADMIN_LIST_BANK_PACKAGES_ACCOUNT_INTEREST_MINUS', "Zinsen f. Soll"); define('ADMIN_DELETE_BANK_PACKAGES', "Angebotspakete entgültig entfernen"); -define('ADMIN_DELETE_BANK_PACKAGES_NOTES', "Hinweis: Wenn Sie die aufgelisteten Angebotspakete entgültig löschen, kann eventuell Ihre Bank nicht korrekt funktionieren, da eventuell einige Mitglieder dieses Paket ausgewählt haben. Bitte schauen Sie unter Konten auflisten vorher nach!"); +define('ADMIN_DELETE_BANK_PACKAGES_NOTES', "Hinweis: Wenn Sie die aufgelisteten Angebotspakete entgültig löschen, kann eventuell Ihre Bank nicht korrekt funktionieren, da eventuell einige Mitglieder dieses Paket ausgewählt haben. Bitte schauen Sie unter Konten auflisten vorher nach!"); define('ADMIN_EDIT_BANK_PACKAGES', "Angebotspakete ändern"); define('ADMIN_EDIT_BANK_PACKAGES_NOTES', "Hinweis: Derzeit keine Tipps für diese Aktion."); diff --git a/inc/language/en.ph b/inc/language/en.ph index ff595d7eff..d524d80930 100644 --- a/inc/language/en.ph +++ b/inc/language/en.ph @@ -179,8 +179,8 @@ define('ADMIN_SUBJ_SEND_DONE', "Vollstaendig: Aussendung einer Werbebbuchung!"); define('MEMBER_SENDING_DONE', "Ihre gebuchte Mail wurde soeben vollstaendig von unserem System versendet! Wir wuenschen Ihnen viel Erfolg mit Ihrer Werbebuchung!"); define('MEMBER_NOTIFY_DONE', "Den weiteren Verlauf dieser Werbebuchung koennen Sie im Mitgliedsbereich unter Statistiken verfolgen!"); define('MEMBER_SUBJ_SEND_DONE', "Ihre Werbebuchung wurde versandt"); -define('GUEST_SELECT_LEAST_CATS_1', "Bitte wählen Sie mindestens "); -define('GUEST_SELECT_LEAST_CATS_2', " Kategorien aus. Anderfalls erfolgt keine Anmeldung!"); +define('GUEST_SELECT_LEAST_CATS_1', "Bitte wählen Sie mindestens "); +define('GUEST_SELECT_LEAST_CATS_2', " Kategorien aus. Anderfalls erfolgt keine Anmeldung!"); define('MEMBER_POOL_CONTENT', "Ihre Mails im Sende-Pool"); define('EMAIL_END_SEND', "Vollständig versendet"); define('EMAIL_CONFIRMED', "Bestätigt"); @@ -410,8 +410,8 @@ define('PATCH_NOTES', "Bitte beachten Sie, dass wenn bei der Installation die SQ define('LATEST_PATCH_INSTALLED', "Es wurde bereits die Datenbank aktualisiert!"); define('PATCH_LISTED', "Anbei eine Liste der noetigen Dateien:"); define('NO_PATCHES_APPLIED', "Keine Patches wurden ausgeführt!"); -define('LOAD_URL_ERROR_1', "Konnte nicht weiterleiten, da bereits Kopfinformationen gesendet wurden! Bitte klicken Sie hier, um zur URL zu kommen.
+define('LOAD_URL_ERROR_1', "Konnte nicht weiterleiten, da bereits Kopfinformationen gesendet wurden! Bitte klicken Sie hier, um zur URL zu kommen.

Danke."); define('GUEST_STATS', "Statistiken unseres {!MT_WORD2!}"); diff --git a/inc/language/install_de.php b/inc/language/install_de.php index 916c7b04e8..ce32e43d8b 100644 --- a/inc/language/install_de.php +++ b/inc/language/install_de.php @@ -42,7 +42,7 @@ define('MT_WORD', "Mailtausch"); define('MT_WORD2', "Mailtausches"); define('INSTALLATION_OF_MXCHANGE', "Installation von MXChange-{!MT_WORD!}-Script"); define('INSTALL_MISSING_DUMPS', "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644)."); -define('INSTALL_ENABLE_BACKLINK', "Backlink (=Rückverlinkung zu mxchange.org setzen?) rel="external" ist gesetzt. Bitte nicht den Backlink einbauen, und nofollow verwenden! Das schadet allen."); +define('INSTALL_ENABLE_BACKLINK', "Backlink (=Rückverlinkung zu mxchange.org setzen?) rel="external" ist gesetzt. Bitte nicht den Backlink einbauen, und nofollow verwenden! Das schadet allen."); define('WRONG_PAGE', "Sie oder dieses Script haben eine falsche Seite ausgewählt!"); define('WELCOME_TEXT', "Willkommen zum Installationsscript von MXChange-{!MT_WORD!}, dem kostenlosen {!MT_WORD!} Powered by MyAutoInstaller-Community!"); define('INTRO_TEXT', "Dieses Script wird den {!MT_WORD!} für Sie soweit installieren, die Datenbank einrichten und vorkonfigurieren.
Sie werden während der Installation Schritt-Für-Schritt durch die Installation gebracht! Bitte halten Sie die MySQL-Daten, sowie den absoluten Server-Pfad bereit!
Nach erfolgreicher Installation sollten Sie als nächstes das erste Administrator-Login einrichten. Anschliessend können Sie sich einloggen und weitere Einstellungen verfeinern.
Wir empfehlen dann alle Installationsdateien von Ihrem Server zu löschen."); diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index d10f3bdc32..3b777cab73 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -106,11 +106,11 @@ function ADMINS_CHECK_ACL($act, $wht) { if (!empty($act)) { // Main menu - $result = SQL_QUERY_ESC("SELECT access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE admin_id=%s AND action_menu='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT access_mode FROM `{!MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' LIMIT 1", array(bigintval($aid), $act), __FILE__, __LINE__); } elseif (!empty($wht)) { // Sub menu - $result = SQL_QUERY_ESC("SELECT access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE admin_id=%s AND what_menu='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT access_mode FROM `{!MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND what_menu='%s' LIMIT 1", array(bigintval($aid), $wht), __FILE__, __LINE__); } @@ -136,7 +136,7 @@ function ADMINS_CREATE_EMAIL_LINK($email, $mod="admin") { if (strpos("@", $email) > 0) { // Create email link $result = SQL_QUERY_ESC("SELECT id -FROM "._MYSQL_PREFIX."_admins +FROM `{!MYSQL_PREFIX!}_admins` WHERE email='%s'".$locked." LIMIT 1", array($email), __FILE__, __LINE__); @@ -208,7 +208,7 @@ function ADMINS_CHANGE_ADMIN_ACCOUNT($POST) { // Update admin account if ($default == "allow") { // Allow changing default ACL - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET login='%s'".$ADD.", email='%s', default_acl='%s', @@ -223,7 +223,7 @@ WHERE id=%s LIMIT 1", ), __FILE__, __LINE__); } else { // Do not allow it here - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET login='%s'".$ADD.", email='%s', la_mode='%s' @@ -268,7 +268,7 @@ function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) { $id = bigintval($id); // Get the admin's data - $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); if ((SQL_NUMROWS($result) == 1) && ($sel == 1)) { // Entry found @@ -303,7 +303,7 @@ function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) { // Delete given admin accounts function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) { // Check if this account is the last one which cannot be deleted... - $result_main = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_admins", __FILE__, __LINE__); + $result_main = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_admins`", __FILE__, __LINE__); $accounts = SQL_NUMROWS($result_main); SQL_FREERESULT($result_main); if ($accounts > 1) { @@ -314,7 +314,7 @@ function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) { $id = bigintval($id); // Get the admin's data - $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Entry found @@ -353,11 +353,11 @@ function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) { // Delete only when it's not your own account! if (($del == 1) && (GET_CURRENT_ADMIN_ID() != $id)) { // Rewrite his tasks to all admins - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE assigned_admin=%s", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_task_system` SET assigned_admin=0 WHERE assigned_admin=%s", array($id), __FILE__, __LINE__); // Remove account - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); // Purge cache @@ -373,7 +373,7 @@ function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) { // List all admin accounts function ADMINS_LIST_ADMIN_ACCOUNTS() { // Select all admin accounts - $result = SQL_QUERY("SELECT id, login, email, default_acl AS mode, la_mode FROM "._MYSQL_PREFIX."_admins ORDER BY login ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, login, email, default_acl AS mode, la_mode FROM `{!MYSQL_PREFIX!}_admins` ORDER BY login ASC", __FILE__, __LINE__); $SW = 2; $OUT = ""; while ($content = SQL_FETCHARRAY($result)) { // Compile some variables diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index f557eac2c5..89abcf3dee 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -41,7 +41,7 @@ function AUTOPURGE_ADD_POINTS($uid, $points) { global $jackpot; // Check if he has locked points or not - $result = SQL_QUERY_ESC("SELECT ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT ref_payout FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); list($payout) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -62,7 +62,7 @@ function AUTOPURGE_ADD_POINTS($uid, $points) { $jackpot += $points; } else { // .. to user's account - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1", array($target, $target, $points, bigintval($uid)), __FILE__, __LINE__); // Update mediadata as well diff --git a/inc/libs/beg_functions.php b/inc/libs/beg_functions.php index 7eeb42072a..e6c17e9004 100644 --- a/inc/libs/beg_functions.php +++ b/inc/libs/beg_functions.php @@ -48,7 +48,7 @@ function BEG_ADD_POINTS ($uid, $points) { // Is begging rallye active? if (getConfig('beg_rallye') == "Y") { // Add points to rallye account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1", array($points, $uid), __FILE__, __LINE__); } else { // Add points to account diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 649f086c3a..c428208c11 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -72,7 +72,7 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) { } // END - if // Check for entry - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM "._MYSQL_PREFIX."_bonus_turbo WHERE userid=%s AND %s=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM `{!MYSQL_PREFIX!}_bonus_turbo` WHERE userid=%s AND %s=%s LIMIT 1", array($uid, $column, $mid), __FILE__, __LINE__); // Load clicks from table as current rank @@ -101,11 +101,11 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) { } // Add points to his account directly - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); // Rember this whole data for displaying ranking list - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus_turbo (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_bonus_turbo` (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())", array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FILE__, __LINE__); if ((GET_EXT_VERSION("bonus") >= "0.3.5") && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points); @@ -119,7 +119,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { $ranks = sizeof(explode(";", getConfig('turbo_rates'))) + 1; // Load current user's data - $result = SQL_QUERY_ESC("SELECT level, points, timemark FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s AND userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT level, points, timemark FROM `{!MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND userid=%s LIMIT 1", array($type, $data, $uid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data @@ -138,7 +138,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { } // END - if // Load rankings - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s ORDER BY level LIMIT %s", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s ORDER BY level LIMIT %s", array($type, $data, getConfig('bonus_lines')), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start generating the ranking list @@ -147,7 +147,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { $SW = 2; for ($rank = 1; $rank <= $max; $rank++) { // Load data - $result_users = SQL_QUERY_ESC("SELECT userid, points, timemark FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s AND level=%s LIMIT 1", + $result_users = SQL_QUERY_ESC("SELECT userid, points, timemark FROM `{!MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND level=%s LIMIT 1", array($type, $data, $rank), __FILE__, __LINE__); // Nothing found by default @@ -243,7 +243,7 @@ function BONUS_PURGE_EXPIRED_TURBO_BONUS() global $_CONFIG; // Remove entries - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FILE__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FILE__, __LINE__); if (SQL_AFFECTEDROWS() > 0) { // Send out email to admin SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", SQL_AFFECTEDROWS(), ""); diff --git a/inc/libs/booking_functions.php b/inc/libs/booking_functions.php index 44fda2dac0..78252fb5c8 100644 --- a/inc/libs/booking_functions.php +++ b/inc/libs/booking_functions.php @@ -47,7 +47,7 @@ function ADD_BOOKING_RECORD ($subject, $uid, $points, $mode) { } // END - if // Add record entry here - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)", array($uid, $subject, $mode, $points), __FILE__, __LINE__); } diff --git a/inc/libs/country_functions.php b/inc/libs/country_functions.php index 8b879e251c..fa6694c3dc 100644 --- a/inc/libs/country_functions.php +++ b/inc/libs/country_functions.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { // Generate a human-readable country description with code function COUNTRY_GENERATE_INFO ($id) { // Load code and description - $result = SQL_QUERY_ESC("SELECT code, descr FROM "._MYSQL_PREFIX."_countries WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT code, descr FROM `{!MYSQL_PREFIX!}_countries` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Is there an entry? diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 424df56ef6..f80d13630d 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -67,7 +67,7 @@ function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") { // List entries $result = SQL_QUERY("SELECT userid, refid, points, timemark -FROM "._MYSQL_PREFIX."_doubler +FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='".$done."' AND is_ref='".$ref."'".$ADD." ORDER BY timemark ".$sort." LIMIT ".$limit, __FILE__, __LINE__); @@ -123,7 +123,7 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() { if (getConfig('doubler_jackpot') == "Y") { // Load jackpot - $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT points FROM `{!MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); list($jackpot) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index a63d334d27..079e99af89 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { function HOLIDAY_STOP_HOLIDAYS () { // Let's find some expired holiday requests... $result_stop = SQL_QUERY("SELECT userid, holiday_start, holiday_end, comments -FROM "._MYSQL_PREFIX."_user_holidays +FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE holiday_end <= UNIX_TIMESTAMP() ORDER BY userid", __FILE__, __LINE__); if (SQL_NUMROWS($result_stop) > 0) { @@ -49,11 +49,11 @@ ORDER BY userid", __FILE__, __LINE__); $admin = ""; while (list($uid, $start, $end, $comments) = SQL_FETCHROW($result_stop)) { // Stop holiday - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); // Unlock account - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET holiday_active='N', holiday_activated='0' WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index 9d89121a5c..48eaa19551 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -46,12 +46,12 @@ function MEDIA_UPDATE_ENTRY($keys_array, $mode, $value) foreach ($keys_array as $key) { // First check if it does exist - $result_media = SQL_QUERY_ESC("SELECT media_key FROM "._MYSQL_PREFIX."_mediadata + $result_media = SQL_QUERY_ESC("SELECT media_key FROM `{!MYSQL_PREFIX!}_mediadata` WHERE media_key = '%s' LIMIT 1", array($key), __FILE__, __LINE__); if (SQL_NUMROWS($result_media) == 0) { // Not found so we create it (mode will be ignored here!) - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mediadata (media_key, media_value) VALUES ('%s', '%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_mediadata` (media_key, media_value) VALUES ('%s', '%s')", array($key, $value), __FILE__, __LINE__); } else @@ -65,13 +65,13 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FILE__, __LINE__); if ($mode == "init") { // Initialize entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=%s WHERE media_key='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_mediadata` SET media_value=%s WHERE media_key='%s' LIMIT 1", array($value, $key), __FILE__, __LINE__); } else { // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_mediadata` SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1", array($value, $key), __FILE__, __LINE__); } } @@ -85,7 +85,7 @@ function MEDIA_GET_ENTRY($key) $value = ""; // Check for entry - $result = SQL_QUERY_ESC("SELECT media_value FROM "._MYSQL_PREFIX."_mediadata WHERE media_key='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT media_value FROM `{!MYSQL_PREFIX!}_mediadata` WHERE media_key='%s' LIMIT 1", array($key), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data diff --git a/inc/libs/nickname_functions.php b/inc/libs/nickname_functions.php index 8b9fe5bcec..c9a44dec6b 100644 --- a/inc/libs/nickname_functions.php +++ b/inc/libs/nickname_functions.php @@ -54,7 +54,7 @@ function NICKNAME_IS_ACTIVE ($uidNick) { } else { // Search in database // @TODO Can we replace this with GET_TOTAL_DATA() ? - $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s OR nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s OR nickname='%s' LIMIT 1", array(bigintval($uidNick), $uidNick), __FILE__, __LINE__); // Check existence of nickname @@ -87,7 +87,7 @@ function NICKNAME_GET_NICK ($userid) { incrementConfigEntry('cache_hits'); } elseif (NICKNAME_IS_ACTIVE($userid)) { // Search for non-empty nickname - $result = SQL_QUERY_ESC("SELECT nickname FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND nickname != '' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT nickname FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND nickname != '' LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__); // Found? diff --git a/inc/libs/online_functions.php b/inc/libs/online_functions.php index 146d92da35..9b8fcbe9d1 100644 --- a/inc/libs/online_functions.php +++ b/inc/libs/online_functions.php @@ -73,13 +73,13 @@ function FILTER_UPDATE_ONLINE_LIST () { } // END - if // Now search for the user - $result = SQL_QUERY_ESC("SELECT timestamp FROM "._MYSQL_PREFIX."_online WHERE sid='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!MYSQL_PREFIX!}_online` WHERE sid='%s' LIMIT 1", array($PHPSESSID), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { // Then update it - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_online SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_online` SET module='%s', action='%s', what='%s', @@ -104,7 +104,7 @@ WHERE sid='%s' LIMIT 1", ); } else { // No entry does exists so we simply add it! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_online (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_online` (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')", array( $GLOBALS['module'], $GLOBALS['action'], @@ -123,7 +123,7 @@ WHERE sid='%s' LIMIT 1", SQL_FREERESULT($result); // Purge old entries - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_online WHERE timestamp <= (UNIX_TIMESTAMP() - %s)", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_online` WHERE timestamp <= (UNIX_TIMESTAMP() - %s)", array(getConfig('online_timeout')), __FILE__, __LINE__); } diff --git a/inc/libs/optimize_functions.php b/inc/libs/optimize_functions.php index 26dcdbc718..e6f2101f92 100644 --- a/inc/libs/optimize_functions.php +++ b/inc/libs/optimize_functions.php @@ -85,10 +85,10 @@ function REPAIR_OPTIMIZE_DB() $ret['total_gain'] = $total_gain; // Insert new row - $result = SQL_QUERY("INSERT INTO "._MYSQL_PREFIX."_optimize_gain (gain) VALUES ('".$total_gain."')", __FILE__, __LINE__); + $result = SQL_QUERY("INSERT INTO `{!MYSQL_PREFIX!}_optimize_gain` (gain) VALUES ('".$total_gain."')", __FILE__, __LINE__); // Get total runs and total optimization count - $result = SQL_QUERY("SELECT COUNT(id) AS rows, SUM(gain) AS opti FROM "._MYSQL_PREFIX."_optimize_gain", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id) AS rows, SUM(gain) AS opti FROM `{!MYSQL_PREFIX!}_optimize_gain`", __FILE__, __LINE__); list($total_rows, $total_opti) = SQL_FETCHROW($result); // Free memory diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index f524c2ae25..088a0b4eed 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -44,7 +44,7 @@ function PAYOUT_OUTPUT_PAYOUT_LIST ($points) { if ($points > 0) { // Pay this out! $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points -FROM "._MYSQL_PREFIX."_payout_types +FROM `{!MYSQL_PREFIX!}_payout_types` WHERE %s >= min_points ORDER BY type", array($points), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index b8347452d8..7d41947db6 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -49,11 +49,11 @@ function RALLYE_AUTOSTART_RALLYES($result) SQL_FREERESULT($result); // Set notified to Y - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET notified='Y' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET notified='Y' WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Do a snapshot off all user refs - $result_user = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); + $result_user = SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); // Transfer all neccessary data to the global $DATA array $DATA['uid_cnt'] = SQL_NUMROWS($result_user); @@ -91,7 +91,7 @@ function RALLYE_AUTOSTART_RALLYES($result) if (empty($cnt)) $cnt = 0; // Added prevent some unknown troubles... :-? // Check if line is already included... - $result_ref = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s AND userid=%s LIMIT 1", + $result_ref = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND userid=%s LIMIT 1", array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_ref) == 0) { // Free memory @@ -99,8 +99,8 @@ function RALLYE_AUTOSTART_RALLYES($result) // Add userid and his ref count to table $result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(p.points) -FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_points` AS p +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON p.userid=d.userid WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s", array(getConfig('ref_payout'), bigintval($uid)), __FILE__, __LINE__); @@ -110,7 +110,7 @@ WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p if (empty($cpoints)) $cpoints = "0.00000"; // Add info line - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs, curr_points) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs, curr_points) VALUES ('%s','%s','%s','%s')", array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__); $un = true; @@ -147,7 +147,7 @@ function RALLYE_ADD_PRICES($rallye,$mode="email") } // Load prices - $result_prices = SQL_QUERY("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id='".$rallye."' ORDER BY price_level", __FILE__, __LINE__); + $result_prices = SQL_QUERY("SELECT price_level, points, info FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id='".$rallye."' ORDER BY price_level", __FILE__, __LINE__); if (SQL_NUMROWS($result_prices) > 0) { // Load prices @@ -185,14 +185,14 @@ function RALLYE_ADD_PRICES($rallye,$mode="email") function RALLYE_ADD_TOPUSERS($rallye,$default=0) { // First check how many prices are set - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", array(bigintval($rallye)), __FILE__, __LINE__); $prices = SQL_NUMROWS($result); SQL_FREERESULT($result); // And load only limited users - $result = SQL_QUERY_ESC("SELECT DISTINCT u.userid, u.refs, u.curr_points FROM "._MYSQL_PREFIX."_rallye_users AS u -LEFT JOIN "._MYSQL_PREFIX."_refsystem AS r + $result = SQL_QUERY_ESC("SELECT DISTINCT u.userid, u.refs, u.curr_points FROM `{!MYSQL_PREFIX!}_rallye_users` AS u +LEFT JOIN `{!MYSQL_PREFIX!}_refsystem` AS r ON u.userid=r.userid WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC", array(bigintval($rallye)), __FILE__, __LINE__); @@ -210,8 +210,8 @@ WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC", $cnt = RALLYE_GET_REFCOUNT($uid, $refs); // Points of ref's - $result_ref = SQL_QUERY_ESC("SELECT DISTINCT p.points FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d + $result_ref = SQL_QUERY_ESC("SELECT DISTINCT p.points FROM `{!MYSQL_PREFIX!}_user_points` AS p +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON p.userid=d.userid WHERE d.userid=%s AND d.status='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s LIMIT 1", array(bigintval($uid), getConfig('ref_payout')), __FILE__, __LINE__); @@ -279,7 +279,7 @@ function RALLYE_AUTOADD_USER($uid) } // END - if // Check for an auto-add rallye - $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$ADD." FROM "._MYSQL_PREFIX."_rallye_data WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$ADD." FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Init variables $min_users = 0; $min_prices = 0; @@ -294,13 +294,13 @@ function RALLYE_AUTOADD_USER($uid) SQL_FREERESULT($result); // Check if line is already included... - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s AND userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND userid=%s LIMIT 1", array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); // Is this user added? if (SQL_NUMROWS($result) == 0) { // Add userid and his ref count to table - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs) VALUES ('%s','%s','0')", array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); } else { @@ -370,7 +370,7 @@ function RALLYE_EXPIRE_RALLYES($result) // active = 1: account is still confirmed // active = 0: account is deleted or locked $result = SQL_QUERY_ESC("SELECT COUNT(userid) AS active -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); list($active) = SQL_FETCHROW($result); @@ -391,7 +391,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } // END - if // Expire rallye - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET expired='Y' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET expired='Y' WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Run array through (by uid is the most important 2nd-level-array) @@ -461,7 +461,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0); // Add task - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created) VALUES ('NEW','RALLYE_EXPIRED','".RALLYE_ADMIN_EXPIRED.": %s','".RALLYE_ADMIN_EXPIRED_TEXT."',UNIX_TIMESTAMP())", array($title), __FILE__, __LINE__); @@ -474,7 +474,7 @@ function RALLYE_LOAD_USER_DATA($uids_array) $uid_string = implode(",", $uids_array['uid']); // Load users - $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s", + $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s", array($uid_string, count($uids_array)), __FILE__, __LINE__); $ret = ""; while (list($u, $gender, $surname, $family, $email) = SQL_FETCHROW($result)) @@ -496,7 +496,7 @@ function RALLYE_LOAD_PRICES_ARRAY($rallye) ); // Load prices - $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level", + $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", array(bigintval($rallye)), __FILE__, __LINE__); while(list($level, $points, $info) = SQL_FETCHROW($result)) { @@ -527,7 +527,7 @@ function RALLYE_LOAD_USERS_ARRAY ($rallye) { ); // Load users uid old points earned - $result_user = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s ORDER BY userid", + $result_user = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY userid", array(bigintval($rallye)), __FILE__, __LINE__); while (list($uid, $refs, $cpoints) = SQL_FETCHROW($result_user)) { // Load current ref count @@ -535,8 +535,8 @@ function RALLYE_LOAD_USERS_ARRAY ($rallye) { // Points of ref's $result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(p.points) -FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_points` AS p +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON p.userid=d.userid WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s", array(getConfig('ref_payout'), bigintval($uid)), __FILE__, __LINE__); @@ -579,7 +579,7 @@ WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p // function RALLYE_LIST_WINNERS ($rallye, $default=0) { // First check how many prices are set - $result_prices = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level", + $result_prices = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", array(bigintval($rallye)), __FILE__, __LINE__); $prices = SQL_NUMROWS($result_prices); SQL_FREERESULT($result_prices); @@ -595,7 +595,7 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) { // Check status // active = 1: account is still confirmed // active = 0: account is deleted or locked - $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($DATA['uid'][$idx])), __FILE__, __LINE__); list($active) = SQL_FETCHROW($result_active); SQL_FREERESULT($result_active); @@ -654,7 +654,7 @@ function RALLYE_DELETE_EXPIRED_RALLYES() // Check for expired rallyes $EXPIRE = getConfig('one_day') * 3; // @TODO The hard-coded value... $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time -FROM "._MYSQL_PREFIX."_rallye_data +FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'", array($EXPIRE), __FILE__, __LINE__); @@ -673,16 +673,16 @@ WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'", SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0); // Purge whole rallye - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // Add task - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created) VALUES ('NEW','RALLYE_PURGED','".RALLYE_ADMIN_PURGED.": %s','".RALLYE_ADMIN_PURGED_TEXT."',UNIX_TIMESTAMP())", array($title), __FILE__, __LINE__); } @@ -781,8 +781,8 @@ function RALLYE_GET_REFCOUNT($uid, $old=0) { } else { // Load current refs from database $result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(s.counter) AS cnt -FROM "._MYSQL_PREFIX."_refsystem AS s -LEFT JOIN "._MYSQL_PREFIX."_refdepths AS d +FROM `{!MYSQL_PREFIX!}_refsystem` AS s +LEFT JOIN `{!MYSQL_PREFIX!}_refdepths` AS d ON s.level=d.level WHERE s.userid=%s AND s.level=1", array(bigintval($uid)), __FILE__, __LINE__); list($cnt) = SQL_FETCHROW($result_ref); diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 551f56e4cf..2c7c17b3a0 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -49,7 +49,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) { $return = $points; // Get all ref levels - $result_refs = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE level > 0 ORDER BY level ASC", __FILE__, __LINE__); + $result_refs = SQL_QUERY("SELECT level, percents FROM `{!MYSQL_PREFIX!}_refdepths` WHERE level > 0 ORDER BY level ASC", __FILE__, __LINE__); // "Walk" through all level while (list($level, $perc) = SQL_FETCHROW($result_refs)) { @@ -73,7 +73,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) { $refback = $points * ($perc / 100) * ($percents / 100); // Update refback table ("refid" and "uid" must be exchanged!) - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_refs` SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1", array($refback, $refid, $uid), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")
\n"; @@ -112,7 +112,7 @@ function GET_REFBACK_PERCENTS ($uid, $ref) { $percents = 0; // Get percents from database - $result = SQL_QUERY_ESC("SELECT refback FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND refid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT refback FROM `{!MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND refid=%s LIMIT 1", array($ref, $uid), __FILE__, __LINE__); // Entry found? (Should be!) @@ -142,7 +142,7 @@ function GET_REFBACK_USERID_ARRAY ($rid, $level) { // Look for all $result = SQL_QUERY_ESC("SELECT userid -FROM "._MYSQL_PREFIX."_user_refs +FROM `{!MYSQL_PREFIX!}_user_refs` WHERE refid=%s AND level=%s ORDER BY userid ASC", array($rid,$level), __FILE__, __LINE__); @@ -179,7 +179,7 @@ function UPDATE_REFBACK_TABLE($uid) { $old = 0; $minus = 0; // Check for his referal - $result_refid = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s ORDER BY userid ASC", + $result_refid = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC", array(bigintval($uid)), __FILE__, __LINE__); // When no entry was updated then we have to create it here @@ -203,7 +203,7 @@ function UPDATE_REFBACK_TABLE($uid) { } // END - if // Check existence - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1", array(bigintval($uid), $cacheArray['back_level'], bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); // Do we have no entry? @@ -211,7 +211,7 @@ function UPDATE_REFBACK_TABLE($uid) { if (SQL_NUMROWS($result) == 0) { // Insert this level //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - ADD!
\n"; - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)", array(bigintval($uid), $cacheArray['back_level'], bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); // Move to next referal level and count his counter one up! @@ -224,14 +224,14 @@ function UPDATE_REFBACK_TABLE($uid) { $uid = $old; // Shall we add this as well? - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1", array(bigintval($uid), ($cacheArray['back_level']-$minus), bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); // Do we have no entry? //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!
\n"; if (SQL_NUMROWS($result) == 0) { // Insert this level - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)", array(bigintval($uid), ($cacheArray['back_level']-$minus), bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - RETURNED!
\n"; } // END - if @@ -274,8 +274,8 @@ function GET_USER_REFS ($uid, $level) { // Get refs from database $result = SQL_QUERY_ESC("SELECT r.id, r.refid, r.refback, r.points, d.status".$ADD." -FROM "._MYSQL_PREFIX."_user_refs AS r -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_refs` AS r +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON r.refid=d.userid WHERE r.userid=%s AND r.level=%s ORDER BY r.refid ASC", @@ -307,7 +307,7 @@ function GET_USER_REF_ENTRY ($id) { $id = bigintval($id); // Get entry from database - $result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM "._MYSQL_PREFIX."_user_refs WHERE id=%s AND userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM `{!MYSQL_PREFIX!}_user_refs` WHERE id=%s AND userid=%s LIMIT 1", array($id, $GLOBALS['userid']), __FILE__, __LINE__); // Is there an entry? @@ -358,7 +358,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { $percents = REVERT_COMMA($percents); // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET refback='%s' WHERE id=%s AND userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_refs` SET refback='%s' WHERE id=%s AND userid=%s LIMIT 1", array($percents, $id, $GLOBALS['userid']), __FILE__, __LINE__); // Entry updated? diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 1c266eec81..0564fb375e 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { // function REGISTER_FILL_MUST_CONSTANTS() { - $result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT field_name, field_required FROM `{!MYSQL_PREFIX!}_must_register` ORDER BY id", __FILE__, __LINE__); while(list($name, $required) = SQL_FETCHROW($result)) { $value = ""; if ($required == "Y") $value = "
 (*)
"; @@ -63,7 +63,7 @@ function REGISTER_CHECK_REQUIRED_FIELDS(&$array) $ret = false; foreach ($array as $key => $value) { - $result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT field_required FROM `{!MYSQL_PREFIX!}_must_register` WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // "Must-line" found @@ -87,7 +87,7 @@ function REGISTER_CHECK_REQUIRED_FIELDS(&$array) // function REGISTER_OUTPUT_REQUIRE_CHECK(&$array) { - $result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT field_name, field_required FROM `{!MYSQL_PREFIX!}_must_register` ORDER BY id", __FILE__, __LINE__); while(list($name, $required) = SQL_FETCHROW($result)) { if (($array[$name] == "!") && ($required == "Y")) { @@ -113,7 +113,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) // Admins are allowed to see every category... if (IS_ADMIN()) $AND = ""; - $result = SQL_QUERY("SELECT id, cat, visible FROM "._MYSQL_PREFIX."_cats ".$AND." ORDER BY sort", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, cat, visible FROM `{!MYSQL_PREFIX!}_cats` ".$AND." ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List alle visible modules (or all to the admin) diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 6e07f8f46c..50b0d509cb 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -69,7 +69,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S $SAVE = false; } else { // Do we want to add a new sponsor or update his data? - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE email='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1", array($POST['email']), __FILE__, __LINE__); // Is a sponsor alread in the db? @@ -125,7 +125,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S // Update? if ($UPDATE) { // Update his data - $SQL = "UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET "; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET "; foreach ($DATA['keys'] as $k => $v) { $SQL .= $v."='%s', "; } @@ -160,7 +160,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S $VALUES = str_repeat("%s', '", count($DATA['values']) - 1); // Generate string - $SQL = "INSERT INTO `"._MYSQL_PREFIX."_sponsor_data` (".$KEYS.") VALUES ('".$VALUES."%s')"; + $SQL = "INSERT INTO `{!MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$VALUES."%s')"; // Generate message $MSG = SPONSOR_GET_MESSAGE(ADMIN_SPONSOR_ADDED, "added", $MSGs); @@ -264,7 +264,7 @@ function IS_SPONSOR () { $ret = false; if ((isSessionVariableSet('sponsorid'))) && (isSessionVariableSet('sponsorpass')))) { // Check cookies against database records... - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' AND password='%s' AND status='CONFIRMED' LIMIT 1", array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -287,7 +287,7 @@ function GENERATE_SPONSOR_MENU($current) if (IS_ADMIN()) $WHERE = ""; // Load main menu entries - $result_main = SQL_QUERY("SELECT action, title FROM `"._MYSQL_PREFIX."_sponsor_menu` + $result_main = SQL_QUERY("SELECT action, title FROM `{!MYSQL_PREFIX!}_sponsor_menu` WHERE (what='' OR what IS NULL) ".$WHERE." ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) @@ -296,7 +296,7 @@ ORDER BY sort", __FILE__, __LINE__); while(list($action, $title_main) = SQL_FETCHROW($result_main)) { // Load sub menus - $result_sub = SQL_QUERY_ESC("SELECT what, title FROM `"._MYSQL_PREFIX."_sponsor_menu` + $result_sub = SQL_QUERY_ESC("SELECT what, title FROM `{!MYSQL_PREFIX!}_sponsor_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ".$WHERE." ORDER BY sort", array($action), __FILE__, __LINE__); if (SQL_NUMROWS($result_sub) > 0) @@ -374,7 +374,7 @@ function UPDATE_SPONSOR_LOGIN () { // Is sponsor? if (IS_SPONSOR()) { // Update last online timestamp - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET last_online=UNIX_TIMESTAMP() WHERE id='%s' AND password='%s' LIMIT 1", array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__); @@ -417,7 +417,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) { $DATA = array(); // Prepare SQL string - $SQL = "UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET"; foreach ($POST as $key => $value) { // Mmmmm, too less security here??? $SQL .= " ".strip_tags($key)."='%s',"; diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index cdb46c8e77..914494b368 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -264,7 +264,7 @@ function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) { global $SURFBAR_CACHE; // Search for the requested action/status combination in database - $result = SQL_QUERY_ESC("SELECT new_status FROM "._MYSQL_PREFIX."_surfbar_actions WHERE action='%s' AND status='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT new_status FROM `{!MYSQL_PREFIX!}_surfbar_actions` WHERE action='%s' AND status='%s' LIMIT 1", array($action, $status), __FILE__, __LINE__); // Is the entry there? @@ -432,7 +432,7 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) { if (true) { //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) { // Run the query - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET url='%s', views_allowed=%s, views_max=%s WHERE id=%s AND status='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_surfbar_urls` SET url='%s', views_allowed=%s, views_max=%s WHERE id=%s AND status='%s' LIMIT 1", array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FILE__, __LINE__); // All fine @@ -504,7 +504,7 @@ function SURFBAR_HANDLE_LOW_POINTS () { SURFBAR_NOTIFY_USER("low_points", $content); // Update last notified - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); } // END - if } // END - foreach @@ -543,7 +543,7 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="AS // Look up the record $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed, fixed_reload -FROM "._MYSQL_PREFIX."_surfbar_urls +FROM `{!MYSQL_PREFIX!}_surfbar_urls` WHERE %s='%s'".$add." ORDER BY %s %s %s", @@ -622,7 +622,7 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { if (empty($uid)) $uid = 0; // Just run the insert query for now - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)", array( $uid, $urlData['url'], @@ -821,8 +821,8 @@ function SURFBAR_CHECK_RELOAD_FULL() { } // END - if // Ask the database - $result = SQL_QUERY_ESC("SELECT COUNT(l.id) AS cnt FROM "._MYSQL_PREFIX."_surfbar_locks AS l -INNER JOIN "._MYSQL_PREFIX."_surfbar_urls AS u + $result = SQL_QUERY_ESC("SELECT COUNT(l.id) AS cnt FROM `{!MYSQL_PREFIX!}_surfbar_locks` AS l +INNER JOIN `{!MYSQL_PREFIX!}_surfbar_urls` AS u ON u.id=l.url_id WHERE l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = 0) LIMIT 1", @@ -864,7 +864,7 @@ function SURFBAR_GET_TOTAL_URLS ($status="ACTIVE", $excludeUserId=0) { // Get amount from database $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt -FROM "._MYSQL_PREFIX."_surfbar_urls +FROM `{!MYSQL_PREFIX!}_surfbar_urls` WHERE userid NOT IN (".implode(",", $UIDs['uid']).") AND status='%s'", array($status), __FILE__, __LINE__ ); @@ -918,7 +918,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") { // Get amount from database $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt -FROM "._MYSQL_PREFIX."_surfbar_urls +FROM `{!MYSQL_PREFIX!}_surfbar_urls` WHERE userid=%s".$ADD." LIMIT %s", array($uid, getConfig('surfbar_max_order')), __FILE__, __LINE__ @@ -995,11 +995,11 @@ function SURFBAR_LOCKDOWN_ID ($urlId) { //* DEBUG: */ print "LOCK!"); ///* DEBUG: */ return; // Just add it to the database - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_locks (userid, url_id) VALUES (%s, %s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_surfbar_locks` (userid, url_id) VALUES (%s, %s)", array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__); // Remove the salt from database - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_surfbar_salts WHERE url_id=%s AND userid=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_surfbar_salts` WHERE url_id=%s AND userid=%s LIMIT 1", array(bigintval($urlId), $GLOBALS['userid']), __FILE__, __LINE__); } // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf" @@ -1033,17 +1033,17 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () { } // END - if // Update URL stats - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET views_total=views_total+1".$ADD." WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_surfbar_urls` SET views_total=views_total+1".$ADD." WHERE id=%s LIMIT 1", array(SURFBAR_GET_ID()), __FILE__, __LINE__); // Update the stats entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_stats SET count=count+1 WHERE userid=%s AND url_id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_surfbar_stats` SET count=count+1 WHERE userid=%s AND url_id=%s LIMIT 1", array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__); // Was that update okay? if (SQL_AFFECTEDROWS() < 1) { // No, then insert entry - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_stats (userid,url_id,count) VALUES (%s,%s,1)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_surfbar_stats` (userid,url_id,count) VALUES (%s,%s,1)", array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__); } // END - if @@ -1062,7 +1062,7 @@ function SURFBAR_UPDATE_SALT_STATS () { SURFBAR_UPDATE_INSERT_STATS_RECORD(); // Simply store the salt from cache away in database... - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_salts SET last_salt='%s' WHERE url_id=%s AND userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_surfbar_salts` SET last_salt='%s' WHERE url_id=%s AND userid=%s LIMIT 1", array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), $GLOBALS['userid']), __FILE__, __LINE__); // Debug message @@ -1071,7 +1071,7 @@ function SURFBAR_UPDATE_SALT_STATS () { // Was that okay? if (SQL_AFFECTEDROWS() < 1) { // Insert missing entry! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_salts (url_id,userid,last_salt) VALUES (%s, %s, '%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_surfbar_salts` (url_id,userid,last_salt) VALUES (%s, %s, '%s')", array(SURFBAR_GET_ID(), $GLOBALS['userid'], SURFBAR_GET_SALT()), __FILE__, __LINE__); } // END - if @@ -1086,7 +1086,7 @@ function SURFBAR_CHECK_RELOAD_LOCK ($urlId) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "id={$urlId}", false); // Ask the database $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt -FROM "._MYSQL_PREFIX."_surfbar_locks +FROM `{!MYSQL_PREFIX!}_surfbar_locks` WHERE userid=%s AND url_id=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(last_surfed) ORDER BY last_surfed ASC LIMIT 1", @@ -1121,8 +1121,8 @@ function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) { // Get all userid except logged in one $result = SQL_QUERY_ESC("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified -FROM "._MYSQL_PREFIX."_surfbar_urls AS u -INNER JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_surfbar_urls` AS u +INNER JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON u.userid=d.userid WHERE u.userid NOT IN (%s,0) AND u.status='ACTIVE' GROUP BY u.userid @@ -1131,8 +1131,8 @@ ORDER BY u.userid ASC", } else { // Get all userid $result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified -FROM "._MYSQL_PREFIX."_surfbar_urls AS u -INNER JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_surfbar_urls` AS u +INNER JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON u.userid=d.userid WHERE u.status='ACTIVE' GROUP BY u.userid @@ -1170,7 +1170,7 @@ function SURFBAR_DETERMINE_TOTAL_ONLINE () { // Count all users in surfbar modue and return the value $result = SQL_QUERY_ESC("SELECT id -FROM "._MYSQL_PREFIX."_surfbar_stats +FROM `{!MYSQL_PREFIX!}_surfbar_stats` WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s GROUP BY userid", array(getConfig('online_timeout')), __FILE__, __LINE__); @@ -1235,7 +1235,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) // Update the status now // ---------- Comment out for debugging/developing member actions! --------- - //SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET status='%s' WHERE id=%s LIMIT 1", + //SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_surfbar_urls` SET status='%s' WHERE id=%s LIMIT 1", // array($newStatus, bigintval($urlId)), __FILE__, __LINE__); // ---------- Comment out for debugging/developing member actions! --------- @@ -1355,7 +1355,7 @@ function SURFBAR_GET_LOCK_IDS () { // Get all id from locks within the timestamp $result = SQL_QUERY_ESC("SELECT id, url_id, UNIX_TIMESTAMP(last_surfed) AS last FROM - "._MYSQL_PREFIX."_surfbar_locks + {!MYSQL_PREFIX!}_surfbar_locks WHERE userid=%s ORDER BY @@ -1403,10 +1403,10 @@ function SURFBAR_GET_MAX_RANDOM ($UIDs, $ADD) { global $_CONFIG; // Count max availabe entries $result = SQL_QUERY("SELECT sbu.id AS cnt -FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs +FROM `{!MYSQL_PREFIX!}_surfbar_urls` AS sbu +LEFT JOIN `{!MYSQL_PREFIX!}_surfbar_salts` AS sbs ON sbu.id=sbs.url_id -LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l +LEFT JOIN `{!MYSQL_PREFIX!}_surfbar_locks` AS l ON sbu.id=l.url_id WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0)) AND sbu.status='ACTIVE'".$ADD." GROUP BY sbu.id", __FILE__, __LINE__); @@ -1430,7 +1430,7 @@ function SURFBAR_GET_USER_URLS () { // Begin the query $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.views_max, u.views_allowed, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason -FROM "._MYSQL_PREFIX."_surfbar_urls AS u +FROM `{!MYSQL_PREFIX!}_surfbar_urls` AS u WHERE u.userid=%s AND u.status != 'DELETED' ORDER BY u.id ASC", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -1456,7 +1456,7 @@ function SURFBAR_GET_ACTION_ARRAY ($status) { $returnArray = array(); // Get all assigned actions - $result = SQL_QUERY_ESC("SELECT action FROM "._MYSQL_PREFIX."_surfbar_actions WHERE status='%s' ORDER BY id ASC", + $result = SQL_QUERY_ESC("SELECT action FROM `{!MYSQL_PREFIX!}_surfbar_actions` WHERE status='%s' ORDER BY id ASC", array($status), __FILE__, __LINE__); // Some entries there? @@ -1528,10 +1528,10 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { // And query the database //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_SURF_LOCK()."", false); $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed, sbu.fixed_reload -FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs +FROM `{!MYSQL_PREFIX!}_surfbar_urls` AS sbu +LEFT JOIN `{!MYSQL_PREFIX!}_surfbar_salts` AS sbs ON sbu.id=sbs.url_id -LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l +LEFT JOIN `{!MYSQL_PREFIX!}_surfbar_locks` AS l ON sbu.id=l.url_id WHERE sbu.userid NOT IN (".implode(",", $UIDs['uid']).") AND sbu.status='ACTIVE' AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))".$ADD." GROUP BY sbu.id @@ -1542,10 +1542,10 @@ LIMIT %s,1", } else { // Get data from specified id number $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed, sbu.fixed_reload -FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs +FROM `{!MYSQL_PREFIX!}_surfbar_urls` AS sbu +LEFT JOIN `{!MYSQL_PREFIX!}_surfbar_salts` AS sbs ON sbu.id=sbs.url_id -LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l +LEFT JOIN `{!MYSQL_PREFIX!}_surfbar_locks` AS l ON sbu.id=l.url_id WHERE sbu.userid != %s AND sbu.status='ACTIVE' AND sbu.id=%s AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0)) LIMIT 1", diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index cc989decf4..59f30ec08e 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -45,6 +45,7 @@ if (!defined('__SECURITY')) { // - Your own tasks // - ... // +// @TODO Move all extension-dependent queries into filters function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { global $_CONFIG; @@ -260,7 +261,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) // Check for all accounts $SQLs[] = "SELECT DISTINCT d.userid, d.email, d.last_online -FROM `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_data` AS d WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - ".$since.") AND d.last_online < (UNIX_TIMESTAMP() - ".$since.") AND d.ap_notified < (UNIX_TIMESTAMP() - ".$since.") ".$EXCLUDE_LIST." ORDER BY d.userid"; @@ -271,7 +272,7 @@ ORDER BY d.userid"; if (GET_EXT_VERSION("sql_patches") >= "0.3.4") { // Check for accounts without referal - $SQLs[] = "SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE refid='0' ORDER BY userid"; + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid='0' ORDER BY userid"; $DESCRs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF; $TITLEs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF_TITLE; $WHATs[] = "list_user&mode=norefs"; @@ -279,11 +280,11 @@ ORDER BY d.userid"; if (EXT_IS_ACTIVE("payout")) { // List new payout requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts WHERE status='NEW' ORDER BY userid"; + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_payouts` WHERE status='NEW' ORDER BY userid"; $WHATs[] = "list_payouts"; $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING; $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING_TITLE; - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts ORDER BY userid"; + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_payouts` ORDER BY userid"; $WHATs[] = "list_payouts"; $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_ALL; $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_ALL_TITLE; @@ -291,7 +292,7 @@ ORDER BY d.userid"; if (EXT_IS_ACTIVE("wernis")) { // List new wernis requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_wernis ORDER BY userid"; + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_wernis` ORDER BY userid"; $WHATs[] = "list_wernis"; $DESCRs[] = TASK_ADMIN_LIST_WERNIS_ALL; $TITLEs[] = TASK_ADMIN_LIST_WERNIS_ALL_TITLE; @@ -299,7 +300,7 @@ ORDER BY d.userid"; if (EXT_IS_ACTIVE("primera")) { // List new primera requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_primera ORDER BY userid"; + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_primera` ORDER BY userid"; $WHATs[] = "list_primera"; $DESCRs[] = TASK_ADMIN_LIST_PRIMERA_ALL; $TITLEs[] = TASK_ADMIN_LIST_PRIMERA_ALL_TITLE; @@ -307,7 +308,7 @@ ORDER BY d.userid"; if (EXT_IS_ACTIVE("holiday")) { // List holiday requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_holidays ORDER BY userid"; + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_holidays` ORDER BY userid"; $WHATs[] = "list_holiday"; $DESCRs[] = TASK_ADMIN_LIST_HOLIDAYS; $TITLEs[] = TASK_ADMIN_LIST_HOLIDAYS_TITLE; @@ -315,7 +316,7 @@ ORDER BY d.userid"; if (GET_EXT_VERSION("bonus") >= "0.8.7") { // List all notifications - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE is_notify='Y' ORDER BY timestamp DESC"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_bonus` WHERE is_notify='Y' ORDER BY timestamp DESC"; $WHATs[] = "list_notifications"; $DESCRs[] = TASK_ADMIN_LIST_NOTIFICATIONS; $TITLEs[] = TASK_ADMIN_LIST_NOTIFICATIONS_TITLE; @@ -345,7 +346,7 @@ ORDER BY d.userid"; } $SQLs[] = "SELECT ".$USE." AS points -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND ".$USE.">0".$LAST." ORDER BY points DESC, userid"; $WHATs[] = "list_bonus"; @@ -363,7 +364,7 @@ ORDER BY points DESC, userid"; $LAST = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since')); } - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data + $SQLs[] = "SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND beg_points>0".$LAST." ORDER BY beg_points DESC, userid"; $WHATs[] = "list_beg"; @@ -373,11 +374,11 @@ ORDER BY beg_points DESC, userid"; if (EXT_IS_ACTIVE("doubler")) { // List waiting payouts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='N' ORDER BY id"; $WHATs[] = "list_doubler&mode=waiting&select=all"; $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_WAITING; $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_WAITING_TITLE; - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_doubler` ORDER BY id"; $WHATs[] = "list_doubler"; $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_ALL; $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_ALL_TITLE; @@ -386,7 +387,7 @@ ORDER BY beg_points DESC, userid"; // // All referal banner // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_refbanner` ORDER BY id"; $WHATs[] = "refbanner"; $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ALL; $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ALL_TITLE; @@ -394,7 +395,7 @@ ORDER BY beg_points DESC, userid"; // // All activated referal banner // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner WHERE visible='Y' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_refbanner` WHERE visible='Y' ORDER BY id"; $WHATs[] = "refbanner"; $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE; $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE_TITLE; @@ -402,7 +403,7 @@ ORDER BY beg_points DESC, userid"; // // All extensions // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_extensions` ORDER BY id"; $WHATs[] = "extensions"; $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL; $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL_TITLE; @@ -410,66 +411,66 @@ ORDER BY beg_points DESC, userid"; // // All activated extensions // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_active='Y' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_active='Y' ORDER BY id"; $WHATs[] = "extensions&active=Y"; $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE; $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE_TITLE; if (EXT_IS_ACTIVE("engine")) { // List all export accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_engine_accounts` ORDER BY id"; $WHATs[] = "list_engine"; $DESCRs[] = TASK_ADMIN_LIST_ENGINE; // List all pending accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts WHERE status='UNCONFIRMED' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_engine_accounts` WHERE status='UNCONFIRMED' ORDER BY id"; $WHATs[] = "unlock_engine"; $DESCRs[] = TASK_ADMIN_UNLOCK_ENGINE; // List all safes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_safe ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_engine_safe` ORDER BY id"; $WHATs[] = "list_engine&mode=safe"; $DESCRs[] = TASK_ADMIN_LIST_ENGINE_SAFES; // List all export URLs - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_urls ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_engine_urls` ORDER BY id"; $WHATs[] = "engine_urls"; $DESCRs[] = TASK_ADMIN_LIST_ENGINE_URLS; } if (EXT_IS_ACTIVE("sponsor")) { // List all sponsors - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` ORDER BY id"; $WHATs[] = "list_sponsor"; $DESCRs[] = TASK_ADMIN_LIST_SPONSOR; $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_TITLE; // List confirmed sponsor accounts - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE status='CONFIRMED' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE status='CONFIRMED' ORDER BY id"; $WHATs[] = "list_sponsor"; $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED; $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED_TITLE; // List unconfirmed sponsor accounts - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE status='UNCONFIRMED' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE status='UNCONFIRMED' ORDER BY id"; $WHATs[] = "list_sponsor"; $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED; $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED_TITLE; // List locked sponsor accounts - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE status='LOCKED' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE status='LOCKED' ORDER BY id"; $WHATs[] = "list_sponsor"; $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED; $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED_TITLE; // List waiting sponsor accounts to be approved - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE status='PENDING' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE status='PENDING' ORDER BY id"; $WHATs[] = "unlock_sponsor"; $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_PENDING; $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_PENDING_TITLE; // Waiting payments - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_sponsor_orders` WHERE pay_status='PENDING' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_orders` WHERE pay_status='PENDING' ORDER BY id"; $WHATs[] = "list_sponsor_pays"; $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS; $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS_TITLE; @@ -477,7 +478,7 @@ ORDER BY beg_points DESC, userid"; if (EXT_IS_ACTIVE("country")) { // List country codes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_countries ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_countries` ORDER BY id"; $WHATs[] = "list_country"; $DESCRs[] = TASK_ADMIN_LIST_COUNTRY; $TITLEs[] = TASK_ADMIN_LIST_COUNTRY_TITLE; @@ -485,13 +486,13 @@ ORDER BY beg_points DESC, userid"; if (EXT_IS_ACTIVE("theme")) { // List all themes - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_themes` ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_themes` ORDER BY id"; $WHATs[] = "theme_edit"; $DESCRs[] = TASK_ADMIN_LIST_THEME_ALL; $TITLEs[] = TASK_ADMIN_LIST_THEME_ALL_TITLE; // List active themes - $SQLs[] = "SELECT id FROM `"._MYSQL_PREFIX."_themes` WHERE theme_active='Y' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_active='Y' ORDER BY id"; $WHATs[] = "theme_edit"; $DESCRs[] = TASK_ADMIN_LIST_THEME_ACTIVE; $TITLEs[] = TASK_ADMIN_LIST_THEME_ACTIVE_TITLE; @@ -499,7 +500,7 @@ ORDER BY beg_points DESC, userid"; if (EXT_IS_ACTIVE("admins")) { // List all administrator logins - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_admins ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_admins` ORDER BY id"; $WHATs[] = "admins_edit"; $DESCRs[] = TASK_ADMIN_LIST_ADMINS_ALL; $TITLEs[] = TASK_ADMIN_LIST_ADMINS_ALL_TITLE; @@ -507,13 +508,13 @@ ORDER BY beg_points DESC, userid"; if (EXT_IS_ACTIVE("surfbar")) { // List all URLs in surfbar - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_surfbar_urls ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_surfbar_urls` ORDER BY id"; $WHATs[] = "list_surfbar_urls"; $DESCRs[] = TASK_ADMIN_LIST_SURFBAR_URLS_ALL; $TITLEs[] = TASK_ADMIN_LIST_SURFBAR_URLS_ALL_TITLE; // List all pending URLs in surfbar - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_surfbar_urls WHERE status='PENDING' ORDER BY id"; + $SQLs[] = "SELECT id FROM `{!MYSQL_PREFIX!}_surfbar_urls` WHERE status='PENDING' ORDER BY id"; $WHATs[] = "unlock_surfbar_urls"; $DESCRs[] = TASK_ADMIN_LIST_SURFBAR_URLS_PENDING; $TITLEs[] = TASK_ADMIN_LIST_SURFBAR_URLS_PENDING_TITLE; diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index a39bdff3a8..92a2a47ac4 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -101,7 +101,7 @@ function THEME_GET_VERSION ($name) { incrementConfigEntry('cache_hits'); } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Load version from database - $result = SQL_QUERY_ESC("SELECT theme_ver FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1", array($name), __FILE__, __LINE__); // Entry found? @@ -146,7 +146,7 @@ function THEME_IS_ACTIVE ($name) { incrementConfigEntry('cache_hits'); } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Check if current theme is already imported or not - $result = SQL_QUERY_ESC("SELECT theme_active FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT theme_active FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1", array($name), __FILE__, __LINE__); // Is the theme active and installed? @@ -182,7 +182,7 @@ function GET_CURR_THEME_NAME () { incrementConfigEntry('cache_hits'); } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Check if current theme is already imported or not - $result = SQL_QUERY_ESC("SELECT theme_name FROM `"._MYSQL_PREFIX."_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT theme_name FROM `{!MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1", array($name), __FILE__, __LINE__); // Load theme name diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php index f8b65f32bd..ce94a35246 100644 --- a/inc/libs/transfer_functions.php +++ b/inc/libs/transfer_functions.php @@ -40,31 +40,31 @@ if (!defined('__SECURITY')) { // function TRANSFER_AUTPPURGE($max, $age) { // First get total in-going lines - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_transfers_in ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_user_transfers_in` ORDER BY id", __FILE__, __LINE__); if (SQL_NUMROWS($result) > $max) { // Update overdue transfers $remove = SQL_NUMROWS($result) - $max; // This will make it really old, so the final removal query will find it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_in SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); + $result = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_transfers_in` SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); } // Second get total out-going lines - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_user_transfers_out` ORDER BY id", __FILE__, __LINE__); if (SQL_NUMROWS($result) > $max) { // Update overdue transfers $remove = SQL_NUMROWS($result) - $max; // This will make it really old, so the final removal query will find it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_out SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); + $result = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_transfers_out` SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); } // Remove old in-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_transfers_in` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__); $REMOVE = SQL_AFFECTEDROWS(); // Remove old out-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_transfers_out` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__); $REMOVE += SQL_AFFECTEDROWS(); // Only send email to admin(s) when we have removed entries diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index c07333256a..c1b19229e7 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -199,7 +199,7 @@ function USER_CREATE_EMAIL_LINK($email, $mod="admin") { if (IS_ADMIN()) $locked = ""; $result = SQL_QUERY_ESC("SELECT userid -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE email='%s'".$locked." LIMIT 1", array($email), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -235,7 +235,7 @@ function SELECT_RANDOM_REFID () { $randNum = mt_rand(0, ($totalUsers - 1)); // Look for random user - $result = SQL_QUERY_ESC("SELECT `userid` FROM `"._MYSQL_PREFIX."_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= %s ORDER BY `rand_confirmed` DESC LIMIT %s, 1", + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= %s ORDER BY `rand_confirmed` DESC LIMIT %s, 1", array(getConfig('user_min_confirmed'), $randNum), __FILE__, __LINE__); // Do we have one entry there? @@ -244,7 +244,7 @@ function SELECT_RANDOM_REFID () { list($refid) = SQL_FETCHROW($result); // Reset this user's counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `rand_confirmed`=0 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET `rand_confirmed`=0 WHERE userid=%s LIMIT 1", array($refid), __FILE__, __LINE__); } // END - if @@ -269,13 +269,13 @@ function USER_DO_LOGIN ($uid, $passwd) { $password = ""; $uid2 = ""; $dmy = ""; $online = 0; $login = 0; if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) { // Nickname entered - $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND status='CONFIRMED' LIMIT 1", array($uid), __FILE__, __LINE__); list($uid2, $password, $online, $login) = SQL_FETCHROW($result); if (!empty($uid2)) $uid = bigintval($uid2); } else { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array($uid, $hash), __FILE__, __LINE__); list($uid2, $password, $online, $login) = SQL_FETCHROW($result); } @@ -302,7 +302,7 @@ function USER_DO_LOGIN ($uid, $passwd) { $hash = generateHash($passwd); // ... and update database - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET password='%s' WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array($hash, $uid), __FILE__, __LINE__); // No login bonus by default @@ -336,7 +336,7 @@ function USER_DO_LOGIN ($uid, $passwd) { // Try to set session data (which shall normally always work!) if ((set_session('userid', $uid )) && (set_session('u_hash', $hash))) { // Update database records - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { // Procedure to checking for login data @@ -357,7 +357,7 @@ function USER_DO_LOGIN ($uid, $passwd) { } } elseif (GET_EXT_VERSION("sql_patches") >= "0.6.1") { // Update failture counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); // Wrong password! @@ -366,7 +366,7 @@ function USER_DO_LOGIN ($uid, $passwd) { } elseif ((($probe_nickname) && (!empty($uid2))) || ($uid2 == $uid)) { // Other account status? // @TODO Can this query be merged with above query? - $result = SQL_QUERY_ESC("SELECT status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT status FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); // Entry found? @@ -404,15 +404,15 @@ function USER_DO_NEW_PASSWORD ($email, $uid) { // Probe userid/nickname if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) { // Nickname entered - $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1", array($uid, $email), __FILE__, __LINE__); } elseif (($uid > 0) && (empty($email))) { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } elseif (!empty($email)) { // Email entered - $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE email='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1", array($email), __FILE__, __LINE__); } else { // Userid not set! @@ -428,7 +428,7 @@ function USER_DO_NEW_PASSWORD ($email, $uid) { if ($status == "CONFIRMED") { // Ooppps, this was missing! ;-) We should update the database... $NEW_PASS = GEN_PASS(); - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET password='%s' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s LIMIT 1", array(generateHash($NEW_PASS), $uid), __FILE__, __LINE__); // Prepare data and message for email diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index ff4acda10f..ee1bb275ca 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -326,7 +326,7 @@ function WERNIS_TRANSFER_STATUS ($status) { // Log the transfer function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") { // Register this wernis movement - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_wernis` (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')", array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FILE__, __LINE__); } diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 2f9f64a237..49a45d16fa 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -242,7 +242,7 @@ function YOOMEDIA_EXCLUDE_MAIL ($data, $mode) { $mode = YOOMEDIA_CONVERT_MODE($mode); // Add the entry - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')", array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__); } // END - if } @@ -253,7 +253,7 @@ function YOOMEDIA_UNLIST_MAIL ($data, $mode) { $mode = YOOMEDIA_CONVERT_MODE($mode); // Add the entry - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", array($mode, bigintval($data['id'])), __FILE__, __LINE__); } @@ -303,7 +303,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) { $reloaded = false; // Query database - $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `"._MYSQL_PREFIX."_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `{!MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", array($type, bigintval($id)), __FILE__, __LINE__); // Entry found? @@ -314,7 +314,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) { // Are we ready to sent again? if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) { // Remove entry - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_yoomedia_reload WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_yoomedia_reload` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); } else { // Dont' sent again this mail @@ -337,7 +337,7 @@ function YOOMEDIA_RELOAD_LOCK ($data, $mode) { $mode = YOOMEDIA_CONVERT_MODE($mode); // Add the entry - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)", array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__); } // END - if } diff --git a/inc/load_extensions.php b/inc/load_extensions.php index 7db086e4e1..4830affddf 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -176,12 +176,12 @@ if ($cacheMode == "load") { if (GET_EXT_VERSION("sql_patches") >= "0.0.6") { // Query with CSS file from DB $res_ext_crt = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_has_css AS ext_css, ext_active, ext_version -FROM "._MYSQL_PREFIX."_extensions".$ADD." +FROM `{!MYSQL_PREFIX!}_extensions`".$ADD." ORDER BY ext_name", __FILE__, __LINE__); } else { // Old obsolete query string $res_ext_crt = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_name, ext_active, ext_version -FROM "._MYSQL_PREFIX."_extensions".$ADD." +FROM `{!MYSQL_PREFIX!}_extensions`".$ADD." ORDER BY ext_name", __FILE__, __LINE__); } } @@ -278,11 +278,11 @@ if (!empty($DEL[0])) { // Remove extensions from two tables: extension registry and tasks table foreach ($DEL as $del_ext) { // First remove entry from extensions table - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($del_ext), __FILE__, __LINE__); // Remove (maybe?) found tasks (main task and possible updates - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_task_system` WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')", array($del_ext), __FILE__, __LINE__); } // END - foreach diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php index 48e7c90f60..7e2a91baff 100644 --- a/inc/loader/load_cache-admin.php +++ b/inc/loader/load_cache-admin.php @@ -93,7 +93,7 @@ if (($cacheInstance->loadCacheFile("admins")) && ($cacheInstance->extensionVersi // Query the database about this $result_admins = SQL_QUERY("SELECT id AS aid, login, password, email".$ADD." -FROM "._MYSQL_PREFIX."_admins +FROM `{!MYSQL_PREFIX!}_admins` ORDER BY login", __FILE__, __LINE__); while($dummy = SQL_FETCHARRAY($result_admins)) { // Save row @@ -123,7 +123,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") { $cacheInstance->storeExtensionVersion("admins"); // Load all modules and their data - $result = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM `{!MYSQL_PREFIX!}_admins_acls` ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__); // Add all rows while ($data = SQL_FETCHARRAY($result)) { diff --git a/inc/loader/load_cache-config.php b/inc/loader/load_cache-config.php index dc7bc67c4e..97668f2444 100644 --- a/inc/loader/load_cache-config.php +++ b/inc/loader/load_cache-config.php @@ -53,7 +53,7 @@ if (($cacheInstance->loadCacheFile("config", true)) && ($cacheInstance->extensio $cacheInstance->storeExtensionVersion("sql_patches"); // Load all modules and their data - $result = SQL_QUERY("SELECT * FROM `"._MYSQL_PREFIX."_config` ORDER BY config ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT * FROM `{!MYSQL_PREFIX!}_config` ORDER BY config ASC", __FILE__, __LINE__); while ($data = SQL_FETCHARRAY($result)) { // Add row to cache file $cacheInstance->addRow($data); diff --git a/inc/loader/load_cache-modreg.php b/inc/loader/load_cache-modreg.php index 4b5624dec1..351550fee5 100644 --- a/inc/loader/load_cache-modreg.php +++ b/inc/loader/load_cache-modreg.php @@ -76,11 +76,11 @@ if (($cacheInstance->loadCacheFile("mod_reg")) && ($cacheInstance->extensionVers if (GET_EXT_VERSION("sql_patches") >= "0.3.6") { // Load has_menu $result = SQL_QUERY("SELECT id, module, title, locked, hidden, admin_only, title, mem_only, has_menu -FROM "._MYSQL_PREFIX."_mod_reg ORDER BY id", __FILE__, __LINE__); +FROM `{!MYSQL_PREFIX!}_mod_reg` ORDER BY id", __FILE__, __LINE__); } else { // Don't load has_menu $result = SQL_QUERY("SELECT id, module, title, locked, hidden, admin_only, title, mem_only -FROM "._MYSQL_PREFIX."_mod_reg ORDER BY id", __FILE__, __LINE__); +FROM `{!MYSQL_PREFIX!}_mod_reg` ORDER BY id", __FILE__, __LINE__); } // Cache all data diff --git a/inc/loader/load_cache-refdepths.php b/inc/loader/load_cache-refdepths.php index 11a47438ae..f6bcbd0cbc 100644 --- a/inc/loader/load_cache-refdepths.php +++ b/inc/loader/load_cache-refdepths.php @@ -51,7 +51,7 @@ if (($cacheInstance->loadCacheFile("refdepths")) && ($cacheInstance->extensionVe $cacheInstance->storeExtensionVersion("sql_patches"); // Load all modules and their data - $result = SQL_QUERY("SELECT id, level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, level, percents FROM `{!MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__); while ($data = SQL_FETCHARRAY($result)) { // Add row to cache file $cacheInstance->addRow($data); diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php index 5025371b66..5a34d05e76 100644 --- a/inc/loader/load_cache-refsystem.php +++ b/inc/loader/load_cache-refsystem.php @@ -51,7 +51,7 @@ if (($cacheInstance->loadCacheFile("refsystem")) && ($cacheInstance->extensionVe $cacheInstance->storeExtensionVersion("sql_patches"); // Load all modules and their data - $result = SQL_QUERY("SELECT id, userid, level, counter FROM "._MYSQL_PREFIX."_refsystem ORDER BY userid, level", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, userid, level, counter FROM `{!MYSQL_PREFIX!}_refsystem` ORDER BY userid, level", __FILE__, __LINE__); while ($data = SQL_FETCHARRAY($result)) { // Add row to cache file $cacheInstance->addRow($data); diff --git a/inc/loader/load_cache-them.php b/inc/loader/load_cache-them.php index 673d82693c..18781a48e4 100644 --- a/inc/loader/load_cache-them.php +++ b/inc/loader/load_cache-them.php @@ -75,9 +75,9 @@ if (($cacheInstance->loadCacheFile("themes")) && ($cacheInstance->extensionVersi // Load all themes and their data if (GET_EXT_VERSION("theme") >= "0.0.7") { - $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `"._MYSQL_PREFIX."_themes` ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{!MYSQL_PREFIX!}_themes` ORDER BY id", __FILE__, __LINE__); } else { - $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver FROM `"._MYSQL_PREFIX."_themes` ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver FROM `{!MYSQL_PREFIX!}_themes` ORDER BY id", __FILE__, __LINE__); } while ($data = SQL_FETCHARRAY($result)) { // Add row to cache file diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index cd43f5df05..defa215d44 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -48,7 +48,7 @@ $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', ti $SQL = ""; $MODE = ""; // Shall I sent activation or deactivation mail? -$SQL = "SELECT userid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE (beg_ral_notify "; +$SQL = "SELECT userid, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify "; switch (getConfig('beg_rallye')) { case "Y": // Begging rallye is activated @@ -115,7 +115,7 @@ if (!empty($SQL)) { // Okay lets notify all users! while(list($uid, $email) = SQL_FETCHROW($result_main)) { // Update account - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php index 1098443155..0a69e1c09e 100644 --- a/inc/mails/birthday_mails.php +++ b/inc/mails/birthday_mails.php @@ -57,7 +57,7 @@ if ((getConfig('birthday_active')) && (EXT_IS_ACTIVE("autopurge")) && (getConfig // Only confirmed members shall receive birthday mails... $result_birthday = SQL_QUERY_ESC("SELECT userid, email, birth_year -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < (UNIX_TIMESTAMP() - ".(getConfig('one_day') * 364).")".$ADD." ORDER BY userid", array($DAY, $MONTH, $VALUE), __FILE__, __LINE__); @@ -85,7 +85,7 @@ if (SQL_NUMROWS($result_birthday) > 0) { } // Insert row into database - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s','%s','%s' )", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )", array(bigintval($uid), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__); // Load email template with confirmation link @@ -99,7 +99,7 @@ if (SQL_NUMROWS($result_birthday) > 0) { SEND_EMAIL($uid, HAPPY_BIRTHDAY, $msg); // Remember him that he has received a birthday mail - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index b77202d461..e565d624e5 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -48,7 +48,7 @@ $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', ti $SQL = ""; $MODE = ""; // Shall I sent activation or deactivation mail? -$SQL = "SELECT userid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE (bonus_ral_notify "; +$SQL = "SELECT userid, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify "; switch (getConfig('bonus_active')) { case "Y": // Active rallye is activated @@ -94,7 +94,7 @@ if (!empty($SQL)) { // Okay lets notify all users! while(list($uid, $email) = SQL_FETCHROW($result_main)) { // Update account - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index e95bbe7e9e..39e47d68e6 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -43,13 +43,13 @@ function REGISTER_ADMIN ($user, $md5, $email=WEBMASTER) { $ret = "already"; // Lookup the user - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1", array($user), __FILE__, __LINE__); // Is the entry there? if (SQL_NUMROWS($result) == 0) { // Ok, let's create the admin login - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins (login, password, email) VALUES ('%s', '%s', '%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_admins` (login, password, email) VALUES ('%s', '%s', '%s')", array($user, $md5, $email), __FILE__, __LINE__); $ret = "done"; } // END - if @@ -91,7 +91,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { $ADD = RUN_FILTER('sql_admin_extra_data'); // Get password from DB - $result = SQL_QUERY_ESC("SELECT password".$ADD." FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT password".$ADD." FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array($aid), __FILE__, __LINE__); // Entry found? @@ -140,11 +140,11 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { set_session('mxchange_admin_last_fail', $data['last_failure']); // Update password and reset login failures - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failures=0,last_failure='0000-00-00 00:00:00' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET password='%s',login_failures=0,last_failure='0000-00-00 00:00:00' WHERE id=%s LIMIT 1", array($data['password'], $aid), __FILE__, __LINE__); } else { // Update password - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET password='%s' WHERE id=%s LIMIT 1", array($data['password'], $aid), __FILE__, __LINE__); } @@ -173,7 +173,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { // Count login failure if admins extension version is 0.7.0+ if (($ret == "pass") && (GET_EXT_VERSION("admins") >= "0.7.0")) { // Update counter - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failures=login_failures+1,last_failure=NOW() WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET login_failures=login_failures+1,last_failure=NOW() WHERE id=%s LIMIT 1", array($aid), __FILE__, __LINE__); // Rebuild cache @@ -192,7 +192,7 @@ function LOGIN_ADMIN ($adminLogin, $passHash) { // Reset failure counter on matching admins version if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) { // Reset counter on out-dated sql_patches version - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failures=0,last_failure='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET login_failures=0,last_failure='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", array($adminLogin), __FILE__, __LINE__); // Rebuild cache @@ -343,7 +343,7 @@ function ADMIN_DO_ACTION($wht) { LOAD_TEMPLATE("admin_main_header"); // Check if action/what pair is valid - $result_action = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu + $result_action = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR what IS NULL) AND '%s'='overview')) LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__); if (SQL_NUMROWS($result_action) == 1) { @@ -411,7 +411,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { } // END - if // Build main menu - $result_main = SQL_QUERY("SELECT action, title, descr FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort, id DESC", __FILE__, __LINE__); + $result_main = SQL_QUERY("SELECT action, title, descr FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort, id DESC", __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { $OUT = " @@ -457,7 +457,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { } $OUT .= "\n"; - $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort, id DESC", + $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort, id DESC", array($menu), __FILE__, __LINE__); if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)) { @@ -497,7 +497,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { } else { - $OUT .= ""; + $OUT .= ""; } $OUT .= $title_what; if ($readable) @@ -570,7 +570,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field="userid") { // Output selection form with all confirmed user accounts listed - $result = SQL_QUERY("SELECT userid, surname, family FROM `"._MYSQL_PREFIX."_user_data` ORDER BY userid", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT userid, surname, family FROM `{!MYSQL_PREFIX!}_user_data` ORDER BY userid", __FILE__, __LINE__); $OUT = ""; // USe this only for adding points (e.g. adding refs really makes no sence ;-) ) @@ -604,7 +604,7 @@ function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $non function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") { $wht = "what != ''"; if ($MODE == "action") $wht = "(what='' OR what IS NULL) AND action !='login'"; - $result = SQL_QUERY_ESC("SELECT %s, title FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$wht." ORDER BY sort", + $result = SQL_QUERY_ESC("SELECT %s, title FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY sort", array($MODE), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load menu as selection @@ -798,7 +798,7 @@ function ADMIN_CHECK_MENU_MODE() { incrementConfigEntry('cache_hits'); } elseif (GET_EXT_VERSION("admins") >= "0.6.7") { // Load from database when version of "admins" is enough - $result = SQL_QUERY_ESC("SELECT la_mode FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT la_mode FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array($aid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data @@ -828,7 +828,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") { // Should always be set... ;-) if (!empty($selected)) { // Determine new status - $result = SQL_QUERY_ESC("SELECT %s FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT %s FROM `{!MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1", array($row, $table, $idRow, $id), __FILE__, __LINE__); // Row found? @@ -840,7 +840,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") { if ($currStatus == "Y") $newStatus = "N"; else $newStatus = "Y"; // Change this status - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_%s SET %s='%s' WHERE %s=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_%s` SET %s='%s' WHERE %s=%s LIMIT 1", array($table, $row, $newStatus, $idRow, $id), __FILE__, __LINE__); // Count up affected rows @@ -960,10 +960,12 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct // "Walk" through all entries foreach ($IDs as $id => $sel) { // Construct SQL query - $SQL = "UPDATE "._MYSQL_PREFIX."_".$table." SET"; + $SQL = sprintf("UPDATE `{!_MYSQL_PREFIX!}_%s` SET", + SQL_ESCAPE($table) + ); // Load data of entry - $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT * FROM `{!MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1", array($table, $idColumn, $id), __FILE__, __LINE__); // Fetch the data @@ -1042,7 +1044,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu // Shall we delete here or list for deletion? if ($deleteNow) { // The base SQL command: - $SQL = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_%s WHERE %s IN (%s)"; + $SQL = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_%s` WHERE %s IN (%s)"; // Delete them all $idList = ""; @@ -1050,7 +1052,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu // Is there a userid? if (isset($_POST['uid_raw'][$id])) { // Load all data from that id - $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT * FROM `{!MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1", array($table, $idColumn, $id), __FILE__, __LINE__); // Fetch the data @@ -1097,7 +1099,9 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc $content = array(); // Prepare SQL for this row - $SQL = "UPDATE "._MYSQL_PREFIX."_".$table." SET"; + $SQL = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET", + SQL_ESCAPE($table) + ); foreach ($_POST as $key => $entries) { // Skip raw userid which is always invalid if ($key == "uid_raw") { @@ -1143,7 +1147,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc $affected += SQL_AFFECTEDROWS(); // Load all data from that id - $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT * FROM `{!MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1", array($table, $idColumn, $id), __FILE__, __LINE__); // Fetch the data @@ -1224,7 +1228,7 @@ function ADMIN_SEND_PASSWORD_RESET_LINK ($email) { $email = COMPILE_CODE($email); // Look up administator login - $result = SQL_QUERY_ESC("SELECT id, login, password FROM "._MYSQL_PREFIX."_admins WHERE email='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, login, password FROM `{!MYSQL_PREFIX!}_admins` WHERE email='%s' LIMIT 1", array($email), __FILE__, __LINE__); // Is there an account? @@ -1264,7 +1268,7 @@ function ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN ($hash, $login) { $login = COMPILE_CODE($login); // Then try to find that user - $result = SQL_QUERY_ESC("SELECT id, password, email FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, password, email FROM `{!MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1", array($login), __FILE__, __LINE__); // Is an account here? @@ -1300,7 +1304,7 @@ function ADMIN_RESET_PASSWORD ($login, $password) { } // Update database - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE login='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins` SET password='%s' WHERE login='%s' LIMIT 1", array($passHash, $login), __FILE__, __LINE__); // Run filters @@ -1322,7 +1326,7 @@ function ADMIN_DELETE_TASK ($id) { // Function to update task data function ADMIN_UPDATE_TASK_DATA ($id, $row, $data) { // Update the task - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET %s='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_task_system` SET %s='%s' WHERE id=%s LIMIT 1", array($row, $data, bigintval($id)), __FILE__, __LINE__); } // diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 8e930e8340..840a4ffb7e 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -41,7 +41,7 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) { global $cacheArray, $_CONFIG; // First check for solved and not assigned tasks and assign them to current admin - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_task_system` SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'", array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); // We currently don't want to install an extension so let's find out if we need... @@ -100,7 +100,7 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) { // At last - but not least - check for own and new unassigned tasks... $result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created -FROM "._MYSQL_PREFIX."_task_system +FROM `{!MYSQL_PREFIX!}_task_system` WHERE assigned_admin='%s' OR (assigned_admin='0' AND status='NEW') ORDER BY userid DESC, task_type DESC, subject, task_created DESC", array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); @@ -124,7 +124,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { // Assign / do tasks $OUT = ""; $SW = 2; foreach ($POST['task'] as $id => $sel) { - $result_task = SQL_QUERY_ESC("SELECT id, userid, task_type, subject, text, task_created, status, assigned_admin FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND (assigned_admin='%s' OR (assigned_admin='0' AND status='NEW')) LIMIT 1", + $result_task = SQL_QUERY_ESC("SELECT id, userid, task_type, subject, text, task_created, status, assigned_admin FROM `{!MYSQL_PREFIX!}_task_system` WHERE id=%s AND (assigned_admin='%s' OR (assigned_admin='0' AND status='NEW')) LIMIT 1", array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); if (SQL_NUMROWS($result_task) == 1) { // Task is valid... @@ -133,7 +133,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { if ($aid == "0") { // Assgin current admin to unassgigned task - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_task_system` SET assigned_admin='%s' WHERE id=%s LIMIT 1", array(GET_CURRENT_ADMIN_ID(), bigintval($tid)), __FILE__, __LINE__); } // END - if @@ -145,7 +145,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { } // END - if if ($uid > 0) { - $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_user) == 1) { list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user); @@ -229,7 +229,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { { case "EXTENSION": // Install new extensions $ext_name = substr($subj, 1, strpos($subj, ":") - 1); - $result_lines = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + $result_lines = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($ext_name), __FILE__, __LINE__); $lines = SQL_NUMROWS($result_lines); SQL_FREERESULT($result_lines); @@ -275,7 +275,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { case "PAYOUT_REQUEST": // Payout requests if (EXT_IS_ACTIVE("payout")) { // Extension is installed so let him send a notification to the user - $result_pay = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_payouts WHERE userid=%s AND payout_timestamp=%s LIMIT 1", + $result_pay = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_payouts` WHERE userid=%s AND payout_timestamp=%s LIMIT 1", array(bigintval($uid), bigintval($created)), __FILE__, __LINE__); list($pid) = SQL_FETCHROW($result_pay); SQL_FREERESULT($result_pay); @@ -300,7 +300,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { case "WERNIS_REQUEST": // Wernis requests if (EXT_IS_ACTIVE("wernis")) { // Extension is installed so let him send a notification to the user - $result_pay = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_wernis WHERE userid=%s AND wernis_timestamp=%s LIMIT 1", + $result_pay = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_wernis` WHERE userid=%s AND wernis_timestamp=%s LIMIT 1", array(bigintval($uid), bigintval($created)), __FILE__, __LINE__); list($pid) = SQL_FETCHROW($result_pay); SQL_FREERESULT($result_pay); @@ -327,7 +327,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { break; case "NL_UNSUBSCRIBE": // Newsletter unsubscriptions - $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); list($span) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -366,19 +366,19 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { if (!empty($POST['unassign'])) { // Unassign from tasks foreach ($POST['task'] as $id => $sel) { - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_task_system` SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1", array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); } } elseif (isset($POST['del'])) { // Delete tasks foreach ($POST['task'] as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND assigned_admin IN (%s,0) LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_task_system` WHERE id=%s AND assigned_admin IN (%s,0) LIMIT 1", array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); } } // Update query - $result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin=%s OR (assigned_admin=0 AND status='NEW') ORDER BY task_created DESC", + $result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM `{!MYSQL_PREFIX!}_task_system` WHERE assigned_admin=%s OR (assigned_admin=0 AND status='NEW') ORDER BY task_created DESC", array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); } // END - if diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 3232be3b56..fafd094a5f 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -47,7 +47,7 @@ if ($_GET['u_id'] == "all") { // Add points to all accounts if ((isset($_POST['ok'])) && ($_POST['points'] > 0)) { define('__POINTS_VALUE', $_POST['points']); - $result_main = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); + $result_main = SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); while (list($uid) = SQL_FETCHROW($result_main)) { // Remove depth to prevent booking errors. This is a bad coding // practice, thats also why we need to write this project from @@ -79,7 +79,7 @@ if ($_GET['u_id'] == "all") { } } elseif (!empty($_GET['u_id'])) { // User ID found in URL so we use this give him some credits - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Selected user does exist diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index d5d1e97066..b57a28389d 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -47,13 +47,13 @@ if (isset($_POST['ok'])) $END = mktime($_POST['end_hour'] , $_POST['end_min'] , $_POST['end_sec'] , $_POST['end_month'] , $_POST['end_day'] , $_POST['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", + $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1", array($START, $START, $START, $END), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Ok, start and end time did not overlap - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_data (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", array( GET_CURRENT_ADMIN_ID(), @@ -68,7 +68,7 @@ VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", ), __FILE__, __LINE__); // Load ID - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_data WHERE start_time='%s' AND end_time='%s' AND title='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND title='%s' LIMIT 1", array($START, $END, $_POST['title']), __FILE__, __LINE__); list($id) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 8c2bc8fc26..6320112d63 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -51,7 +51,7 @@ if (!isset($_POST['ok'])) $menus = array(); $titles = array(); $below = array(); // Get all available main menus - $result = SQL_QUERY("SELECT action, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT action, title, sort FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Read menu structure @@ -89,7 +89,7 @@ if (!isset($_POST['ok'])) // Load sub menus :) foreach ($menus as $key_main => $value_main) { - $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", + $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", array($value_main), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -170,7 +170,7 @@ if (!isset($_POST['ok'])) if (!empty($_POST['menu'])) { // Add sub menu - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( $_POST['menu'], $_POST['name'], @@ -184,7 +184,7 @@ if (!isset($_POST['ok'])) else { // Add main menu - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", array( $_POST['name'], $_POST['title'], diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 5b25d34b39..7bf1bff4a2 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -63,7 +63,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) { if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -112,7 +112,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) { if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -156,7 +156,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) { $sel = bigintval($sel); // Update entry - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET title='%s', action='%s', what='%s', @@ -180,7 +180,7 @@ WHERE ".$AND." AND id=%s LIMIT 1", case "del": // Delete menu foreach ($_POST['sel'] as $sel => $menu) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); CACHE_PURGE_ADMIN_MENU(0, "", "", $AND); } // END - foreach @@ -200,11 +200,11 @@ WHERE ".$AND." AND id=%s LIMIT 1", // Get IDs if (!empty($_GET['w'])) { // Sub menus selected - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1", array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); - $result = SQL_QUERY("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1", + $result = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1", array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -212,11 +212,11 @@ WHERE ".$AND." AND id=%s LIMIT 1", else { // Main menu selected - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", array(bigintval($_GET['tid'])), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", array(bigintval($_GET['fid'])), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -225,9 +225,9 @@ WHERE ".$AND." AND id=%s LIMIT 1", if ((!empty($tid)) && (!empty($fid))) { // Sort menu - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__); - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__); CACHE_PURGE_ADMIN_MENU(0, "", "", $AND); } @@ -237,13 +237,13 @@ WHERE ".$AND." AND id=%s LIMIT 1", if (!empty($SUB)) { // Sub menus of a main menu - $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC", + $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC", array($SUB), __FILE__, __LINE__); } else { // Main menus - $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__); } $max = SQL_NUMROWS($result); if ($max > 0) diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 98098a7631..71c09abaa7 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -52,7 +52,7 @@ if (isset($_POST['edit'])) foreach ($_POST['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", + $result = SQL_QUERY_ESC("SELECT admin_id, id FROM `{!MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY id", array($template), __FILE__, __LINE__); $OUT = ""; $aid = 0; $aid2 = 0; while (list($aid, $id) = SQL_FETCHROW($result)) @@ -110,8 +110,8 @@ if (isset($_POST['edit'])) { // Load all assigned mails $result = SQL_QUERY("SELECT DISTINCT m.id, m.admin_id, a.login, m.mail_template -FROM "._MYSQL_PREFIX."_admins_mails AS m -LEFT JOIN "._MYSQL_PREFIX."_admins AS a +FROM `{!MYSQL_PREFIX!}_admins_mails` AS m +LEFT JOIN `{!MYSQL_PREFIX!}_admins` AS a ON m.admin_id=a.id WHERE (m.admin_id=a.id OR m.admin_id < 1) AND m.mail_template != '' ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__); @@ -129,25 +129,25 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__); $aid = bigintval($aid); // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins_mails SET admin_id=%s WHERE id=%s ORDER BY id LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins_mails` SET admin_id=%s WHERE id=%s ORDER BY id LIMIT 1", array($aid, $id), __FILE__, __LINE__); if (($aid < 1) && (!empty($_POST['template'][$id]))) { // Remove any other admin entries - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' AND id != '%s'", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' AND id != '%s'", array($_POST['template'][$id], $id), __FILE__, __LINE__); } if ($_POST['admin_new'][$_POST['template'][$id]] > 0) { // Add new admin - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_mails (admin_id, mail_template) VALUES ('%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')", array($aid, $_POST['template'][$id]), __FILE__, __LINE__); } } // Query again... - $result = SQL_QUERY("SELECT DISTINCT m.id, m.admin_id, a.login, m.mail_template FROM "._MYSQL_PREFIX."_admins_mails AS m, "._MYSQL_PREFIX."_admins AS a WHERE m.admin_id=a.id OR m.admin_id < 1 ORDER BY m.admin_id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT DISTINCT m.id, m.admin_id, a.login, m.mail_template FROM `{!MYSQL_PREFIX!}_admins_mails` AS m, `{!MYSQL_PREFIX!}_admins` AS a WHERE m.admin_id=a.id OR m.admin_id < 1 ORDER BY m.admin_id", __FILE__, __LINE__); } // List found entries diff --git a/inc/modules/admin/what-chk_regs.php b/inc/modules/admin/what-chk_regs.php index f8d1b32ab8..28999a763e 100644 --- a/inc/modules/admin/what-chk_regs.php +++ b/inc/modules/admin/what-chk_regs.php @@ -42,7 +42,7 @@ ADD_DESCR ("admin", basename(__FILE__)); // Check for accounts $result = SQL_QUERY("SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, user_hash -FROM `"._MYSQL_PREFIX."_user_data` +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='UNCONFIRMED' ORDER BY userid ASC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index d9f518f01d..8f3db7d3fc 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -48,7 +48,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) { $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $sel) { // Load data for the ID - $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!MYSQL_PREFIX!}_admins_acls` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($aid, $act, $wht, $mode) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -83,7 +83,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) { $id = bigintval($id); // Update entries - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins_acls SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admins_acls` SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE id=%s LIMIT 1", array($_POST['admin'][$id], $_POST['action_menu'][$id], $_POST['what_menu'][$id], $_POST['mode'][$id], $id),__FILE__, __LINE__); } @@ -102,7 +102,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) { $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $sel) { // Load data for the ID - $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!MYSQL_PREFIX!}_admins_acls` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($admin, $act, $wht, $mode) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -145,7 +145,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) { } elseif ((isset($_POST['remove'])) && ($SEL > 0)) { // Remove entries foreach ($_POST['sel'] as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_admins_acls` WHERE id=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); } @@ -175,11 +175,11 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) { $BOTH = ((!empty($_POST['action_menu'])) && (!empty($_POST['what_menu']))); if (((!empty($_POST['action_menu'])) || (!empty($_POST['what_menu']))) && (!$BOTH)) { // 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", + $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($_POST['admin_id']), $_POST['action_menu'], $_POST['what_menu']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Finally add the new ACL - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_acls (admin_id, action_menu, what_menu, access_mode) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_admins_acls` (admin_id, action_menu, what_menu, access_mode) VALUES ('%s','%s','%s','%s')", array( bigintval($_POST['admin_id']), @@ -216,7 +216,7 @@ VALUES ('%s','%s','%s','%s')", LOAD_TEMPLATE("admin_settings_saved", false, $content); } else { // List all ACLs - $result_acls = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls ORDER BY admin_id, id", __FILE__, __LINE__); + $result_acls = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM `{!MYSQL_PREFIX!}_admins_acls` ORDER BY admin_id, id", __FILE__, __LINE__); if (SQL_NUMROWS($result_acls) > 0) { // List ACLs diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 60538f8411..eacf938ace 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -94,7 +94,7 @@ if (isset($_POST['ok'])) { foreach ($RANKS as $k => $rate) { if (!empty($rate)) { // Print only when something is in - $OUT .= "
  •  
    (".POINTS.")\n"; + $OUT .= "
  •  
    ({!POINTS!})\n"; } $cnt++; } @@ -104,7 +104,7 @@ if (isset($_POST['ok'])) { // Add more empty fields for ($i = $cnt; $i < $max; $i++) { - $OUT .= "
  •  
    (".POINTS.")\n"; + $OUT .= "
  •  
    ({!POINTS!})\n"; } $OUT .= "\n"; define('__TRATES_LIST', $OUT); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index d4677e86d6..d3533af3f7 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -46,11 +46,11 @@ $CATS = ""; if (isset($_POST['add'])) { // Add a new category - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_cats WHERE cat='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_cats` WHERE cat='%s' LIMIT 1", array($_POST['catname']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Category does not exists, we simply add it... - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_cats (cat, visible, sort) VALUES ('%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')", array($_POST['catname'], $_POST['visible'], bigintval($_POST['parent'] + 1)), __FILE__, __LINE__); $content = CATEGORY_ADDED; } else { @@ -75,15 +75,15 @@ if (isset($_POST['add'])) { switch ($_GET['do']) { case "edit": // Change categories - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_cats SET cat='%s', visible='%s', sort=%s WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_cats` SET cat='%s', visible='%s', sort=%s WHERE id=%s LIMIT 1", array($cat, $_POST['vis'][$id], $_POST['sort'][$id], $id), __FILE__, __LINE__); $TEXT = CATEGORIES_SAVED; break; case "del": // Delete categories - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s", array($id), __FILE__, __LINE__); $TEXT = CATEGORIES_DELETED; break; @@ -103,7 +103,7 @@ if (isset($_POST['add'])) { $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $value) { // Load data of category - $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT cat FROM `{!MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($cat) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -129,7 +129,7 @@ if (isset($_POST['add'])) { foreach ($_POST['sel'] as $id => $value) { // Load data from the category - $result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM `{!MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($cat, $vis, $sort) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -155,7 +155,7 @@ if (isset($_POST['add'])) { else { // Load all categories - $result = SQL_QUERY("SELECT id, cat, visible, sort FROM "._MYSQL_PREFIX."_cats ORDER BY sort", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, cat, visible, sort FROM `{!MYSQL_PREFIX!}_cats` ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List already existing categories for editing diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index bd9d47eebb..fd443e1f95 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -45,11 +45,11 @@ if (empty($_POST['max'])) unset($_POST['add_max']); if (isset($_POST['add_max'])) { // Save all settings - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_max_receive WHERE value='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_max_receive` WHERE value='%s' LIMIT 1", array(bigintval($_POST['max'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Add this value (including comment) - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_max_receive (value, comment) VALUES ('%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('%s','%s')", array(bigintval($_POST['max']), $_POST['comment']),__FILE__, __LINE__); $content = MAX_VALUE_SAVED; } else { @@ -72,13 +72,13 @@ if (isset($_POST['add_max'])) { switch ($_GET['do']) { case "edit": // Change entries - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_max_receive SET value='%s', comment='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_max_receive` SET value='%s', comment='%s' WHERE id=%s LIMIT 1", array(bigintval($_POST['val'][$id]), $_POST['comm'][$id], $id),__FILE__, __LINE__); $TEXT = MRECEIVE_SAVED; break; case "del": - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_max_receive` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); $TEXT = MRECEIVE_DELETED; break; @@ -95,7 +95,7 @@ if (isset($_POST['add_max'])) { foreach ($_POST['sel'] as $id => $value) { // Load data - $result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT value, comment FROM `{!MYSQL_PREFIX!}_max_receive` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($value, $comment) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -121,7 +121,7 @@ if (isset($_POST['add_max'])) { $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $value) { // Load data - $result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT value, comment FROM `{!MYSQL_PREFIX!}_max_receive` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($value, $comment) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -143,7 +143,7 @@ if (isset($_POST['add_max'])) { // Load main template LOAD_TEMPLATE("admin_config_email_edit"); } else { - $result = SQL_QUERY("SELECT id, value, comment FROM "._MYSQL_PREFIX."_max_receive ORDER BY value", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, value, comment FROM `{!MYSQL_PREFIX!}_max_receive` ORDER BY value", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List already existing entries for editing $SW = 2; $OUT = ""; diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index cde99debfb..5185bfb4ba 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -72,7 +72,7 @@ case "target": // Set which what-file will be placed in home-page (only modules. // Load all what menu points $result = SQL_QUERY("SELECT id, what, title -FROM "._MYSQL_PREFIX."_guest_menu +FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='main' AND what != '' AND what IS NOT NULL AND locked='N' ORDER BY sort ASC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index d2cd854f80..424121c8f7 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -54,7 +54,7 @@ if (isset($_POST['edit'])) foreach ($_POST['sel'] as $id => $sel) { // Load module data - $result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM "._MYSQL_PREFIX."_mod_reg WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM `{!MYSQL_PREFIX!}_mod_reg` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($mod, $title, $locked, $hidden, $admin, $mem) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -99,7 +99,7 @@ if (isset($_POST['edit'])) $id = bigintval($id); // Update module - 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", + 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($_POST['title'][$id], $_POST['locked'][$id], $_POST['hidden'][$id], $_POST['admin'][$id], $_POST['member'][$id], $id), __FILE__, __LINE__); } @@ -118,7 +118,7 @@ if ($SEL == 0) { // Load module data (We do not need to check if there's at least one...) $result = SQL_QUERY("SELECT id, module, locked, hidden, admin_only, title, mem_only, clicks -FROM "._MYSQL_PREFIX."_mod_reg +FROM `{!MYSQL_PREFIX!}_mod_reg` ORDER BY module", __FILE__, __LINE__); $OUT = ""; $SW = 2; while (list($id, $mod, $locked, $hidden, $admin, $title, $mem) = SQL_FETCHROW($result)) diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 2eb58b66b0..9bd9591c46 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -44,11 +44,11 @@ if (!empty($_POST['rate'])) $_POST['rate'] = REVERT_COMMA($_POST['rate']); if ((isset($_POST['add'])) && (!empty($_POST['title'])) && ($_POST['rate'] > 0)) { // Add new payout type - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_payout_types WHERE type='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_payout_types` WHERE type='%s' LIMIT 1", array($_POST['title']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Add now - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_payout_types + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_payout_types` (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url) VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')", array( @@ -74,7 +74,7 @@ VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')", } // Payout requests by your members -$result_mem = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_payouts WHERE status='NEW' ORDER BY payout_timestamp DESC", __FILE__, __LINE__); +$result_mem = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_user_payouts` WHERE status='NEW' ORDER BY payout_timestamp DESC", __FILE__, __LINE__); $display = true; if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0)) { @@ -88,7 +88,7 @@ if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0)) { // Edit only if something is entered if ((!empty($_POST['title'][$id])) && ($_POST['rate'][$id] > 0)) { // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_payout_types SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_payout_types` SET type='%s', rate=%s, min_points=%s, @@ -108,7 +108,7 @@ WHERE id='".$id."' LIMIT 1", $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $sel) { // Load data - $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{!MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($title, $rate, $mpoi, $allow) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -137,7 +137,7 @@ WHERE id='".$id."' LIMIT 1", if ((isset($_GET['ok'])) && ($_GET['ok'] == "ok")) { // Delete entries foreach ($_POST['sel'] as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } $msg = ADMIN_PAYOUT_ENTRIES_DELETED; @@ -149,7 +149,7 @@ WHERE id='".$id."' LIMIT 1", $id = bigintval($id); // Load data - $result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM `{!MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); list($title, $rate, $mpoi) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -180,7 +180,7 @@ if (!empty($msg)) { } // Payout types -$result_type = SQL_QUERY("SELECT id, type, rate, min_points, from_account FROM "._MYSQL_PREFIX."_payout_types ORDER BY type", __FILE__, __LINE__); +$result_type = SQL_QUERY("SELECT id, type, rate, min_points, from_account FROM `{!MYSQL_PREFIX!}_payout_types` ORDER BY type", __FILE__, __LINE__); if ((SQL_NUMROWS($result_type) > 0) && ($display)) { // List all payout types diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 57a98b1103..357d122204 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -72,14 +72,14 @@ if (isset($_POST['ok'])) { switch ($_GET['sub']) { case "points": - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_config` SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config=0 LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_config` SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config=0 LIMIT 1"; break; case "ref": switch ($_GET['do']) { case "add": - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_refdepths (level, percents) VALUES ('".$_POST['lvl']."','".$_POST['perc']."')"; + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".$_POST['lvl']."','".$_POST['perc']."')"; break; case "edit": // Change entries @@ -91,7 +91,7 @@ if (isset($_POST['ok'])) { $_POST['perc'][$id] = REVERT_COMMA($_POST['perc'][$id]); // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level='%s', percents='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE id=%s LIMIT 1", array(bigintval($value), $_POST['perc'][$id], $id), __FILE__, __LINE__); } $message = REF_DEPTHS_SAVED; @@ -99,7 +99,7 @@ if (isset($_POST['ok'])) { case "del": foreach ($_POST['id'] as $id => $value) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_refdepths` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } $message = REF_DEPTHS_DELETED; @@ -114,7 +114,7 @@ if (isset($_POST['ok'])) { case "settings": $REF = bigintval($_POST['ref_payout']); - $SQLs[] = sprintf("UPDATE `"._MYSQL_PREFIX."_config` SET + $SQLs[] = sprintf("UPDATE `{!MYSQL_PREFIX!}_config` SET allow_direct_pay='%s', reg_points_mode='%s', ref_payout='%s' @@ -125,20 +125,20 @@ WHERE config=0 LIMIT 1", ); if ((getConfig('ref_payout') == 0) && ($_POST['ref_payout'] > 0)) { // Update account's ref_payout for "must-confirm" - $SQLs[] = sprintf("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=(%s - mails_confirmed) + $SQLs[] = sprintf("UPDATE `{!MYSQL_PREFIX!}_user_data` SET ref_payout=(%s - mails_confirmed) WHERE mails_confirmed < %s", $REF, $REF); } elseif ((getConfig('ref_payout') > 0) && ($_POST['ref_payout'] == 0)) { // Update account's ref_payout for "not-must-confirm" - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=0 WHERE ref_payout > 0"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_points SET points=points+locked_points WHERE locked_points>0"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_points SET locked_points=0 WHERE locked_points>0"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_data` SET ref_payout=0 WHERE ref_payout > 0"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_points` SET points=points+locked_points WHERE locked_points>0"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_user_points` SET locked_points=0 WHERE locked_points>0"; } break; } if ((isset($SQLs)) && (is_array($SQLs)) && (!empty($SQLs[0]))) { if (strpos($SQLs[0], "INSERT") > -1) { - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_refdepths WHERE level='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1", array(bigintval($_POST['lvl'])), __FILE__, __LINE__); SQL_FREERESULT($result); } // END - if @@ -197,7 +197,7 @@ WHERE mails_confirmed < %s", $REF, $REF); // Delete entries $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $value) { - $result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT level, percents FROM `{!MYSQL_PREFIX!}_refdepths` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($lvl, $perc) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -222,7 +222,7 @@ WHERE mails_confirmed < %s", $REF, $REF); // Edit entries $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $value) { - $result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT level, percents FROM `{!MYSQL_PREFIX!}_refdepths` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($lvl, $perc) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -245,7 +245,7 @@ WHERE mails_confirmed < %s", $REF, $REF); LOAD_TEMPLATE("admin_points_edit"); } else { // Referal levels - $result = SQL_QUERY("SELECT id, level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, level, percents FROM `{!MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Make referal levels editable and deletable $SW = 2; $OUT = ""; diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index ace5287823..fea6546b9b 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -48,13 +48,13 @@ if (!empty($_GET['rallye'])) if ((!empty($_POST['level'])) && ((!empty($_POST['points'])) || (!empty($_POST['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", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s AND price_level='%s' LIMIT 1", array(bigintval($_GET['rallye']), bigintval($_POST['level'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Ok, new price level entered! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_prices (rallye_id, price_level, points, info) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_rallye_prices` (rallye_id, price_level, points, info) VALUES ('%s','%s','%s','%s')", array( bigintval($_GET['rallye']), @@ -79,7 +79,7 @@ VALUES ('%s','%s','%s','%s')", if ($SEL > 0) { // Delete selected entries foreach ($_POST['sel'] as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } @@ -95,7 +95,7 @@ VALUES ('%s','%s','%s','%s')", $id = bigintval($id); // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_prices SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_rallye_prices` SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE id=%s LIMIT 1", array($_POST['rallye_id'][$id], bigintval($level), $_POST['points'][$id], $_POST['infos'][$id], $id), __FILE__, __LINE__); } @@ -113,7 +113,7 @@ VALUES ('%s','%s','%s','%s')", foreach ($_POST['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", + $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__); list($rallye, $level, $points, $infos) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -158,7 +158,7 @@ VALUES ('%s','%s','%s','%s')", foreach ($_POST['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", + $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__); list($rallye, $level, $points, $infos) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -196,7 +196,7 @@ VALUES ('%s','%s','%s','%s')", 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", + $result = SQL_QUERY_ESC("SELECT id, price_level, points, info FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", array(bigintval($_GET['rallye'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) @@ -243,7 +243,7 @@ VALUES ('%s','%s','%s','%s')", { // No rallye selected so display all available without prices $result = SQL_QUERY("SELECT d.id, d.admin_id, d.start_time, d.end_time, d.title, a.login, d.is_active -FROM "._MYSQL_PREFIX."_rallye_data AS d, "._MYSQL_PREFIX."_admins AS a +FROM `{!MYSQL_PREFIX!}_rallye_data` AS d, `{!MYSQL_PREFIX!}_admins` AS a WHERE d.admin_id=a.id ORDER BY start_time DESC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -251,7 +251,7 @@ WHERE d.admin_id=a.id ORDER BY start_time DESC", __FILE__, __LINE__); $SW = 2; $OUT = ""; while (list($id, $aid, $start, $end, $title, $alogin, $active) = SQL_FETCHROW($result)) { - $select = ""; + $select = ""; if ($active == "Y") $select = "
    ".$id."
    "; // Prepare data for the row template diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index 550beebfab..8814b810ae 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -43,14 +43,14 @@ ADD_DESCR("admin", __FILE__); // Do we want to save changes? if (isset($_POST['ok'])) { foreach ($_POST['sel'] as $id => $value) { - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%s AND field_required != '%s' LIMIT 1", + 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__); } LOAD_TEMPLATE("admin_settings_saved", false, REGISTER_ADMIN_CHANGES_SAVED); } // List all register values -$result = SQL_QUERY("SELECT id, field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT id, field_name, field_required FROM `{!MYSQL_PREFIX!}_must_register` ORDER BY id", __FILE__, __LINE__); $SW = 2; $OUT = ""; while (list($id, $name, $required) = SQL_FETCHROW($result)) { // Get constant value diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index 0beb356e45..0fa42eae84 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -59,7 +59,7 @@ if (isset($_POST['ok'])) { ADMIN_SAVE_SETTINGS($_POST); } else { // Load existing modules and generate TR rows for the template - $result = SQL_QUERY("SELECT module, title FROM "._MYSQL_PREFIX."_mod_reg ORDER BY module", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT module, title FROM `{!MYSQL_PREFIX!}_mod_reg` ORDER BY module", __FILE__, __LINE__); $SW = 2; $OUT = ""; while(list($mod, $title) = SQL_FETCHROW($result)) { // Set title to three dashes when no title is supplied diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index a14bcb665e..5d6784c963 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -48,7 +48,7 @@ $cnt = 0; if (!empty($_GET['mid'])) { // Load email data - $result = SQL_QUERY_ESC("SELECT id, sender, subject, url, timestamp, payment_id FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, sender, subject, url, timestamp, payment_id FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array(bigintval($_GET['mid'])), __FILE__, __LINE__); // Delete mail only once @@ -78,8 +78,8 @@ if (!empty($_GET['mid'])) { SEND_EMAIL($sender, MEMBER_ORDER_DELETED, $msg_user); // Fetch right stats_id from pool - $result_pool = SQL_QUERY_ESC("SELECT s.id FROM "._MYSQL_PREFIX."_user_stats AS s -LEFT JOIN "._MYSQL_PREFIX."_pool AS p + $result_pool = SQL_QUERY_ESC("SELECT s.id FROM `{!MYSQL_PREFIX!}_user_stats` AS s +LEFT JOIN `{!MYSQL_PREFIX!}_pool` AS p ON s.pool_id=p.id WHERE s.pool_id=%s LIMIT 1", array(bigintval($_GET['mid'])), __FILE__, __LINE__); @@ -132,7 +132,7 @@ WHERE s.pool_id=%s LIMIT 1", } // Remove links from DB - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE stats_id=%s", array(bigintval($stats_id)), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); @@ -144,7 +144,7 @@ WHERE s.pool_id=%s LIMIT 1", SQL_FREERESULT($result_pool); // Delete mail from queue - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array(bigintval($_GET['mid'])), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); @@ -156,14 +156,14 @@ WHERE s.pool_id=%s LIMIT 1", } } elseif (!empty($_GET['pid'])) { // Remove stats entries - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1", array(bigintval($_GET['pid'])), __FILE__, __LINE__); // Output message LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_USER_STATS_REMOVED); } elseif ((!empty($_GET['bid'])) && (EXT_IS_ACTIVE("bonus"))) { // Load data from bonus mail - $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp, mails_sent FROM "._MYSQL_PREFIX."_bonus WHERE id=%s", + $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp, mails_sent FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s", array(bigintval($_GET['bid'])), __FILE__, __LINE__); // Delete mail only once @@ -178,10 +178,10 @@ WHERE s.pool_id=%s LIMIT 1", $cnt = 0; // Delete bonus mail entirely from database - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", array(bigintval($_GET['bid'])), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s", array(bigintval($_GET['bid'])), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); @@ -203,7 +203,7 @@ WHERE s.pool_id=%s LIMIT 1", SQL_FREERESULT($result); } elseif ((!empty($_GET['nid'])) && (GET_EXT_VERSION("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", + $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s", array(bigintval($_GET['nid'])), __FILE__, __LINE__); // Delete mail only once @@ -216,10 +216,10 @@ WHERE s.pool_id=%s LIMIT 1", $cnt = 0; // Delete bonus mail entirely from database - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", array(bigintval($_GET['nid'])), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s", array(bigintval($_GET['nid'])), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index b1cd317782..3295a77753 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -53,7 +53,7 @@ if ($SUM > 0) { // Get the userid $result = SQL_QUERY_ESC("SELECT userid, holiday_start, holiday_end -FROM "._MYSQL_PREFIX."_user_holidays +FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -62,12 +62,12 @@ WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); SQL_FREERESULT($result); // Update user's account - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET holiday_active='N', holiday_activated='0' WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); // Remove holiday - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Prepare loaded data for the @@ -91,7 +91,7 @@ WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Fetch data $result_load = SQL_QUERY_ESC("SELECT holiday_start AS start, holiday_end AS end -FROM "._MYSQL_PREFIX."_user_holidays +FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_load) == 1) { @@ -103,7 +103,7 @@ WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); unset($content[1]); // Delete one holiday request (for task) - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); // Send email to user diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index 8f850b5a2b..5f01a8358c 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); if (!empty($_GET['id'])) { // Check for selected sponsor - $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE id='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Remove sponsor @@ -63,11 +63,11 @@ if (!empty($_GET['id'])) { SEND_EMAIL($email, SPONSOR_ADMIN_DEL_SUBJECT, $msg); // Remove account - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE id='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); // Remove orders - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_sponsor_orders` WHERE sponsorid='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); // Output message diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index 45fbc4e0f9..15d931d39f 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -50,16 +50,16 @@ if (isset($_POST['del'])) // Delete entries... foreach ($_POST['sel'] as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE trans_id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_transfers_in` WHERE trans_id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE trans_id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_transfers_out` WHERE trans_id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } } } // We only need outgoing transfers -$result = SQL_QUERY("SELECT userid, to_uid, trans_id, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY trans_id", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT userid, to_uid, trans_id, points, reason, time_trans FROM `{!MYSQL_PREFIX!}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__); $total = 0; if (SQL_NUMROWS($result) > 0) { @@ -108,7 +108,7 @@ define('__TRANSFER_TOTAL_VALUE', $total); define('__TRANSFER_TITLE', TRANSFER_LIST_ALL); // Show delete button here -define('__TRANSFER_DELETE', " * "); +define('__TRANSFER_DELETE', " * "); // Load final template LOAD_TEMPLATE("admin_list_transfer"); diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 502b9b594c..732416e923 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); // User exists.. if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'])))) { // Delete users account - $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_user) == 1) { // Free memory @@ -64,7 +64,7 @@ if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'] ADD_MEMBER_SELECTION_BOX(); } else { // Realy want to delete? - $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 212b60b15a..a31f7777cf 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -44,11 +44,11 @@ if ((isset($_POST['ok'])) && (empty($_POST['id']))) { unset($_POST['ok']); } -$result = SQL_QUERY("SELECT id, sender, subject, payment_id, cat_id FROM "._MYSQL_PREFIX."_pool ORDER BY timestamp", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT id, sender, subject, payment_id, cat_id FROM `{!MYSQL_PREFIX!}_pool` ORDER BY timestamp", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { if (isset($_POST['ok'])) { // Make mail editable... - $result = SQL_QUERY_ESC("SELECT subject, text, url FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array(bigintval($_POST['id'])), __FILE__, __LINE__); list($subj, $text, $url) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -61,7 +61,7 @@ if (SQL_NUMROWS($result) > 0) { LOAD_TEMPLATE("admin_edit_email"); } elseif (!empty($_POST['save'])) { // Save changes - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET subject='%s', text='%s', url='%s' diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index f265cca365..2d122ace48 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) { // Check for selected sponsor - $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, receive_warnings, warning_interval FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE id='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, receive_warnings, warning_interval FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load sponsor details @@ -109,7 +109,7 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) { $POINTS = strval(REVERT_COMMA($_POST['points'])); // Add points to account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET points_amount=points_amount+%s WHERE id='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET points_amount=points_amount+%s WHERE id='%s' LIMIT 1", array($POINTS, bigintval($_GET['id'])), __FILE__, __LINE__); // Remember points /reason for the template @@ -132,7 +132,7 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) { $POINTS = strval(REVERT_COMMA($_POST['points'])); // Add points to account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET points_used=points_used+%s WHERE id='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET points_used=points_used+%s WHERE id='%s' LIMIT 1", array($POINTS, bigintval($_GET['id'])), __FILE__, __LINE__); // Remember points /reason for the template diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 18bc6f76d9..32d8a67535 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -45,7 +45,7 @@ $result_main = false; if (isset($_GET['u_id'])) { // 0 1 2 3 4 5 6 7 8 9 10 11 $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails -FROM `"._MYSQL_PREFIX."_user_data` +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); @@ -77,7 +77,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (empty($_GET['u_id']))) if ($PASS) { // We have to add the following things: birthday and max receive mails - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET gender='%s', surname='%s', family='%s', diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index cde9710ce3..6f660da7ed 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -45,7 +45,7 @@ ADD_DESCR("admin", __FILE__); // 0 1 2 3 4 5 6 7 8 9 10 $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id - FROM "._MYSQL_PREFIX."_pool + FROM `{!MYSQL_PREFIX!}_pool` WHERE data_type='SEND' OR data_type='DELETED' ORDER BY timestamp DESC"; @@ -86,7 +86,7 @@ if (SQL_NUMROWS($result) > 0) while ($pool = SQL_FETCHROW($result)) { // Check sent mails and clicks - $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1", + $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1", array(bigintval($pool[0])), __FILE__, __LINE__); list($sent, $clicks) = SQL_FETCHROW($result_mails); SQL_FREERESULT($result_mails); diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 9a29cf3d6f..5f90d77c1d 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -53,7 +53,7 @@ ADD_DESCR("admin", __FILE__); // Normal mails ordered by your members // 0 1 2 3 4 5 6 7 8 9 10 $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id -FROM "._MYSQL_PREFIX."_pool +FROM `{!MYSQL_PREFIX!}_pool` WHERE data_type IN('ADMIN','TEMP','NEW','ACTIVE') ORDER BY timestamp DESC"; @@ -64,7 +64,7 @@ if (!empty($_GET['mid'])) { // Only a specific mail shall be displayed // 0 1 2 3 4 5 6 7 8 9 10 $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id - FROM "._MYSQL_PREFIX."_pool + FROM `{!MYSQL_PREFIX!}_pool` WHERE id='".bigintval($_GET['mid'])."' LIMIT 1"; $WHO = MAIL_ID.": ".$_GET['mid']; @@ -72,9 +72,9 @@ if (!empty($_GET['mid'])) { // All mails by a specific member shall be displayed // 0 1 2 3 4 5 6 7 8 9 10 $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id - FROM "._MYSQL_PREFIX."_pool - WHERE sender='".bigintval($_GET['u_id'])."' - ORDER by timestamp DESC"; +FROM `{!MYSQL_PREFIX!}_pool` +WHERE sender='".bigintval($_GET['u_id'])."' +ORDER by timestamp DESC"; $WHO = USER_ID.": ".$_GET['u_id']; } @@ -82,9 +82,9 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) { // Bonus mails sent by you // 0 1 2 3 4 5 6 7 8 9 10 11 12 $SQL2 = "SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, clicks - FROM "._MYSQL_PREFIX."_bonus - WHERE is_notify='N' - ORDER BY timestamp DESC"; +FROM `{!MYSQL_PREFIX!}_bonus` +WHERE is_notify='N' +ORDER BY timestamp DESC"; // Check for maximum pages $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__); @@ -125,7 +125,7 @@ if (SQL_NUMROWS($result_list) > 0) { // Walk through all entries while ($pool = SQL_FETCHARRAY($result_list)) { // Unconfirmed mails and sent mails - $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1", + $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1", array(bigintval($pool['id'])), __FILE__, __LINE__); list($pool['sent_email'], $pool['clicks']) = SQL_FETCHROW($result_uncon); SQL_FREERESULT($result_uncon); diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 8a9d923f5f..a321662297 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -61,7 +61,7 @@ if (!empty($_GET['reg_ext'])) { // De/activate extension $ACT = "N"; $EXT_LOAD_MODE = "deactivate"; if ($active == "N") { $ACT = "Y"; $EXT_LOAD_MODE = "activate"; } - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='".$ACT."' WHERE id=%s AND ext_active='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_active='".$ACT."' WHERE id=%s AND ext_active='%s' LIMIT 1", array(bigintval($ext_id), $active), __FILE__, __LINE__); // Run embeded SQL commands @@ -83,11 +83,11 @@ if (!empty($_GET['reg_ext'])) { $active = $_POST['active'][$ext_id]; if (GET_EXT_VERSION("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", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_has_css='%s', ext_active='%s' WHERE id=%s LIMIT 1", array($_POST['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", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_extensions` SET ext_active='%s' WHERE id=%s LIMIT 1", array($active, $ext_id), __FILE__, __LINE__); } @@ -114,12 +114,12 @@ if (!empty($_GET['reg_ext'])) { if (($sel == "Y") || ($sel == "N")) { // Load required data if (GET_EXT_VERSION("sql_patches") >= "0.0.6") { - $result = SQL_QUERY_ESC("SELECT ext_name, ext_has_css, ext_active FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT ext_name, ext_has_css, ext_active FROM `{!MYSQL_PREFIX!}_extensions` WHERE id=%s LIMIT 1", array(bigintval($ext_id)), __FILE__, __LINE__); list($name, $css, $active) = SQL_FETCHROW($result); SQL_FREERESULT($result); } else { - $result = SQL_QUERY_ESC("SELECT ext_name, ext_active FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT ext_name, ext_active FROM `{!MYSQL_PREFIX!}_extensions` WHERE id=%s LIMIT 1", array(bigintval($ext_id)), __FILE__, __LINE__); list($name, $active) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -225,13 +225,13 @@ case "overview": // List all registered extensions if (GET_EXT_VERSION("sql_patches") >= "0.0.6") { // Load extension data with CSS informations $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version -FROM "._MYSQL_PREFIX."_extensions +FROM `{!MYSQL_PREFIX!}_extensions` ".$where." ORDER BY ext_name", __FILE__, __LINE__); } else { // Load extension data without CSS informations $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, id, ext_version -FROM "._MYSQL_PREFIX."_extensions +FROM `{!MYSQL_PREFIX!}_extensions` ".$where." ORDER BY ext_name", __FILE__, __LINE__); } @@ -275,7 +275,7 @@ ORDER BY ext_name", __FILE__, __LINE__); break; case "register": // Register new extension - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin=%s AND task_type='EXTENSION' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_task_system` WHERE assigned_admin=%s AND task_type='EXTENSION' LIMIT 1", array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); $task_found = SQL_NUMROWS($result); @@ -285,7 +285,7 @@ case "register": // Register new extension // Is the ID number valid and the task was found? if (($ext_id > 0) && ($task_found == 1)) { // ID is valid so begin with registration, we first want to it's real name from task management (subject column) - $result = SQL_QUERY_ESC("SELECT subject FROM "._MYSQL_PREFIX."_task_system WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT subject FROM `{!MYSQL_PREFIX!}_task_system` WHERE id=%s LIMIT 1", array(bigintval($ext_id)), __FILE__, __LINE__); list($subj) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 6880b91955..c32ed7b60c 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -51,7 +51,7 @@ if (!isset($_POST['ok'])) { $menus = array(); $titles = array(); $below = array(); // Get all available main menus - $result = SQL_QUERY("SELECT action, title, sort FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT action, title, sort FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Read menu structure while (list($act, $title, $sort) = SQL_FETCHROW($result)) { @@ -88,7 +88,7 @@ if (!isset($_POST['ok'])) { // Load sub menus :) foreach ($menus as $key_main => $value_main) { $result = SQL_QUERY_ESC("SELECT what, title, sort -FROM "._MYSQL_PREFIX."_guest_menu +FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", array($value_main), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) @@ -172,7 +172,7 @@ WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", // Insert new menu entry if (!empty($_POST['menu'])) { - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')", array( $_POST['menu'], $_POST['name'], @@ -184,7 +184,7 @@ WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", } else { - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')", array( $_POST['name'], $_POST['title'], diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index b9b23e6f18..34d8a5b12e 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -65,7 +65,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title, action, what FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title, action, what FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -112,7 +112,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -157,7 +157,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) $sel = bigintval($sel); // Update entry - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1", array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__); } LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE); @@ -167,7 +167,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) foreach ($_POST['sel'] as $sel => $menu) { // Delete enty - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); } LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE); @@ -180,7 +180,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) $sel = bigintval($sel); // Update entry - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1", array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__); } LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE); @@ -206,7 +206,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -247,21 +247,21 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) // Get IDs if (!empty($_GET['w'])) { // Sub menus selected - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1", array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1", array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } else { // Main menu selected - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", array(bigintval($_GET['tid'])), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", array(bigintval($_GET['fid'])), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -269,9 +269,9 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ((!empty($tid)) && (!empty($fid))) { // Sort menu - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__); - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__); } // END - if } // END - if @@ -279,10 +279,10 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) // By default list menus if (empty($SUB)) { // List only main menus - $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); } else { // List sub menus - $result = SQL_QUERY_ESC("SELECT `id`, `action`, `what`, `title`, `sort` FROM `"._MYSQL_PREFIX."_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC", + $result = SQL_QUERY_ESC("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC", array($SUB), __FILE__, __LINE__); } diff --git a/inc/modules/admin/what-list_autopurge.php b/inc/modules/admin/what-list_autopurge.php index 1fd7e00feb..51fc477553 100644 --- a/inc/modules/admin/what-list_autopurge.php +++ b/inc/modules/admin/what-list_autopurge.php @@ -54,7 +54,7 @@ if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_acti // Check for all accounts $result = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.gender, d.surname, d.family, d.email, d.joined, d.last_online, d.ap_notified -FROM `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_data` AS d WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s) ".$EXCLUDE_LIST." ORDER BY d.userid", array(getConfig('ap_inactive_since'), getConfig('ap_inactive_since'), getConfig('ap_inactive_since')), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 250ed17527..1ca2d5a974 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -75,7 +75,7 @@ if (!$show) return; // Load all banking packages from DB $result = SQL_QUERY("SELECT id, title, description, account_fee AS 'fee', package_active AS 'active', interest_plus AS 'plus', interest_minus AS 'minus' -FROM "._MYSQL_PREFIX."_bank_packages +FROM `{!MYSQL_PREFIX!}_bank_packages` ORDER BY id", __FILE__, __LINE__); // Is there at lease one package? diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 4340ef0a9f..af0d7d96fb 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -60,7 +60,7 @@ if (getConfig('beg_rallye') == "Y") { // Check if at least one is in the active rallye $result = SQL_QUERY_ESC("SELECT userid, email, gender, surname, family, beg_points, last_online -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND beg_points > 0".$LAST." ORDER BY beg_points DESC, last_online DESC, userid", array($ONLINE), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index b540d55e8a..c99cb1b254 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -75,7 +75,7 @@ if (getConfig('bonus_active') == "Y") { // Check if at least one is in the active rallye $result = SQL_QUERY_ESC("SELECT userid AS uid, email, gender, surname, family, ".$USE." AS points, last_online AS last -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND ".$USE." > 0".$LAST." ORDER BY points DESC, last_online DESC, userid", array($ONLINE), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index 096f1423fe..6575e66163 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); if (!empty($_GET['u_id'])) { // Check if the user already exists - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Loads surname, family's name and the email address @@ -57,19 +57,19 @@ if (!empty($_GET['u_id'])) { define('__EMAIL' , "".$sname." ".$fname.""); // Ok, list categories of this user - $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats ORDER BY sort", __FILE__, __LINE__); + $result_cats = SQL_QUERY("SELECT id, cat FROM `{!MYSQL_PREFIX!}_cats` ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result_cats) > 0) { // List categories $cnt = "1"; $SW = 2; $OUT = ""; while (list($cid, $cat) = SQL_FETCHROW($result_cats)) { // Check user's selection - $result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s AND cat_id=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1", array(bigintval($_GET['u_id']), bigintval($cid)), __FILE__, __LINE__); // Set selection - $SELECTED = "".NO."
    "; - if (SQL_NUMROWS($result_user) == 1) $SELECTED = "".YES.""; + $SELECTED = "{!NO!}"; + if (SQL_NUMROWS($result_user) == 1) $SELECTED = "{!YES!}"; // Prepare array for the row template $content = array( diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index fb97e68a15..fc8fe7fbdb 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -43,11 +43,11 @@ ADD_DESCR("admin", __FILE__); // Add new code? if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr']))) { // Check if country code does already exist - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_countries WHERE code='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_countries` WHERE code='%s' LIMIT 1", array(strtoupper($_POST['code'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Save entry - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')", array(strtoupper(substr($_POST['code'], 0, 2)), $_POST['descr'], $_POST['is_active']), __FILE__, __LINE__); // Country added @@ -75,7 +75,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr' $class = "admin_submit"; $submit = ADMIN_COUNTRY_EDIT_NOW; $title = ADMIN_COUNTRY_EDIT_TITLE; - $reset = " *\n"; + $reset = " *\n"; } else { // Delete template $row = "admin_list_country_del_row"; @@ -90,7 +90,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr' $OUT = ""; $SW = 2; foreach ($_POST['id'] as $id => $status) { // Load data from DB - $result = SQL_QUERY_ESC("SELECT code, descr FROM "._MYSQL_PREFIX."_countries WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT code, descr FROM `{!MYSQL_PREFIX!}_countries` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data @@ -134,7 +134,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr' if ((isset($_POST['modify'])) && (!empty($_POST['id']))) { // Modify foreach ($_POST['id'] as $id => $sel) { - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_countries SET code='".$_POST['code'][$id]."', descr='".$_POST['descr'][$id]."', is_active='".$_POST['is_active'][$id]."' WHERE id='".$id."' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_countries` SET code='".$_POST['code'][$id]."', descr='".$_POST['descr'][$id]."', is_active='".$_POST['is_active'][$id]."' WHERE id='".$id."' LIMIT 1"; } // Create message @@ -142,7 +142,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr' } elseif ((isset($_POST['remove'])) && (!empty($_POST['id']))) { // Remove $IDs = implode(",", array_keys($_POST['id'])); - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_countries WHERE id IN (".$IDs.") LIMIT ".count($_POST['id']).""; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count($_POST['id']).""; // Create message $MSG = ADMIN_COUNTRIES_REMOVED; @@ -160,7 +160,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr' } // Load currenty setup country codes to list - $result = SQL_QUERY("SELECT id, code, descr, is_active FROM "._MYSQL_PREFIX."_countries ORDER BY code", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, code, descr, is_active FROM `{!MYSQL_PREFIX!}_countries` ORDER BY code", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List all countries $OUT = ""; $SW = 2; diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index 05abd6c53e..867a408900 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -59,7 +59,7 @@ case "already": // Already payed out points case "overview": // General overview page $SUM_ALREADY = 0; $SUM_WAITING = 0; // Number of direct already payouts and referal - $result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_doubler WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__); list($cnt) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -74,7 +74,7 @@ case "overview": // General overview page $SUM_ALREADY += $cnt; define('__DOUBLER_ALREADY_DIRECT_LINK', "".$cnt.""); } - $result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_doubler WHERE completed='Y' AND is_ref='Y'", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='Y'", __FILE__, __LINE__); list($cnt) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -92,7 +92,7 @@ case "overview": // General overview page define('__DOUBLER_ALREADY_ALL_LINK', "".$SUM_ALREADY.""); // And the same for waiting pouts (direct and referal) - $result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' AND is_ref='N'", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='N'", __FILE__, __LINE__); list($cnt) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -107,7 +107,7 @@ case "overview": // General overview page $SUM_WAITING += $cnt; define('__DOUBLER_WAITING_DIRECT_LINK', "".$cnt.""); } - $result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' AND is_ref='Y'", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='Y'", __FILE__, __LINE__); list($cnt) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 713b45fcf4..26907e3aea 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -42,8 +42,8 @@ ADD_DESCR("admin", __FILE__); // Start listing holiday requests $result = SQL_QUERY("SELECT h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online -FROM "._MYSQL_PREFIX."_user_holidays AS h -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_holidays` AS h +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON h.userid=d.userid ORDER BY h.userid", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index dbcd8e50a2..8f9831e34d 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -47,7 +47,7 @@ if (empty($_GET['del'])) $_GET['del'] = ""; if (!empty($_GET['u_id'])) { // Check if the user already exists - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); // Is there an entry? @@ -59,11 +59,11 @@ if (!empty($_GET['u_id'])) { // Grab user's all unconfirmed mails if (EXT_IS_ACTIVE("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", + $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY id", array(bigintval($_GET['u_id'])), __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", + $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY id", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); } @@ -74,7 +74,7 @@ if (!empty($_GET['u_id'])) { // Some unconfirmed mails left if ($_GET['del'] == "all") { // Delete all unconfirmed mails by this user - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s LIMIT %s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE userid=%s LIMIT %s", array(bigintval($_GET['u_id']), $nums), __FILE__, __LINE__); // Prepare mail and send it away @@ -97,14 +97,14 @@ if (!empty($_GET['u_id'])) { switch ($type) { case "NORMAL": - $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%s LIMIT 1", + $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $type = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM; $LINK = "".$id.""; break; case "BONUS": - $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + $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"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM; $LINK = "".$id2.""; diff --git a/inc/modules/admin/what-list_newsletter.php b/inc/modules/admin/what-list_newsletter.php index 3a7f335271..f073a6d4a5 100644 --- a/inc/modules/admin/what-list_newsletter.php +++ b/inc/modules/admin/what-list_newsletter.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); if ((!empty($_POST['uid'])) && (!empty($_POST['id']))) { // Update database... // First user's account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_until=(UNIX_TIMESTAMP() + nl_timespan), nl_receive='N', nl_timespan=0 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET nl_until=(UNIX_TIMESTAMP() + nl_timespan), nl_receive='N', nl_timespan=0 WHERE userid=%s LIMIT 1", array(bigintval($_POST['uid'])), __FILE__, __LINE__); // Next the task system... diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index 93cfcb49e6..f049c28509 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -52,7 +52,7 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) { // Bonus mails sent by you // 0 1 2 3 4 5 6 7 8 9 10 11 12 $SQL2 = "SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, clicks -FROM "._MYSQL_PREFIX."_bonus +FROM `{!MYSQL_PREFIX!}_bonus` WHERE is_notify='Y' ORDER BY timestamp DESC"; diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index ec36f237a7..40a7ec0f3c 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); if (!empty($_GET['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", + $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{!MYSQL_PREFIX!}_user_payouts` WHERE id=%s LIMIT 1", array($_GET['pid']), __FILE__, __LINE__); list($uid, $tuid, $points, $tstamp, $tpass) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -50,7 +50,7 @@ if (!empty($_GET['pid'])) { // Obtain some data if (empty($_GET['task']) && (!empty($uid)) && ($uid > 0)) { // 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='".$tstamp."' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_task_system` WHERE userid=%s AND task_type='PAYOUT_REQUEST' AND task_created='".$tstamp."' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); list($task) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -65,7 +65,7 @@ if (!empty($_GET['pid'])) { if ((!empty($task)) && (!empty($uid)) && ($uid > 0)) { // Load user's data - $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); list($email, $gender, $surname, $family) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -77,14 +77,14 @@ if (!empty($_GET['pid'])) { // Ok, now we can output the form or execute accepting if (isset($_POST['ok'])) { // Obtain payout type and other data - $result = SQL_QUERY_ESC("SELECT payout_id FROM "._MYSQL_PREFIX."_user_payouts WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT payout_id FROM `{!MYSQL_PREFIX!}_user_payouts` WHERE id=%s LIMIT 1", array(bigintval($_GET['pid'])), __FILE__, __LINE__); list($ptype) = SQL_FETCHROW($result); SQL_FREERESULT($result); if (!empty($ptype)) { // Obtain data from payout type - $result = SQL_QUERY_ESC("SELECT from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url FROM `{!MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1", array(bigintval($ptype)), __FILE__, __LINE__); list($fuid, $fpass, $eurl, $eok, $failed, $eenc, $allow) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -126,7 +126,7 @@ if (!empty($_GET['pid'])) { } // Clear payout request - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_payouts SET status='ACCEPTED' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_payouts` SET status='ACCEPTED' WHERE id=%s LIMIT 1", array(bigintval($_GET['pid'])), __FILE__, __LINE__); // Send out mail @@ -165,7 +165,7 @@ if (!empty($_GET['pid'])) { } // Clear payout request - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_payouts SET status='REJECTED' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_payouts` SET status='REJECTED' WHERE id=%s LIMIT 1", array(bigintval($_GET['pid'])), __FILE__, __LINE__); // Send out mail @@ -192,12 +192,12 @@ if (!empty($_GET['pid'])) { if (empty($_GET['do'])) $_GET['do'] = ""; if ($_GET['do'] == "delete") { // Delete all requests - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_payouts", __FILE__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_payouts`", __FILE__, __LINE__); } // Search for payouts $result = SQL_QUERY("SELECT p.id, p.userid AS uid, p.payout_total, p.target_account, p.target_bank, t.type, p.payout_timestamp, p.status, t.allow_url AS allow, p.target_url AS url, p.link_text AS alt, p.banner_url AS banner -FROM "._MYSQL_PREFIX."_user_payouts AS p, "._MYSQL_PREFIX."_payout_types AS t +FROM `{!MYSQL_PREFIX!}_user_payouts` AS p, `{!MYSQL_PREFIX!}_payout_types` AS t WHERE p.payout_id=t.id ORDER BY p.payout_timestamp DESC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-list_primera.php b/inc/modules/admin/what-list_primera.php index 6bd4c379c5..a416d9ca89 100644 --- a/inc/modules/admin/what-list_primera.php +++ b/inc/modules/admin/what-list_primera.php @@ -41,7 +41,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR("admin", __FILE__); // Check for entries -$result = SQL_QUERY("SELECT id, userid, primera_account, primera_amount, primera_timestamp, primera_type, primera_api_message, primera_api_status FROM "._MYSQL_PREFIX."_user_primera ORDER BY primera_timestamp DESC, id DESC", +$result = SQL_QUERY("SELECT id, userid, primera_account, primera_amount, primera_timestamp, primera_type, primera_api_message, primera_api_status FROM `{!MYSQL_PREFIX!}_user_primera` ORDER BY primera_timestamp DESC, id DESC", __FILE__, __LINE__); // Are there some entries to display? diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 554efeaefe..18be1d8cc0 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -53,11 +53,11 @@ if (isset($_GET['rallye'])) switch ($_GET['activate']) { case "1": // Activate - $SQL = "UPDATE "._MYSQL_PREFIX."_rallye_data SET is_active='Y' WHERE id=%s AND is_active='N' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE id=%s AND is_active='N' LIMIT 1"; break; case "0": // Deactivate - $SQL = "UPDATE "._MYSQL_PREFIX."_rallye_data SET is_active='N' WHERE id=%s AND is_active='Y' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE id=%s AND is_active='Y' LIMIT 1"; break; } } @@ -68,11 +68,11 @@ if (isset($_GET['rallye'])) switch ($_GET['notify']) { case "1": // Activate - $SQL = "UPDATE "._MYSQL_PREFIX."_rallye_data SET send_notify='Y' WHERE id=%s AND send_notify='N' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE id=%s AND send_notify='N' LIMIT 1"; break; case "0": // Deactivate - $SQL = "UPDATE "._MYSQL_PREFIX."_rallye_data SET send_notify='N' WHERE id=%s AND send_notify='Y' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE id=%s AND send_notify='Y' LIMIT 1"; break; } } @@ -83,11 +83,11 @@ if (isset($_GET['rallye'])) switch ($_GET['auto']) { case "1": // Activate - $SQL = "UPDATE "._MYSQL_PREFIX."_rallye_data SET auto_add_new_user='Y' WHERE id=%s AND auto_add_new_user='N' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE id=%s AND auto_add_new_user='N' LIMIT 1"; break; case "0": // Deactivate - $SQL = "UPDATE "._MYSQL_PREFIX."_rallye_data SET auto_add_new_user='N' WHERE id=%s AND auto_add_new_user='Y' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE id=%s AND auto_add_new_user='Y' LIMIT 1"; break; } } @@ -108,11 +108,11 @@ if (isset($_GET['rallye'])) foreach ($_POST['sel'] as $id => $sel) { // Remove selected rallye entirely... - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s", array(bigintval($id)), __FILE__, __LINE__); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s", array(bigintval($id)), __FILE__, __LINE__); } @@ -142,7 +142,7 @@ if (isset($_GET['rallye'])) $END = mktime($_POST['end_hour'][$id] , $_POST['end_min'][$id] , $_POST['end_sec'][$id] , $_POST['end_month'][$id] , $_POST['end_day'][$id] , $_POST['end_year'][$id] ); // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_rallye_data` SET title='%s', descr='%s', template='%s', @@ -171,7 +171,7 @@ if (isset($_POST['edit'])) foreach ($_POST['sel'] as $id => $sel) { // Load rallye basic data - $result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices FROM `{!MYSQL_PREFIX!}_rallye_data` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($title, $descr, $templ, $start, $end, $min_users, $min_prices) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -220,7 +220,7 @@ if (isset($_POST['edit'])) } } elseif (($_GET['sub'] == "users") && ($_GET['rallye'] > 0)) { // List users and their refs before start and current - $result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s ORDER BY userid", + $result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY userid", array(bigintval($_GET['rallye'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -275,7 +275,7 @@ if (isset($_POST['edit'])) { // Start listing rallyes $result = SQL_QUERY("SELECT id, admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify, notified, min_users, min_prices -FROM "._MYSQL_PREFIX."_rallye_data +FROM `{!MYSQL_PREFIX!}_rallye_data` ORDER BY start_time DESC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) @@ -288,11 +288,11 @@ ORDER BY start_time DESC", $alogin = GET_ADMIN_LOGIN($aid); // Count assigned prices - $result_prices = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s", + $result_prices = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s", array(bigintval($id)), __FILE__, __LINE__); // Count joined userids - $result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s", + $result_user = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s", array($id), __FILE__, __LINE__); $joined = SQL_NUMROWS($result_user); @@ -310,7 +310,7 @@ ORDER BY start_time DESC", // Transfer data into array for the template $content = array( - 'select' => "", + 'select' => "", 'aid' => $aid, 'email_link' => CREATE_EMAIL_LINK($aid), 'alogin' => $alogin, diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 9abdf00480..a1de804b17 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -51,7 +51,7 @@ if (!empty($_GET['u_id'])) { $uid = bigintval($_GET['u_id']); // Check if the user already exists - $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); // User found? @@ -60,14 +60,14 @@ if (!empty($_GET['u_id'])) { if (EXT_IS_ACTIVE("refback")) { // Load all referal levels $result_levels = SQL_QUERY("SELECT level, percents -FROM "._MYSQL_PREFIX."_refdepths +FROM `{!MYSQL_PREFIX!}_refdepths` WHERE level > 0 ORDER BY level ASC", __FILE__, __LINE__); } else { // Loads surname, family's name and the email address - $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s", + $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s", array($uid), __FILE__, __LINE__); - $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid", + $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid", array($uid), __FILE__, __LINE__); $menge = SQL_RESULT($result , 0, 0); $menge_lck = SQL_RESULT($result_lck, 0, 0); @@ -77,7 +77,7 @@ ORDER BY level ASC", __FILE__, __LINE__); SQL_FREERESULT($result_lck); // Query for refs - $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s ORDER BY userid ASC", + $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC", array($uid), __FILE__, __LINE__); // Output info message @@ -95,16 +95,16 @@ ORDER BY level ASC", __FILE__, __LINE__); // Is the refback still active? ;-) if (EXT_IS_ACTIVE("refback")) { // Load all refs of this user - $result_refs = SQL_QUERY_ESC("SELECT refid FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND level='%s' ORDER BY refid ASC", + $result_refs = SQL_QUERY_ESC("SELECT refid FROM `{!MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' ORDER BY refid ASC", array($uid, $levels['level']), __FILE__, __LINE__); //* DEBUG: */ echo $uid."/".$levels['level']."/".SQL_NUMROWS($result_refs)."
    \n"; // Do we have levels? if (SQL_NUMROWS($result_refs) > 0) { // Loads surname, family's name and the email address - $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s", + $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s", array($uid), __FILE__, __LINE__); - $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid", + $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid", array($uid), __FILE__, __LINE__); $menge = SQL_RESULT($result , 0, 0); $menge_lck = SQL_RESULT($result_lck, 0, 0); @@ -120,7 +120,7 @@ ORDER BY level ASC", __FILE__, __LINE__); $OUT_REFS = ""; $SW = 2; while (list($refid) = SQL_FETCHROW($result_refs)) { // Query for data - $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($refid), __FILE__, __LINE__); // Is the data there? @@ -129,7 +129,7 @@ ORDER BY level ASC", __FILE__, __LINE__); $data = SQL_FETCHARRAY($result_user); // Check for referals - $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s", + $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s", array($refid), __FILE__, __LINE__); // Load refs @@ -185,7 +185,7 @@ ORDER BY level ASC", __FILE__, __LINE__); $OUT .= LOAD_TEMPLATE("admin_list_refs_level", true, $levels); } else { // Check for referals - $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s", + $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!MYSQL_PREFIX!}_user_data` WHERE refid=%s", array(bigintval($levels['userid'])), __FILE__, __LINE__); $refs_cnt = SQL_RESULT($result_refs, 0, 0); SQL_FREERESULT($result_refs); diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 3aceeb5f01..9d10f75b9a 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); if (!empty($_GET['id'])) { // Show detailed informations to a sponsor $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, status, sponsor_created, last_online, last_change, receive_warnings, points_amount, points_used, remote_addr, warning_interval, refid, ref_count -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); @@ -58,7 +58,7 @@ WHERE id='%s' LIMIT 1", } // Check for sponsor's orders (only count) - $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `"._MYSQL_PREFIX."_sponsor_orders` WHERE sponsorid='%s'", + $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s'", array(bigintval($_GET['id'])), __FILE__, __LINE__); list($orders) = SQL_FETCHROW($result_orders); SQL_FREERESULT($result_orders); @@ -113,7 +113,7 @@ WHERE id='%s' LIMIT 1", } } elseif (!empty($_GET['rid'])) { // Search for sponsor - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE id='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['rid'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Free memory @@ -121,7 +121,7 @@ WHERE id='%s' LIMIT 1", // Sponsor found so let's list all his referals $result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email, status, sponsor_created, last_online, points_amount, points_used, remote_addr, ref_count -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE refid='%s' ORDER BY id", array(bigintval($_GET['rid'])), __FILE__, __LINE__); @@ -140,7 +140,7 @@ WHERE refid='%s' ORDER BY id", } else { // List all sponsors $result_main = SQL_QUERY("SELECT id, gender, surname, family, email, status, sponsor_created, last_online, points_amount, points_used, remote_addr -FROM `"._MYSQL_PREFIX."_sponsor_data` ORDER BY id", __FILE__, __LINE__); +FROM `{!MYSQL_PREFIX!}_sponsor_data` ORDER BY id", __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { // At least one sponsor found! $OUT = ""; $SW = 2; diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 7d6cace8ea..a274160dea 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -64,7 +64,7 @@ if (isset($_POST['add'])) { $id = bigintval($id); // Save entry - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_paytypes` + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_paytypes` SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id='%s' LIMIT 1", array($_POST['name'][$id], $_POST['rate'][$id], bigintval($_POST['min'][$id]), $_POST['curr'][$id], $id), __FILE__, __LINE__); @@ -76,7 +76,7 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id // Remove entries here... foreach ($_POST['id'] as $id => $sel) { // Remove entry - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_sponsor_paytypes` WHERE id='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` WHERE id='%s' LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } @@ -93,11 +93,11 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id if (isset($_POST['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", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` WHERE pay_name='%s' LIMIT 1", array($_POST['pay_name']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // No entry found so add this line - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_sponsor_paytypes` (pay_name, pay_rate, pay_min_count, pay_currency) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_rate, pay_min_count, pay_currency) VALUES ('%s','%s','%s','%s')", array(htmlspecialchars($_POST['pay_name']), REVERT_COMMA($_POST['pay_rate']), bigintval($_POST['pay_min_count']), htmlspecialchars($_POST['pay_currency'])), __FILE__, __LINE__); @@ -120,7 +120,7 @@ if (isset($_POST['add'])) { $OUT = ""; $SW = 2; foreach ($_POST['id'] as $id => $sel) { // Load entry - $result = SQL_QUERY_ESC("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `"._MYSQL_PREFIX."_sponsor_paytypes` WHERE id='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` WHERE id='%s' LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data @@ -166,7 +166,7 @@ if (isset($_POST['add'])) { } } else { // Load all payment types - $result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_min_count, pay_currency FROM `"._MYSQL_PREFIX."_sponsor_paytypes` ORDER BY pay_name", + $result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_min_count, pay_currency FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__); // Do we have some paytypes setup? diff --git a/inc/modules/admin/what-list_sponsor_pays.php b/inc/modules/admin/what-list_sponsor_pays.php index 39038484be..56222cd12b 100644 --- a/inc/modules/admin/what-list_sponsor_pays.php +++ b/inc/modules/admin/what-list_sponsor_pays.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); if (!empty($_GET['id'])) { // Check for selected sponsor - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE id='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // ... diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index e431db9087..95d4d87a39 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); // Load all actions $result = SQL_QUERY("SELECT `id`, `status`, `action`, `new_status` -FROM `"._MYSQL_PREFIX."_surfbar_actions` +FROM `{!MYSQL_PREFIX!}_surfbar_actions` ORDER BY `status` ASC, `action` ASC", __FILE__, __LINE__); // Entries found? diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index dabf40bfe8..73058d30cb 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -135,7 +135,7 @@ if (!$show) return false; // List all URLs $result = SQL_QUERY("SELECT id, userid, url, views_total, status, UNIX_TIMESTAMP(registered) AS registered, UNIX_TIMESTAMP(last_locked) AS last_locked, lock_reason -FROM "._MYSQL_PREFIX."_surfbar_urls +FROM `{!MYSQL_PREFIX!}_surfbar_urls` ORDER BY id ASC", __FILE__, __LINE__); // Do we have some URLs left? diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index dff8a1df47..ff48e0d633 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -90,7 +90,7 @@ if (!empty($whereStatement)) } else { // Start listing tasks matching selected filter $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created -FROM "._MYSQL_PREFIX."_task_system +FROM `{!MYSQL_PREFIX!}_task_system` WHERE ".$whereStatement." ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __LINE__); if (($SEL > 0) && (!IS_DEMO())) { @@ -98,7 +98,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L if (isset($_POST['unassign'])) { // Unassign from tasks foreach ($_POST['task'] as $id => $sel) { - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_task_system` SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1", array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__); } } elseif (isset($_POST['del'])) { @@ -106,7 +106,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L foreach ($_POST['task'] as $id => $sel) { if ($_GET['type'] == "deleted") { // Delete task immediately - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_task_system` WHERE id=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); } else { // Mark task as to be deleted (purged by autppurge extension) @@ -116,7 +116,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L } // Update query - $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM "._MYSQL_PREFIX."_task_system WHERE ".$whereStatement." ORDER BY subject, task_created DESC", __FILE__, __LINE__); + $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM `{!MYSQL_PREFIX!}_task_system` WHERE ".$whereStatement." ORDER BY subject, task_created DESC", __FILE__, __LINE__); } // There are uncompleted jobs! diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index 6dbbe871e5..ee8319497d 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -41,7 +41,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']) || (!IS_ADMIN())) { ADD_DESCR("admin", __FILE__); // We only need outgoing transfers -$result = SQL_QUERY("SELECT userid, to_uid, trans_id, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY trans_id", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT userid, to_uid, trans_id, points, reason, time_trans FROM `{!MYSQL_PREFIX!}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__); $total = 0; if (SQL_NUMROWS($result) > 0) { diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index ba8c54288a..fb32ef6874 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -52,8 +52,8 @@ if (!empty($_GET['mid'])) define('__LIST_UNCON_TITLE', LIST_UNCONFIRMED_MEMBER_LINKS); // SQL query for mail data - $SQL = "SELECT DISTINCT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec FROM "._MYSQL_PREFIX."_pool AS p -LEFT JOIN "._MYSQL_PREFIX."_user_stats AS s + $SQL = "SELECT DISTINCT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec FROM `{!MYSQL_PREFIX!}_pool` AS p +LEFT JOIN `{!MYSQL_PREFIX!}_user_stats` AS s ON p.id=s.pool_id WHERE p.id='".$_GET['mid']."' LIMIT 1"; @@ -69,7 +69,7 @@ WHERE p.id='".$_GET['mid']."' LIMIT 1"; define('__LIST_UNCON_TITLE', LIST_UNCONFIRMED_BONUS_LINKS); // SQL query for mail data (both ids are required for compatiblity to above normal mail - $SQL = "SELECT id, id, subject, text, url, timestamp, mails_sent FROM "._MYSQL_PREFIX."_bonus WHERE id='".$_GET['bid']."' LIMIT 1"; + $SQL = "SELECT id, id, subject, text, url, timestamp, mails_sent FROM `{!MYSQL_PREFIX!}_bonus` WHERE id='".$_GET['bid']."' LIMIT 1"; // Column, type and ID for member's mail $col = "bonus_id"; $type = "BONUS"; $ID = $_GET['bid']; @@ -108,8 +108,8 @@ if ($listed) // accounts. So if you have delete one you did not see those links // $result = SQL_QUERY_ESC("SELECT DISTINCT l.userid, u.status, u.surname, u.family, u.gender, u.email -FROM "._MYSQL_PREFIX."_user_links AS l -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS u +FROM `{!MYSQL_PREFIX!}_user_links` AS l +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS u ON l.userid=u.userid WHERE l.%s='%s' ORDER BY l.userid LIMIT %s", array($col, $ID, bigintval($max)),__FILE__, __LINE__); @@ -158,9 +158,9 @@ WHERE l.%s='%s' ORDER BY l.userid LIMIT %s", elseif ($_GET['mid'] > 0) { // Data in pool or in user_stats not found, so let's find out where data is missing - $result1 = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1", + $result1 = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array(bigintval($ID)), __FILE__, __LINE__); - $result2 = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1", + $result2 = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1", array(bigintval($ID)), __FILE__, __LINE__); if (SQL_NUMROWS($result1) == 1) { diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index be0148a6e5..68399a678d 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -98,7 +98,7 @@ if (!empty($_GET['u_id'])) { // Does the account exists? $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails, receive_mails, refid, status, REMOTE_ADDR, last_online, last_module, ref_clicks, total_logins, used_points, emails_sent, joined, last_update, last_profile_sent, notified, ref_payout, emails_received, mails_confirmed".$MORE." -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); @@ -232,7 +232,7 @@ LIMIT 1", } // END = if // Prepare SQL and run it - $SQL = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status, emails_sent, mails_confirmed, emails_received".$MORE." FROM "._MYSQL_PREFIX."_user_data".$whereStatement." ORDER BY ".SQL_ESCAPE($_GET['sortby']); + $SQL = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status, emails_sent, mails_confirmed, emails_received".$MORE." FROM `{!MYSQL_PREFIX!}_user_data`".$whereStatement." ORDER BY ".SQL_ESCAPE($_GET['sortby']); $result_master = SQL_QUERY($SQL, __FILE__, __LINE__); // Calculate page count (0.5 fixes a bug with page count) @@ -251,7 +251,7 @@ LIMIT 1", $SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset']; $result = SQL_QUERY($SQL, __FILE__, __LINE__); - $result_user = SQL_QUERY("SELECT emails_sent FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED'", __FILE__, __LINE__); + $result_user = SQL_QUERY("SELECT emails_sent FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED'", __FILE__, __LINE__); $user_count = SQL_NUMROWS($result_user); SQL_FREERESULT($result_user); diff --git a/inc/modules/admin/what-list_wernis.php b/inc/modules/admin/what-list_wernis.php index 722d9bb252..b3dc996db1 100644 --- a/inc/modules/admin/what-list_wernis.php +++ b/inc/modules/admin/what-list_wernis.php @@ -41,7 +41,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR("admin", __FILE__); // Check for entries -$result = SQL_QUERY("SELECT id, userid, wernis_account, wernis_amount, wernis_timestamp, wernis_type, wernis_api_message, wernis_api_status FROM "._MYSQL_PREFIX."_user_wernis ORDER BY wernis_timestamp DESC, id DESC", +$result = SQL_QUERY("SELECT id, userid, wernis_account, wernis_amount, wernis_timestamp, wernis_type, wernis_api_message, wernis_api_status FROM `{!MYSQL_PREFIX!}_user_wernis` ORDER BY wernis_timestamp DESC, id DESC", __FILE__, __LINE__); // Are there some entries to display? diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 53034beb33..834aab41f5 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -43,7 +43,7 @@ $MSG = ""; if (!empty($_GET['id'])) { // Check for selected sponsor - $result = SQL_QUERY_ESC("SELECT gender, surname, family, email, status FROM `"._MYSQL_PREFIX."_sponsor_data` WHERE id='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT gender, surname, family, email, status FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Get sponsor's current status and let only confirmed and locked status pass @@ -78,7 +78,7 @@ if (!empty($_GET['id'])) { SEND_EMAIL($email, $subject, $msg); // Update sponsor's account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET status='".$status."' WHERE id='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET status='".$status."' WHERE id='%s' LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); } elseif (!empty($_POST['no'])) { // No don't lock / unlock now! diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index 7781051d71..2191cef1ce 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); // Is a userid set? if (!empty($_GET['u_id'])) { // Load user's data - $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); $ACT = false; if (SQL_NUMROWS($result_user) == 1) { @@ -58,11 +58,11 @@ if (!empty($_GET['u_id'])) { // Ok, lock the account! if (GET_EXT_VERSION("user") >= "0.3.5") { // Lock with reason - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET status='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1", array($_POST['reason'], bigintval($_GET['u_id'])), __FILE__, __LINE__); } else { // Lock with no lock reason saved - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET status='LOCKED' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); } @@ -82,11 +82,11 @@ if (!empty($_GET['u_id'])) { // Ok, unlock the account! if (GET_EXT_VERSION("user") >= "0.3.5") { // Reset lock reason as well - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET status='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); } else { // No lock reason to reset - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET status='CONFIRMED' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); } @@ -113,7 +113,7 @@ if (!empty($_GET['u_id'])) { // Do not lock him... $URL = "modules.php?module=admin&what=list_user&u_id=".bigintval($_GET['u_id']); } else { - $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); // Entry found? diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 7291af2c21..0e543a4f7e 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -53,7 +53,7 @@ if (!isset($_POST['ok'])) $menus = array(); $titles = array(); $below = array(); // Get all available main menus - $result = SQL_QUERY("SELECT action, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT action, title, sort FROM `{!MYSQL_PREFIX!}_member_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Read menu structure @@ -92,7 +92,7 @@ if (!isset($_POST['ok'])) // Load sub menus :) foreach ($menus as $key_main => $value_main) { - $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND what != '' ORDER BY sort", + $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND what != '' ORDER BY sort", array($value_main), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -175,7 +175,7 @@ if (!isset($_POST['ok'])) // Insert new menu entry if (!empty($_POST['menu'])) { - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", array( $_POST['menu'], $_POST['name'], @@ -187,7 +187,7 @@ if (!isset($_POST['ok'])) } else { - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( $_POST['name'], $_POST['title'], diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 4a73f65a08..f243e0ebe7 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -64,7 +64,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title, action, what FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title, action, what FROM `{!MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -111,7 +111,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title FROM `{!MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -153,7 +153,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `{!MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -200,17 +200,17 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) switch ($_POST['ok']) { case "edit": // Edit menu - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1", array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $sel), __FILE__, __LINE__); break; case "del": // Delete menu - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1", array($sel), __FILE__, __LINE__); break; case "status": // Change status of menus - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1", array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__); break; } @@ -227,29 +227,29 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) // Get IDs if (!empty($_GET['w'])) { // Sub menus selected - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1", array(bigintval($_GET['act']), bigintval($_GET['tid'])), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1", array(bigintval($_GET['act']), bigintval($_GET['fid'])), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } else { // Main menu selected - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_member_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", array(bigintval($_GET['tid'])), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); - $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_member_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1", array(bigintval($_GET['fid'])), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); } if ((!empty($tid)) && (!empty($fid))) { // Sort menu - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__); - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__); } // END - -fi } @@ -257,12 +257,12 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) if (!empty($SUB)) { // Edit sub menus - $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND what != '' AND what IS NOT NULL ORDER BY sort ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `{!MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND what != '' AND what IS NOT NULL ORDER BY sort ASC", __FILE__, __LINE__); } else { // Edit main menus - $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `{!MYSQL_PREFIX!}_member_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__); } $max = SQL_NUMROWS($result); if ($max > 0) diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index f744849d10..81cfb28433 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -50,8 +50,8 @@ if (isset($_POST['ok'])) { $SQL = array(); switch ($_GET['do']) { case "add": - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_payments (time, payment, mail_title, price) VALUES ('".$_POST['t_wait']."','".$_POST['payment']."','".$_POST['title']."','".$_POST['price']."')"; - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_payments WHERE time='%s' LIMIT 1", + $SQLs[] = "INSERT INTO `{!MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".$_POST['t_wait']."','".$_POST['payment']."','".$_POST['title']."','".$_POST['price']."')"; + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_payments` WHERE time='%s' LIMIT 1", array($_POST['t_wait']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Free memory @@ -62,13 +62,13 @@ if (isset($_POST['ok'])) { case "edit": foreach ($_POST['time'] as $id => $value) { - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_payments SET time='".$value."', payment='".$_POST['pay'][$id]."', price='".$_POST['price'][$id]."', mail_title='".$_POST['title'][$id]."' WHERE id='".$id."' LIMIT 1"; + $SQLs[] = "UPDATE `{!MYSQL_PREFIX!}_payments` SET time='".$value."', payment='".$_POST['pay'][$id]."', price='".$_POST['price'][$id]."', mail_title='".$_POST['title'][$id]."' WHERE id='".$id."' LIMIT 1"; } break; case "del": foreach ($_POST['id'] as $id => $value) { - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payments WHERE id='".$id."' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_payments` WHERE id='".$id."' LIMIT 1"; } break; } @@ -89,7 +89,7 @@ if (isset($_POST['ok'])) { // Delete entries here $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $value) { - $result = SQL_QUERY_ESC("SELECT time, mail_title FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT time, mail_title FROM `{!MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($time, $title) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -114,7 +114,7 @@ if (isset($_POST['ok'])) { // Edit entries $SW = 2; $OUT = ""; foreach ($_POST['sel'] as $id => $value) { - $result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM `{!MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($time, $pay, $title, $price) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -139,7 +139,7 @@ if (isset($_POST['ok'])) { LOAD_TEMPLATE("admin_edit_payments"); } else { // Referal levels - $result = SQL_QUERY("SELECT id, time, payment, mail_title, price FROM "._MYSQL_PREFIX."_payments ORDER BY time", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, time, payment, mail_title, price FROM `{!MYSQL_PREFIX!}_payments` ORDER BY time", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Make referal levels editable and deletable $SW = 2; $OUT = ""; diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 68abbb0486..d9a27694f2 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -59,11 +59,11 @@ if (isset($_POST['ok'])) { { case "add": // Check if banner is already added - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_refbanner WHERE url='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1", array($_POST['url']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Add banner - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refbanner (url, alternate, visible) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_refbanner` (url, alternate, visible) VALUES ('%s','%s','%s')", array($_POST['url'], $_POST['alternate'], $_POST['visible']), __FILE__, __LINE__); } else { @@ -78,7 +78,7 @@ VALUES ('%s','%s','%s')", $id = bigintval($id); // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET url='%s', alternate='%s', visible='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_refbanner` SET url='%s', alternate='%s', visible='%s' WHERE id=%s LIMIT 1", array($_POST['url'][$id], $_POST['alternate'][$id], $_POST['visible'], $id), __FILE__, __LINE__); } break; @@ -95,7 +95,7 @@ VALUES ('%s','%s','%s')", $SW = ""; $OUT = ""; foreach ($_POST['sel'] as $id => $sel) { // Load data - $result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM `{!MYSQL_PREFIX!}_refbanner` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($url, $alt, $vis) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -122,13 +122,13 @@ VALUES ('%s','%s','%s')", { // Delete banner foreach ($_POST['sel'] as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_refbanner` WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } } // Referal levels - $result = SQL_QUERY("SELECT id, url, alternate, visible, counter, clicks FROM "._MYSQL_PREFIX."_refbanner ORDER BY url", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, url, alternate, visible, counter, clicks FROM `{!MYSQL_PREFIX!}_refbanner` ORDER BY url", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Make referal banner editable and deletable diff --git a/inc/modules/admin/what-repair_amenu.php b/inc/modules/admin/what-repair_amenu.php index 175597b999..65df8b2005 100644 --- a/inc/modules/admin/what-repair_amenu.php +++ b/inc/modules/admin/what-repair_amenu.php @@ -42,14 +42,14 @@ ADD_DESCR("admin", __FILE__); $ACTIONS = array(); // First fix all main menus (what="")... -$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); +$result_fix = SQL_QUERY("SELECT id, action FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); $cnt = 0; $REP = 0; while(list($id, $act) = SQL_FETCHROW($result_fix)) { // Store act value for later usage in sorting sub menus $ACTIONS[] = $act; // Fix weight - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -58,16 +58,16 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) { } // Set logout weight to 999 -SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); +SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); // Now sort every each menu foreach ($ACTIONS as $act) { - $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", + $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", array($act), __FILE__, __LINE__); $cnt = 1; while (list($id) = SQL_FETCHROW($result_fix)) { // Fix weight - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_admin_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); diff --git a/inc/modules/admin/what-repair_cats.php b/inc/modules/admin/what-repair_cats.php index 66e6dae316..f74cf27bf4 100644 --- a/inc/modules/admin/what-repair_cats.php +++ b/inc/modules/admin/what-repair_cats.php @@ -40,16 +40,16 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR("admin", __FILE__); -$result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_cats ORDER BY userid", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_cats` ORDER BY userid", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Check if found userid is also found in user_data table $REMOVED = 0; // Nothing is removed for now... ;-) while (list($uid) = SQL_FETCHROW($result)) { - $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_user) == 0) { // Ok, we found something to remove - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_cats` WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__); $REMOVED += SQL_AFFECTEDROWS(); } else { diff --git a/inc/modules/admin/what-repair_gmenu.php b/inc/modules/admin/what-repair_gmenu.php index fdd4dc5bc8..b5fa87deb9 100644 --- a/inc/modules/admin/what-repair_gmenu.php +++ b/inc/modules/admin/what-repair_gmenu.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); $ACTIONS = array(); // First fix all main menus (what="")... -$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); +$result_fix = SQL_QUERY("SELECT id, action FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); $cnt = 0; $REP = 0; while(list($id, $act) = SQL_FETCHROW($result_fix)) { @@ -50,23 +50,23 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) $ACTIONS[] = $act; // Fix weight - $result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='".$cnt."' WHERE id='".$id."' LIMIT 1", __FILE__, __LINE__); + $result_sort = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET sort='".$cnt."' WHERE id='".$id."' LIMIT 1", __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); // Count one up $cnt++; } // Set logout weight to 999 -$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); +$result_sort = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); // Now sort every each menu foreach ($ACTIONS as $act) { - $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", + $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", array($act), __FILE__, __LINE__); $cnt = 1; while (list($id) = SQL_FETCHROW($result_fix)) { // Fix weight - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort=%s WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_guest_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); diff --git a/inc/modules/admin/what-repair_mmenu.php b/inc/modules/admin/what-repair_mmenu.php index bdef5a44b3..3383d01bcb 100644 --- a/inc/modules/admin/what-repair_mmenu.php +++ b/inc/modules/admin/what-repair_mmenu.php @@ -42,14 +42,14 @@ ADD_DESCR("admin", __FILE__); $ACTIONS = array(); // First fix all main menus (what="")... -$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); +$result_fix = SQL_QUERY("SELECT id, action FROM `{!MYSQL_PREFIX!}_member_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); $cnt = 0; $REP = 0; while(list($id, $act) = SQL_FETCHROW($result_fix)) { // Store action value for later usage in sorting sub menus $ACTIONS[] = $act; // Fix weight - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -57,16 +57,16 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) { $cnt++; } // Set logout weight to 999 -SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); +SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); // Now sort every each menu foreach ($ACTIONS as $act) { - $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", + $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", array($act), __FILE__, __LINE__); $cnt = 1; while (list($id) = SQL_FETCHROW($result_fix)) { // Fix weight - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_member_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index 68091e0907..3ad19859d7 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); if (isset($_POST['ok'])) { $result = SQL_QUERY("SELECT userid, email -FROM `"._MYSQL_PREFIX."_user_data` +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND nl_receive='Y' ORDER BY userid ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php index 0f160adf3f..9d9fc05506 100644 --- a/inc/modules/admin/what-stats_mods.php +++ b/inc/modules/admin/what-stats_mods.php @@ -55,7 +55,8 @@ if (($_GET['mod'] == "index") || ($_GET['mod'] == "login")) } // Load module's detail statistic - $result = SQL_QUERY("SELECT action, title, counter FROM "._MYSQL_PREFIX."_".$mod."_menu WHERE what != '' ORDER BY counter DESC", __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT action, title, counter FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE what != '' AND what IS NOT NULL ORDER BY counter DESC", + array($mod), __FILE__, __LINE__); $SW = 2; $OUT = ""; while(list($act, $title, $clicks) = SQL_FETCHROW($result)) { @@ -84,7 +85,7 @@ if (($_GET['mod'] == "index") || ($_GET['mod'] == "login")) else { // Load module statics - $result = SQL_QUERY("SELECT module, title, clicks FROM "._MYSQL_PREFIX."_mod_reg ORDER BY clicks DESC, module", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT module, title, clicks FROM `{!MYSQL_PREFIX!}_mod_reg` ORDER BY clicks DESC, module", __FILE__, __LINE__); $SW = 2; $OUT = ""; while(list($mod, $title, $clicks) = SQL_FETCHROW($result)) { diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index a09a2a31c1..04f1fd51de 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -49,11 +49,11 @@ if ($_GET['u_id'] == "all") define('__POINTS_VALUE', $_POST['points']); if ((isset($_POST['ok'])) && ($_POST['points'] > 0)) { - $result_main = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); + $result_main = SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); while (list($uid) = SQL_FETCHROW($result_main)) { // User ID found in URL so we use this give him some credits - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -93,7 +93,7 @@ if ($_GET['u_id'] == "all") elseif (!empty($_GET['u_id'])) { // User ID found in URL so we use this give him some credits - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($_GET['u_id'])),__FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Selected user does exist diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index f9e34b061a..ea53ffdfe9 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__); if (isset($_GET['url_id'])) { // Generate general statistics $result = SQL_QUERY_ESC("SELECT `userid`, `count` AS `total_visits`, UNIX_TIMESTAMP(`last_online`) AS `last_online` -FROM `"._MYSQL_PREFIX."_surfbar_stats` +FROM `{!MYSQL_PREFIX!}_surfbar_stats` WHERE `url_id`=%s ORDER BY `userid` ASC", array(bigintval($_GET['url_id'])), __FILE__, __LINE__); @@ -85,7 +85,7 @@ ORDER BY `userid` ASC", } else { // Generate general statistics $result = SQL_QUERY("SELECT `userid`, COUNT(`url_id`) AS `visited_urls`, SUM(`count`) AS `total_visits` -FROM `"._MYSQL_PREFIX."_surfbar_stats` +FROM `{!MYSQL_PREFIX!}_surfbar_stats` GROUP BY `userid` ORDER BY `userid` ASC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 4ec6387677..826b650a27 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -54,14 +54,14 @@ if ($SEL > 0) { if (isset($_POST['status'])) { // Change status if ($_POST['active'][$id] == "Y") { - $SQL = "UPDATE `"._MYSQL_PREFIX."_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1"; } else { - $SQL = "UPDATE `"._MYSQL_PREFIX."_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1"; + $SQL = "UPDATE `{!MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1"; } $OUT = ADMIN_THEMES_UPDATED; } elseif (isset($_POST['del'])) { // Delete themes - $SQL = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_themes` WHERE id='".$id."' LIMIT 1"; + $SQL = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1"; $OUT = ADMIN_THEMES_DELETED; } @@ -98,7 +98,7 @@ $THEME_MODE = "test"; // Generate output lines for the template $OUT = ""; $SW = 2; -$result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `"._MYSQL_PREFIX."_themes` ORDER BY theme_path", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{!MYSQL_PREFIX!}_themes` ORDER BY theme_path", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { while(list($id, $unix, $active, $ver, $name) = SQL_FETCHROW($result)) { // Load theme in test mode diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index fd9fd24cc4..cc1cc05f9e 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -57,7 +57,7 @@ if (!empty($_POST['theme'])) { require($file); // Register it ith the exchange - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`) VALUES ('%s','N','%s','%s')", array($_POST['theme'], $THEME_VERSION, $THEME_NAME), __FILE__, __LINE__); @@ -127,8 +127,8 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { } else { // Theme not installed $FOUND = "
    - - + + "; } diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 55e09e7d54..45ccd127ba 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -45,7 +45,7 @@ global $DATA; // Check for mails $result_main = SQL_QUERY("SELECT `id`, `sender`, `subject`, `payment_id` AS `payment`, `timestamp`, `url`, `target_send`, `cat_id` AS `category` -FROM `"._MYSQL_PREFIX."_pool` +FROM `{!MYSQL_PREFIX!}_pool` WHERE `data_type`='ADMIN' ORDER BY `timestamp` ASC", __FILE__, __LINE__); @@ -69,8 +69,8 @@ if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) { // Order placed in queue... $result = SQL_QUERY_ESC("SELECT po.url, po.subject, po.sender, pay.payment, po.payment_id -FROM "._MYSQL_PREFIX."_pool AS po -INNER JOIN "._MYSQL_PREFIX."_payments AS pay +FROM `{!MYSQL_PREFIX!}_pool` AS po +INNER JOIN `{!MYSQL_PREFIX!}_payments` AS pay ON po.payment_id=pay.id WHERE po.id=%s LIMIT 1", @@ -93,7 +93,7 @@ LIMIT 1", // Check for bonus extension version >= 0.4.4 for the order bonus if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) { // Add points directly - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1", array(bigintval($DATA['sender'])), __FILE__, __LINE__); // Subtract bonus points from system @@ -107,7 +107,7 @@ LIMIT 1", SEND_EMAIL($DATA['sender'], MEMBER_ORDER_ACCEPTED, $msg_user); // Unlock selected email - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW' WHERE id=%s AND data_type='ADMIN' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='NEW' WHERE id=%s AND data_type='ADMIN' LIMIT 1", array($id), __FILE__, __LINE__); } // END - if } // END - foreach @@ -130,7 +130,7 @@ LIMIT 1", $id = bigintval($id); // Load URL and subject from pool - $result = SQL_QUERY_ESC("SELECT url, subject, sender FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT url, subject, sender FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array($id), __FILE__, __LINE__); // Load data @@ -147,7 +147,7 @@ LIMIT 1", if ((empty($_POST['redirect'])) || ($_POST['redirect'] == "http://")) $_POST['redirect'] = URL; // Redirect URL - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET url='%s', data_type='NEW' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE id=%s LIMIT 1", array($_POST['redirect'], $id),__FILE__, __LINE__); // Prepare data for the row template @@ -176,11 +176,11 @@ LIMIT 1", $id = bigintval($id); // Lookup in blacklist - $result = SQL_QUERY_ESC("SELECT `id` FROM `"._MYSQL_PREFIX."_url_blacklist` WHERE `url`='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id` FROM `{!MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1", array($url), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Did not find a record so we can add it... :) - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)", array($url, $id), __FILE__, __LINE__); } // END - if diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index bed2bab1f1..76f9303867 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -51,7 +51,7 @@ if (isset($_POST['ok'])) { // Load his personal data $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, email, remote_addr, sponsor_created, points_amount, refid -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE status='PENDING' AND id='%s' LIMIT 1", array($id), __FILE__, __LINE__); $refid = 0; @@ -62,8 +62,8 @@ WHERE status='PENDING' AND id='%s' LIMIT 1", // Check for open payments and close them $result = SQL_QUERY_ESC("SELECT DISTINCT so.aid, so.pay_count, so.pay_ordered, so.pay_status, sp.pay_name, sp.pay_rate, sp.pay_currency -FROM `"._MYSQL_PREFIX."_sponsor_orders` AS so -LEFT JOIN `"._MYSQL_PREFIX."_sponsor_paytypes` AS sp +FROM `{!MYSQL_PREFIX!}_sponsor_orders` AS so +LEFT JOIN `{!MYSQL_PREFIX!}_sponsor_paytypes` AS sp ON sp.id=so.payid WHERE so.sponsorid='%s' ORDER BY sp.pay_name", @@ -103,14 +103,14 @@ ORDER BY sp.pay_name", SQL_FREERESULT($result_main); // Unlock sponsor account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET status='CONFIRMED' + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET status='CONFIRMED' WHERE id='%s' AND status='PENDING' LIMIT 1", array($id), __FILE__, __LINE__); // Update, if applyable, referal count and points if (($refid > 0) && ($refid != $id)) { // Update referal account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET points_amount=points_amount+%s, ref_count=ref_count+1 WHERE id='%s' LIMIT 1", array(getConfig('sponsor_ref_points'), bigintval($refid)), __FILE__, __LINE__); @@ -120,7 +120,7 @@ WHERE id='%s' LIMIT 1", // Load referal's data $result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email, (points_amount - points_used) AS points, receive_warnings, ref_count AS refs -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' LIMIT 1", array(bigintval($refid)), __FILE__, __LINE__); $REFERRAL = SQL_FETCHARRAY($result); @@ -164,7 +164,7 @@ WHERE id='%s' LIMIT 1", // Begin listing of all pending sponsor accounts $result = SQL_QUERY("SELECT id, gender, surname, family, email, remote_addr, sponsor_created -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE status='PENDING' ORDER BY id", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index e6ea703afc..a01b3c8446 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -63,7 +63,7 @@ if ((isset($_POST['unlock'])) && (is_array($_POST['id'])) && (count($_POST['id'] // List all URLs $result = SQL_QUERY("SELECT id, userid, url, UNIX_TIMESTAMP(registered) AS registered -FROM "._MYSQL_PREFIX."_surfbar_urls +FROM `{!MYSQL_PREFIX!}_surfbar_urls` WHERE status='PENDING' ORDER BY id ASC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 3949a23ae4..33bdd57b24 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); // Is a user id given? if ((isset($_GET['u_id'])) && (bigintval($_GET['u_id']) > 0)) { // Load user data and display it - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); // Is a user account found? diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index 69a9a69023..a548abdf12 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -43,9 +43,9 @@ ADD_DESCR("admin", __FILE__); if (EXT_IS_ACTIVE("online", true)) { // Count guests, members and admins - $result_guests = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__); - $result_members = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__); - $result_admins = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='Y'", __FILE__, __LINE__); + $result_guests = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_online` WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__); + $result_members = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_online` WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__); + $result_admins = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_online` WHERE is_admin='Y'", __FILE__, __LINE__); // Remember values for the template define('_GUESTS_ONLINE' , SQL_NUMROWS($result_guests)); @@ -61,7 +61,7 @@ if (EXT_IS_ACTIVE("online", true)) LOAD_TEMPLATE("admin_mini_online"); // Check for online users - $result = SQL_QUERY("SELECT id, ip, userid, refid, module, action, what, is_member, is_admin, timestamp FROM "._MYSQL_PREFIX."_online ORDER by timestamp DESC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, ip, userid, refid, module, action, what, is_member, is_admin, timestamp FROM `{!MYSQL_PREFIX!}_online` ORDER by timestamp DESC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load header template diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index ce282a4c7b..2146f98385 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -50,7 +50,7 @@ if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) { } // END - if // Get theme from profile - $result = SQL_QUERY_ESC("SELECT curr_theme".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT curr_theme".$ADD." FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Load data @@ -65,7 +65,7 @@ if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) { // Remmeber login failures if available if (GET_EXT_VERSION("sql_patches") >= "0.6.1") { // Reset login failures - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET login_failures=0, last_failure='0000-00-00 00:00:00' WHERE userid=%s LIMIT 1", @@ -80,7 +80,7 @@ LIMIT 1", $bonus = false; if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && (getConfig('bonus_login_yn') == "Y")) { // Update last login if far enougth away - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET last_login=UNIX_TIMESTAMP() WHERE userid=%s AND last_login < (UNIX_TIMESTAMP() - %s) LIMIT 1", diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index befb76db4d..3cbe638599 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -43,7 +43,7 @@ if (!empty($_GET['order'])) { // Order number placed, is he also logged in? if (IS_MEMBER()) { // 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", + $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($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__); // Finally is the entry valid? diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index f7d481760b..a1c0135b6e 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -43,9 +43,9 @@ if (!defined('__SECURITY')) { return; } -$result_guests = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__); -$result_members = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__); -$result_admins = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='Y'", __FILE__, __LINE__); +$result_guests = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_online` WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__); +$result_members = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_online` WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__); +$result_admins = SQL_QUERY("SELECT id FROM `{!MYSQL_PREFIX!}_online` WHERE is_admin='Y'", __FILE__, __LINE__); // Total visitors online $total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins); diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index e0e3a0768d..ba848fad15 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -46,7 +46,7 @@ if (defined('__THEME_SELECTION_CONTENT')) return false; // Load all active designs (or all if admin) $whereStatement = ""; $OUT = ""; if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'"; -$result_themes = SQL_QUERY("SELECT theme_path FROM `"._MYSQL_PREFIX."_themes`".$whereStatement, __FILE__, __LINE__); +$result_themes = SQL_QUERY("SELECT theme_path FROM `{!MYSQL_PREFIX!}_themes`".$whereStatement, __FILE__, __LINE__); $num_themes = SQL_NUMROWS($result_themes); if ($num_themes > 1) { diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index 724810e1db..990a16b093 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -51,7 +51,7 @@ if (EXT_IS_ACTIVE("nickname")) $ADD = "nickname"; // Check for members who were active only this day $result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", last_online -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE last_online >= %s AND status='CONFIRMED' ORDER BY last_online DESC LIMIT %s", array(START_TDAY, getConfig('active_limit')), __FILE__, __LINE__); diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 76fdc29438..9f3120e749 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -45,14 +45,14 @@ if (!empty($_GET['hash'])) { $uid = 0; // Search for an unconfirmed or confirmed account - $result = SQL_QUERY_ESC("SELECT userid, email, refid FROM `"._MYSQL_PREFIX."_user_data` WHERE user_hash='%s' AND (status='UNCONFIRMED' OR status='CONFIRMED') LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, email, refid FROM `{!MYSQL_PREFIX!}_user_data` WHERE user_hash='%s' AND (status='UNCONFIRMED' OR status='CONFIRMED') LIMIT 1", array($_GET['hash']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Ok, he want's to confirm now so we load some data list ($uid, $email, $rid) = SQL_FETCHROW($result); // Unlock his account (but only when it is on UNCONFIRMED!) - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET status='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1", array(getConfig('ref_payout'), $_GET['hash']), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { $msg = LOAD_EMAIL_TEMPLATE("confirm-member", array('points' => getConfig('points_register')), bigintval($uid)); @@ -63,7 +63,7 @@ if (!empty($_GET['hash'])) { // Maybe he got "referaled"? if (($rid > 0) && ($rid != $uid)) { // Select the referal userid - $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($rid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Update ref counter... @@ -84,7 +84,7 @@ if (!empty($_GET['hash'])) { // If version matches add ref bonus to refid's account if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) { // Add points (directly only!) - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1", array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__); // Subtract points from system @@ -134,7 +134,7 @@ if (!empty($_GET['hash'])) { } } elseif ((isset($_POST['ok'])) && (!empty($_POST['email']))) { // Confirmation link requested 0 1 2 - $result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM `"._MYSQL_PREFIX."_user_data` WHERE email='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM `{!MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1", array($_POST['email']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Email address found diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 728d080be9..d4c813f489 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -77,13 +77,13 @@ if ($TEST > time()) { } // User who can receive mails -$result_max = SQL_QUERY("SELECT COUNT(max_mails) FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__); +$result_max = SQL_QUERY("SELECT COUNT(max_mails) FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__); list($dummy) = SQL_FETCHROW($result_max); SQL_FREERESULT($result_max); define('user_max_mails', $dummy); // Users who can receive mails today -$result_rec = SQL_QUERY("SELECT COUNT(receive_mails) FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND receive_mails > 0", __FILE__, __LINE__); +$result_rec = SQL_QUERY("SELECT COUNT(receive_mails) FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND receive_mails > 0", __FILE__, __LINE__); list($dummy) = SQL_FETCHROW($result_rec); SQL_FREERESULT($result_rec); define('user_max_rec', $dummy); @@ -131,7 +131,7 @@ if ($sent > 0) $clr = $clicks / $sent * 100; define('_clr', TRANSLATE_COMMA($clr)."%"); // Load jackpot -$result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT points FROM `{!MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); list($jackpot) = SQL_FETCHROW($result); SQL_FREERESULT($result); if (empty($jackpot)) $jackpot = 0; @@ -139,7 +139,7 @@ define('jackpot', TRANSLATE_COMMA($jackpot)); // Total referal link clicks, total logins $result = SQL_QUERY("SELECT DISTINCT SUM(d.ref_clicks), SUM(d.total_logins) -FROM `"._MYSQL_PREFIX."_user_data` AS d", __FILE__, __LINE__); +FROM `{!MYSQL_PREFIX!}_user_data` AS d", __FILE__, __LINE__); list($ref, $logins) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -155,10 +155,10 @@ define('__TOTAL_REFCLICKS', $ref); define('__TOTAL_LOGINS' , $logins); // Referal banner -$result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_refbanner WHERE visible='Y'", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_refbanner` WHERE visible='Y'", __FILE__, __LINE__); list($total) = SQL_FETCHROW($result); SQL_FREERESULT($result); -$result = SQL_QUERY("SELECT SUM(counter), SUM(clicks) FROM "._MYSQL_PREFIX."_refbanner WHERE visible='Y'", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT SUM(counter), SUM(clicks) FROM `{!MYSQL_PREFIX!}_refbanner` WHERE visible='Y'", __FILE__, __LINE__); list($views, $clicks) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -182,7 +182,7 @@ $OUT_SPECIAL = ""; // We don't need row count here if (EXT_IS_ACTIVE("beg")) { // Clicks on beg links - $result = SQL_QUERY("SELECT SUM(beg_clicks) FROM `"._MYSQL_PREFIX."_user_data` WHERE beg_clicks>0", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT SUM(beg_clicks) FROM `{!MYSQL_PREFIX!}_user_data` WHERE beg_clicks>0", __FILE__, __LINE__); list($extra) = SQL_FETCHROW($result); SQL_FREERESULT($result); if (empty($extra)) $extra = 0; @@ -196,10 +196,10 @@ if (EXT_IS_ACTIVE("beg")) { if (EXT_IS_ACTIVE("doubler")) { // Total payed points - $result = SQL_QUERY("SELECT COUNT(id), SUM(points) FROM "._MYSQL_PREFIX."_doubler WHERE completed='Y' AND points > 0", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id), SUM(points) FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND points > 0", __FILE__, __LINE__); list($count1, $points1) = SQL_FETCHROW($result); SQL_FREERESULT($result); - $result = SQL_QUERY("SELECT COUNT(id), SUM(points) FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' AND points > 0", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(id), SUM(points) FROM `{!MYSQL_PREFIX!}_doubler` WHERE completed='N' AND points > 0", __FILE__, __LINE__); list($count2, $points2) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -239,8 +239,8 @@ if (EXT_IS_ACTIVE("doubler")) { if (EXT_IS_ACTIVE("holiday")) { // Total holiday requests $result = SQL_QUERY("SELECT DISTINCT COUNT(h.userid) -FROM "._MYSQL_PREFIX."_user_holidays AS h -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_holidays` AS h +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON h.userid=d.userid WHERE d.holiday_active='Y'", __FILE__, __LINE__); @@ -257,8 +257,8 @@ WHERE d.holiday_active='Y'", if (EXT_IS_ACTIVE("transfer")) { // Statistics for points transfers $result = SQL_QUERY("SELECT DISTINCT COUNT(t.id), SUM(t.points) -FROM "._MYSQL_PREFIX."_user_transfers_in AS t -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_transfers_in` AS t +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON t.userid=d.userid", __FILE__, __LINE__); list($count_in, $points_in) = SQL_FETCHROW($result); @@ -266,8 +266,8 @@ ON t.userid=d.userid", if (empty($points_in)) $points_in = 0; $result = SQL_QUERY("SELECT DISTINCT COUNT(t.id), SUM(t.points) -FROM "._MYSQL_PREFIX."_user_transfers_out AS t -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_transfers_out` AS t +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON t.userid=d.userid", __FILE__, __LINE__); list($count_out, $points_out) = SQL_FETCHROW($result); diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 1687cac3fd..7186f388e7 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -50,7 +50,7 @@ $ADMIN = " AND d.is_active='Y'"; if (IS_ADMIN()) $ADMIN = ""; $result = SQL_QUERY("SELECT DISTINCT d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices -FROM "._MYSQL_PREFIX."_rallye_data AS d, "._MYSQL_PREFIX."_admins AS a +FROM `{!MYSQL_PREFIX!}_rallye_data` AS d, `{!MYSQL_PREFIX!}_admins` AS a WHERE d.admin_id=a.id".$ADMIN." AND d.notified='Y' ORDER BY d.end_time LIMIT 1", __FILE__, __LINE__); diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 0d6e3f65e9..56c347f2d1 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -72,7 +72,7 @@ if (empty($_POST['country_code'])) $_POST['country_code'] = "1"; $_POST['refid'] = 0; if ($GLOBALS['refid'] > 0) { // Test if the refid is valid - $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); // Userid found? @@ -156,7 +156,7 @@ if (isset($_POST['ok'])) { // Check for IP timeout? if (getConfig('ip_timeout') > 0) { // Check his IP number - $result = SQL_QUERY_ESC("SELECT joined, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1", + $result = SQL_QUERY_ESC("SELECT joined, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1", array(GET_REMOTE_ADDR(), getConfig('ip_timeout'), getConfig('ip_timeout')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Same IP in timeout range and different email address entered... Eat this, faker! ;-) @@ -229,7 +229,7 @@ if ((isset($_POST['ok'])) && ((!$FAILED) || (IS_ADMIN()))) { // Create user's account... // ////////////////////////////// // - SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.") + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.") VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")", array( $countryRow, @@ -269,13 +269,13 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF } // END - if // Write his welcome-points - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s AND ref_depth=0 LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_points` WHERE userid=%s AND ref_depth=0 LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Add only when the line was not found (maybe some more secure?) $locked = "points"; if (getConfig('ref_payout') > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, ".$locked.") VALUES (%s,0,'%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_points` (userid, ref_depth, ".$locked.") VALUES (%s,0,'%s')", array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__); // Update mediadata as well @@ -290,7 +290,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF foreach ($_POST['cat'] as $cat => $joined) { if ($joined == "Y") { // Insert category entry - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%s, %s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES (%s, %s)", array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__); } // END - if } // END - foreach @@ -463,7 +463,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF define('__COUNTRY_CONTENT', $OUT); } else { // Old out-dated variant - define('__COUNTRY_CONTENT', ""); + define('__COUNTRY_CONTENT', ""); } // Set MUST_??? constants diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index 7dbcd2fdd6..2fd1cc4d8e 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -51,9 +51,9 @@ unset($result_act); // Load all sponsor actions $result_act = SQL_QUERY("SELECT DISTINCT m.title, c.conv_rate, c.conv_name -FROM `"._MYSQL_PREFIX."_sponsor_menu` AS m -LEFT JOIN `"._MYSQL_PREFIX."_sponsor_action_convert` AS c ON m.what=c.ext_name -LEFT JOIN `"._MYSQL_PREFIX."_sponsor_registry` AS r ON m.what=r.ext_name +FROM `{!MYSQL_PREFIX!}_sponsor_menu` AS m +LEFT JOIN `{!MYSQL_PREFIX!}_sponsor_action_convert` AS c ON m.what=c.ext_name +LEFT JOIN `{!MYSQL_PREFIX!}_sponsor_registry` AS r ON m.what=r.ext_name WHERE m.action='actions' AND r.is_active='Y' ORDER BY m.sort ASC", __FILE__, __LINE__); $num_act = SQL_NUMROWS($result_act); @@ -76,7 +76,7 @@ if ($num_act > 0) { } // END - while // Check for pay types - $result_pay = SQL_QUERY("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `"._MYSQL_PREFIX."_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__); + $result_pay = SQL_QUERY("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__); if (SQL_NUMROWS($result_pay) > 0) { // Load all pay types $OUT_PAY = ""; $SW = 2; diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index b81d0b51b0..6b4b5a9341 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -63,7 +63,7 @@ if (!empty($_GET['hash'])) { company, position, tax_ident, street_nr1, street_nr2, country, zip, city, email, phone, fax, cell, points_amount AS points, last_pay AS pay, last_curr AS curr -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE hash='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1", array($_GET['hash']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -78,7 +78,7 @@ LIMIT 1", array($_GET['hash']), __FILE__, __LINE__); // Unconfirmed account or changed email address? if ($SPONSOR['status'] == "UNCONFIRMED") { // Set account to pending - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET status='PENDING' + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET status='PENDING' WHERE id='%s' AND hash='%s' AND status='UNCONFIRMED' LIMIT 1", array(bigintval($SPONSOR['id']), $_GET['hash']), __FILE__, __LINE__); @@ -99,7 +99,7 @@ WHERE id='%s' AND hash='%s' AND status='UNCONFIRMED' LIMIT 1", } } elseif ($SPONSOR['status'] == "EMAIL") { // Changed email adress need to be confirmed - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET status='CONFIRMED' + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET status='CONFIRMED' WHERE id='%s' AND hash='%s' AND status='EMAIL' LIMIT 1", array(bigintval($SPONSOR['id']), $_GET['hash']), __FILE__, __LINE__); @@ -132,7 +132,7 @@ WHERE id='%s' AND hash='%s' AND status='EMAIL' LIMIT 1", if (isset($_POST['ok'])) { // Check email $result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1", array($_POST['email']), __FILE__, __LINE__); @@ -178,7 +178,7 @@ WHERE email='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1", if (isset($_POST['ok'])) { // Check email $result = SQL_QUERY_ESC("SELECT id, hash, remote_addr, gender, surname, family, sponsor_created -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' AND id='%s' AND status='CONFIRMED' LIMIT 1", array($_POST['email'], bigintval($_POST['id'])), __FILE__, __LINE__); // Entry found? @@ -198,7 +198,7 @@ WHERE email='%s' AND id='%s' AND status='CONFIRMED' LIMIT 1", SEND_EMAIL($_POST['email'], SPONSOR_LOST_PASSWORD_SUBJ, $msg_sponsor); // Update password - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_sponsor_data` SET password='%s' + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_sponsor_data` SET password='%s' WHERE id='%s' LIMIT 1", array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__); @@ -217,7 +217,7 @@ WHERE id='%s' LIMIT 1", } } elseif (isset($_POST['ok'])) { // Check status and login data ... - $result = SQL_QUERY_ESC("SELECT status FROM `"._MYSQL_PREFIX."_sponsor_data` + $result = SQL_QUERY_ESC("SELECT status FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' AND password='%s' LIMIT 1", array(bigintval($_POST['sponsorid']), md5($_POST['pass'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index cfd9279b35..acce2dacdf 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -211,7 +211,7 @@ if ((isset($_POST['ok'])) && (count($FORM_ERRORS) == 0)) { // Calulate points $result = SQL_QUERY_ESC("SELECT (pay_rate * pay_min_count) AS points, pay_min_count AS pay, pay_currency AS curr -FROM `"._MYSQL_PREFIX."_sponsor_paytypes` +FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` WHERE id='%s' LIMIT 1", array($_POST['pay_type']), __FILE__, __LINE__); list($points, $pay, $curr) = SQL_FETCHROW($result); @@ -232,7 +232,7 @@ WHERE id='%s' LIMIT 1", array($_POST['pay_type']), __FILE__, __LINE__); { 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 email='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, hash FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1", array($_POST['email']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -286,7 +286,7 @@ WHERE id='%s' LIMIT 1", array($_POST['pay_type']), __FILE__, __LINE__); } else { // Check for payment types $result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_currency, pay_min_count -FROM `"._MYSQL_PREFIX."_sponsor_paytypes` +FROM `{!MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load all types... @@ -296,8 +296,8 @@ ORDER BY pay_name", __FILE__, __LINE__); { $OUT .= "
  • \n"; $SW = 3 - $SW; diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index f4e5f589e6..9628f98de0 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -52,19 +52,19 @@ switch (getConfig('guest_stats')) { case "MEMBERS": // Statistics about your members // Members yesterday / today online - $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE last_online >= ".START_YDAY." AND last_online < ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__)); - $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE last_online >= ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__)); + $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE last_online >= ".START_YDAY." AND last_online < ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__)); + $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE last_online >= ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__)); // Yesterday / today registered - $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE joined >= ".START_YDAY." AND joined < ".START_TDAY, __FILE__, __LINE__)); - $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE joined >= ".START_TDAY, __FILE__, __LINE__)); + $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE joined >= ".START_YDAY." AND joined < ".START_TDAY, __FILE__, __LINE__)); + $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE joined >= ".START_TDAY, __FILE__, __LINE__)); // Only males / females - $male = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE gender='M' AND status='CONFIRMED'", __FILE__, __LINE__)); - $female = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE gender='F' AND status='CONFIRMED'", __FILE__, __LINE__)); + $male = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE gender='M' AND status='CONFIRMED'", __FILE__, __LINE__)); + $female = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE gender='F' AND status='CONFIRMED'", __FILE__, __LINE__)); // Unconfirmed accounts - $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__)); + $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__)); // Total members $total = $male + $female; @@ -74,27 +74,25 @@ case "MEMBERS": // Statistics about your members for ($idx = 1; $idx < 13; $idx++) { $month = $idx; if ($idx < 10) $month = "0".$idx; - $months[$month] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE birth_month=%s AND status='CONFIRMED'", + $months[$month] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE birth_month=%s AND status='CONFIRMED'", array(bigintval($month)), __FILE__, __LINE__)); } // Members in categories - $result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats WHERE visible='Y' ORDER BY id", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, cat FROM `{!MYSQL_PREFIX!}_cats` WHERE visible='Y' ORDER BY id", __FILE__, __LINE__); // Load categories first $cats = array(); $cat_cnt = array(); - while (list($id, $cat) = SQL_FETCHROW($result)) - { + while (list($id, $cat) = SQL_FETCHROW($result)) { // Simple... $cats[$id] = $cat; } // Now we have all categories loaded, count members - foreach ($cats as $id => $dummy) - { + foreach ($cats as $id => $dummy) { // We only need id and nothing more to count... - $cat_cnt[$id] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s", - array(bigintval($id)), __FILE__, __LINE__)); + $cat_cnt[$id] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s", + array(bigintval($id)), __FILE__, __LINE__)); } // Prepare data for the template @@ -166,8 +164,8 @@ case "MEMBERS": // Statistics about your members case "MODULES": // TOP10 module clicks $AND = ""; if (!IS_ADMIN()) $AND = " AND locked='N' AND visible='Y'"; - $guest_t10 = SQL_QUERY("SELECT counter, title FROM `"._MYSQL_PREFIX."_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__); - $mem_t10 = SQL_QUERY("SELECT counter, title FROM `"._MYSQL_PREFIX."_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__); + $guest_t10 = SQL_QUERY("SELECT counter, title FROM `{!MYSQL_PREFIX!}_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__); + $mem_t10 = SQL_QUERY("SELECT counter, title FROM `{!MYSQL_PREFIX!}_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__); if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) { // Output header diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index fe843213db..151f60057f 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -108,9 +108,9 @@ SELECT DISTINCT (SUM(p.points) - d.used_points) AS tpoints, d.last_online FROM - `"._MYSQL_PREFIX."_user_data` AS d + `{!MYSQL_PREFIX!}_user_data` AS d LEFT JOIN - "._MYSQL_PREFIX."_user_points AS p + {!MYSQL_PREFIX!}_user_points AS p ON p.userid=d.userid WHERE @@ -174,9 +174,9 @@ SELECT DISTINCT SUM(r.counter) AS refs, d.last_online FROM - `"._MYSQL_PREFIX."_user_data` AS d + `{!MYSQL_PREFIX!}_user_data` AS d LEFT JOIN - "._MYSQL_PREFIX."_refsystem AS r + {!MYSQL_PREFIX!}_refsystem AS r ON r.userid=d.userid WHERE diff --git a/inc/modules/guest/what-welcome.php b/inc/modules/guest/what-welcome.php index fe2a7e9b85..99c81229dd 100644 --- a/inc/modules/guest/what-welcome.php +++ b/inc/modules/guest/what-welcome.php @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { ADD_DESCR("guest", __FILE__); // Count referal levels -$result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_refdepths WHERE level>0", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_refdepths` WHERE level>0", __FILE__, __LINE__); // Fetch rows list($cnt) = SQL_FETCHROW($result); diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index 1135235c6a..0eecb59927 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -48,7 +48,7 @@ if (defined('__THEME_SELECTION_CONTENT')) return false; // Load all active designs (or all if admin) $whereStatement = ""; $OUT = ""; if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'"; -$result_themes = SQL_QUERY("SELECT theme_path FROM `"._MYSQL_PREFIX."_themes`".$whereStatement, __FILE__, __LINE__); +$result_themes = SQL_QUERY("SELECT theme_path FROM `{!MYSQL_PREFIX!}_themes`".$whereStatement, __FILE__, __LINE__); $num_themes = SQL_NUMROWS($result_themes); if ($num_themes > 1) { diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index bf048dcac0..16df22b6d3 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -59,7 +59,7 @@ if (EXT_IS_ACTIVE("nickname")) // Run SQL command $result = SQL_QUERY_ESC("SELECT ".$data.", beg_clicks -FROM `"._MYSQL_PREFIX."_user_data` +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); list($uid, $clicks) = SQL_FETCHROW($result); diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 116fd821d0..d1da6a6af2 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -54,7 +54,7 @@ if (EXT_IS_ACTIVE("autopurge")) { } // Let's check if there are some points left we can "pay"... -$result = SQL_QUERY_ESC("SELECT userid, beg_points AS beg, last_online FROM "._MYSQL_PREFIX."_user_data +$result = SQL_QUERY_ESC("SELECT userid, beg_points AS beg, last_online FROM `{!MYSQL_PREFIX!}_user_data` WHERE beg_points > 0 AND status='CONFIRMED'".$LAST." ORDER BY beg_points DESC, last_online DESC, userid LIMIT %s", array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__); diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index 13f45b08d5..2b133c5ebc 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -71,7 +71,7 @@ if (EXT_IS_ACTIVE("autopurge")) { } // Let's check if there are some points left we can "pay"... -$result = SQL_QUERY_ESC("SELECT userid, ".$USE." AS points, last_online FROM "._MYSQL_PREFIX."_user_data +$result = SQL_QUERY_ESC("SELECT userid, ".$USE." AS points, last_online FROM `{!MYSQL_PREFIX!}_user_data` WHERE ".$USE." > 0 AND status='CONFIRMED'".$LAST." ORDER BY points DESC, last_online DESC, userid LIMIT %s", diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 796eb90adf..e62396e54b 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -46,7 +46,7 @@ $UID = $GLOBALS['userid']; $whereStatement = " WHERE visible='Y'"; if (IS_ADMIN()) $whereStatement = ""; -$result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT id, cat FROM `{!MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY sort", __FILE__, __LINE__); $cats = SQL_NUMROWS($result); if ($cats > 0) @@ -73,12 +73,12 @@ if ($cats > 0) { case "Y": $sql = ""; - $result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s AND cat_id=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1", array($UID, bigintval($cat)), __FILE__, __LINE__); if (SQL_NUMROWS($result_user) == 0) { - $sql = "INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES ('%s','%s')"; + $sql = "INSERT INTO `{!MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES ('%s','%s')"; } else { @@ -88,7 +88,7 @@ if ($cats > 0) break; case "N": - $sql = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s AND cat_id=%s LIMIT 1"; + $sql = "DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1"; break; } if (!empty($sql)) @@ -121,7 +121,7 @@ if ($cats > 0) $JOINED_N = " checked=\"checked\""; $JOINED_Y = ""; // Check category selection - $result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s AND cat_id=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1", array($UID, bigintval($id)), __FILE__, __LINE__); // When we found an entry don't read it, just change the JOINED_x variables diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index d9bf8ba0b2..d616a78fde 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -46,11 +46,11 @@ if (!defined('__SECURITY')) { ADD_DESCR("member", __FILE__); // Check for running mail orders in pool -$result1 = SQL_QUERY_ESC("SELECT timestamp FROM "._MYSQL_PREFIX."_pool +$result1 = SQL_QUERY_ESC("SELECT timestamp FROM `{!MYSQL_PREFIX!}_pool` WHERE sender=%s ORDER BY timestamp DESC LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Check for sent mail orders in stats -$result2 = SQL_QUERY_ESC("SELECT timestamp_ordered FROM "._MYSQL_PREFIX."_user_stats +$result2 = SQL_QUERY_ESC("SELECT timestamp_ordered FROM `{!MYSQL_PREFIX!}_user_stats` WHERE userid=%s ORDER BY timestamp_ordered DESC LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) @@ -104,11 +104,11 @@ if (isset($_POST['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')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_holidays` (userid, holiday_start, holiday_end, comments) VALUES ('%s','%s','%s','%s')", array($GLOBALS['userid'], $START, $END, $_POST['comments']), __FILE__, __LINE__); // Activate holiday system - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET holiday_active='N', holiday_activated=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -129,7 +129,7 @@ WHERE userid=%s LIMIT 1", SEND_ADMIN_NOTIFICATION(HOLIDAY_ADMIN_SUBJECT, "admin_holiday_request", $_POST['comments'], $GLOBALS['userid']); // Create task - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','%s','%s', UNIX_TIMESTAMP())", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','%s','%s', UNIX_TIMESTAMP())", array($GLOBALS['userid'], HOLIDAY_ADMIN_SUBJECT, $msg), __FILE__, __LINE__); // Display message @@ -141,7 +141,7 @@ WHERE userid=%s LIMIT 1", if (isset($_POST['stop'])) { // Okay, end the holiday here... - $result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM "._MYSQL_PREFIX."_user_data + $result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($active, $locked) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -149,7 +149,7 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (($active == "Y") && (($locked + getConfig('holiday_lock')) < time())) { // Load data - $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM "._MYSQL_PREFIX."_user_holidays + $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -162,12 +162,12 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); define('__HOLIDAY_END' , MAKE_DATETIME($end , "3")); // Deactivate it now - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET holiday_active='N', holiday_activated='0' WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Remove entry - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Send email to admin @@ -193,7 +193,7 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if ((!isset($_POST['ok'])) && (!isset($_POST['stop']))) { // Check if user is in holiday... - $result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM "._MYSQL_PREFIX."_user_data + $result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($active, $locked) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -206,7 +206,7 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); { case "Y": // Display deactivation form // Load starting and ending date - $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM "._MYSQL_PREFIX."_user_holidays + $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -228,7 +228,7 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); SQL_FREERESULT($result); // Remove entry and reload URL - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET holiday_active='N' WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); LOAD_URL("modules.php?module=login&what=holiday"); diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index c847867ca1..e82f71705e 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -49,14 +49,14 @@ ADD_DESCR("member", __FILE__); if (isset($_POST['ok'])) { // Save settings - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET html='%s' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET html='%s' WHERE userid=%s LIMIT 1", array($_POST['html'], $GLOBALS['userid']), __FILE__, __LINE__); LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SETTINGS_SAVED); } else { // Load template for changing settings - $result = SQL_QUERY_ESC("SELECT html FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT html FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($mode) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index df2c5a3fca..64d7f85679 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -59,13 +59,13 @@ case "show": // Show his data if (EXT_IS_ACTIVE("country", true)) { // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(UID_VALUE), __FILE__, __LINE__); } else { // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(UID_VALUE), __FILE__, __LINE__); } $DATA = SQL_FETCHROW($result); @@ -108,12 +108,12 @@ case "edit": // Edit data if (EXT_IS_ACTIVE("country", true)) { // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update -FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(UID_VALUE), __FILE__, __LINE__); } else { // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update -FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(UID_VALUE), __FILE__, __LINE__); } @@ -182,7 +182,7 @@ FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", define('__COUNTRY_CONTENT', $OUT); } else { // Ouput default input box - define('__COUNTRY_CONTENT', ""); + define('__COUNTRY_CONTENT', ""); } // Load template @@ -192,7 +192,7 @@ FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", case "save": // Save entered data // Load old email / password: 0 1 2 - $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(UID_VALUE), __FILE__, __LINE__); $DATA = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -229,7 +229,7 @@ case "save": // Save entered data if (EXT_IS_ACTIVE("country")) { // New way - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET gender='%s', surname='%s', family='%s', street_nr='%s', country_code=%s, zip=%s, city='%s', @@ -260,7 +260,7 @@ array( else { // Old way - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET gender='%s', surname='%s', family='%s', street_nr='%s', country='%s', zip=%s, city='%s', @@ -304,7 +304,7 @@ array( break; case "notify": // Switch off notfication - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); $URL = "modules.php?module=login&what=welcome&msg=".urlencode(PROFILE_UPDATED); break; diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index 07baf13a77..7789941813 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { ADD_DESCR("member", __FILE__); // Load status -$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", +$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($status, $until, $span) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -57,14 +57,14 @@ define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('nl_charge'))); if ((isset($_POST['ok'])) && ($status == "Y") && ($span == "0")) { // Save request - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Load admin message $admin_msg = LOAD_EMAIL_TEMPLATE("admin_newsletter_request", array(), $GLOBALS['userid']); // Add task - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, status, task_type, subject, text, task_created, userid) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (assigned_admin, status, task_type, subject, text, task_created, userid) VALUES ('0','NEW','NL_UNSUBSCRIBE','".ADMIN_NL_SUBJECT."','".$admin_msg."', UNIX_TIMESTAMP(),'%s')", array($GLOBALS['userid']), __FILE__, __LINE__); // Send mail to member diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 272938728a..5297de5ad1 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -60,11 +60,11 @@ if (isset($_POST['ok'])) { if ($VALID) { // 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", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND userid != '%s' LIMIT 1", array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Nickname not in use, so set it now - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1", array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__); $content = NICKNAME_SAVED; } else { diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 44865bb679..5cf3a25bec 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -69,7 +69,7 @@ if (GET_EXT_VERSION("holiday") >= "0.1.3") { } // END - if $result_mmails = SQL_QUERY_ESC("SELECT userid, receive_mails, mail_orders, ".$HOLIDAY." -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND max_mails > 0 LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -92,7 +92,7 @@ if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) { // // First we would like to store the data and get it's pool position back... $result = SQL_QUERY_ESC("SELECT id, data_type -FROM "._MYSQL_PREFIX."_pool +FROM `{!MYSQL_PREFIX!}_pool` WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", array($GLOBALS['userid'], $_POST['url'], getConfig('url_tlock')), __FILE__, __LINE__); @@ -139,7 +139,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", // And shall I check that his URL is not in the black list? if (getConfig('url_blacklist') == "Y") { // 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", + $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{!MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1", array($_POST['url']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -195,8 +195,8 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", } // END - if // Check for userids - $result = SQL_QUERY_ESC("SELECT DISTINCT c.userid FROM "._MYSQL_PREFIX."_user_cats AS c -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d + $result = SQL_QUERY_ESC("SELECT DISTINCT c.userid FROM `{!MYSQL_PREFIX!}_user_cats` AS c +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON c.userid=d.userid WHERE c.cat_id=%s AND c.userid != '%s' AND d.status='CONFIRMED' AND d.receive_mails > 0".$ADD." ORDER BY d.%s %s", @@ -221,7 +221,7 @@ ORDER BY d.%s %s", while (list($REC) = SQL_FETCHROW($result)) { if ($HOLIDAY) { // Check for his holiday status - $result_holiday = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_holidays + $result_holiday = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP() LIMIT 1", array(bigintval($REC)), __FILE__, __LINE__); if (SQL_NUMROWS($result_holiday) == 1) $REC = 0; // Exclude user who are in holiday @@ -247,7 +247,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME $MAX_SEND = count($TEST); // Update receiver list - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s", array(str_replace(";", ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it @@ -268,7 +268,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME $id = 0; if (EXT_IS_ACTIVE("html_mail")) { // HTML extension is active - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_pool (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg) VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s','%s')", array( $GLOBALS['userid'], @@ -285,7 +285,7 @@ array( ), __FILE__, __LINE__); } else { // No HTML extension is active - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_pool (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip) VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s')", array( $GLOBALS['userid'], @@ -304,7 +304,7 @@ array( // Change current order if (EXT_IS_ACTIVE("html_mail")) { // HTML extension is active - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET subject='%s', text='%s', receivers='%s', @@ -330,7 +330,7 @@ array( ), __FILE__, __LINE__); } else { // No HTML extension is active - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET subject='%s', text='%s', receivers='%s', @@ -358,7 +358,7 @@ array( // Do we need to get the ID number? if ($id == 0) { // Order is placed as temporary. We need to get it's id for the frametester - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE sender=%s AND subject='%s' AND payment_id=%s AND data_type='TEMP' AND timestamp=%s 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=%s LIMIT 1", array( $GLOBALS['userid'], $_POST['subject'], @@ -392,7 +392,7 @@ array( LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_ORDER_ALLOWED_EXHAUSTED); } elseif (($links < getConfig('unconfirmed')) && ($mmails == "1")) { // Display order form - $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__); + $result_cats = SQL_QUERY("SELECT id, cat FROM `{!MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result_cats) > 0) { if ($TOTAL > 0) { // Initialize array... @@ -416,7 +416,7 @@ array( $CATS['name'][] = $cat; // Select users in current category - $result_uids = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s AND userid != '%s' ORDER BY userid", + $result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s AND userid != '%s' ORDER BY userid", array(bigintval($id), $GLOBALS['userid']), __FILE__, __LINE__); $uid_cnt = 0; @@ -425,8 +425,8 @@ array( $HOL_ACTIVE = false; if ($HOLIDAY) { // Check user's holiday status - $result_holiday = SQL_QUERY_ESC("SELECT DISTINCT d.userid FROM `"._MYSQL_PREFIX."_user_data` AS d -LEFT JOIN "._MYSQL_PREFIX."_user_holidays AS h + $result_holiday = SQL_QUERY_ESC("SELECT DISTINCT d.userid FROM `{!MYSQL_PREFIX!}_user_data` AS d +LEFT JOIN `{!MYSQL_PREFIX!}_user_holidays` AS h ON d.userid=h.userid WHERE d.userid=%s AND d.receive_mails > 0 AND d.status='CONFIRMED' AND d.holiday_active='Y' AND h.holiday_start < UNIX_TIMESTAMP() AND h.holiday_end > UNIX_TIMESTAMP() @@ -442,7 +442,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); if (!$HOL_ACTIVE) { // Check if the user want's to receive mails? - $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", + $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($ucat)), __FILE__, __LINE__); if ((SQL_NUMROWS($result_ver) == 1) && (!empty($_POST['zip'])) && (getConfig('order_multi_page') == "Y")) { @@ -468,7 +468,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); SQL_FREERESULT($result_cats); // Now we need to load the mail types... - $result = SQL_QUERY("SELECT id, price, payment, mail_title FROM "._MYSQL_PREFIX."_payments ORDER BY payment", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, price, payment, mail_title FROM `{!MYSQL_PREFIX!}_payments` ORDER BY payment", __FILE__, __LINE__); $typeS = array(); if (SQL_NUMROWS($result) > 0) { @@ -477,7 +477,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); switch ($_GET['msg']) { case CODE_URL_TLOCK: - $result = SQL_QUERY_ESC("SELECT timestamp FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array(bigintval($_GET['id'])), __FILE__, __LINE__); // Load timestamp from last order @@ -595,7 +595,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $OLD_ORDER = false; $subject = ""; $text = ""; $target = ""; // Check if we already have an order placed and make it editable - $result = SQL_QUERY_ESC("SELECT subject, text, payment_id, timestamp, url, target_send, cat_id, zip FROM "._MYSQL_PREFIX."_pool WHERE sender=%s AND data_type='TEMP' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT subject, text, payment_id, timestamp, url, target_send, cat_id, zip FROM `{!MYSQL_PREFIX!}_pool` WHERE sender=%s AND data_type='TEMP' LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -658,7 +658,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE("member_order-html_ext", true, HTML_ADD_VALID_TAGS())); } else { // Extension not active and/or class not uploaded - define('MEMBER_HTML_EXTENSION', ""); + define('MEMBER_HTML_EXTENSION', ""); } // Output form for page 2 @@ -672,7 +672,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE("member_order-html_intro", true)); } else { // No HTML extension installed - define('MEMBER_HTML_EXTENSION', ""); + define('MEMBER_HTML_EXTENSION', ""); } // Do we want ZIP code or not? diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 0aebb866e3..d8d9af5369 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -47,11 +47,11 @@ if (!defined('__SECURITY')) { // Add description as navigation point ADD_DESCR("member", __FILE__); -$result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__); +$result_depths = SQL_QUERY("SELECT level, percents FROM `{!MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__); $TPTS = 0; while (list($lvl, $per) = SQL_FETCHROW($result_depths)) { // Load referal points - $result_points = SQL_QUERY_ESC("SELECT points FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s AND ref_depth=%d LIMIT 1", + $result_points = SQL_QUERY_ESC("SELECT points FROM `{!_MYSQL_PREFIX_user_points!}` WHERE userid=%s AND ref_depth=%d LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__); // Entry found? @@ -83,7 +83,7 @@ if (empty($_GET['payout'])) { // Load payout types $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points, allow_url -FROM "._MYSQL_PREFIX."_payout_types +FROM `{!MYSQL_PREFIX!}_payout_types` WHERE %s >= min_points ORDER BY type", array(REVERT_COMMA($TPTS)), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) @@ -93,8 +93,8 @@ ORDER BY type", array(REVERT_COMMA($TPTS)), __FILE__, __LINE__); // Check for his payouts $result_payouts = SQL_QUERY_ESC("SELECT DISTINCT p.id, p.payout_total, p.target_account, p.target_bank, t.type, p.payout_timestamp, p.status, t.allow_url AS allow, p.target_url AS url, p.link_text AS alt, p.banner_url AS bannerm -FROM "._MYSQL_PREFIX."_user_payouts AS p -LEFT JOIN "._MYSQL_PREFIX."_payout_types AS t +FROM `{!MYSQL_PREFIX!}_user_payouts` AS p +LEFT JOIN `{!MYSQL_PREFIX!}_payout_types` AS t ON p.payout_id = t.id WHERE p.userid = %s ORDER BY p.payout_timestamp DESC", @@ -116,7 +116,7 @@ ORDER BY p.payout_timestamp DESC", if (!empty($banner)) { // Banner - $account = "\"".$alt."\""; + $account = "\"".$alt."\""; } else { @@ -163,7 +163,7 @@ ORDER BY p.payout_timestamp DESC", else { // Chedk if he can get paid by selected type - $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{!MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1", array(bigintval($_GET['payout'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) @@ -202,7 +202,7 @@ ORDER BY p.payout_timestamp DESC", if ($allow == "Y") { // Banner/textlink ordered - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_payouts (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_payouts` (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url) VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')", array( $GLOBALS['userid'], @@ -227,7 +227,7 @@ VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')", else { // e-currency payout requested - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_payouts (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_payouts` (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password) VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", array( $GLOBALS['userid'], @@ -249,7 +249,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", } // Generate task - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, status, task_type, subject, text, task_created, userid) + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (assigned_admin, status, task_type, subject, text, task_created, userid) VALUES (0, 'NEW','PAYOUT_REQUEST','[payout:] ".PAYOUT_REQUEST_ADMIN."','%s', UNIX_TIMESTAMP(), %s)", array( $msg_adm, diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 465e377ca5..648116e4db 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { // Add description as navigation point ADD_DESCR("member", __FILE__); -$result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__); +$result_depths = SQL_QUERY("SELECT level, percents FROM `{!MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__); $depths = SQL_NUMROWS($result_depths); // Add many more rows for the login/turbo/ref/order bonus @@ -62,7 +62,7 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) { $REFS = 0; // Load referal points - $result_points = SQL_QUERY_ESC("SELECT points, locked_points FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s AND ref_depth=%d LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__); + $result_points = SQL_QUERY_ESC("SELECT points, locked_points FROM `{!MYSQL_PREFIX!}_user_points` WHERE userid=%s AND ref_depth=%d LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__); if (SQL_NUMROWS($result_points) == 1) { list($points, $locked) = SQL_FETCHROW($result_points); SQL_FREERESULT($result_points); @@ -73,7 +73,7 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) { } // Load referal counts - $result_refs = SQL_QUERY_ESC("SELECT counter FROM "._MYSQL_PREFIX."_refsystem WHERE userid=%s AND level='%s' LIMIT 1", + $result_refs = SQL_QUERY_ESC("SELECT counter FROM `{!MYSQL_PREFIX!}_refsystem` WHERE userid=%s AND level='%s' LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__); if (SQL_NUMROWS($result_refs) == 1) { list($REFS) = SQL_FETCHROW($result_refs); @@ -101,7 +101,7 @@ SQL_FREERESULT($result_depths); // Put rows to constant for the main template define('__REF_LEVEL_ROWS', $OUT); -$result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", +$result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($USED, $PAY) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -115,7 +115,7 @@ if (GET_EXT_VERSION("user") >= "0.1.2") { if (GET_EXT_VERSION("user") >= "0.1.4") { $ADD = ", emails_sent, emails_received"; } - $result = SQL_QUERY_ESC("SELECT mails_confirmed".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT mails_confirmed".$ADD." FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($CONFIRMED, $SENT, $RECEIVED) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -145,7 +145,7 @@ if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && (getCon if (GET_EXT_VERSION("bonus") >= "0.4.4") $ADD = ", bonus_ref, bonus_order, bonus_stats"; // Load data - $result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$ADD." FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // We don't add this points now. This will be done after each month diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 7abf34c076..38c4e95ba7 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -63,7 +63,7 @@ if (!isset($_GET['mode'])) { $content['refid'] = bigintval(getConfig('primera_refid')); // Get Primus id - $result = SQL_QUERY_ESC("SELECT primera_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Are there some entries? @@ -81,7 +81,7 @@ if (!isset($_GET['mode'])) { $_GET['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", + $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", array($GLOBALS['userid']), __FILE__, __LINE__); // Load all rows @@ -133,7 +133,7 @@ if ($_GET['mode'] == "pay") { // Get Primera id $content['primera_nickname'] = ""; - $result = SQL_QUERY_ESC("SELECT primera_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Are there some entries? @@ -197,7 +197,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { SUB_POINTS("primera_payout", $GLOBALS['userid'], $_POST['amount']); // Update primera nickname - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1", array($_POST['primera_nickname'], $GLOBALS['userid']), __FILE__, __LINE__); // All done! diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 673401e1c4..47f67fc61f 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -51,7 +51,7 @@ OUTPUT_HTML("
    "); $ADMIN = " AND d.is_active='Y'"; if (IS_ADMIN()) $ADMIN = ""; $result = SQL_QUERY("SELECT DISTINCT d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices - FROM "._MYSQL_PREFIX."_rallye_data AS d, "._MYSQL_PREFIX."_admins AS a + FROM `{!MYSQL_PREFIX!}_rallye_data` AS d, `{!MYSQL_PREFIX!}_admins` AS a WHERE d.admin_id=a.id".$ADMIN." AND d.notified='Y' ORDER BY d.end_time LIMIT 1", __FILE__, __LINE__); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 2a30ff392a..014e8f5f0f 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -100,7 +100,7 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) { // Load all referal levels $result = SQL_QUERY_ESC("SELECT r.level, r.percents -FROM "._MYSQL_PREFIX."_refdepths AS r +FROM `{!MYSQL_PREFIX!}_refdepths` AS r WHERE r.level > 0 ORDER BY r.level ASC", array($GLOBALS['userid']), __FILE__, __LINE__); diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php index bb9fe814be..f597c457fd 100644 --- a/inc/modules/member/what-reflinks.php +++ b/inc/modules/member/what-reflinks.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { ADD_DESCR("member", __FILE__); // Load current referal clicks -$result = SQL_QUERY_ESC("SELECT ref_clicks FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", +$result = SQL_QUERY_ESC("SELECT ref_clicks FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($c) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -72,7 +72,7 @@ if (EXT_IS_ACTIVE("nickname")) { OUTPUT_HTML(YOUR_REFCLICKS.": ".$c." ".CLICKS."


    "); $whereStatement = " WHERE visible='Y'"; if (IS_ADMIN()) $whereStatement = ""; -$result = SQL_QUERY("SELECT id, url, alternate, counter, clicks FROM "._MYSQL_PREFIX."_refbanner", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT id, url, alternate, counter, clicks FROM `{!MYSQL_PREFIX!}_refbanner`", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List available ref banners diff --git a/inc/modules/member/what-reflist.php b/inc/modules/member/what-reflist.php index 57b8362046..dbede43df8 100644 --- a/inc/modules/member/what-reflist.php +++ b/inc/modules/member/what-reflist.php @@ -45,7 +45,7 @@ ADD_DESCR("member", __FILE__); // Load all referal levels $result = SQL_QUERY_ESC("SELECT r.level, r.percents -FROM "._MYSQL_PREFIX."_refdepths AS r +FROM `{!MYSQL_PREFIX!}_refdepths` AS r WHERE r.level > 0 ORDER BY r.level ASC", array($GLOBALS['userid']), __FILE__, __LINE__); diff --git a/inc/modules/member/what-stats.php b/inc/modules/member/what-stats.php index b78419c8df..1b76b8fd27 100644 --- a/inc/modules/member/what-stats.php +++ b/inc/modules/member/what-stats.php @@ -47,7 +47,7 @@ $main_content = array(); // Load waiting/pending orders $result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp, target_send, data_type, zip -FROM "._MYSQL_PREFIX."_pool +FROM `{!MYSQL_PREFIX!}_pool` WHERE sender=%s AND data_type != 'SEND' ORDER BY timestamp DESC", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -94,7 +94,7 @@ SQL_FREERESULT($result); // Load sent orders // 0 1 2 3 4 5 6 7 8 $result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp_ordered, max_rec, timestamp_send, clicks -FROM "._MYSQL_PREFIX."_user_stats +FROM `{!MYSQL_PREFIX!}_user_stats` WHERE userid=%s ORDER BY timestamp_ordered DESC", array($GLOBALS['userid']), __FILE__, __LINE__); diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 904d67393f..f4bb2318f0 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -71,7 +71,7 @@ if ((!isset($_POST['ok'])) || (empty($_POST['qsummary']))) { SEND_EMAIL($GLOBALS['userid'], $subj_m, $msg_m); // Drop a message in the admin's area - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())", array($GLOBALS['userid'], $subj_a, $_POST['qsummary'].":".array('text' => $_POST['qdetails'])), __FILE__, __LINE__); // Form sent diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 745ccf26ed..6abebb41fd 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -47,7 +47,7 @@ ADD_DESCR("member", __FILE__); if (!empty($_POST['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", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1", array($_POST['member_theme'], $GLOBALS['userid']), __FILE__, __LINE__); // Set new theme for guests @@ -105,7 +105,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { // Add row $OUT .= "
    @@ -456,7 +456,7 @@ array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); LOAD_TEMPLATE("member_transfer_list"); // At the end we don't need a temporary table in memory - $result = SQL_QUERY("DROP TABLE IF EXISTS "._MYSQL_PREFIX."_transfers_tmp", __FILE__, __LINE__); + $result = SQL_QUERY("DROP TABLE IF EXISTS `{!MYSQL_PREFIX!}_transfers_tmp`", __FILE__, __LINE__); // Free some memory... SQL_FREERESULT($result); @@ -464,7 +464,7 @@ array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); case "": // Overview page // Check incoming transfers - $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_user_transfers_in WHERE userid=%s", array($GLOBALS['userid']), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s", array($GLOBALS['userid']), __FILE__, __LINE__); list($dmy) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -476,7 +476,7 @@ case "": // Overview page } // Check outgoing transfers - $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_user_transfers_out WHERE userid=%s", array($GLOBALS['userid']), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s", array($GLOBALS['userid']), __FILE__, __LINE__); list($dmy) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -496,7 +496,7 @@ case "": // Overview page if (isset($_POST['ok'])) { // Save settings - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1", array($_POST['opt_in'], $GLOBALS['userid']), __FILE__, __LINE__); // Rember for next switch() command @@ -523,7 +523,7 @@ case "": // Overview page // Check for latest out-transfers $result = SQL_QUERY_ESC("SELECT time_trans -FROM "._MYSQL_PREFIX."_user_transfers_out +FROM `{!MYSQL_PREFIX!}_user_transfers_out` WHERE time_trans > (UNIX_TIMESTAMP() - %s) AND userid=%s ORDER BY time_trans DESC LIMIT 1", array(getConfig('transfer_timeout'), $GLOBALS['userid']), __FILE__, __LINE__); diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index e24ad158ad..3728a410aa 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -48,7 +48,7 @@ ADD_DESCR("member", __FILE__); if ((isset($_GET['bonusid'])) && (EXT_IS_ACTIVE("bonus"))) { // Display bonus mail by loading it's full data $result_data = SQL_QUERY_ESC("SELECT id, subject, timestamp, cat_id, points, text, is_notify, data_type, time, url -FROM "._MYSQL_PREFIX."_bonus +FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", array(bigintval($_GET['bonusid'])), __FILE__, __LINE__); @@ -79,10 +79,10 @@ WHERE id=%s LIMIT 1", } elseif (isset($_GET['mailid'])) { // Display regular member mail by loading its full data $result_data = SQL_QUERY_ESC("SELECT s.id, s.subject, p.text, s.timestamp_ordered AS `timestamp`, s.cat_id, pay.price AS points, p.sender, pay.time, p.data_type -FROM "._MYSQL_PREFIX."_user_stats AS s -LEFT JOIN "._MYSQL_PREFIX."_pool AS p +FROM `{!MYSQL_PREFIX!}_user_stats` AS s +LEFT JOIN `{!MYSQL_PREFIX!}_pool` AS p ON s.pool_id=p.id -LEFT JOIN "._MYSQL_PREFIX."_payments AS pay +LEFT JOIN `{!MYSQL_PREFIX!}_payments` AS pay ON p.payment_id=pay.id WHERE s.id=%s LIMIT 1", array(bigintval($_GET['mailid'])), __FILE__, __LINE__); @@ -113,11 +113,11 @@ WHERE s.id=%s LIMIT 1", if (EXT_IS_ACTIVE("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 bonus_id DESC, stats_id DESC", + $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY bonus_id DESC, stats_id DESC", array($GLOBALS['userid']), __FILE__, __LINE__); } else { // Don't load bonus ID - $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s ORDER BY stats_id DESC", + $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY stats_id DESC", array($GLOBALS['userid']), __FILE__, __LINE__); } @@ -132,8 +132,8 @@ if (SQL_NUMROWS($result) > 0) { { case "NORMAL": $result_data = SQL_QUERY_ESC("SELECT s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender -FROM "._MYSQL_PREFIX."_user_stats AS s -LEFT JOIN "._MYSQL_PREFIX."_pool AS p +FROM `{!MYSQL_PREFIX!}_user_stats` AS s +LEFT JOIN `{!MYSQL_PREFIX!}_pool` AS p ON s.pool_id=p.id WHERE s.id=%s LIMIT 1", @@ -142,7 +142,7 @@ LIMIT 1", break; case "BONUS": - $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", array(bigintval($id2)), __FILE__, __LINE__); $type = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM; break; diff --git a/inc/modules/member/what-welcome.php b/inc/modules/member/what-welcome.php index 005babea71..127da07de6 100644 --- a/inc/modules/member/what-welcome.php +++ b/inc/modules/member/what-welcome.php @@ -50,7 +50,7 @@ define('_LAST_MODULE_VALUE', GET_MOD_DESCR("member", $LAST['module'])); LOAD_TEMPLATE("member_welcome_header"); // Chedk if he is returning from a profile update notification -$result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE notified='Y' AND userid=%s LIMIT 1", +$result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE notified='Y' AND userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("profile"))) { diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index c66b29d414..d9ead54bdf 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -63,7 +63,7 @@ if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) { $content['wds66_id'] = 0; // Get WDS66 id - $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Are there some entries? @@ -81,7 +81,7 @@ if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) { $_GET['mode'] = "list"; // And load all rows! - $result = SQL_QUERY_ESC("SELECT `id`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type` FROM "._MYSQL_PREFIX."_user_wernis WHERE `userid` = %s ORDER BY `wernis_timestamp` DESC", + $result = SQL_QUERY_ESC("SELECT `id`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type` FROM `{!MYSQL_PREFIX!}_user_wernis` WHERE `userid` = %s ORDER BY `wernis_timestamp` DESC", array($GLOBALS['userid']), __FILE__, __LINE__); // Load all rows @@ -154,7 +154,7 @@ if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) { // Get WDS66 id $content['wds66_id'] = ""; - $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Are there some entries? @@ -178,7 +178,7 @@ if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) { WERNIS_ADD_FEES_TO_ARRAY($content); // Get WDS66 id - $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Are there some entries? @@ -235,7 +235,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { ADD_POINTS_REFSYSTEM("wernis_withdraw", $GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct"); // Update the user data as well.. - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__); // All done! @@ -270,7 +270,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { SUB_POINTS("wernis_payout", $GLOBALS['userid'], $_POST['amount']); // Update WDS66 id - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__); // All done! diff --git a/inc/modules/order.php b/inc/modules/order.php index db72794c44..399efd48a4 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -63,19 +63,19 @@ if (empty($URL)) { } // Update sending pool - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='%s' WHERE id=%s AND sender=%s AND data_type='TEMP' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='%s' WHERE id=%s AND sender=%s AND data_type='TEMP' LIMIT 1", array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__); // Finally is the entry valid? if (SQL_AFFECTEDROWS() == 1) { // Load personal data... - $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($gender, $sname, $fname, $email) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Load mail again... 0 1 2 3 4 5 6 7 - $result = SQL_QUERY_ESC("SELECT subject, text, receivers, payment_id, timestamp, url, cat_id, target_send FROM "._MYSQL_PREFIX."_pool WHERE id=%s AND sender=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT subject, text, receivers, payment_id, timestamp, url, cat_id, target_send FROM `{!MYSQL_PREFIX!}_pool` WHERE id=%s AND sender=%s LIMIT 1", array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__); $DATA = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index d13ff959c8..35bbe9b8c4 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -48,7 +48,7 @@ $result = SQL_QUERY_ESC("SELECT company, position, tax_ident, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, status, receive_warnings -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' AND password='%s' LIMIT 1", array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index 7b846b9a8f..79db1ecb61 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { // Data for the formular $result = SQL_QUERY_ESC("SELECT status, receive_warnings, warning_interval, email, surname, family, gender -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' AND password='%s' LIMIT 1", array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { diff --git a/inc/modules/sponsor/welcome.php b/inc/modules/sponsor/welcome.php index f836205809..fc4db713f5 100644 --- a/inc/modules/sponsor/welcome.php +++ b/inc/modules/sponsor/welcome.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { // Load some data $result = SQL_QUERY_ESC("SELECT gender, surname, family, (points_amount - points_used) AS points -FROM `"._MYSQL_PREFIX."_sponsor_data` +FROM `{!MYSQL_PREFIX!}_sponsor_data` WHERE id='%s' AND password='%s' LIMIT 1", array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__); list($gender, $surname, $family, $points) = SQL_FETCHROW($result); diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index 237c5917b6..c11b477238 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -69,7 +69,7 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC // SQL string to check for accounts $result_main = SQL_QUERY_ESC("SELECT userid, email, gender, surname, family, beg_points AS points -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED'".$whereStatement1." AND beg_points > 0 ORDER BY beg_points DESC, userid LIMIT %s", @@ -91,7 +91,7 @@ LIMIT %s", } // END - while // Reset accounts - $result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=0.00000 WHERE beg_points > 0", __FILE__, __LINE__); + $result = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_data` SET beg_points=0.00000 WHERE beg_points > 0", __FILE__, __LINE__); } // END - if // Free memory diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index c3440470b3..db93b58aee 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -76,7 +76,7 @@ if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($CS // Run SQL string to check for accounts $result_main = SQL_QUERY_ESC("SELECT userid, email, gender, surname, family, (0".$ADD.") AS points -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` ".$whereStatement1."".$ADD." ORDER BY points DESC, userid LIMIT %s", @@ -102,7 +102,7 @@ LIMIT %s", } // END - while // Reset accounts - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data + $result = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", __FILE__, __LINE__); } // END - if diff --git a/inc/monthly/monthly_newsletter.php b/inc/monthly/monthly_newsletter.php index 19172f1df1..8b88763479 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -48,12 +48,12 @@ $curr = date("m", time()); if (getConfig('last_month') != $curr) { // Check for unsubscribed members - $result = SQL_QUERY("SELECT userid, nl_until FROM `"._MYSQL_PREFIX."_user_data` WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT userid, nl_until FROM `{!MYSQL_PREFIX!}_user_data` WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Some unsubscriptions are found so we reset them to receive newsletters while(list($uid, $until) = SQL_FETCHROW($result)) { // Update account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_receive='Y', nl_until='0' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET nl_receive='Y', nl_until='0' WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); // Send email to him diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index d55eb38440..119fcc7ed5 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -53,7 +53,7 @@ function ADD_MODULE_TITLE($mod) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT title FROM `{!MYSQL_PREFIX!}_mod_reg` WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__); list($name) = SQL_FETCHROW($result); SQL_FREERESULT($result); } @@ -123,7 +123,7 @@ function CHECK_MODULE ($mod) { } } elseif (!EXT_IS_ACTIVE("cache")) { // Check for module in database - $result = SQL_QUERY_ESC("SELECT locked, hidden, admin_only, mem_only FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", array($mod_chk), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT locked, hidden, admin_only, mem_only FROM `{!MYSQL_PREFIX!}_mod_reg` WHERE module='%s' LIMIT 1", array($mod_chk), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Read data list($locked, $hidden, $admin, $mem) = SQL_FETCHROW($result); @@ -160,12 +160,12 @@ function CHECK_MODULE ($mod) { if (GET_EXT_VERSION("sql_patches") >= "0.3.6") { // Since 0.3.6 we have a has_menu column, this took me a half hour // to find a loop here... *sigh* - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_mod_reg` (module, locked, hidden, mem_only, admin_only, has_menu) VALUES ('%s','Y','N','N','N','N')", array($mod_chk), __FILE__, __LINE__); } else { // Wrong/missing sql_patches! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_mod_reg` (module, locked, hidden, mem_only, admin_only) VALUES ('%s','Y','N','N','N')", array($mod_chk), __FILE__, __LINE__); } @@ -279,7 +279,7 @@ function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) { } // END - i // Get the title from menu - $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_%s_menu WHERE %s='%s' ".$AND." LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' ".$AND." LIMIT 1", array($ACC_LVL, $type, $search), __FILE__, __LINE__); // Menu found? @@ -338,7 +338,7 @@ function ADD_MENU ($MODE, $act, $wht) { } // Load SQL data and add the menu to the output stream... - $result_main = SQL_QUERY_ESC("SELECT title, action FROM "._MYSQL_PREFIX."_%s_menu WHERE (what='' OR what IS NULL)".$AND." ORDER BY sort", + $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE (what='' OR what IS NULL)".$AND." ORDER BY sort", array($MODE), __FILE__, __LINE__); //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*
    \n"; if (SQL_NUMROWS($result_main) > 0) { @@ -358,7 +358,7 @@ function ADD_MENU ($MODE, $act, $wht) { // Load menu header template LOAD_TEMPLATE($MODE."_menu_title", false, $content); - $result_sub = SQL_QUERY_ESC("SELECT title, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ".$AND." ORDER BY sort", + $result_sub = SQL_QUERY_ESC("SELECT title, what FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ".$AND." ORDER BY sort", array($MODE, $main_action), __FILE__, __LINE__); $ctl = SQL_NUMROWS($result_sub); if ($ctl > 0) { @@ -469,7 +469,7 @@ function IS_ADMIN ($admin="") { $cacheArray['admin_hash'] = $valPass; } elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE("cache"))) || (!isset($cacheArray['admins']['password'][$admin]))) { // Search for admin - $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM `{!MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1", array($admin), __FILE__, __LINE__); // Is he admin? @@ -508,7 +508,7 @@ function ADD_MAX_RECEIVE_LIST($MODE, $default="", $return=false) { case "guest": // Guests (in the registration form) are not allowed to select 0 mails per day. - $result = SQL_QUERY("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE value > 0 ORDER BY value", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT value, comment FROM `{!MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { $OUT = ""; @@ -534,7 +534,7 @@ function ADD_MAX_RECEIVE_LIST($MODE, $default="", $return=false) case "member": // Members are allowed to set to zero mails per day (we will change this soon!) - $result = SQL_QUERY("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive ORDER BY value", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT value, comment FROM `{!MYSQL_PREFIX!}_max_receive` ORDER BY value", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { $OUT = ""; @@ -572,7 +572,7 @@ function ADD_MAX_RECEIVE_LIST($MODE, $default="", $return=false) function SEARCH_EMAIL_USERTAB($email) { $ret = false; - $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1", array($email), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1", array($email), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) $ret = true; SQL_FREERESULT($result); return $ret; @@ -588,7 +588,7 @@ function WHAT_IS_VALID($act, $wht, $type="guest") else { $ret = false; - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s' AND what='%s' AND locked='N' LIMIT 1", array($type, $act, $wht), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND what='%s' AND locked='N' LIMIT 1", array($type, $act, $wht), __FILE__, __LINE__); // Is "what" valid? if (SQL_NUMROWS($result) == 1) $ret = true; SQL_FREERESULT($result); @@ -613,7 +613,7 @@ function IS_MEMBER () { // Are cookies set? if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash'))) { // Cookies are set with values, but are they valid? - $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data from cookies @@ -667,15 +667,15 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) //* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*
    \n"; if (($MODE != "admin") && ($UPDATE)) { // Update guest or member menu - $SQL = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_%s_menu SET counter=counter+1 WHERE action='%s' AND what='%s'".$ADD." LIMIT 1", + $SQL = SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE action='%s' AND what='%s'".$ADD." LIMIT 1", array($MODE, $act, $wht), __FILE__, __LINE__, false); } elseif ($wht != "overview") { // Other actions - $SQL = SQL_QUERY_ESC("SELECT id, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s'".$ADD." ORDER BY action DESC LIMIT 1", + $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE action='%s'".$ADD." ORDER BY action DESC LIMIT 1", array($MODE, $act), __FILE__, __LINE__, false); } else { // Admin login overview - $SQL = SQL_QUERY_ESC("SELECT id, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s' AND (what='' OR what IS NULL)".$ADD." ORDER BY action DESC LIMIT 1", + $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND (what='' OR what IS NULL)".$ADD." ORDER BY action DESC LIMIT 1", array($MODE, $act), __FILE__, __LINE__, false); } @@ -711,7 +711,7 @@ function GET_MOD_DESCR($MODE, $wht, $column="what") $ret = "??? (".$wht.")"; // Look for title - $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_%s_menu WHERE %s='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT title FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1", array($MODE, $column, $wht), __FILE__, __LINE__); // Is there an entry? @@ -729,7 +729,7 @@ function SEND_MODE_MAILS($mod, $modes) { global $DATA; // Load hash - $result_main = SQL_QUERY_ESC("SELECT password FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result_main = SQL_QUERY_ESC("SELECT password FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load hash from database @@ -742,7 +742,7 @@ function SEND_MODE_MAILS($mod, $modes) { $hash = generatePassString($hashDB); if (($hash == get_session('u_hash')) || ($_POST['pass1'] == $_POST['pass2'])) { // Load user's data - $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND password='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND password='%s' LIMIT 1", array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load the data @@ -851,7 +851,7 @@ function SEND_MODE_MAILS($mod, $modes) { function COUNT_MODULE($mod) { if ($mod != "css") { // Do count all other modules but not accesses on CSS file css.php! - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET clicks=clicks+1 WHERE module='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET clicks=clicks+1 WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__); } // END - if } @@ -895,7 +895,7 @@ function GET_ACTION ($MODE, &$wht) { if (empty($ret)) $ret = "main"; // Load from database - $result = SQL_QUERY_ESC("SELECT action FROM "._MYSQL_PREFIX."_%s_menu WHERE what='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT action FROM `{!MYSQL_PREFIX!}_%s_menu` WHERE what='%s' LIMIT 1", array($MODE, $wht), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load action value and pray that this one is the right you want... ;-) @@ -924,7 +924,7 @@ function GET_CATEGORY ($cid) { $ret = _CATEGORY_NONE; } elseif ($cid > 0) { // Lookup the category in database - $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT cat FROM `{!MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1", array(bigintval($cid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Category found... :-) @@ -945,7 +945,7 @@ function GET_PAYMENT ($pid, $full=false) { $ret = _PAYMENT_404; // Load payment data - $result = SQL_QUERY_ESC("SELECT mail_title, price FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{!MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1", array(bigintval($pid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Payment type found... :-) @@ -970,7 +970,7 @@ function GET_PAYMENT ($pid, $full=false) { function GET_PAY_POINTS($pid, $lookFor="price") { $ret = "-1"; - $result = SQL_QUERY_ESC("SELECT %s FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT %s FROM `{!MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1", array($lookFor, $pid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -996,12 +996,12 @@ function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fa // Only when we got a real stats ID continue searching for the entry $type = "NORMAL"; $rowName = "stats_id"; if ($bonus) { $type = "BONUS"; $rowName = "bonus_id"; } - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE %s='%s' AND userid=%s AND link_type='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_links` WHERE %s='%s' AND userid=%s AND link_type='%s' LIMIT 1", array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // No, so we add one! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_links (%s, userid, link_type) VALUES ('%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_links` (%s, userid, link_type) VALUES ('%s','%s','%s')", array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__); $ret = "done"; } @@ -1026,12 +1026,12 @@ function GET_TOTAL_DATA ($search, $tableName, $lookFor, $whereStatement="userid" if (($onlyRows) || ($lookFor == "userid")) { // Count rows //* DEBUG: */ echo "COUNT!
    \n"; - $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `"._MYSQL_PREFIX."_%s` WHERE `%s`='%s'".$add, + $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add, array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__); } else { // Add all rows //* DEBUG: */ echo "SUM!
    \n"; - $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `"._MYSQL_PREFIX."_%s` WHERE `%s`='%s'".$add, + $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add, array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__); } @@ -1073,7 +1073,7 @@ function GET_REF_LEVEL_PERCENTS ($level) { } } elseif (!EXT_IS_ACTIVE("cache")) { // Get referal data - $result_lvl = SQL_QUERY_ESC("SELECT percents FROM "._MYSQL_PREFIX."_refdepths WHERE level='%s' LIMIT 1", + $result_lvl = SQL_QUERY_ESC("SELECT percents FROM `{!MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1", array(bigintval($level)), __FILE__, __LINE__); // Entry found? @@ -1140,7 +1140,7 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid if ($locked) $data = "locked_points"; // Check user account - $result_user = SQL_QUERY_ESC("SELECT refid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT refid, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}
    \n"; @@ -1167,14 +1167,14 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid } // END - if // Update points... - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth='%s' LIMIT 1", array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")
    \n"; // No entry updated? if (SQL_AFFECTEDROWS() < 1) { // First ref in this level! :-) - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,'%s',%s)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_points` (userid,ref_depth,%s) VALUES (%s,'%s',%s)", array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")
    \n"; } // END - if @@ -1239,20 +1239,20 @@ function UPDATE_REF_COUNTER ($uid) { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['ref_level'][$uid]}
    \n"; // Update counter - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refsystem SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_refsystem` SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1", array(bigintval($uid), $cacheArray['ref_level'][$uid]), __FILE__, __LINE__); // When no entry was updated then we have to create it here //* DEBUG: */ print __FUNCTION__."(".__LINE__."):updated=".SQL_AFFECTEDROWS()."
    \n"; if (SQL_AFFECTEDROWS() < 1) { // First count! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refsystem (userid, level, counter) VALUES (%s,%s,1)", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_refsystem` (userid, level, counter) VALUES (%s,%s,1)", array(bigintval($uid), $cacheArray['ref_level'][$uid]), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid}
    \n"; } // END - if // Check for his referal - $result = SQL_QUERY_ESC("SELECT refid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT refid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); // Load refid @@ -1285,7 +1285,7 @@ function UPDATE_REF_COUNTER ($uid) { // OBSOLETE: Sends out mail to all administrators function SEND_ADMIN_EMAILS ($subj, $msg) { // Load all admin email addresses - $result = SQL_QUERY("SELECT email FROM "._MYSQL_PREFIX."_admins ORDER BY id ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT email FROM `{!MYSQL_PREFIX!}_admins` ORDER BY id ASC", __FILE__, __LINE__); while (list($email) = SQL_FETCHROW($result)) { // Send the email out SEND_EMAIL($email, $subj, $msg); @@ -1309,7 +1309,7 @@ function GET_ADMIN_ID ($login) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1", array($login), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($ret) = SQL_FETCHROW($result); @@ -1346,7 +1346,7 @@ function GET_ADMIN_HASH ($aid) incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT password FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array($aid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Fetch data @@ -1373,7 +1373,7 @@ function GET_ADMIN_LOGIN ($aid) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result = SQL_QUERY_ESC("SELECT login FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT login FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array(bigintval($aid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Fetch data @@ -1401,7 +1401,7 @@ function GET_ADMIN_EMAIL ($aid) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result_aid = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result_aid = SQL_QUERY_ESC("SELECT email FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array(bigintval($aid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_aid) == 1) { // Get data @@ -1431,7 +1431,7 @@ function GET_ADMIN_DEFAULT_ACL ($aid) { incrementConfigEntry('cache_hits'); } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database - $result_aid = SQL_QUERY_ESC("SELECT default_acl FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1", + $result_aid = SQL_QUERY_ESC("SELECT default_acl FROM `{!MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1", array(bigintval($aid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_aid) == 1) { // Fetch data @@ -1467,7 +1467,7 @@ function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where= if (!empty($special)) $SPEC = ", ".$special; $ORDER = $name.$SPEC; if ($table == "country") $ORDER = $special; - $result = SQL_QUERY_ESC("SELECT %s, %s".$SPEC." FROM "._MYSQL_PREFIX."_%s ".$where." ORDER BY %s", + $result = SQL_QUERY_ESC("SELECT %s, %s".$SPEC." FROM `{!_MYSQL_PREFIX!}_%s` ".$where." ORDER BY %s", array($id, $ORDER, $table, $name), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option @@ -1498,9 +1498,9 @@ function activateExchange() { if ($totalUsers >= getConfig('activate_xchange')) { // Activate System $SQLs = array( - "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', mem_only='Y' WHERE module='order' LIMIT 1", - "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='order' OR what='unconfirmed' LIMIT 2", - "UPDATE `"._MYSQL_PREFIX."_config` SET activate_xchange='0' WHERE config=0 LIMIT 1" + "UPDATE `{!MYSQL_PREFIX!}_mod_reg` SET locked='N', hidden='N', mem_only='Y' WHERE module='order' LIMIT 1", + "UPDATE `{!MYSQL_PREFIX!}_member_menu` SET visible='Y', locked='N' WHERE what='order' OR what='unconfirmed' LIMIT 2", + "UPDATE `{!MYSQL_PREFIX!}_config` SET activate_xchange='0' WHERE config=0 LIMIT 1" ); // Run SQLs @@ -1515,8 +1515,8 @@ function DELETE_USER_ACCOUNT($uid, $reason) { $points = 0; $result = SQL_QUERY_ESC("SELECT (SUM(p.points) - d.used_points) AS points -FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d +FROM `{!MYSQL_PREFIX!}_user_points` AS p +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS d ON p.userid=d.userid WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -1525,7 +1525,7 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__); SQL_FREERESULT($result); // Delete points entries as well - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_points` WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__); // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { @@ -1538,13 +1538,13 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__); } // Delete category selections as well... - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s", - array(bigintval($uid)), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_cats` WHERE userid=%s", + array(bigintval($uid)), __FILE__, __LINE__); // Remove from rallye if found if (EXT_IS_ACTIVE("rallye")) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE userid=%s", - array(bigintval($uid)), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_rallye_users` WHERE userid=%s", + array(bigintval($uid)), __FILE__, __LINE__); } // Now a mail to the user and that's all... @@ -1552,7 +1552,7 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__); SEND_EMAIL($uid, ADMIN_DEL_ACCOUNT, $msg); // Ok, delete the account! - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } // @@ -1560,7 +1560,7 @@ function META_DESCRIPTION ($mod, $wht) { // Exclude admin and member's area if (($mod != "admin") && ($mod != "login")) { // Construct dynamic description - $DESCR = MAIN_TITLE." ".trim(getConfig('title_middle'))." ".ADD_DESCR("guest", "what-".$wht, true); + $DESCR = "{!MAIN_TITLE!} ".trim(getConfig('title_middle'))." ".ADD_DESCR("guest", "what-".$wht, true); // Output it directly OUTPUT_HTML(""); @@ -1571,16 +1571,16 @@ function META_DESCRIPTION ($mod, $wht) { } // function ADD_JACKPOT($points) { - $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT points FROM `{!MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Create line - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_jackpot (ok, points) VALUES ('ok','%s')", array($points), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok','%s')", array($points), __FILE__, __LINE__); } else { // Free memory SQL_FREERESULT($result); // Update points - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points+%s WHERE ok='ok' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_jackpot` SET points=points+%s WHERE ok='ok' LIMIT 1", array($points), __FILE__, __LINE__); } } @@ -1590,16 +1590,16 @@ function SUB_JACKPOT($points) { $ret = "-1"; // Get current points - $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT points FROM `{!MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Create line - SQL_QUERY("INSERT INTO "._MYSQL_PREFIX."_jackpot (ok, points) VALUES ('ok', 0.00000)", __FILE__, __LINE__); + SQL_QUERY("INSERT INTO `{!MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok', 0.00000)", __FILE__, __LINE__); } else { // Read points list($jackpot) = SQL_FETCHROW($result); if ($jackpot >= $points) { // Update points when there are enougth points in jackpot - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points-%s WHERE ok='ok' LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_jackpot` SET points=points-%s WHERE ok='ok' LIMIT 1", array($points), __FILE__, __LINE__); $ret = $jackpot - $points; } // END - if @@ -1631,7 +1631,7 @@ function LOAD_CONFIG ($no="0") { } // END - if } elseif ((!EXT_IS_ACTIVE("cache")) || (!isset($cacheArray['config'][$no]))) { // Load config from DB - $result_config = SQL_QUERY_ESC("SELECT * FROM `"._MYSQL_PREFIX."_config` WHERE config=%d LIMIT 1", + $result_config = SQL_QUERY_ESC("SELECT * FROM `{!MYSQL_PREFIX!}_config` WHERE config=%d LIMIT 1", array(bigintval($no)), __FILE__, __LINE__); // Get config from database @@ -1675,7 +1675,7 @@ function GET_WHAT($modCheck) { // Subtract points from database and mediadata cache function SUB_POINTS ($subject, $uid, $points) { // Add points to used points - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1", array($points, bigintval($uid)), __FILE__, __LINE__); // Insert booking record @@ -1736,7 +1736,7 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") { // Run database update //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "entries={$entries}"); - SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_config` SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__); + SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_config` SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__); // Get affected rows $affectedRows = SQL_AFFECTEDROWS(); @@ -1766,7 +1766,7 @@ function PREPARE_SQL_HTML_HOLIDAY ($mode) { function GET_TOTAL_RECEIVERS ($mode="normal") { // Query database $result_all = SQL_QUERY("SELECT userid -FROM "._MYSQL_PREFIX."_user_data +FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode), __FILE__, __LINE__); @@ -1794,7 +1794,7 @@ function ADD_CATEGORY_OPTIONS ($mode) { ); // Get categories - $result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT id, cat FROM `{!MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // ... and begin loading stuff while (list($id, $cat) = SQL_FETCHROW($result)) { @@ -1803,13 +1803,13 @@ function ADD_CATEGORY_OPTIONS ($mode) { $CATS['name'][] = $cat; // Check which users are in this category - $result_uids = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s", + $result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s", array(bigintval($id)), __FILE__, __LINE__); // Start adding all $uid_cnt = 0; while (list($ucat) = SQL_FETCHROW($result_uids)) { - $result_ver = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data + $result_ver = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode)." LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $uid_cnt += SQL_NUMROWS($result_ver); @@ -1872,37 +1872,37 @@ function ADD_BONUS_MAIL_TO_QUEUE ($subject, $text, $receiverList, $points, $seco if ($mode == "html") $HTML = "Y"; // Add HTML mail - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_bonus` (subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, html_msg) VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')", - array( - $subject, - $text, - $receiverList, - $points, - $seconds, - $url, - $cat, - $target, - bigintval($receiver), - $HTML -), __FILE__, __LINE__); + array( + $subject, + $text, + $receiverList, + $points, + $seconds, + $url, + $cat, + $target, + bigintval($receiver), + $HTML + ), __FILE__, __LINE__); } else { // Add regular mail - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_bonus` (subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent) VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')", - array( - $subject, - $text, - $receiverList, - $points, - $seconds, - $url, - $cat, - $target, - bigintval($receiver), -), __FILE__, __LINE__); + array( + $subject, + $text, + $receiverList, + $points, + $seconds, + $url, + $cat, + $target, + bigintval($receiver), + ), __FILE__, __LINE__); } } @@ -1926,7 +1926,7 @@ function GENERATE_RECEIVER_LIST ($cat, $receiver, $mode="") { // Category given? if ($cat > 0) { // Select category - $CAT_TABS = "LEFT JOIN "._MYSQL_PREFIX."_user_cats AS c ON d.userid=c.userid"; + $CAT_TABS = "LEFT JOIN `{!MYSQL_PREFIX!}_user_cats` AS c ON d.userid=c.userid"; $CAT_WHERE = " AND c.cat_id=%s"; } // END - if @@ -1938,11 +1938,11 @@ function GENERATE_RECEIVER_LIST ($cat, $receiver, $mode="") { if ((EXT_IS_ACTIVE("html_mail")) && ($mode == "html")) { // Only include HTML receivers - $result = SQL_QUERY_ESC("SELECT d.userid FROM `"._MYSQL_PREFIX."_user_data` AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s", + $result = SQL_QUERY_ESC("SELECT d.userid FROM `{!MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s", array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FILE__, __LINE__); } else { // Include all - $result = SQL_QUERY_ESC("SELECT d.userid FROM `"._MYSQL_PREFIX."_user_data` AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s", + $result = SQL_QUERY_ESC("SELECT d.userid FROM `{!MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s", array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FILE__, __LINE__); } @@ -1983,7 +1983,7 @@ function USER_STATS_GET_TIMESTAMP ($type, $data, $uid = 0) { // Try to find the entry $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`inserted`) AS `stamp` -FROM "._MYSQL_PREFIX."_user_stats_data +FROM `{!MYSQL_PREFIX!}_user_stats_data` WHERE userid=%s AND stats_type='%s' AND stats_data='%s' LIMIT 1", array(bigintval($uid), $type, $data), __FILE__, __LINE__); @@ -2012,7 +2012,7 @@ function USER_STATS_INSERT_RECORD ($uid, $type, $data) { // Does it exist? if ((!USER_STATS_GET_TIMESTAMP($type, $data, $uid)) && (!is_array($data))) { // Then insert it! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_stats_data (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')", array(bigintval($uid), $type, $data), __FILE__, __LINE__); } elseif (is_array($data)) { // Invalid data! @@ -2034,10 +2034,10 @@ function GET_USER_REF_POINTS ($uid, $level) { // Get refs from database $result = SQL_QUERY_ESC("SELECT ur.id, ur.refid, ud.status, ud.last_online, ud.mails_confirmed, ud.emails_received".$ADD." -FROM "._MYSQL_PREFIX."_user_refs AS ur -LEFT JOIN "._MYSQL_PREFIX."_user_points AS up +FROM `{!MYSQL_PREFIX!}_user_refs` AS ur +LEFT JOIN `{!MYSQL_PREFIX!}_user_points` AS up ON ur.refid=up.userid AND ur.level=0 -LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS ud +LEFT JOIN `{!MYSQL_PREFIX!}_user_data` AS ud ON ur.refid=ud.userid WHERE ur.userid=%s AND ur.level=%s ORDER BY ur.refid ASC", @@ -2092,7 +2092,7 @@ ORDER BY ur.refid ASC", // Recuced the amount of received emails for the receipients for given email function REDUCT_RECIPIENT_RECEIVED_MAILS ($column, $id, $count) { // Search for mail in database - $result = SQL_QUERY_ESC("SELECT `userid` FROM `"._MYSQL_PREFIX."_user_links` WHERE `%s`=%s ORDER BY `userid` ASC LIMIT %s", + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!MYSQL_PREFIX!}_user_links` WHERE `%s`=%s ORDER BY `userid` ASC LIMIT %s", array($column, bigintval($id), $count), __FILE__, __LINE__); // Are there entries? @@ -2104,7 +2104,7 @@ function REDUCT_RECIPIENT_RECEIVED_MAILS ($column, $id, $count) { } // END - while // Now update all user accounts - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s", array(implode(",", $UIDs), count($UIDs)), __FILE__, __LINE__); } // END - if diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index 9af04721bd..ea789c3df0 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -54,10 +54,10 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { // Do we need to send out bonus mails? if (EXT_IS_ACTIVE("html_mail")) { // 0 1 2 3 4 5 6 7 8 9 10 11 - $result_bonus = SQL_QUERY("SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, html_msg FROM "._MYSQL_PREFIX."_bonus WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__); + $result_bonus = SQL_QUERY("SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, html_msg FROM `{!MYSQL_PREFIX!}_bonus` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__); } else { // 0 1 2 3 4 5 6 7 8 9 10 - $result_bonus = SQL_QUERY("SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send FROM "._MYSQL_PREFIX."_bonus WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__); + $result_bonus = SQL_QUERY("SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send FROM `{!MYSQL_PREFIX!}_bonus` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__); } if (SQL_NUMROWS($result_bonus) > 0) { @@ -68,7 +68,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { $DATA['url'] = COMPILE_CODE($DATA['url']); // Message is active in queue - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='QUEUE' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_bonus` SET data_type='QUEUE' WHERE id=%s LIMIT 1", array(bigintval($DATA['id'])), __FILE__, __LINE__); // "Explode" all receivers into an array @@ -89,7 +89,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { foreach ($RECEIVERS as $key => $uid) { // Load personal data //* DEBUG: */ echo "*L:".__LINE__."/".$uid."*
    "; - $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); // Is his data available? @@ -132,7 +132,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { if (GET_EXT_VERSION("user") >= "0.1.4") { // Update mails received for receiver - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } // END - if @@ -162,7 +162,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { //* DEBUG: */ echo "-L:".__LINE__."/".SELECTION_COUNT($dummy)."-
    "; if (SELECTION_COUNT($dummy) == 0) { // Queue reached! - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_bonus` SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1", array(bigintval($DATA['id'])), __FILE__, __LINE__); //* DEBUG: */ echo "*L:".__LINE__."*
    "; @@ -174,7 +174,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { } // END - if } elseif ($GLOBALS['pool_cnt'] >= getConfig('max_send')) { // Update bonus pool - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='NEW', target_send=%s, receivers='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_bonus` SET data_type='NEW', target_send=%s, receivers='%s' WHERE id=%s LIMIT 1", array(SELECTION_COUNT($dummy), implode(";", $dummy), bigintval($DATA['id'])), __FILE__, __LINE__); //* DEBUG: */ echo "*L:".__LINE__."
    ";
     				//* DEBUG: */ print_r($dummy);
    diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php
    index 5b8be7a708..d39b3b89c8 100644
    --- a/inc/pool/pool-user.php
    +++ b/inc/pool/pool-user.php
    @@ -52,10 +52,10 @@ global $REPLACER;
     // Check for freed mail orders to send out
     if (EXT_IS_ACTIVE("html_mail")) {
     	//                                0     1        2      3       4          5            6      7        8          9       10
    -	$result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, html_msg FROM "._MYSQL_PREFIX."_pool WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
    +	$result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, html_msg FROM `{!MYSQL_PREFIX!}_pool` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
     } else {
     	//                                0     1        2      3       4          5            6      7        8          9    10
    -	$result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, id FROM "._MYSQL_PREFIX."_pool WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
    +	$result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, id FROM `{!MYSQL_PREFIX!}_pool` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
     }
     
     // Reset variables
    @@ -64,7 +64,7 @@ if (SQL_NUMROWS($result_main) > 0) {
     	// Parse all mails
     	while ($DATA = SQL_FETCHROW($result_main)) {
     		// Set mail order as "active". That means it will be sent out
    -		SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='ACTIVE' WHERE id=%s AND data_type='NEW' LIMIT 1",
    +		SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='ACTIVE' WHERE id=%s AND data_type='NEW' LIMIT 1",
     			array($DATA[0]), __FILE__, __LINE__);
     
     		// Check fetched data for HTML
    @@ -92,7 +92,7 @@ if (SQL_NUMROWS($result_main) > 0) {
     			// We can now send mails to them...
     			foreach ($RECEIVERS as $key => $uid) {
     				// Lookup user ID
    -				$result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
    +				$result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
     					array(bigintval($uid)), __FILE__, __LINE__);
     
     				// Is his data available?
    @@ -105,18 +105,18 @@ if (SQL_NUMROWS($result_main) > 0) {
     					SQL_FREERESULT($result_user);
     
     					// Do we have a stats entry?
    -					$result_stats = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s AND userid=%s AND timestamp_ordered='%s' LIMIT 1",
    +					$result_stats = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s AND userid=%s AND timestamp_ordered='%s' LIMIT 1",
     						array($DATA[0], $DATA[1], $DATA[6]), __FILE__, __LINE__);
     
     					// If there's no stats entry add it!
     					//* DEBUG: */ echo "!L:".__LINE__."/".SQL_NUMROWS($result_stats)."!
    "; if (SQL_NUMROWS($result_stats) == 0) { // No entry was found, so we add him! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_stats (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_stats` (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())", array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__); // Receive it's ID for the links table - $result_stats = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s AND userid=%s AND timestamp_ordered='%s' LIMIT 1", + $result_stats = SQL_QUERY_ESC("SELECT id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s AND userid=%s AND timestamp_ordered='%s' LIMIT 1", array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[6])), __FILE__, __LINE__); } // END - if @@ -159,12 +159,12 @@ if (SQL_NUMROWS($result_main) > 0) { SEND_EMAIL($email, $DATA[2], $mailText, $HTML); // Count sent mails... - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1", array(bigintval($DATA[1])), __FILE__, __LINE__); if (GET_EXT_VERSION("user") >= "0.1.4") { // Update mails received for receiver - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } // END - if @@ -204,7 +204,7 @@ if (SQL_NUMROWS($result_main) > 0) { SEND_ADMIN_NOTIFICATION(ADMIN_SUBJ_SEND_DONE, "done-admin", $content, $uid); // Get sender's data - $result_sender = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result_sender = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($DATA[1])), __FILE__, __LINE__); // Is the sender found? @@ -223,11 +223,11 @@ if (SQL_NUMROWS($result_main) > 0) { SQL_FREERESULT($result_sender); // Set status to SEND because we completely send it away - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1", array(bigintval($DATA[0])), __FILE__, __LINE__); // Update send-completed-time - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET timestamp_send=UNIX_TIMESTAMP() WHERE pool_id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_stats` SET timestamp_send=UNIX_TIMESTAMP() WHERE pool_id=%s LIMIT 1", array(bigintval($DATA[0])), __FILE__, __LINE__); $LAST_SENT_ID = $DATA[0]; $GLOBALS['pool_cnt'] = 0; @@ -248,7 +248,7 @@ if (SQL_NUMROWS($result_main) > 0) { // There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered) $ADD = ""; if ($GLOBALS['pool_cnt'] <= $DATA[8]) $ADD = ", target_send=target_send-".$GLOBALS['pool_cnt']; - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW', receivers='%s'".$ADD." WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='NEW', receivers='%s'".$ADD." WHERE id=%s LIMIT 1", array(implode(";", $dummy), bigintval($DATA[0])), __FILE__, __LINE__); //* DEBUG: */ echo"*EXIT/L:".__LINE__."*
    "; @@ -261,7 +261,7 @@ if (SQL_NUMROWS($result_main) > 0) { // User does not exists so we have add the sender's points back to sender's account if (($RECEIVERS[0] == "0") || (empty($RECEIVERS[0]))) { // List was empty - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='SEND' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET data_type='SEND' WHERE id=%s LIMIT 1", array(bigintval($DATA[0])), __FILE__, __LINE__); } else { // Is the userid set? @@ -282,7 +282,7 @@ if (SQL_NUMROWS($result_main) > 0) { unset($dummy[$key]); // Update receivers - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET receivers='%s' WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_pool` SET receivers='%s' WHERE id=%s LIMIT 1", array(implode(";", $dummy), bigintval($DATA[0])), __FILE__, __LINE__); } } @@ -301,7 +301,7 @@ if (SQL_NUMROWS($result_main) > 0) { ); // We have to pay back some points to the sender (we add them directly :-P) - $result = SQL_QUERY_ESC("SELECT email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); $DATA[10] = $PB; $DATA[11] = $cnt_back[$uid]; diff --git a/inc/profile-updte.php b/inc/profile-updte.php index cad1433c90..b28953ef85 100644 --- a/inc/profile-updte.php +++ b/inc/profile-updte.php @@ -70,7 +70,7 @@ ORDER BY userid", array(getConfig('profile_update'), getConfig('resend_profile_u SEND_EMAIL($DATA[1], PROFILE_OUTDATED, $msg); // Update profile data - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1", array(bigintval($DATA[0])), __FILE__, __LINE__); } } diff --git a/inc/reset/reset_beg.php b/inc/reset/reset_beg.php index 3fdf322e81..93ef330ddb 100644 --- a/inc/reset/reset_beg.php +++ b/inc/reset/reset_beg.php @@ -44,7 +44,7 @@ if (($CSS == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') == "Y //* DEBUG: */ echo basename(__FILE__)."
    \n"; // Reset accounts -$result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=0.00000 WHERE beg_points > 0", +$result = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_data` SET beg_points=0.00000 WHERE beg_points > 0", __FILE__, __LINE__); // diff --git a/inc/reset/reset_bonus.php b/inc/reset/reset_bonus.php index 96718ec80e..cf503317de 100644 --- a/inc/reset/reset_bonus.php +++ b/inc/reset/reset_bonus.php @@ -47,7 +47,7 @@ if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; BONUS_PURGE_EXPIRED_TURBO_BONUS(); // Reset accounts -$result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", +$result = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", __FILE__, __LINE__); // diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index b289fb5307..0b5d3c7208 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -46,14 +46,14 @@ if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; // Update user profiles if (GET_EXT_VERSION("order") >= "0.1.1") { // Latest version - $result_daily = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=max_mails, mail_orders=0 WHERE receive_mails != max_mails", __FILE__, __LINE__); + $result_daily = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_data` SET receive_mails=max_mails, mail_orders=0 WHERE receive_mails != max_mails", __FILE__, __LINE__); } else { // Obsolete version - $result_daily = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=max_mails WHERE receive_mails != max_mails", __FILE__, __LINE__); + $result_daily = SQL_QUERY("UPDATE `{!MYSQL_PREFIX!}_user_data` SET receive_mails=max_mails WHERE receive_mails != max_mails", __FILE__, __LINE__); } // Transfer points from locked_points to points -$result_daily = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE ref_payout=0 AND status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); +$result_daily = SQL_QUERY("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE ref_payout=0 AND status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); //* DEBUG: */ echo basename(__FILE__).":payout=0;daily|numRows=".SQL_NUMROWS($result_daily)."
    \n"; if (SQL_NUMROWS($result_daily) > 0) @@ -62,7 +62,7 @@ if (SQL_NUMROWS($result_daily) > 0) while (list($uid) = SQL_FETCHROW($result_daily)) { //* DEBUG: */ echo basename(__FILE__).":uid={$uid}
    \n"; - $result_points = SQL_QUERY_ESC("SELECT ref_depth, locked_points FROM "._MYSQL_PREFIX."_user_points + $result_points = SQL_QUERY_ESC("SELECT ref_depth, locked_points FROM `{!MYSQL_PREFIX!}_user_points` WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth", array(bigintval($uid)), __FILE__, __LINE__); //* DEBUG: */ echo basename(__FILE__).":payout=0;points|numRows=".SQL_NUMROWS($result_points)."
    \n"; @@ -72,7 +72,7 @@ WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth", while (list($dep, $locked) = SQL_FETCHROW($result_points)) { //* DEBUG: */ echo basename(__FILE__).":uid={$uid},depth={$dep},locked={$locked}
    \n"; - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s, locked_points=0.00000 + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_points` SET points=points+%s, locked_points=0.00000 WHERE userid=%s AND ref_depth=%d LIMIT 1", array($locked, bigintval($uid), $dep), __FILE__, __LINE__); diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index 1881d7ff43..2f2da2e11b 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -44,14 +44,14 @@ if (($CSS == 1) || ((!defined('__DAILY_RESET')) && (getConfig('holiday_mode') == //* DEBUG: */ echo basename(__FILE__)."
    \n"; // Check for holidays we need to enable and send email to user -$result_main = SQL_QUERY("SELECT userid, holiday_activated FROM "._MYSQL_PREFIX."_user_data +$result_main = SQL_QUERY("SELECT userid, holiday_activated FROM `{!MYSQL_PREFIX!}_user_data` WHERE holiday_activated > 0 AND holiday_activated < UNIX_TIMESTAMP() AND holiday_active='N' ORDER BY holiday_activated", __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { // We have found at least one useraccount so let's check it... while(list($uid, $activated) = SQL_FETCHROW($result_main)) { // Check if his holiday can be activated - $result_holiday = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM "._MYSQL_PREFIX."_user_holidays + $result_holiday = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!MYSQL_PREFIX!}_user_holidays` WHERE userid=%s AND holiday_start <= UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP() LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result_holiday) == 1) @@ -71,7 +71,7 @@ WHERE userid=%s AND holiday_start <= UNIX_TIMESTAMP() AND holiday_end > UNIX_TIM SEND_EMAIL($uid, HOLIDAY_MEMBER_ACTIVATED, $msg); // Update account - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET holiday_active='Y' + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET holiday_active='Y' WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } diff --git a/inc/security.php b/inc/security.php index b798a636b3..4ac542e47c 100644 --- a/inc/security.php +++ b/inc/security.php @@ -35,15 +35,15 @@ print "
    ";
     debug_print_backtrace();
     die("
    "); -echo " - -Protected file ".basename($_SERVER['PHP_SELF'])." - ACCESS DENIED! - - +echo " + +Protected file ".basename($_SERVER['PHP_SELF'])." - ACCESS DENIED! + +
    -  ".$name."
    -
    (".$min." ".$curr." = ".TRANSLATE_COMMA($rate * $min)." ".POINTS.")
    +  ".$name."
    +
    (".$min." ".$curr." = ".TRANSLATE_COMMA($rate * $min)." {!POINTS!})
    /
    - + ".$THEMES['theme_name'][$key]." diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 701f13352d..b40a8b3300 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { ADD_DESCR("member", __FILE__); // Load data -$result = SQL_QUERY_ESC("SELECT opt_in FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", +$result = SQL_QUERY_ESC("SELECT opt_in FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($opt_in) = SQL_FETCHROW($result); @@ -99,7 +99,7 @@ case "new": // Start new transfer } // Re-check receivers and own personal data - $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid IN ('%s','%s') AND status='CONFIRMED' ORDER BY userid LIMIT 2", + $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$ADD." FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid IN ('%s','%s') AND status='CONFIRMED' ORDER BY userid LIMIT 2", array($GLOBALS['userid'], bigintval($_POST['to_uid'])), __FILE__, __LINE__); $valid_data = (SQL_NUMROWS($result) == 2); @@ -168,10 +168,10 @@ case "new": // Start new transfer define('__TRANS_ID', bigintval(GEN_RANDOM_CODE("10", mt_rand(0, 99999), $GLOBALS['userid'], $_POST['reason']))); // Add entries to both tables - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_in (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_transfers_in` (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", array(bigintval($_POST['to_uid']), $GLOBALS['userid'], bigintval($_POST['points']), $_POST['reason'], __TRANS_ID), __FILE__, __LINE__); - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_out (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", + SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_user_transfers_out` (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", array($GLOBALS['userid'], bigintval($_POST['to_uid']), bigintval($_POST['points']), $_POST['reason'], __TRANS_ID), __FILE__, __LINE__); @@ -226,11 +226,11 @@ case "new": // Start new transfer // Load member list if (EXT_IS_ACTIVE("nickname")) { // Load userid and nickname - $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid", + $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid", array($GLOBALS['userid']), __FILE__, __LINE__); } else { // Load only userid - $result = SQL_QUERY_ESC("SELECT userid, userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid", + $result = SQL_QUERY_ESC("SELECT userid, userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid", array($GLOBALS['userid']), __FILE__, __LINE__); } @@ -270,7 +270,7 @@ case "new": // Start new transfer $rand = mt_rand(0, 99999); $code = GEN_RANDOM_CODE(getConfig('transfer_code'), $rand, $GLOBALS['userid'], __TRANSFER_MAX_VALUE); $img = GENERATE_IMAGE($code, false); - define('__TRANSFER_IMAGE_INPUT', " ".$img); + define('__TRANSFER_IMAGE_INPUT', " ".$img); } else { $code = "00000"; define('__TRANSFER_IMAGE_INPUT', TRANSFER_NO_CODE); @@ -298,14 +298,14 @@ case "list_out": // List only outgoing transactions switch ($MODE) { case "list_in": - $SQL = "SELECT trans_id, from_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_in WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max'); + $SQL = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max'); $NOTHING = TRANSFER_NO_INCOMING_TRANSFERS; define('__TRANSFER_SUM', TRANSFER_TOTAL_INCOMING); define('__TRANSFER_TITLE', TRANSFER_LIST_INCOMING); break; case "list_out": - $SQL = "SELECT trans_id, to_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max'); + $SQL = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max'); $NOTHING = TRANSFER_NO_OUTGOING_TRANSFERS; define('__TRANSFER_SUM', TRANSFER_TOTAL_OUTGOING); define('__TRANSFER_TITLE', TRANSFER_LIST_OUTGOING); @@ -367,7 +367,7 @@ case "list_all": // List all transactions // fastest way but it shall be fine for now. // // First of all create the temporary table - $result = SQL_QUERY("CREATE TEMPORARY TABLE "._MYSQL_PREFIX."_transfers_tmp ( + $result = SQL_QUERY("CREATE TEMPORARY TABLE `{!MYSQL_PREFIX!}_transfers_tmp` ( trans_id VARCHAR(12) NOT NULL DEFAULT '', party_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', @@ -378,24 +378,24 @@ KEY(party_uid) ) TYPE=HEAP", __FILE__, __LINE__); // Let's begin with the incoming list - $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_in WHERE userid=%s ORDER BY id LIMIT %s", + $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM `{!MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY id LIMIT %s", array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); while ($DATA = SQL_FETCHROW($result)) { $DATA[] = "IN"; $DATA = implode("','", $DATA); - $res_temp = SQL_QUERY("INSERT INTO "._MYSQL_PREFIX."_transfers_tmp (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__); + $res_temp = SQL_QUERY("INSERT INTO `{!MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__); } // Free memory SQL_FREERESULT($result); // As the last table transfer data from outgoing table to temporary - $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE userid=%s ORDER BY id LIMIT %s", + $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM `{!MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY id LIMIT %s", array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); while ($DATA = SQL_FETCHROW($result)) { $DATA[] = "OUT"; $DATA = implode("','", $DATA); - $res_temp = SQL_QUERY("INSERT INTO "._MYSQL_PREFIX."_transfers_tmp (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__); + $res_temp = SQL_QUERY("INSERT INTO `{!MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__); } // Free memory @@ -405,7 +405,7 @@ array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Output rows $OUT = ""; $SW = 2; - $result = SQL_QUERY("SELECT party_uid, trans_id, points, reason, time_trans, trans_type FROM "._MYSQL_PREFIX."_transfers_tmp ORDER BY time_trans DESC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT party_uid, trans_id, points, reason, time_trans, trans_type FROM `{!MYSQL_PREFIX!}_transfers_tmp` ORDER BY time_trans DESC", __FILE__, __LINE__); while(list($uid, $idx, $points, $reason, $stamp, $type) = SQL_FETCHROW($result)) { if ($type == "OUT") $points = "-$points"; $OUT .= "
    - + @@ -59,8 +59,8 @@ echo "
    A C C E S S   D E N I E D !A C C E S S   D E N I E D !
    - -\n"; + +\n"; exit(); // ?> diff --git a/inc/stats_bonus.php b/inc/stats_bonus.php index f47523fe2b..ec90206560 100644 --- a/inc/stats_bonus.php +++ b/inc/stats_bonus.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { // Check for 100% klickrate mails $result_bonus = SQL_QUERY("SELECT id, userid, subject, timestamp_ordered, clicks, url -FROM "._MYSQL_PREFIX."_user_stats +FROM `{!MYSQL_PREFIX!}_user_stats` WHERE max_rec=clicks AND clicks>0 AND bonus_stats_active='N' ORDER BY userid", __FILE__, __LINE__); @@ -50,7 +50,7 @@ if (SQL_NUMROWS($result_bonus) > 0) { // We found some mail orders... while(list($id, $uid, $subj, $stamp, $clicks, $url) = SQL_FETCHROW($result_bonus)) { // Add points - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1", array(getConfig('bonus_stats'), bigintval($uid)), __FILE__, __LINE__); // Prepare array @@ -66,7 +66,7 @@ if (SQL_NUMROWS($result_bonus) > 0) { SEND_EMAIL($uid, BONUS_MEMBER_STATS_SUBJECT, $msg); // Update database - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET bonus_stats_active='Y' WHERE id=%s LIMIT 1", + $result_update = SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_stats` SET bonus_stats_active='Y' WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } diff --git a/lead-confirm.php b/lead-confirm.php index 7bcd9100eb..4ba44b42b6 100644 --- a/lead-confirm.php +++ b/lead-confirm.php @@ -59,7 +59,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the cookie set? if (isSessionVariableSet('lead_uid')) { // Is the user-account unlocked and valid? - $result = SQL_QUERY_ESC("SELECT email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT email FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval(get_session('lead_uid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Secure the ID number diff --git a/mailid.php b/mailid.php index 3fb1eaafab..b877c10f19 100644 --- a/mailid.php +++ b/mailid.php @@ -64,13 +64,13 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Maybe he wants to confirm an email? if ($url_mid > 0) { // Normal-Mails - $result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s AND userid=%s LIMIT 1", - array($url_mid, $url_uid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND userid=%s LIMIT 1", + array($url_mid, $url_uid), __FILE__, __LINE__); $type = "mailid"; $DATA = $url_mid; } elseif ($url_bid > 0) { // Bonus-Mail - $result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s AND userid=%s LIMIT 1", - array($url_bid, $url_uid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND userid=%s LIMIT 1", + array($url_bid, $url_uid), __FILE__, __LINE__); $type = "bonusid"; $DATA = $url_bid; } else { // Problem: No ID entered @@ -88,8 +88,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { { case "NORMAL": // Is the stats ID valid? - $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM "._MYSQL_PREFIX."_user_stats WHERE id=%s LIMIT 1", - array($url_mid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM `{!MYSQL_PREFIX!}_user_stats` WHERE id=%s LIMIT 1", + array($url_mid), __FILE__, __LINE__); break; case "BONUS": @@ -100,8 +100,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { } // END - if // Bonus-Mails - $result = SQL_QUERY_ESC("SELECT id, url, subject FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", + array($url_bid), __FILE__, __LINE__); break; } @@ -116,8 +116,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { $EXTRA_TITLE = COMPILE_CODE($EXTRA_TITLE); // Is the user's ID unlocked? - $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", - array($url_uid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", + array($url_uid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($status, $gender, $sname, $fname) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -126,8 +126,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { switch ($ltype) { case "NORMAL": - $result = SQL_QUERY_ESC("SELECT payment_id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1", - array(bigintval($pool)), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1", + array(bigintval($pool)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($pay) = SQL_FETCHROW($result); @@ -141,8 +141,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { break; case "BONUS": - $result = SQL_QUERY_ESC("SELECT points, time FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT points, time FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", + array($url_bid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($points, $time) = SQL_FETCHROW($result); diff --git a/mailid_top.php b/mailid_top.php index 57509a6c74..b477247c6d 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -66,11 +66,11 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Maybe he wants to confirm an email? if ($url_mid > 0) { - $result = SQL_QUERY_ESC("SELECT id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s AND userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND userid=%s LIMIT 1", array($url_mid, $url_uid), __FILE__, __LINE__); $type = "mailid"; $DATA = $url_mid; } elseif ($url_bid > 0) { - $result = SQL_QUERY_ESC("SELECT id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s AND userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND userid=%s LIMIT 1", array($url_bid, $url_uid), __FILE__, __LINE__); $type = "bonusid"; $DATA = $url_bid; } @@ -82,12 +82,12 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { switch ($ltype) { case "NORMAL": - $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%s LIMIT 1", + $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE id=%s LIMIT 1", array($url_mid), __FILE__, __LINE__); break; case "BONUS": - $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", array($url_bid), __FILE__, __LINE__); break; } @@ -107,7 +107,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if ($ltype == "BONUS") $sender = 0; // Is the user's ID unlocked? - $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($url_uid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data @@ -118,14 +118,14 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if ($status == "CONFIRMED") { // Update last activity - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1", array($url_uid), __FILE__, __LINE__); // User has confirmed his account so we can procede... switch ($ltype) { case "NORMAL": - $result = SQL_QUERY_ESC("SELECT payment_id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1", array(bigintval($pool)), __FILE__, __LINE__); // Entry found? @@ -141,7 +141,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { break; case "BONUS": - $result = SQL_QUERY_ESC("SELECT time, points FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT time, points FROM `{!MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1", array(bigintval($pool)), __FILE__, __LINE__); // Entry found? @@ -173,7 +173,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { switch ($ltype) { case "NORMAL": - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET clicks=clicks + 1 WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_stats` SET clicks=clicks + 1 WHERE id=%s LIMIT 1", array($url_mid), __FILE__, __LINE__); // Update mediadata as well @@ -185,7 +185,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { break; case "BONUS": - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET clicks=clicks + 1 WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_bonus` SET clicks=clicks + 1 WHERE id=%s LIMIT 1", array($url_bid), __FILE__, __LINE__); // Update mediadata as well @@ -204,13 +204,13 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Only when user extension = v0.1.2: Update mails-confirmed counter if (GET_EXT_VERSION("user") >= "0.1.2") { // Update counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1", array($url_uid), __FILE__, __LINE__); // Update random confirmed as well? if (GET_EXT_VERSION("user") >= "0.3.4") { // Update second counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1", array($url_uid), __FILE__, __LINE__); } // END - if } // END - if @@ -232,7 +232,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { } // END - if // Count down ref_payout value - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1", array($url_uid), __FILE__, __LINE__); // Add points @@ -276,7 +276,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { } // Remove link from table - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!MYSQL_PREFIX!}_user_links` WHERE id=%s LIMIT 1", array(bigintval($lid)), __FILE__, __LINE__); break; diff --git a/modules.php b/modules.php index b94a2a0414..913b66e169 100644 --- a/modules.php +++ b/modules.php @@ -60,7 +60,7 @@ require("inc/config.php"); // Check if logged in if (IS_MEMBER()) { // Is still logged in so we welcome him with his name - $result = SQL_QUERY_ESC("SELECT surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT surname, family FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load surname and family's name and build the username diff --git a/ref.php b/ref.php index 7adf9ae91a..5b46f1778a 100644 --- a/ref.php +++ b/ref.php @@ -67,7 +67,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if ($ref != "".($ref + 0)."") { if (EXT_IS_ACTIVE("nickname")) { // Nickname in URL, so load the ID - $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array($ref), __FILE__, __LINE__); // Load userid @@ -93,7 +93,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the refid valid? if ($ref > 0) { // Update ref counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1", array(bigintval($ref)), __FILE__, __LINE__); } // END - if } else { diff --git a/show_bonus.php b/show_bonus.php index 06a0dd7139..a71eee78e1 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -78,8 +78,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if (!empty($t)) { // Check for data $result = SQL_QUERY_ESC("SELECT DISTINCT d.gender, d.surname, d.family, b.level, b.points -FROM `"._MYSQL_PREFIX."_user_data` AS d -RIGHT JOIN "._MYSQL_PREFIX."_bonus_turbo AS b +FROM `{!MYSQL_PREFIX!}_user_data` AS d +RIGHT JOIN `{!MYSQL_PREFIX!}_bonus_turbo` AS b ON d.userid=b.userid WHERE d.status='CONFIRMED' AND d.userid=%s AND b.%s=%s LIMIT 1", diff --git a/templates/de/html/admin/admin_add_bank_package.tpl b/templates/de/html/admin/admin_add_bank_package.tpl index 8f7bba5e14..bce74de388 100644 --- a/templates/de/html/admin/admin_add_bank_package.tpl +++ b/templates/de/html/admin/admin_add_bank_package.tpl @@ -10,7 +10,7 @@ {--ADMIN_BANK_PACKAGE_TITLE--}   - @@ -30,7 +30,7 @@ {--ADMIN_BANK_PACKAGE_ACCOUNT_FEE--}   - {!POINTS!} @@ -39,7 +39,7 @@ {--ADMIN_BANK_PACKAGE_FREE_TRANSFERS--}   - @@ -61,7 +61,7 @@ {--ADMIN_BANK_PACKAGE_FREE_MONTHS_FEE--}   - {--_MONTHS--} @@ -71,7 +71,7 @@ {--ADMIN_BANK_PACKAGE_INTEREST_PLUS--}   - % @@ -80,7 +80,7 @@ {--ADMIN_BANK_PACKAGE_INTEREST_MINUS--}   - % @@ -89,7 +89,7 @@ {--ADMIN_BANK_PACKAGE_FIRST_PAYMENT--}   - {!POINTS!} @@ -98,7 +98,7 @@ {--ADMIN_BANK_PACKAGE_FREE_ACCOUNT_INCOME--}   - {!POINTS!} @@ -118,7 +118,7 @@ {--ADMIN_BANK_PACKAGE_TAN_LOCK--}   - @@ -128,18 +128,18 @@ {--ADMIN_BANK_PACKAGE_ACTIVE--}   -  {--YES--}
    -  {--NO--}   - - diff --git a/templates/de/html/admin/admin_add_banner.tpl b/templates/de/html/admin/admin_add_banner.tpl index 999731a65a..9d2299580d 100644 --- a/templates/de/html/admin/admin_add_banner.tpl +++ b/templates/de/html/admin/admin_add_banner.tpl @@ -13,7 +13,7 @@ {--ADMIN_ENTER_BANNER_URL--}:   - @@ -23,7 +23,7 @@ {--ADMIN_ENTER_ALTERNATE_TEXT--}:   - @@ -41,9 +41,9 @@   - - diff --git a/templates/de/html/admin/admin_add_cat.tpl b/templates/de/html/admin/admin_add_cat.tpl index 9cbaf82056..e8a7bcb88e 100644 --- a/templates/de/html/admin/admin_add_cat.tpl +++ b/templates/de/html/admin/admin_add_cat.tpl @@ -16,7 +16,7 @@ {--ENTER_CATNAME--}:   -   @@ -42,8 +42,8 @@ {--CAT_IS_VISIBLE--}   - {--YES--}:    {--NO--}: {--YES--}:    {--NO--}:   @@ -52,8 +52,8 @@   -      diff --git a/templates/de/html/admin/admin_add_country.tpl b/templates/de/html/admin/admin_add_country.tpl index 9e95f4816f..63cb837af8 100644 --- a/templates/de/html/admin/admin_add_country.tpl +++ b/templates/de/html/admin/admin_add_country.tpl @@ -15,7 +15,7 @@   {--ADMIN_ENTER_COUNTRY_CODE--}:   -   @@ -26,7 +26,7 @@   {--ADMIN_ENTER_COUNTRY_NAME--}:   -   @@ -48,9 +48,9 @@   - -   diff --git a/templates/de/html/admin/admin_add_max.tpl b/templates/de/html/admin/admin_add_max.tpl index 1821650744..de7950b463 100644 --- a/templates/de/html/admin/admin_add_max.tpl +++ b/templates/de/html/admin/admin_add_max.tpl @@ -21,7 +21,7 @@   {--ENTER_MAX_VALUE--}:   -   @@ -32,7 +32,7 @@   {--ENTER_MAX_COMMENT--}:   -   @@ -41,8 +41,8 @@   -      diff --git a/templates/de/html/admin/admin_add_payment.tpl b/templates/de/html/admin/admin_add_payment.tpl index 9c8e430725..f2ae277424 100644 --- a/templates/de/html/admin/admin_add_payment.tpl +++ b/templates/de/html/admin/admin_add_payment.tpl @@ -12,7 +12,7 @@ {--ENTER_PAY_TIME--}:   -  {--_SECONDS--} @@ -22,7 +22,7 @@ {--ENTER_PAY_PAYMENT--}:   -  {!POINTS!} @@ -31,7 +31,7 @@ {--ENTER_PAY_PRICE--}:   -  {!POINTS!} @@ -40,16 +40,16 @@ {--ENTER_PAY_TITLE--}:   -   - - diff --git a/templates/de/html/admin/admin_add_points.tpl b/templates/de/html/admin/admin_add_points.tpl index b707640a71..33601e4a3b 100644 --- a/templates/de/html/admin/admin_add_points.tpl +++ b/templates/de/html/admin/admin_add_points.tpl @@ -18,7 +18,7 @@ {--ENTER_POINTS_ADD--}:   - @@ -37,8 +37,8 @@   -    diff --git a/templates/de/html/admin/admin_add_points_all.tpl b/templates/de/html/admin/admin_add_points_all.tpl index e5af711655..c2076ec37a 100644 --- a/templates/de/html/admin/admin_add_points_all.tpl +++ b/templates/de/html/admin/admin_add_points_all.tpl @@ -18,7 +18,7 @@ {--ENTER_POINTS_ADD--}:   - @@ -37,8 +37,8 @@   -    diff --git a/templates/de/html/admin/admin_add_rallye.tpl b/templates/de/html/admin/admin_add_rallye.tpl index 12d8440151..207918819f 100644 --- a/templates/de/html/admin/admin_add_rallye.tpl +++ b/templates/de/html/admin/admin_add_rallye.tpl @@ -13,7 +13,7 @@ {--RALLYE_TITLE--}:   - @@ -104,7 +104,7 @@ {--RALLYE_MIN_USERS--}:   - @@ -113,16 +113,16 @@ {--RALLYE_MIN_PRICES--}:   -   - - diff --git a/templates/de/html/admin/admin_add_rallye_prices.tpl b/templates/de/html/admin/admin_add_rallye_prices.tpl index 9f1604f4ea..16858a69ae 100644 --- a/templates/de/html/admin/admin_add_rallye_prices.tpl +++ b/templates/de/html/admin/admin_add_rallye_prices.tpl @@ -13,7 +13,7 @@ {--RALLYE_PRICE_LEVEL--}:   - @@ -25,7 +25,7 @@ {--RALLYE_PRICE_POINTS--}:   - @@ -34,16 +34,16 @@ {--RALLYE_PRICE_INFOS--}:   -   - - diff --git a/templates/de/html/admin/admin_add_reflvl.tpl b/templates/de/html/admin/admin_add_reflvl.tpl index dad2f550da..1b7c638f99 100644 --- a/templates/de/html/admin/admin_add_reflvl.tpl +++ b/templates/de/html/admin/admin_add_reflvl.tpl @@ -16,7 +16,7 @@   {--ENTER_REF_LVL--}:   -   @@ -27,7 +27,7 @@   {--ENTER_REF_PERCENTS--}:   - %   @@ -36,9 +36,9 @@   - -   diff --git a/templates/de/html/admin/admin_add_sponsor.tpl b/templates/de/html/admin/admin_add_sponsor.tpl index 5f253220fc..bd7148358b 100644 --- a/templates/de/html/admin/admin_add_sponsor.tpl +++ b/templates/de/html/admin/admin_add_sponsor.tpl @@ -22,7 +22,7 @@   - +   @@ -34,7 +34,7 @@   - +   @@ -46,7 +46,7 @@   - +   @@ -82,7 +82,7 @@   - +   @@ -94,7 +94,7 @@   - +   @@ -114,7 +114,7 @@   - +   @@ -126,7 +126,7 @@   - +   @@ -138,8 +138,8 @@   - - - + - +   @@ -151,7 +151,7 @@   - +   @@ -163,7 +163,7 @@   - +   @@ -175,7 +175,7 @@   - +   @@ -187,7 +187,7 @@   - +   @@ -199,7 +199,7 @@   - +   @@ -219,8 +219,8 @@   - - + +   @@ -275,7 +275,7 @@   - +   @@ -283,8 +283,8 @@   - - + +   diff --git a/templates/de/html/admin/admin_add_sponsor_already.tpl b/templates/de/html/admin/admin_add_sponsor_already.tpl index 222d22ad5d..9f89f6b2ca 100644 --- a/templates/de/html/admin/admin_add_sponsor_already.tpl +++ b/templates/de/html/admin/admin_add_sponsor_already.tpl @@ -20,7 +20,7 @@   {!__HIDDEN_DATA!} - +   diff --git a/templates/de/html/admin/admin_add_sponsor_paytype.tpl b/templates/de/html/admin/admin_add_sponsor_paytype.tpl index 0413bb700f..ef3b29954e 100644 --- a/templates/de/html/admin/admin_add_sponsor_paytype.tpl +++ b/templates/de/html/admin/admin_add_sponsor_paytype.tpl @@ -9,31 +9,31 @@ {--SPONSOR_PAYTYPE_NAME--}:
    {--SPONSOR_PAYTYPE_NAME_HINT--}
      - +   {--SPONSOR_PAYTYPE_RATE--}:
    {--SPONSOR_PAYTYPE_RATE_HINT--}
      - +   {--SPONSOR_PAYTYPE_MIN_COUNT--}:   - +   {--SPONSOR_PAYTYPE_CURRENCY--}:   - +   - - + + diff --git a/templates/de/html/admin/admin_admin_add.tpl b/templates/de/html/admin/admin_admin_add.tpl index a5c5556152..65f92befb1 100644 --- a/templates/de/html/admin/admin_admin_add.tpl +++ b/templates/de/html/admin/admin_admin_add.tpl @@ -7,7 +7,7 @@   {--ENTER_TITLE--}:   -   @@ -63,9 +63,9 @@   -   diff --git a/templates/de/html/admin/admin_admins_add.tpl b/templates/de/html/admin/admin_admins_add.tpl index 9472ac0220..682c7e804d 100644 --- a/templates/de/html/admin/admin_admins_add.tpl +++ b/templates/de/html/admin/admin_admins_add.tpl @@ -12,7 +12,7 @@ {--ADMIN_ADMINS_ENTER_LOGIN--}:   - @@ -21,7 +21,7 @@ {--ADMIN_ADMINS_ENTER_EMAIL--}:   - @@ -30,7 +30,7 @@ {--ADMIN_ADMINS_ENTER_PASS1--}:   - @@ -39,15 +39,15 @@ {--ADMIN_ADMINS_ENTER_PASS2--}:   -   -    diff --git a/templates/de/html/admin/admin_admins_add_acl.tpl b/templates/de/html/admin/admin_admins_add_acl.tpl index 3119848f6c..e64de262dd 100644 --- a/templates/de/html/admin/admin_admins_add_acl.tpl +++ b/templates/de/html/admin/admin_admins_add_acl.tpl @@ -47,8 +47,8 @@   -    diff --git a/templates/de/html/admin/admin_admins_contct_default.tpl b/templates/de/html/admin/admin_admins_contct_default.tpl index ae15142c9f..ed94991068 100644 --- a/templates/de/html/admin/admin_admins_contct_default.tpl +++ b/templates/de/html/admin/admin_admins_contct_default.tpl @@ -1,5 +1,5 @@ - {--ADMINS_CONTACT_DEFAULT_MAIL--} diff --git a/templates/de/html/admin/admin_admins_contct_form.tpl b/templates/de/html/admin/admin_admins_contct_form.tpl index fb60f324df..3fc90377e2 100644 --- a/templates/de/html/admin/admin_admins_contct_form.tpl +++ b/templates/de/html/admin/admin_admins_contct_form.tpl @@ -22,10 +22,10 @@   -   - diff --git a/templates/de/html/admin/admin_admins_contct_select.tpl b/templates/de/html/admin/admin_admins_contct_select.tpl index 8fae6adec2..6889e94d3b 100644 --- a/templates/de/html/admin/admin_admins_contct_select.tpl +++ b/templates/de/html/admin/admin_admins_contct_select.tpl @@ -6,10 +6,10 @@   -  {--ADMINS_CONTACT_TYPE_MAIL--}   -  {--ADMINS_CONTACT_TYPE_MSG--} diff --git a/templates/de/html/admin/admin_admins_mails_edit.tpl b/templates/de/html/admin/admin_admins_mails_edit.tpl index 95a39db96c..94c8ae8eb2 100644 --- a/templates/de/html/admin/admin_admins_mails_edit.tpl +++ b/templates/de/html/admin/admin_admins_mails_edit.tpl @@ -14,9 +14,9 @@ {!__ADMINS_ROWS!} - - diff --git a/templates/de/html/admin/admin_admins_mails_edit_row.tpl b/templates/de/html/admin/admin_admins_mails_edit_row.tpl index 95fba57586..dbee101280 100644 --- a/templates/de/html/admin/admin_admins_mails_edit_row.tpl +++ b/templates/de/html/admin/admin_admins_mails_edit_row.tpl @@ -1,6 +1,6 @@ - $content[tpl] $content[content] diff --git a/templates/de/html/admin/admin_admins_mails_list.tpl b/templates/de/html/admin/admin_admins_mails_list.tpl index 152f92b42a..b5f01b0da9 100644 --- a/templates/de/html/admin/admin_admins_mails_list.tpl +++ b/templates/de/html/admin/admin_admins_mails_list.tpl @@ -16,9 +16,9 @@ {!__MAILS_ROWS!} - - diff --git a/templates/de/html/admin/admin_admins_mails_list_row.tpl b/templates/de/html/admin/admin_admins_mails_list_row.tpl index 1efcc0fedc..639ab67de3 100644 --- a/templates/de/html/admin/admin_admins_mails_list_row.tpl +++ b/templates/de/html/admin/admin_admins_mails_list_row.tpl @@ -1,6 +1,6 @@ - + $content[tpl] diff --git a/templates/de/html/admin/admin_amenu_delete.tpl b/templates/de/html/admin/admin_amenu_delete.tpl index 656609afdb..33100482f7 100644 --- a/templates/de/html/admin/admin_amenu_delete.tpl +++ b/templates/de/html/admin/admin_amenu_delete.tpl @@ -11,9 +11,9 @@ {!__MENU_ROWS!} - diff --git a/templates/de/html/admin/admin_amenu_delete_row.tpl b/templates/de/html/admin/admin_amenu_delete_row.tpl index 4a2ed7da94..9492481409 100644 --- a/templates/de/html/admin/admin_amenu_delete_row.tpl +++ b/templates/de/html/admin/admin_amenu_delete_row.tpl @@ -4,6 +4,6 @@ $content[menu] - + diff --git a/templates/de/html/admin/admin_amenu_edit.tpl b/templates/de/html/admin/admin_amenu_edit.tpl index b6bc09e410..70cd9933ae 100644 --- a/templates/de/html/admin/admin_amenu_edit.tpl +++ b/templates/de/html/admin/admin_amenu_edit.tpl @@ -11,9 +11,9 @@ {!__MENU_ROWS!} - - - + + + diff --git a/templates/de/html/admin/admin_amenu_edit_form.tpl b/templates/de/html/admin/admin_amenu_edit_form.tpl index 548dbb4dbf..d00568e1d2 100644 --- a/templates/de/html/admin/admin_amenu_edit_form.tpl +++ b/templates/de/html/admin/admin_amenu_edit_form.tpl @@ -12,11 +12,11 @@ {!__MENU_ROWS!} - - diff --git a/templates/de/html/admin/admin_amenu_edit_row.tpl b/templates/de/html/admin/admin_amenu_edit_row.tpl index d392cd9f49..0c72aedb1e 100644 --- a/templates/de/html/admin/admin_amenu_edit_row.tpl +++ b/templates/de/html/admin/admin_amenu_edit_row.tpl @@ -29,7 +29,7 @@ {--EDIT_TITLE--}: - diff --git a/templates/de/html/admin/admin_config_active.tpl b/templates/de/html/admin/admin_config_active.tpl index 0fcdad20bb..6c6da948e7 100644 --- a/templates/de/html/admin/admin_config_active.tpl +++ b/templates/de/html/admin/admin_config_active.tpl @@ -14,7 +14,7 @@   {--ADMIN_ACTIVE_LIMIT--}:   -   @@ -24,9 +24,9 @@   - -   diff --git a/templates/de/html/admin/admin_config_admin.tpl b/templates/de/html/admin/admin_config_admin.tpl index 9b28338749..b7661af378 100644 --- a/templates/de/html/admin/admin_config_admin.tpl +++ b/templates/de/html/admin/admin_config_admin.tpl @@ -13,14 +13,14 @@ style="padding-top: 3px; padding-right: 20px"> {--ADMIN_SELECT_MENU_TYPE--}: - + {--ADMIN_MENU_NEW--}   - + {--ADMIN_MENU_OLD--} @@ -28,9 +28,9 @@   - - diff --git a/templates/de/html/admin/admin_config_admins.tpl b/templates/de/html/admin/admin_config_admins.tpl index 7d257dd405..3cfb28d8a8 100644 --- a/templates/de/html/admin/admin_config_admins.tpl +++ b/templates/de/html/admin/admin_config_admins.tpl @@ -15,10 +15,10 @@ {!__ACL_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_admins_del.tpl b/templates/de/html/admin/admin_config_admins_del.tpl index e6581d2617..2b6d315697 100644 --- a/templates/de/html/admin/admin_config_admins_del.tpl +++ b/templates/de/html/admin/admin_config_admins_del.tpl @@ -15,9 +15,9 @@ {!__ACL_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_admins_del_row.tpl b/templates/de/html/admin/admin_config_admins_del_row.tpl index a8a09aded6..d44fb9112d 100644 --- a/templates/de/html/admin/admin_config_admins_del_row.tpl +++ b/templates/de/html/admin/admin_config_admins_del_row.tpl @@ -1,6 +1,6 @@ $content[id] - + $content[admin] diff --git a/templates/de/html/admin/admin_config_admins_edit.tpl b/templates/de/html/admin/admin_config_admins_edit.tpl index 84437cf088..811ef1e5bf 100644 --- a/templates/de/html/admin/admin_config_admins_edit.tpl +++ b/templates/de/html/admin/admin_config_admins_edit.tpl @@ -15,9 +15,9 @@ {!__ACL_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_admins_edit_row.tpl b/templates/de/html/admin/admin_config_admins_edit_row.tpl index bc6e90680d..c1094778a2 100644 --- a/templates/de/html/admin/admin_config_admins_edit_row.tpl +++ b/templates/de/html/admin/admin_config_admins_edit_row.tpl @@ -1,6 +1,6 @@ $content[id] - + + $content[admin] diff --git a/templates/de/html/admin/admin_config_autopurge.tpl b/templates/de/html/admin/admin_config_autopurge.tpl index cf42e63fab..8c35852a04 100644 --- a/templates/de/html/admin/admin_config_autopurge.tpl +++ b/templates/de/html/admin/admin_config_autopurge.tpl @@ -93,9 +93,9 @@ {--ADMIN_OPTION_AUTOPURGE_ACTIVE--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:  @@ -169,8 +169,8 @@   -    diff --git a/templates/de/html/admin/admin_config_beg.tpl b/templates/de/html/admin/admin_config_beg.tpl index 293a42e2c4..7c35d520bf 100644 --- a/templates/de/html/admin/admin_config_beg.tpl +++ b/templates/de/html/admin/admin_config_beg.tpl @@ -13,7 +13,7 @@ {--ADMIN_BEG_POINTS--}:   - @@ -24,7 +24,7 @@ {--ADMIN_BEG_POINTS_MAX--}:   - @@ -75,11 +75,11 @@   -  {--BEG_MODE_DIRECT--}
      -  {--BEG_MODE_REF--} @@ -96,9 +96,9 @@ {--ADMIN_BEG_RALLYE_ACTIVE--}   -  {--YES--}
    -  {--NO--} +  {--NO--} @@ -107,9 +107,9 @@ {--ADMIN_BEG_INCLUDE_OWN--}   -  {--YES--}
    -  {--NO--} @@ -118,7 +118,7 @@ {--ADMIN_BEG_RANKS--}   - @@ -130,9 +130,9 @@ {--ADMIN_BEG_RALLYE_ONLY_ACTIVE--}   -  {--YES--}
    -  {--NO--} +  {--NO--} @@ -166,9 +166,9 @@ {--ADMIN_BEG_RAL_EN_NOTIFY--}   -  {--YES--}
    -  {--NO--} @@ -177,9 +177,9 @@ {--ADMIN_BEG_RAL_DI_NOTIFY--}   -  {--YES--}
    -  {--NO--} @@ -188,9 +188,9 @@ {--ADMIN_BEG_NEW_MEMBER_NOTIFY--}   -  {--YES--}
    -  {--NO--} @@ -199,7 +199,7 @@ {--ADMIN_BEG_NOTIFY_BONUS--}   - @@ -215,9 +215,9 @@   - - diff --git a/templates/de/html/admin/admin_config_birthday.tpl b/templates/de/html/admin/admin_config_birthday.tpl index f0f0d6eca9..4b4c985222 100644 --- a/templates/de/html/admin/admin_config_birthday.tpl +++ b/templates/de/html/admin/admin_config_birthday.tpl @@ -12,7 +12,7 @@ {--ADMIN_BIRTHDAY_POINTS--}:
    ({--ADMIN_BIRTHDAY_POINTS_NOTE--})
      -  
    ({!POINTS!})
    @@ -25,9 +25,9 @@ {--ADMIN_BIRTHDAY_ONLY_ACTIVE--}   -  {--YES--}
    -  {--NO--} @@ -41,11 +41,11 @@   -  {--BIRTHDAY_MODE_DIRECT--}
      -  {--BIRTHDAY_MODE_REF--} @@ -53,8 +53,8 @@   -    diff --git a/templates/de/html/admin/admin_config_bonus.tpl b/templates/de/html/admin/admin_config_bonus.tpl index eb2863354f..4ea4d38a14 100644 --- a/templates/de/html/admin/admin_config_bonus.tpl +++ b/templates/de/html/admin/admin_config_bonus.tpl @@ -13,9 +13,9 @@  {--ADMIN_BONUS_RALLYE_IS_ACTIVE--}   -  {--YES--}
    -  {--NO--} +  {--NO--} @@ -25,9 +25,9 @@  {--ADMIN_BONUS_INCLUDE_OWN--}   -  {--YES--}
    -  {--NO--} @@ -40,9 +40,9 @@  {--ADMIN_BONUS_RALLYE_CLICK_INCLUDE--}   -  {--YES--}
    -  {--NO--} @@ -55,9 +55,9 @@  {--ADMIN_BONUS_RALLYE_LOGIN_INCLUDE--}   -  {--YES--}
    -  {--NO--} @@ -70,9 +70,9 @@  {--ADMIN_BONUS_RALLYE_ORDER_INCLUDE--}   -  {--YES--}
    -  {--NO--} @@ -85,9 +85,9 @@  {--ADMIN_BONUS_RALLYE_STATS_INCLUDE--}   -  {--YES--}
    -  {--NO--} @@ -100,9 +100,9 @@  {--ADMIN_BONUS_RALLYE_REF_INCLUDE--}   -  {--YES--}
    -  {--NO--} +  {--NO--} @@ -119,7 +119,7 @@ {--ADMIN_BONUS_ORDER_BONUS--}:   -  
    ({!POINTS!})
    @@ -131,7 +131,7 @@ {--ADMIN_BONUS_REF_BONUS--}:   -  
    ({!POINTS!})
    @@ -143,7 +143,7 @@ {--ADMIN_BONUS_STATS_BONUS--}:   -  
    ({!POINTS!})
    @@ -155,7 +155,7 @@ {--ADMIN_BONUS_LOGIN_BONUS--}:   -  
    ({!POINTS!})
    @@ -173,7 +173,7 @@ {--ADMIN_BONUS_TURBO_BONUS--}:   -  
    ({!POINTS!})
    @@ -235,7 +235,7 @@ {--ADMIN_BONUS_TURBO_RANKS--}:   - @@ -245,7 +245,7 @@ {--ADMIN_BONUS_TURBO_LINES--}:   - @@ -273,9 +273,9 @@  {--ADMIN_BONUS_RALLYE_EN_NOTIFY--}   -  {--YES--}
    -  {--NO--} @@ -285,9 +285,9 @@  {--ADMIN_BONUS_RALLYE_DI_NOTIFY--}   -  {--YES--}
    -  {--NO--} @@ -297,9 +297,9 @@  {--ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY--}   -  {--YES--}
    -  {--NO--} @@ -309,7 +309,7 @@ {--ADMIN_BONUS_RALLYE_NOTIFY_POINTS--}:   -  
    ({!POINTS!})
    @@ -327,8 +327,8 @@ - - + + diff --git a/templates/de/html/admin/admin_config_cache.tpl b/templates/de/html/admin/admin_config_cache.tpl index baf1bebca3..519e6dc1b7 100644 --- a/templates/de/html/admin/admin_config_cache.tpl +++ b/templates/de/html/admin/admin_config_cache.tpl @@ -12,9 +12,9 @@ {--ADMIN_CACHE_ADMINS--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -23,9 +23,9 @@ {--ADMIN_CACHE_ACLS--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -34,9 +34,9 @@ {--ADMIN_CACHE_EXTS--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -45,9 +45,9 @@ {--ADMIN_CACHE_CONFIG--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -56,9 +56,9 @@ {--ADMIN_CACHE_MODREG--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -67,9 +67,9 @@ {--ADMIN_CACHE_REFDEPTH--} -  {--YES--} -  {--NO--}  @@ -78,9 +78,9 @@ {--ADMIN_CACHE_REFSYS--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -89,9 +89,9 @@ {--ADMIN_CACHE_THEMES--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -100,9 +100,9 @@ {--ADMIN_CACHE_ADMIN_MENU--} -  {--YES--} -  {--NO--}  +  {--NO--}  @@ -111,7 +111,7 @@ {--ADMIN_CACHE_PATH--}: - @@ -119,9 +119,9 @@   - - diff --git a/templates/de/html/admin/admin_config_cats.tpl b/templates/de/html/admin/admin_config_cats.tpl index 8ce4af86d9..1ff1c499bf 100644 --- a/templates/de/html/admin/admin_config_cats.tpl +++ b/templates/de/html/admin/admin_config_cats.tpl @@ -14,10 +14,10 @@ {!__CAT_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_cats_row.tpl b/templates/de/html/admin/admin_config_cats_row.tpl index 30c29adb0b..f5f477048a 100644 --- a/templates/de/html/admin/admin_config_cats_row.tpl +++ b/templates/de/html/admin/admin_config_cats_row.tpl @@ -1,8 +1,8 @@ - + - +  $content[cat]  diff --git a/templates/de/html/admin/admin_config_doubler.tpl b/templates/de/html/admin/admin_config_doubler.tpl index fa117b4cc8..50a7dcb27b 100644 --- a/templates/de/html/admin/admin_config_doubler.tpl +++ b/templates/de/html/admin/admin_config_doubler.tpl @@ -13,7 +13,7 @@ {--ADMIN_DOUBLER_CHARGE--}:   - (%) @@ -24,7 +24,7 @@ {--ADMIN_DOUBLER_REFERRAL--}:   - (%) @@ -35,7 +35,7 @@ {--ADMIN_DOUBLER_MINIMUM--}:   - ({!POINTS!}) @@ -46,7 +46,7 @@ {--ADMIN_DOUBLER_MAXIMUM--}:   - ({!POINTS!}) @@ -57,7 +57,7 @@ {--ADMIN_DOUBLER_LEFT--}:   - ({!POINTS!}) @@ -68,7 +68,7 @@ {--ADMIN_DOUBLER_GROUP_SENT--}:   - @@ -79,7 +79,7 @@ {--ADMIN_DOUBLER_MAX_SENT--}:   - @@ -89,9 +89,9 @@ {--ADMIN_DOUBLER_SENT_ALL--}:   -  {--YES--}
    -  {--NO--} @@ -101,9 +101,9 @@ {--ADMIN_DOUBLER_JACKPOT--}:   -  {--YES--}
    -  {--NO--} @@ -112,9 +112,9 @@ {--ADMIN_DOUBLER_OWN--}:   -  {--YES--}
    -  {--NO--} +  {--NO--} @@ -153,11 +153,11 @@ {--ADMIN_DOUBLER_SEND_RESET--} -
      -
    @@ -205,8 +205,8 @@   -    diff --git a/templates/de/html/admin/admin_config_email.tpl b/templates/de/html/admin/admin_config_email.tpl index 10b3990f8c..4f1797501d 100644 --- a/templates/de/html/admin/admin_config_email.tpl +++ b/templates/de/html/admin/admin_config_email.tpl @@ -13,10 +13,10 @@ {!__ROWS!} - - diff --git a/templates/de/html/admin/admin_config_email_del.tpl b/templates/de/html/admin/admin_config_email_del.tpl index 0bf0c50306..3f92729d55 100644 --- a/templates/de/html/admin/admin_config_email_del.tpl +++ b/templates/de/html/admin/admin_config_email_del.tpl @@ -7,8 +7,8 @@ {!__ROWS!} - diff --git a/templates/de/html/admin/admin_config_email_del_row.tpl b/templates/de/html/admin/admin_config_email_del_row.tpl index 937368eade..3d3df8c235 100644 --- a/templates/de/html/admin/admin_config_email_del_row.tpl +++ b/templates/de/html/admin/admin_config_email_del_row.tpl @@ -10,7 +10,7 @@ $content[value] - ($content[comment]) diff --git a/templates/de/html/admin/admin_config_email_edit.tpl b/templates/de/html/admin/admin_config_email_edit.tpl index cfe3066e89..2cf69be142 100644 --- a/templates/de/html/admin/admin_config_email_edit.tpl +++ b/templates/de/html/admin/admin_config_email_edit.tpl @@ -7,8 +7,8 @@ {!__ROWS!} - - + + diff --git a/templates/de/html/admin/admin_config_email_edit_row.tpl b/templates/de/html/admin/admin_config_email_edit_row.tpl index 4f969940f6..e9cd08d24d 100644 --- a/templates/de/html/admin/admin_config_email_edit_row.tpl +++ b/templates/de/html/admin/admin_config_email_edit_row.tpl @@ -3,7 +3,7 @@ {--MRECEIVE_ID--} - $content[id]: + $content[id]: @@ -11,7 +11,7 @@ {--MREC_VALUE!}:  - @@ -20,7 +20,7 @@ {--MREC_COMMENT--}:  - diff --git a/templates/de/html/admin/admin_config_email_row.tpl b/templates/de/html/admin/admin_config_email_row.tpl index 5c28ebd7ca..88b03796c3 100644 --- a/templates/de/html/admin/admin_config_email_row.tpl +++ b/templates/de/html/admin/admin_config_email_row.tpl @@ -1,6 +1,6 @@ - +  $content[value]  diff --git a/templates/de/html/admin/admin_config_extensions.tpl b/templates/de/html/admin/admin_config_extensions.tpl index 280d717e11..f58df2be4c 100644 --- a/templates/de/html/admin/admin_config_extensions.tpl +++ b/templates/de/html/admin/admin_config_extensions.tpl @@ -10,14 +10,14 @@ {--ADMIN_VERBOSE_SQL--}: -  {--YES--} -  {--NO--}  +  {--NO--}  -    diff --git a/templates/de/html/admin/admin_config_holiday.tpl b/templates/de/html/admin/admin_config_holiday.tpl index 48dcf25bdb..63ad66ade2 100644 --- a/templates/de/html/admin/admin_config_holiday.tpl +++ b/templates/de/html/admin/admin_config_holiday.tpl @@ -11,7 +11,7 @@ {--HOLIDAY_ADMIN_MAX_HOLIDAY--}:   -  
    ({--DAYS--})
    @@ -28,10 +28,10 @@ {--HOLIDAY_ADMIN_MODE--}:   - {--HOLIDAY_ADMIN_MODE_RESET--}
    - {--HOLIDAY_ADMIN_MODE_DIRECT--} @@ -39,8 +39,8 @@   -    diff --git a/templates/de/html/admin/admin_config_home_main.tpl b/templates/de/html/admin/admin_config_home_main.tpl index 9c4e61c993..9668d4294c 100644 --- a/templates/de/html/admin/admin_config_home_main.tpl +++ b/templates/de/html/admin/admin_config_home_main.tpl @@ -6,10 +6,10 @@  · {--ADMIN_EDIT_HOME_TARGET--} + href="{!URL!}/modules.php?module=admin&what=config_home&sub=target"> · {--ADMIN_EDIT_HOME_TARGET--}  · {--ADMIN_EDIT_HOME_SETTINGS--} + href="{!URL!}/modules.php?module=admin&what=config_home&sub=settings"> · {--ADMIN_EDIT_HOME_SETTINGS--} diff --git a/templates/de/html/admin/admin_config_home_settings.tpl b/templates/de/html/admin/admin_config_home_settings.tpl index 9dd3d81129..c267919ac5 100644 --- a/templates/de/html/admin/admin_config_home_settings.tpl +++ b/templates/de/html/admin/admin_config_home_settings.tpl @@ -42,8 +42,8 @@   -    diff --git a/templates/de/html/admin/admin_config_home_settings_pro.tpl b/templates/de/html/admin/admin_config_home_settings_pro.tpl index 188a8d932d..a6be7cbab6 100644 --- a/templates/de/html/admin/admin_config_home_settings_pro.tpl +++ b/templates/de/html/admin/admin_config_home_settings_pro.tpl @@ -40,8 +40,8 @@ - - + + diff --git a/templates/de/html/admin/admin_config_mediadata.tpl b/templates/de/html/admin/admin_config_mediadata.tpl index 2f40274613..7e92590f55 100644 --- a/templates/de/html/admin/admin_config_mediadata.tpl +++ b/templates/de/html/admin/admin_config_mediadata.tpl @@ -23,7 +23,7 @@   {--ADMIN_MEDIADATA_MT_STAGE--}:   -   @@ -33,15 +33,15 @@   - -   -
    · {--ADMIN_MEDIADATA_MT_START_NOTE--}
    -· {--ADMIN_MEDIADATA_MT_STAGE_NOTE--}
    +
    · {--ADMIN_MEDIADATA_MT_START_NOTE--}
    +· {--ADMIN_MEDIADATA_MT_STAGE_NOTE--}
    diff --git a/templates/de/html/admin/admin_config_newsletter.tpl b/templates/de/html/admin/admin_config_newsletter.tpl index dc5181cc54..64417269db 100644 --- a/templates/de/html/admin/admin_config_newsletter.tpl +++ b/templates/de/html/admin/admin_config_newsletter.tpl @@ -13,7 +13,7 @@   {--ADMIN_NL_CHARGE--}:   -   @@ -22,8 +22,8 @@   -      diff --git a/templates/de/html/admin/admin_config_nickname.tpl b/templates/de/html/admin/admin_config_nickname.tpl index 668e46f470..94fea4b236 100644 --- a/templates/de/html/admin/admin_config_nickname.tpl +++ b/templates/de/html/admin/admin_config_nickname.tpl @@ -12,7 +12,7 @@ {--ADMIN_NICKNAME_MIN_LENGTH--}:   - + @@ -22,7 +22,7 @@ {--ADMIN_NICKNAME_PATTERN--}:   - + @@ -32,7 +32,7 @@ {--ADMIN_NICKNAME_LANG_CHARS--}:   - + @@ -40,8 +40,8 @@ - - + + diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index 7523acf10a..f69635a765 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -30,11 +30,11 @@   - {--ORDER_ADMIN_MAX--}: {--ORDER_ADMIN_MAX--}:    - {--ORDER_ADMIN_ORDER--}: {--ORDER_ADMIN_ORDER--}:    @@ -53,7 +53,7 @@ {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:   -   @@ -67,7 +67,7 @@   {--ADMIN_OPTION_MAX_TEXT_LENGTH--}:   -   @@ -80,9 +80,9 @@   {--ADMIN_OPTION_CHECK_EMAIL_TEXT--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -95,9 +95,9 @@   {--ADMIN_OPTION_CHECK_EMAIL_SUBJ--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -110,9 +110,9 @@   {--ADMIN_OPTION_URL_BLACKLIST--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -186,7 +186,7 @@ {--ORDER_MIN_RECEIVER_PER_ORDER--}:   -   @@ -196,9 +196,9 @@   - -   diff --git a/templates/de/html/admin/admin_config_order_form.tpl b/templates/de/html/admin/admin_config_order_form.tpl index ad5635c501..b812bc8721 100644 --- a/templates/de/html/admin/admin_config_order_form.tpl +++ b/templates/de/html/admin/admin_config_order_form.tpl @@ -23,11 +23,11 @@   - {--ORDER_ADMIN_MAX--}: {--ORDER_ADMIN_MAX--}:    - {--ORDER_ADMIN_ORDER--}: {--ORDER_ADMIN_ORDER--}:    @@ -50,7 +50,7 @@   - +   @@ -59,9 +59,9 @@   - -   diff --git a/templates/de/html/admin/admin_config_other.tpl b/templates/de/html/admin/admin_config_other.tpl index d3add5e0db..2677f4571b 100644 --- a/templates/de/html/admin/admin_config_other.tpl +++ b/templates/de/html/admin/admin_config_other.tpl @@ -21,7 +21,7 @@   {--ADMIN_OPTION_CODE_LENGTH--}:   -
    {--ADMIN_CODE_LENGTH_NOTE--}
      @@ -37,7 +37,7 @@   - +   @@ -53,7 +53,7 @@   - +   @@ -66,7 +66,7 @@   {--ADMIN_OPTION_POINTS_WORD--}:   -   @@ -79,7 +79,7 @@   {--ADMIN_OPTION_MT_WORD--}:   -   @@ -92,7 +92,7 @@   {--ADMIN_OPTION_MT_WORD2--}:   -   @@ -105,7 +105,7 @@   {--ADMIN_OPTION_MT_WORD3--}:   -   @@ -137,7 +137,7 @@   {--ADMIN_OPTION_REJECT_URL--}:   -   @@ -150,9 +150,9 @@   {--ADMIN_OPTION_CSS_PHP--}:   -  {--ADMIN_CSS_PHP_DIRECT--}
    -  {--ADMIN_CSS_PHP_FILE--} +  {--ADMIN_CSS_PHP_FILE--}
      @@ -165,9 +165,9 @@   {--ADMIN_OPTION_GUEST_MENU--}:   -  {--ADMIN_GUEST_MENU_ACTIVE--}
    -  {--ADMIN_GUEST_MENU_INACTIVE--} +  {--ADMIN_GUEST_MENU_INACTIVE--}
      @@ -180,9 +180,9 @@   {--ADMIN_OPTION_MEMBER_MENU--}:   -  {--ADMIN_MEMBER_MENU_ACTIVE--}
    -  {--ADMIN_MEMBER_MENU_INACTIVE--} +  {--ADMIN_MEMBER_MENU_INACTIVE--}
      @@ -195,9 +195,9 @@   {--ADMIN_OPTION_YOURE_HERE--}:   -  {--ADMIN_YOURE_HERE_ACTIVE--}
    -  {--ADMIN_YOURE_HERE_INACTIVE--} +  {--ADMIN_YOURE_HERE_INACTIVE--}
      @@ -211,8 +211,8 @@ {--ADMIN_OPTION_SHOW_TIMINGS--}:   -  {--YES--}
    -  {--NO--} +  {--YES--}
    +  {--NO--}
      @@ -226,8 +226,8 @@ {--ADMIN_OPTION_SHOW_POINTS_UNCONFIRMED--}:   -  {--YES--}
    -  {--NO--} +  {--YES--}
    +  {--NO--}
      @@ -240,9 +240,9 @@   {--ADMIN_OPTION_MAILID_REDIRECT--}:   -  {--ADMIN_CONFIG_MAILID_REDIRECT_INDEX--}
    -  {--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--} +  {--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--}
      @@ -272,7 +272,7 @@   {--ADMIN_OPTION_POOL_MAX_SEND--}:   -   @@ -285,9 +285,9 @@   {--ADMIN_OPTION_ZIPCODE_ACTIVE--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -300,9 +300,9 @@   {--ADMIN_OPTION_AUTOSEND_ACTIVE--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -332,9 +332,9 @@   {--ADMIN_OPTION_SEND_UPDATE--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -347,9 +347,9 @@   {--ADMIN_OPTION_NOTIFY_ADMIN--}:   - {--YES--}:  {--YES--}:   - {--NO--}:  + {--NO--}:    @@ -457,9 +457,9 @@   - -   diff --git a/templates/de/html/admin/admin_config_payouts.tpl b/templates/de/html/admin/admin_config_payouts.tpl index fc9f00bf36..848440c4a4 100644 --- a/templates/de/html/admin/admin_config_payouts.tpl +++ b/templates/de/html/admin/admin_config_payouts.tpl @@ -14,10 +14,10 @@ {!__PAYOUT_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_payouts_del.tpl b/templates/de/html/admin/admin_config_payouts_del.tpl index 0504bf9811..5ead10c586 100644 --- a/templates/de/html/admin/admin_config_payouts_del.tpl +++ b/templates/de/html/admin/admin_config_payouts_del.tpl @@ -14,7 +14,7 @@ {!__PAYOUT_ROWS!} - diff --git a/templates/de/html/admin/admin_config_payouts_del_row.tpl b/templates/de/html/admin/admin_config_payouts_del_row.tpl index 56d2fc3831..811139c14e 100644 --- a/templates/de/html/admin/admin_config_payouts_del_row.tpl +++ b/templates/de/html/admin/admin_config_payouts_del_row.tpl @@ -1,6 +1,6 @@ $content[id]$content[id] $content[title] $content[rate] diff --git a/templates/de/html/admin/admin_config_payouts_edit.tpl b/templates/de/html/admin/admin_config_payouts_edit.tpl index dd58a0cb3c..67d545b39b 100644 --- a/templates/de/html/admin/admin_config_payouts_edit.tpl +++ b/templates/de/html/admin/admin_config_payouts_edit.tpl @@ -15,9 +15,9 @@ {!__PAYOUT_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_payouts_edit_row.tpl b/templates/de/html/admin/admin_config_payouts_edit_row.tpl index 933f1f7355..8d96935b9d 100644 --- a/templates/de/html/admin/admin_config_payouts_edit_row.tpl +++ b/templates/de/html/admin/admin_config_payouts_edit_row.tpl @@ -1,14 +1,14 @@ $content[id]$content[id] - - - diff --git a/templates/de/html/admin/admin_config_payouts_row.tpl b/templates/de/html/admin/admin_config_payouts_row.tpl index 49d51906f3..1b66f085fa 100644 --- a/templates/de/html/admin/admin_config_payouts_row.tpl +++ b/templates/de/html/admin/admin_config_payouts_row.tpl @@ -1,6 +1,6 @@ - +  $content[from] diff --git a/templates/de/html/admin/admin_config_point_settings.tpl b/templates/de/html/admin/admin_config_point_settings.tpl index aeb780e387..163816e504 100644 --- a/templates/de/html/admin/admin_config_point_settings.tpl +++ b/templates/de/html/admin/admin_config_point_settings.tpl @@ -12,10 +12,10 @@ {--ADMIN_CONFIG_DIRECT_PAY--} - {--ADMIN_CONFIG_POINTS_DIRECT--} 
    -
    - {--ADMIN_CONFIG_POINTS_MAILS--}  + {--ADMIN_CONFIG_POINTS_MAILS--}  @@ -28,10 +28,10 @@ {--ADMIN_CONFIG_REFMODE--} - {--ADMIN_CONFIG_REFMODE_REF--}  -
    - {--ADMIN_CONFIG_REFMODE_DIRECT--}  + {--ADMIN_CONFIG_REFMODE_DIRECT--}  @@ -43,7 +43,7 @@ {--REF_PAYOUT--} - @@ -52,8 +52,8 @@ - - + + diff --git a/templates/de/html/admin/admin_config_points.tpl b/templates/de/html/admin/admin_config_points.tpl index e54218639f..f4b57a542c 100644 --- a/templates/de/html/admin/admin_config_points.tpl +++ b/templates/de/html/admin/admin_config_points.tpl @@ -6,18 +6,18 @@   - ·  ·  {--ADMIN_EDIT_POINTS--}   - ·  ·  {--ADMIN_EDIT_REFDEPTHS--} - ·  ·  {--ADMIN_EDIT_POINT_SETTINGS--} diff --git a/templates/de/html/admin/admin_config_primera.tpl b/templates/de/html/admin/admin_config_primera.tpl index 0fcd3bf4c0..5a5c4656ba 100644 --- a/templates/de/html/admin/admin_config_primera.tpl +++ b/templates/de/html/admin/admin_config_primera.tpl @@ -11,7 +11,7 @@ {--PRIMERA_ADMIN_API_NAME--}:   - @@ -21,7 +21,7 @@ {--PRIMERA_ADMIN_API_MD5--}:   -
    @@ -38,7 +38,7 @@ {--PRIMERA_ADMIN_REFID--}:   - @@ -51,7 +51,7 @@ {--PRIMERA_ADMIN_MIN_PAYOUT--}:   - Wernis @@ -61,7 +61,7 @@ {--PRIMERA_ADMIN_MIN_WITHDRAW--}:   - Wernis @@ -69,8 +69,8 @@   -    diff --git a/templates/de/html/admin/admin_config_proxy.tpl b/templates/de/html/admin/admin_config_proxy.tpl index e3ee4c1e7d..e0a2de6e6b 100644 --- a/templates/de/html/admin/admin_config_proxy.tpl +++ b/templates/de/html/admin/admin_config_proxy.tpl @@ -10,7 +10,7 @@ {--ADMIN_CONFIG_PROXY_HOST--} - +   @@ -19,7 +19,7 @@ {--ADMIN_CONFIG_PROXY_PORT--} - +   @@ -28,7 +28,7 @@ {--ADMIN_CONFIG_PROXY_USERNAME--} - +   @@ -37,14 +37,14 @@ {--ADMIN_CONFIG_PROXY_PASSWORD--} - +   - - + + diff --git a/templates/de/html/admin/admin_config_rallye_del.tpl b/templates/de/html/admin/admin_config_rallye_del.tpl index 0b0479c880..c99475198d 100644 --- a/templates/de/html/admin/admin_config_rallye_del.tpl +++ b/templates/de/html/admin/admin_config_rallye_del.tpl @@ -17,7 +17,7 @@ {!__PRICE_ROWS!} - diff --git a/templates/de/html/admin/admin_config_rallye_del_row.tpl b/templates/de/html/admin/admin_config_rallye_del_row.tpl index 3996a71e0c..01d3c45739 100644 --- a/templates/de/html/admin/admin_config_rallye_del_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_del_row.tpl @@ -1,6 +1,6 @@ - $content[id] $content[level]  $content[points] diff --git a/templates/de/html/admin/admin_config_rallye_edit.tpl b/templates/de/html/admin/admin_config_rallye_edit.tpl index 73c5dfb8b8..08de0aff70 100644 --- a/templates/de/html/admin/admin_config_rallye_edit.tpl +++ b/templates/de/html/admin/admin_config_rallye_edit.tpl @@ -20,9 +20,9 @@ {!__PRICE_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_rallye_edit_row.tpl b/templates/de/html/admin/admin_config_rallye_edit_row.tpl index ec9fcf86da..def6c30280 100644 --- a/templates/de/html/admin/admin_config_rallye_edit_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_edit_row.tpl @@ -4,13 +4,13 @@ $content[rallyes] -   -    -    diff --git a/templates/de/html/admin/admin_config_rallye_prices.tpl b/templates/de/html/admin/admin_config_rallye_prices.tpl index 84aae706d8..510362f33a 100644 --- a/templates/de/html/admin/admin_config_rallye_prices.tpl +++ b/templates/de/html/admin/admin_config_rallye_prices.tpl @@ -17,10 +17,10 @@ {!__PRICE_ROWS!} - - diff --git a/templates/de/html/admin/admin_config_rallye_prices_row.tpl b/templates/de/html/admin/admin_config_rallye_prices_row.tpl index dcf78d7360..75ae49c852 100644 --- a/templates/de/html/admin/admin_config_rallye_prices_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_prices_row.tpl @@ -1,6 +1,6 @@ - + $content[level] diff --git a/templates/de/html/admin/admin_config_refback.tpl b/templates/de/html/admin/admin_config_refback.tpl index f94ffc56d9..03d3506232 100644 --- a/templates/de/html/admin/admin_config_refback.tpl +++ b/templates/de/html/admin/admin_config_refback.tpl @@ -11,8 +11,8 @@ {--ADMIN_CONFIG_REFBACK_ENABLED--} - {--YES--}
    - {--NO--} + {--YES--}
    + {--NO--}   @@ -21,7 +21,7 @@ {--ADMIN_CONFIG_REFBACK_MIN_PERCENTS--} - % + %   @@ -30,14 +30,14 @@ {--ADMIN_CONFIG_REFBACK_MAX_PERCENTS--} - % + %   - - + + diff --git a/templates/de/html/admin/admin_config_refid.tpl b/templates/de/html/admin/admin_config_refid.tpl index 29e3604ebf..ff3e935821 100644 --- a/templates/de/html/admin/admin_config_refid.tpl +++ b/templates/de/html/admin/admin_config_refid.tpl @@ -45,7 +45,7 @@ {--ADMIN_RANDOM_MIN_CONFIRMED--}: - + @@ -53,8 +53,8 @@ - - + + diff --git a/templates/de/html/admin/admin_config_reg_pro.tpl b/templates/de/html/admin/admin_config_reg_pro.tpl index ec5551f02c..19da1339bc 100644 --- a/templates/de/html/admin/admin_config_reg_pro.tpl +++ b/templates/de/html/admin/admin_config_reg_pro.tpl @@ -15,7 +15,7 @@   {--LEAST_CATS--}:   -   @@ -45,9 +45,9 @@   - -   diff --git a/templates/de/html/admin/admin_config_register.tpl b/templates/de/html/admin/admin_config_register.tpl index e74553abfd..b2ab2b62d7 100644 --- a/templates/de/html/admin/admin_config_register.tpl +++ b/templates/de/html/admin/admin_config_register.tpl @@ -13,8 +13,8 @@ {!__REGISTER_ROWS!} - - + + diff --git a/templates/de/html/admin/admin_config_register2.tpl b/templates/de/html/admin/admin_config_register2.tpl index 7d15a68f3a..00d1dbfed9 100644 --- a/templates/de/html/admin/admin_config_register2.tpl +++ b/templates/de/html/admin/admin_config_register2.tpl @@ -13,7 +13,7 @@   {--LEAST_CATS--}:   -   @@ -73,9 +73,9 @@   - -   diff --git a/templates/de/html/admin/admin_config_rewrite.tpl b/templates/de/html/admin/admin_config_rewrite.tpl index 522f2179e0..789513c00d 100644 --- a/templates/de/html/admin/admin_config_rewrite.tpl +++ b/templates/de/html/admin/admin_config_rewrite.tpl @@ -1,5 +1,5 @@
    -
    + {!__MODULE_ROWS!} -
    @@ -14,9 +14,9 @@
    diff --git a/templates/de/html/admin/admin_config_rewrite_rows.tpl b/templates/de/html/admin/admin_config_rewrite_rows.tpl index 873f06e132..820f71a1b8 100644 --- a/templates/de/html/admin/admin_config_rewrite_rows.tpl +++ b/templates/de/html/admin/admin_config_rewrite_rows.tpl @@ -2,8 +2,8 @@ $content[module]  $content[title] - {--YES--}:  - {--NO--}:  diff --git a/templates/de/html/admin/admin_config_secure.tpl b/templates/de/html/admin/admin_config_secure.tpl index 3725f04b06..83aa2da79b 100644 --- a/templates/de/html/admin/admin_config_secure.tpl +++ b/templates/de/html/admin/admin_config_secure.tpl @@ -14,7 +14,7 @@   {--MIN_PASS_LENGTH--}:   -   @@ -25,7 +25,7 @@   {--ADMIN_SALT_LENGTH--}:   -   @@ -34,8 +34,8 @@   -      diff --git a/templates/de/html/admin/admin_config_sponsor.tpl b/templates/de/html/admin/admin_config_sponsor.tpl index 6ea7912bbc..1aa82794a9 100644 --- a/templates/de/html/admin/admin_config_sponsor.tpl +++ b/templates/de/html/admin/admin_config_sponsor.tpl @@ -11,7 +11,7 @@ {--ADMIN_SPONSOR_MIN_POINTS--}: - +   @@ -20,14 +20,14 @@ {--ADMIN_SPONSOR_REF_POINTS--}: - +   - - + + diff --git a/templates/de/html/admin/admin_config_stats.tpl b/templates/de/html/admin/admin_config_stats.tpl index 2f925740bf..d80da7604e 100644 --- a/templates/de/html/admin/admin_config_stats.tpl +++ b/templates/de/html/admin/admin_config_stats.tpl @@ -13,7 +13,7 @@ {--ADMIN_GSTATS_MEMBERS--}:
    ({--ADMIN_GSTATS_MEMBERS_NOTE--})
      - @@ -26,7 +26,7 @@ {--ADMIN_GSTATS_MODULES--}:
    ({--ADMIN_GSTATS_MODULES_NOTE--})
      - @@ -39,7 +39,7 @@ {--ADMIN_GSTATS_INACTIVE--}:
    ({--ADMIN_GSTATS_INACTIVE_NOTE--})
      - @@ -55,15 +55,15 @@ {--ADMIN_MEMBER_STATS_LIMIT--}:   -   -    diff --git a/templates/de/html/admin/admin_config_sub_points.tpl b/templates/de/html/admin/admin_config_sub_points.tpl index 2c28b0adcf..b618e48344 100644 --- a/templates/de/html/admin/admin_config_sub_points.tpl +++ b/templates/de/html/admin/admin_config_sub_points.tpl @@ -16,7 +16,7 @@   {--POINTS_REGISTER--}:   -   @@ -28,7 +28,7 @@   {--POINTS_REF--}:   -   @@ -37,8 +37,8 @@   -      diff --git a/templates/de/html/admin/admin_config_title.tpl b/templates/de/html/admin/admin_config_title.tpl index a72e4013da..b5bb748df9 100644 --- a/templates/de/html/admin/admin_config_title.tpl +++ b/templates/de/html/admin/admin_config_title.tpl @@ -42,7 +42,7 @@ {--ADMIN_TITLE_LEFT--}:   - @@ -51,7 +51,7 @@ {--ADMIN_TITLE_MIDDLE--}:   - @@ -60,15 +60,15 @@ {--ADMIN_TITLE_RIGHT--}:   -   -    diff --git a/templates/de/html/admin/admin_config_top10.tpl b/templates/de/html/admin/admin_config_top10.tpl index 634fe7aebe..813e6c8d30 100644 --- a/templates/de/html/admin/admin_config_top10.tpl +++ b/templates/de/html/admin/admin_config_top10.tpl @@ -11,15 +11,15 @@ {--TOP10_ADMIN_MAX_TOP10--}:   -   -    diff --git a/templates/de/html/admin/admin_config_transfer.tpl b/templates/de/html/admin/admin_config_transfer.tpl index 22ad6abfb5..f9ea21b038 100644 --- a/templates/de/html/admin/admin_config_transfer.tpl +++ b/templates/de/html/admin/admin_config_transfer.tpl @@ -11,7 +11,7 @@ {--ADMIN_TRANSFER_MAX--}:   - @@ -37,7 +37,7 @@ {--ADMIN_TRANSFER_BALANCE--}:   -  
    ({!POINTS!})
    @@ -48,7 +48,7 @@ {--ADMIN_TRANSFER_CODE--}:
    ({--ADMIN_TRANSFER_CODE_NOTE--})
      - @@ -66,8 +66,8 @@   -    diff --git a/templates/de/html/admin/admin_config_user.tpl b/templates/de/html/admin/admin_config_user.tpl index cc6dcf9d8a..c0a49920bc 100644 --- a/templates/de/html/admin/admin_config_user.tpl +++ b/templates/de/html/admin/admin_config_user.tpl @@ -11,7 +11,7 @@ {--USER_ADMIN_LIMIT_USER--}:   - @@ -21,7 +21,7 @@ {--USER_ADMIN_ALPHA_USER--}:   - @@ -29,8 +29,8 @@   -    diff --git a/templates/de/html/admin/admin_config_wernis.tpl b/templates/de/html/admin/admin_config_wernis.tpl index 111ffefe88..8cc0bcbf70 100644 --- a/templates/de/html/admin/admin_config_wernis.tpl +++ b/templates/de/html/admin/admin_config_wernis.tpl @@ -11,7 +11,7 @@ {--WERNIS_ADMIN_API_ID--}:   - @@ -21,7 +21,7 @@ {--WERNIS_ADMIN_API_MD5--}:   - @@ -31,7 +31,7 @@ {--WERNIS_ADMIN_API_URL--}:   - @@ -42,14 +42,14 @@ {--WERNIS_ADMIN_REFID--}:   - + {--WERNIS_ADMIN_WPASS--}:   - + @@ -62,7 +62,7 @@ {--WERNIS_ADMIN_MIN_PAYOUT--}:   - Wernis + Wernis @@ -72,7 +72,7 @@ {--WERNIS_ADMIN_MIN_WITHDRAW--}:   - Wernis + Wernis @@ -82,7 +82,7 @@ {--WERNIS_ADMIN_PAYOUT_FACTOR--}:   - + @@ -92,7 +92,7 @@ {--WERNIS_ADMIN_WITHDRAW_FACTOR--}:   - + @@ -102,7 +102,7 @@ {--WERNIS_ADMIN_PAYOUT_FEE_PERCENT--}:   - + @@ -112,7 +112,7 @@ {--WERNIS_ADMIN_WITHDRAW_FEE_PERCENT--}:   - % + % @@ -122,7 +122,7 @@ {--WERNIS_ADMIN_PAYOUT_FEE_FIX--}:   - {!POINTS!} + {!POINTS!} @@ -132,7 +132,7 @@ {--WERNIS_ADMIN_WITHDRAW_FEE_FIX--}:   - {!POINTS!} + {!POINTS!} @@ -145,8 +145,8 @@ {--WERNIS_ADMIN_PAYOUT_ACTIVE--}   -  {--YES--} -  {--NO--} +  {--YES--} +  {--NO--} @@ -156,16 +156,16 @@ {--WERNIS_ADMIN_WITHDRAW_ACTIVE--}   -  {--YES--} -  {--NO--} +  {--YES--} +  {--NO--}   -    diff --git a/templates/de/html/admin/admin_contct_user_form.tpl b/templates/de/html/admin/admin_contct_user_form.tpl index 5ee64cabb9..09e14a16f9 100644 --- a/templates/de/html/admin/admin_contct_user_form.tpl +++ b/templates/de/html/admin/admin_contct_user_form.tpl @@ -13,8 +13,8 @@ - - + + diff --git a/templates/de/html/admin/admin_del_admins.tpl b/templates/de/html/admin/admin_del_admins.tpl index f47ba8847f..2e3f62a4ad 100644 --- a/templates/de/html/admin/admin_del_admins.tpl +++ b/templates/de/html/admin/admin_del_admins.tpl @@ -13,9 +13,9 @@ {!__ADMINS_ROWS!} - - diff --git a/templates/de/html/admin/admin_del_admins_row.tpl b/templates/de/html/admin/admin_del_admins_row.tpl index 7a70ed41c9..76f903ec94 100644 --- a/templates/de/html/admin/admin_del_admins_row.tpl +++ b/templates/de/html/admin/admin_del_admins_row.tpl @@ -1,6 +1,6 @@ - $content[id] + $content[id] $content[login] diff --git a/templates/de/html/admin/admin_del_bank_packages.tpl b/templates/de/html/admin/admin_del_bank_packages.tpl index 9550a24ffc..cea4e33f83 100644 --- a/templates/de/html/admin/admin_del_bank_packages.tpl +++ b/templates/de/html/admin/admin_del_bank_packages.tpl @@ -13,7 +13,7 @@ $content - + diff --git a/templates/de/html/admin/admin_del_bank_packages_row.tpl b/templates/de/html/admin/admin_del_bank_packages_row.tpl index 1519a93d65..d9d36c593d 100644 --- a/templates/de/html/admin/admin_del_bank_packages_row.tpl +++ b/templates/de/html/admin/admin_del_bank_packages_row.tpl @@ -1,6 +1,6 @@ - + $content[id] diff --git a/templates/de/html/admin/admin_del_cats.tpl b/templates/de/html/admin/admin_del_cats.tpl index 61ab274792..2e081cc25d 100644 --- a/templates/de/html/admin/admin_del_cats.tpl +++ b/templates/de/html/admin/admin_del_cats.tpl @@ -8,8 +8,8 @@ {!__CAT_ROWS!} - diff --git a/templates/de/html/admin/admin_del_cats_row.tpl b/templates/de/html/admin/admin_del_cats_row.tpl index 865cdc754c..2399109d5d 100644 --- a/templates/de/html/admin/admin_del_cats_row.tpl +++ b/templates/de/html/admin/admin_del_cats_row.tpl @@ -9,7 +9,7 @@ - $content[cat] $content[cat] diff --git a/templates/de/html/admin/admin_del_payments.tpl b/templates/de/html/admin/admin_del_payments.tpl index e6dd1c83a0..fd0d6c81ce 100644 --- a/templates/de/html/admin/admin_del_payments.tpl +++ b/templates/de/html/admin/admin_del_payments.tpl @@ -7,8 +7,8 @@ {!__PAYMENT_ROWS!} - diff --git a/templates/de/html/admin/admin_del_payments_row.tpl b/templates/de/html/admin/admin_del_payments_row.tpl index 490c45b8b1..defdfbcd49 100644 --- a/templates/de/html/admin/admin_del_payments_row.tpl +++ b/templates/de/html/admin/admin_del_payments_row.tpl @@ -7,7 +7,7 @@ $content[time] - {--_SECONDS--} ($content[title]) diff --git a/templates/de/html/admin/admin_del_sponsor.tpl b/templates/de/html/admin/admin_del_sponsor.tpl index 5a9975c5b4..eaecffa655 100644 --- a/templates/de/html/admin/admin_del_sponsor.tpl +++ b/templates/de/html/admin/admin_del_sponsor.tpl @@ -2,7 +2,7 @@ @@ -22,8 +22,8 @@
    -
    {--ADMIN_HEADER_DEL_SPONSOR_1--}{!__UID!}{--ADMIN_HEADER_DEL_SPONSOR_2--} +
    {--ADMIN_HEADER_DEL_SPONSOR_1--}{!__UID!}{--ADMIN_HEADER_DEL_SPONSOR_2--}
     
     
    diff --git a/templates/de/html/admin/admin_del_surfbar_urls_row.tpl b/templates/de/html/admin/admin_del_surfbar_urls_row.tpl index 1c4301d7d4..4cf9fa410d 100644 --- a/templates/de/html/admin/admin_del_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_del_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ - - + + $content[userid] diff --git a/templates/de/html/admin/admin_del_transfer_row.tpl b/templates/de/html/admin/admin_del_transfer_row.tpl index 6874f226b2..8351fd1b2f 100644 --- a/templates/de/html/admin/admin_del_transfer_row.tpl +++ b/templates/de/html/admin/admin_del_transfer_row.tpl @@ -1,6 +1,6 @@ - + $content[stamp] diff --git a/templates/de/html/admin/admin_del_user.tpl b/templates/de/html/admin/admin_del_user.tpl index fb8e34387d..9b5d2447e7 100644 --- a/templates/de/html/admin/admin_del_user.tpl +++ b/templates/de/html/admin/admin_del_user.tpl @@ -33,8 +33,8 @@ - - + + diff --git a/templates/de/html/admin/admin_edit_admins.tpl b/templates/de/html/admin/admin_edit_admins.tpl index 9e08c75e4c..dcffb91d30 100644 --- a/templates/de/html/admin/admin_edit_admins.tpl +++ b/templates/de/html/admin/admin_edit_admins.tpl @@ -16,9 +16,9 @@ {!__ADMINS_ROWS!} - - diff --git a/templates/de/html/admin/admin_edit_admins_row.tpl b/templates/de/html/admin/admin_edit_admins_row.tpl index 998d74dee4..4590d282dc 100644 --- a/templates/de/html/admin/admin_edit_admins_row.tpl +++ b/templates/de/html/admin/admin_edit_admins_row.tpl @@ -1,14 +1,14 @@ $content[id] - - -    - + + diff --git a/templates/de/html/admin/admin_edit_bank_packages_row.tpl b/templates/de/html/admin/admin_edit_bank_packages_row.tpl index f881f0da92..a8a02686ac 100644 --- a/templates/de/html/admin/admin_edit_bank_packages_row.tpl +++ b/templates/de/html/admin/admin_edit_bank_packages_row.tpl @@ -1,7 +1,7 @@ {--ADMIN_BANK_PACKAGE_TITLE--}:
    - + {--ADMIN_BANK_PACKAGE_DESCRIPTION--}:
    @@ -9,17 +9,17 @@ {--ADMIN_BANK_PACKAGE_ACCOUNT_FEE--}:
    - {!POINTS!} + {!POINTS!} {--ADMIN_BANK_PACKAGE_FREE_TRANSFERS--}:
    - + {--ADMIN_BANK_PACKAGE_TRANSFER_FEE--}:
    - {!POINTS!} + {!POINTS!} {--ADMIN_BANK_PACKAGE_OUTPUT_MODE--}:
    @@ -33,25 +33,25 @@ {--ADMIN_BANK_PACKAGE_FREE_TRANSFERS--}:
    - + {--ADMIN_BANK_PACKAGE_INTEREST_PLUS--}:
    - % + % {--ADMIN_BANK_PACKAGE_INTEREST_MINUS--}:
    - % + % {--ADMIN_BANK_PACKAGE_FIRST_PAYMENT--}:
    - + {--ADMIN_BANK_PACKAGE_FREE_ACCOUNT_INCOME--}:
    - {!POINTS!} + {!POINTS!} @@ -61,9 +61,9 @@ {--ADMIN_BANK_PACKAGE_EDIT_TAN_LOCK--}:
    - + - + diff --git a/templates/de/html/admin/admin_edit_cats.tpl b/templates/de/html/admin/admin_edit_cats.tpl index d54d59de0c..77d9b42aab 100644 --- a/templates/de/html/admin/admin_edit_cats.tpl +++ b/templates/de/html/admin/admin_edit_cats.tpl @@ -8,8 +8,8 @@ {!__CAT_ROWS!} - - + + diff --git a/templates/de/html/admin/admin_edit_cats_row.tpl b/templates/de/html/admin/admin_edit_cats_row.tpl index 779660940d..1f2f311525 100644 --- a/templates/de/html/admin/admin_edit_cats_row.tpl +++ b/templates/de/html/admin/admin_edit_cats_row.tpl @@ -8,7 +8,7 @@ {--CAT_DESCRIPTION--}:    - @@ -26,7 +26,7 @@ {--SORT_KEY--}:    - diff --git a/templates/de/html/admin/admin_edit_email.tpl b/templates/de/html/admin/admin_edit_email.tpl index 96afa8945e..5bc1c9e2db 100644 --- a/templates/de/html/admin/admin_edit_email.tpl +++ b/templates/de/html/admin/admin_edit_email.tpl @@ -13,7 +13,7 @@ {--EDIT_URL--}:   -   @@ -23,7 +23,7 @@ {--EMAIL_EDIT_SUBJ--}:   -   @@ -40,9 +40,9 @@   - -   diff --git a/templates/de/html/admin/admin_edit_email_row.tpl b/templates/de/html/admin/admin_edit_email_row.tpl index d0c0ceec0c..dc7c3135cd 100644 --- a/templates/de/html/admin/admin_edit_email_row.tpl +++ b/templates/de/html/admin/admin_edit_email_row.tpl @@ -1,7 +1,7 @@   - +   $content[subj] diff --git a/templates/de/html/admin/admin_edit_email_select.tpl b/templates/de/html/admin/admin_edit_email_select.tpl index 541b4e4458..5cd110f658 100644 --- a/templates/de/html/admin/admin_edit_email_select.tpl +++ b/templates/de/html/admin/admin_edit_email_select.tpl @@ -12,8 +12,8 @@   - - +   diff --git a/templates/de/html/admin/admin_edit_payments.tpl b/templates/de/html/admin/admin_edit_payments.tpl index 0b3295bbd5..07e097f156 100644 --- a/templates/de/html/admin/admin_edit_payments.tpl +++ b/templates/de/html/admin/admin_edit_payments.tpl @@ -8,9 +8,9 @@ {!__PAYMENT_ROWS!} - - diff --git a/templates/de/html/admin/admin_edit_payments_row.tpl b/templates/de/html/admin/admin_edit_payments_row.tpl index 4efa5e529e..6cae8ed814 100644 --- a/templates/de/html/admin/admin_edit_payments_row.tpl +++ b/templates/de/html/admin/admin_edit_payments_row.tpl @@ -7,7 +7,7 @@ {--PAY_TIME--}:  - {--_SECONDS--} @@ -17,7 +17,7 @@ {--PAY_PAYMENT--}:  - {!POINTS!} @@ -26,7 +26,7 @@ {--PAY_PRICE--}:  - {!POINTS!} @@ -35,7 +35,7 @@ {--PAY_TITLE--}:  -   diff --git a/templates/de/html/admin/admin_edit_rallyes.tpl b/templates/de/html/admin/admin_edit_rallyes.tpl index faf6347884..8e9a8542ad 100644 --- a/templates/de/html/admin/admin_edit_rallyes.tpl +++ b/templates/de/html/admin/admin_edit_rallyes.tpl @@ -6,9 +6,9 @@ {!__RALLYE_ROWS!} - - diff --git a/templates/de/html/admin/admin_edit_rallyes_row.tpl b/templates/de/html/admin/admin_edit_rallyes_row.tpl index c5e0b2d7cb..e60193ba59 100644 --- a/templates/de/html/admin/admin_edit_rallyes_row.tpl +++ b/templates/de/html/admin/admin_edit_rallyes_row.tpl @@ -4,7 +4,7 @@ {--RALLYE_TITLE--}:   - @@ -58,7 +58,7 @@ {--RALLYE_MIN_USERS_MINI--}:   - @@ -72,7 +72,7 @@ {--RALLYE_MIN_PRICES_MINI--}:   - diff --git a/templates/de/html/admin/admin_edit_sponsor_add_points.tpl b/templates/de/html/admin/admin_edit_sponsor_add_points.tpl index 3954a5fdad..1339896138 100644 --- a/templates/de/html/admin/admin_edit_sponsor_add_points.tpl +++ b/templates/de/html/admin/admin_edit_sponsor_add_points.tpl @@ -12,7 +12,7 @@ {--ADMIN_SUM_SPONSOR_POINTS--}:   - +   @@ -23,8 +23,8 @@   - - + + diff --git a/templates/de/html/admin/admin_edit_sponsor_edit.tpl b/templates/de/html/admin/admin_edit_sponsor_edit.tpl index 5df6cb2a3d..59ed7c1027 100644 --- a/templates/de/html/admin/admin_edit_sponsor_edit.tpl +++ b/templates/de/html/admin/admin_edit_sponsor_edit.tpl @@ -20,7 +20,7 @@   - +   @@ -31,7 +31,7 @@   - +   @@ -42,7 +42,7 @@   - +   @@ -78,8 +78,8 @@   - - + +   @@ -91,7 +91,7 @@   - +   @@ -102,7 +102,7 @@   - +   @@ -114,8 +114,8 @@   - - - + - +   @@ -127,7 +127,7 @@   - +   @@ -138,7 +138,7 @@   - +   @@ -149,7 +149,7 @@   - +   @@ -161,7 +161,7 @@   - +   @@ -172,7 +172,7 @@   - +   @@ -190,8 +190,8 @@   - - + +   @@ -239,8 +239,8 @@   - - + + diff --git a/templates/de/html/admin/admin_edit_sponsor_sub_points.tpl b/templates/de/html/admin/admin_edit_sponsor_sub_points.tpl index d9402b45a0..465a386273 100644 --- a/templates/de/html/admin/admin_edit_sponsor_sub_points.tpl +++ b/templates/de/html/admin/admin_edit_sponsor_sub_points.tpl @@ -12,7 +12,7 @@ {--ADMIN_SUM_SPONSOR_POINTS--}:   - +   @@ -23,8 +23,8 @@   - - + + diff --git a/templates/de/html/admin/admin_edit_user.tpl b/templates/de/html/admin/admin_edit_user.tpl index 5b463d2e9b..15ccea30bb 100644 --- a/templates/de/html/admin/admin_edit_user.tpl +++ b/templates/de/html/admin/admin_edit_user.tpl @@ -20,43 +20,43 @@ {--SURNAME--}:   - {--FAMILY_NAME--}:   - {--STREET_NR--}:   - {--COUNTRY--}:   - {--ZIP--}:   - {--CITY--}:   - {--ADDY--}:   - @@ -66,18 +66,18 @@ {--ADMIN_PASS1--}:   - {--ADMIN_PASS2--}:   - -    diff --git a/templates/de/html/admin/admin_ext_reg_form.tpl b/templates/de/html/admin/admin_ext_reg_form.tpl index bb326d8990..11b55dc3a0 100644 --- a/templates/de/html/admin/admin_ext_reg_form.tpl +++ b/templates/de/html/admin/admin_ext_reg_form.tpl @@ -1,6 +1,6 @@
    \ No newline at end of file diff --git a/templates/de/html/admin/admin_extensions.tpl b/templates/de/html/admin/admin_extensions.tpl index 29398b149b..a584be7904 100644 --- a/templates/de/html/admin/admin_extensions.tpl +++ b/templates/de/html/admin/admin_extensions.tpl @@ -15,10 +15,10 @@ {!__EXT_ROWS!} - - - - + + + + diff --git a/templates/de/html/admin/admin_extensions_delete.tpl b/templates/de/html/admin/admin_extensions_delete.tpl index 5fd1395832..90b18cc094 100644 --- a/templates/de/html/admin/admin_extensions_delete.tpl +++ b/templates/de/html/admin/admin_extensions_delete.tpl @@ -12,7 +12,7 @@ {!__EXTENSIONS_ROWS!} - diff --git a/templates/de/html/admin/admin_extensions_delete_row.tpl b/templates/de/html/admin/admin_extensions_delete_row.tpl index 115b79e724..96bb3f8e23 100644 --- a/templates/de/html/admin/admin_extensions_delete_row.tpl +++ b/templates/de/html/admin/admin_extensions_delete_row.tpl @@ -1,6 +1,6 @@ $content[id] - +  $content[ext_name] diff --git a/templates/de/html/admin/admin_extensions_edit.tpl b/templates/de/html/admin/admin_extensions_edit.tpl index d57ea6af19..2a3e266f2a 100644 --- a/templates/de/html/admin/admin_extensions_edit.tpl +++ b/templates/de/html/admin/admin_extensions_edit.tpl @@ -14,9 +14,9 @@ {!__EXTENSIONS_ROWS!} - - diff --git a/templates/de/html/admin/admin_extensions_edit_row.tpl b/templates/de/html/admin/admin_extensions_edit_row.tpl index 177716455a..7e03d7a53d 100644 --- a/templates/de/html/admin/admin_extensions_edit_row.tpl +++ b/templates/de/html/admin/admin_extensions_edit_row.tpl @@ -1,6 +1,6 @@ $content[id] - +   $content[name] diff --git a/templates/de/html/admin/admin_extensions_row.tpl b/templates/de/html/admin/admin_extensions_row.tpl index 398ee9391b..6217643493 100644 --- a/templates/de/html/admin/admin_extensions_row.tpl +++ b/templates/de/html/admin/admin_extensions_row.tpl @@ -1,6 +1,6 @@ - +   $content[name] diff --git a/templates/de/html/admin/admin_gmenu_delete.tpl b/templates/de/html/admin/admin_gmenu_delete.tpl index 04caa6691f..972a323a51 100644 --- a/templates/de/html/admin/admin_gmenu_delete.tpl +++ b/templates/de/html/admin/admin_gmenu_delete.tpl @@ -11,9 +11,9 @@ {!__MENU_ROWS!} - diff --git a/templates/de/html/admin/admin_gmenu_delete_row.tpl b/templates/de/html/admin/admin_gmenu_delete_row.tpl index 7e8aa7adef..3f25da6e7b 100644 --- a/templates/de/html/admin/admin_gmenu_delete_row.tpl +++ b/templates/de/html/admin/admin_gmenu_delete_row.tpl @@ -1,6 +1,6 @@ $content[cnt]. {--ENTRY_DELETE--}:   - $content[menu] \ No newline at end of file diff --git a/templates/de/html/admin/admin_gmenu_edit.tpl b/templates/de/html/admin/admin_gmenu_edit.tpl index 7e19543dcf..d1fe2d0bdf 100644 --- a/templates/de/html/admin/admin_gmenu_edit.tpl +++ b/templates/de/html/admin/admin_gmenu_edit.tpl @@ -11,10 +11,10 @@ {!__MENU_ROWS!} - - - - + + + + diff --git a/templates/de/html/admin/admin_gmenu_edit_form.tpl b/templates/de/html/admin/admin_gmenu_edit_form.tpl index 168cc57e24..9bc90ec897 100644 --- a/templates/de/html/admin/admin_gmenu_edit_form.tpl +++ b/templates/de/html/admin/admin_gmenu_edit_form.tpl @@ -11,11 +11,11 @@ {!__MENU_ROWS!} - - diff --git a/templates/de/html/admin/admin_gmenu_edit_row.tpl b/templates/de/html/admin/admin_gmenu_edit_row.tpl index 307853e5a8..2f6309828f 100644 --- a/templates/de/html/admin/admin_gmenu_edit_row.tpl +++ b/templates/de/html/admin/admin_gmenu_edit_row.tpl @@ -28,7 +28,7 @@ {--EDIT_TITLE--}:   - diff --git a/templates/de/html/admin/admin_gmenu_status.tpl b/templates/de/html/admin/admin_gmenu_status.tpl index c9b8124fe1..6a9f4f1827 100644 --- a/templates/de/html/admin/admin_gmenu_status.tpl +++ b/templates/de/html/admin/admin_gmenu_status.tpl @@ -15,10 +15,10 @@ {!__MENU_ROWS!} - - diff --git a/templates/de/html/admin/admin_guest_add.tpl b/templates/de/html/admin/admin_guest_add.tpl index 9c9e321020..b482d3ff28 100644 --- a/templates/de/html/admin/admin_guest_add.tpl +++ b/templates/de/html/admin/admin_guest_add.tpl @@ -7,7 +7,7 @@   {--ENTER_TITLE--}:   -   @@ -81,8 +81,8 @@   -   diff --git a/templates/de/html/admin/admin_list_admins.tpl b/templates/de/html/admin/admin_list_admins.tpl index d275648759..f0bf1b5383 100644 --- a/templates/de/html/admin/admin_list_admins.tpl +++ b/templates/de/html/admin/admin_list_admins.tpl @@ -15,10 +15,10 @@ {!__ADMINS_ROWS!} - - diff --git a/templates/de/html/admin/admin_list_admins_row.tpl b/templates/de/html/admin/admin_list_admins_row.tpl index 2cf080f3c4..9405c6dd3b 100644 --- a/templates/de/html/admin/admin_list_admins_row.tpl +++ b/templates/de/html/admin/admin_list_admins_row.tpl @@ -1,6 +1,6 @@ - +   $content[login] diff --git a/templates/de/html/admin/admin_list_bank_package.tpl b/templates/de/html/admin/admin_list_bank_package.tpl index b60dd23eb5..e54b031bff 100644 --- a/templates/de/html/admin/admin_list_bank_package.tpl +++ b/templates/de/html/admin/admin_list_bank_package.tpl @@ -16,12 +16,12 @@ {!__BANK_PACKAGE_ROWS!} - - - diff --git a/templates/de/html/admin/admin_list_bank_package_row.tpl b/templates/de/html/admin/admin_list_bank_package_row.tpl index 1abeadf90c..68468a687a 100644 --- a/templates/de/html/admin/admin_list_bank_package_row.tpl +++ b/templates/de/html/admin/admin_list_bank_package_row.tpl @@ -1,6 +1,6 @@ - + $content[id] diff --git a/templates/de/html/admin/admin_list_beg_form.tpl b/templates/de/html/admin/admin_list_beg_form.tpl index dc1b0b178e..4bbfdaf3f8 100644 --- a/templates/de/html/admin/admin_list_beg_form.tpl +++ b/templates/de/html/admin/admin_list_beg_form.tpl @@ -1,5 +1,5 @@
    diff --git a/templates/de/html/admin/admin_list_bonus_form.tpl b/templates/de/html/admin/admin_list_bonus_form.tpl index 677cabe5eb..cafd87e134 100644 --- a/templates/de/html/admin/admin_list_bonus_form.tpl +++ b/templates/de/html/admin/admin_list_bonus_form.tpl @@ -1,5 +1,5 @@
    diff --git a/templates/de/html/admin/admin_list_country.tpl b/templates/de/html/admin/admin_list_country.tpl index df03681c87..09cf81fa85 100644 --- a/templates/de/html/admin/admin_list_country.tpl +++ b/templates/de/html/admin/admin_list_country.tpl @@ -1,4 +1,4 @@ -
    @@ -13,12 +13,12 @@ {!__COUNTRY_ROWS!} -
    diff --git a/templates/de/html/admin/admin_list_country_del_row.tpl b/templates/de/html/admin/admin_list_country_del_row.tpl index 270e00a889..d7fbb6c5e4 100644 --- a/templates/de/html/admin/admin_list_country_del_row.tpl +++ b/templates/de/html/admin/admin_list_country_del_row.tpl @@ -1,6 +1,6 @@ $content[id] - + $content[code] diff --git a/templates/de/html/admin/admin_list_country_edit_row.tpl b/templates/de/html/admin/admin_list_country_edit_row.tpl index 634f03ae61..d8ace99280 100644 --- a/templates/de/html/admin/admin_list_country_edit_row.tpl +++ b/templates/de/html/admin/admin_list_country_edit_row.tpl @@ -1,10 +1,10 @@ $content[id] - - + - diff --git a/templates/de/html/admin/admin_list_country_row.tpl b/templates/de/html/admin/admin_list_country_row.tpl index 4d6c3d4fc2..51b1ccf6a6 100644 --- a/templates/de/html/admin/admin_list_country_row.tpl +++ b/templates/de/html/admin/admin_list_country_row.tpl @@ -1,6 +1,6 @@ - + $content[code] diff --git a/templates/de/html/admin/admin_list_holiday.tpl b/templates/de/html/admin/admin_list_holiday.tpl index de947f32c9..2e5b1507d8 100644 --- a/templates/de/html/admin/admin_list_holiday.tpl +++ b/templates/de/html/admin/admin_list_holiday.tpl @@ -12,9 +12,9 @@ {!__HOLIDAY_ROWS!} - - diff --git a/templates/de/html/admin/admin_list_holiday_row.tpl b/templates/de/html/admin/admin_list_holiday_row.tpl index fa49516690..411b1e7a33 100644 --- a/templates/de/html/admin/admin_list_holiday_row.tpl +++ b/templates/de/html/admin/admin_list_holiday_row.tpl @@ -1,6 +1,6 @@ - + $content[uid] diff --git a/templates/de/html/admin/admin_list_payments.tpl b/templates/de/html/admin/admin_list_payments.tpl index 829ea944a3..b7c8b742b1 100644 --- a/templates/de/html/admin/admin_list_payments.tpl +++ b/templates/de/html/admin/admin_list_payments.tpl @@ -15,10 +15,10 @@ {!__PAYMENT_ROWS!} - - diff --git a/templates/de/html/admin/admin_list_rallye_prices.tpl b/templates/de/html/admin/admin_list_rallye_prices.tpl index 9be64a57dd..602b113b9d 100644 --- a/templates/de/html/admin/admin_list_rallye_prices.tpl +++ b/templates/de/html/admin/admin_list_rallye_prices.tpl @@ -13,10 +13,10 @@ {!__RALLYE_ROWS!} - - diff --git a/templates/de/html/admin/admin_list_rallyes.tpl b/templates/de/html/admin/admin_list_rallyes.tpl index 271f7206a8..7dd55d1080 100644 --- a/templates/de/html/admin/admin_list_rallyes.tpl +++ b/templates/de/html/admin/admin_list_rallyes.tpl @@ -12,10 +12,10 @@ {!__RALLYE_ROWS!} - - diff --git a/templates/de/html/admin/admin_list_sponsor_pay.tpl b/templates/de/html/admin/admin_list_sponsor_pay.tpl index 77b14d3e4d..142eccedbe 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay.tpl @@ -15,9 +15,9 @@ {!__LIST_ROWS!} - - - + + + diff --git a/templates/de/html/admin/admin_list_sponsor_pay_del.tpl b/templates/de/html/admin/admin_list_sponsor_pay_del.tpl index b5f9df30cc..6571f80ef8 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_del.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_del.tpl @@ -16,8 +16,8 @@ {!__SPONSOR_ROWS!} - - + + diff --git a/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl b/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl index 2f60f33d11..45e79597b7 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_del_row.tpl @@ -1,6 +1,6 @@ - +  $content[name] diff --git a/templates/de/html/admin/admin_list_sponsor_pay_edit.tpl b/templates/de/html/admin/admin_list_sponsor_pay_edit.tpl index fe4890f19a..ca4f3cdb02 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_edit.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_edit.tpl @@ -16,8 +16,8 @@ {!__SPONSOR_ROWS!} - - + + diff --git a/templates/de/html/admin/admin_list_sponsor_pay_edit_row.tpl b/templates/de/html/admin/admin_list_sponsor_pay_edit_row.tpl index 33e660a68d..4619832540 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_edit_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_edit_row.tpl @@ -1,18 +1,18 @@ $content[id] - + -   +   -   +   -   +   -   +   \ No newline at end of file diff --git a/templates/de/html/admin/admin_list_sponsor_pay_row.tpl b/templates/de/html/admin/admin_list_sponsor_pay_row.tpl index 5a594a2187..b9a2baa6b7 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_row.tpl @@ -1,6 +1,6 @@ - +  $content[name] diff --git a/templates/de/html/admin/admin_list_task_ext_rows.tpl b/templates/de/html/admin/admin_list_task_ext_rows.tpl index e683157115..1195f29b9d 100644 --- a/templates/de/html/admin/admin_list_task_ext_rows.tpl +++ b/templates/de/html/admin/admin_list_task_ext_rows.tpl @@ -1,6 +1,6 @@ - + $content[admin] diff --git a/templates/de/html/admin/admin_list_task_rows.tpl b/templates/de/html/admin/admin_list_task_rows.tpl index 0b990c9862..9a8e24ca67 100644 --- a/templates/de/html/admin/admin_list_task_rows.tpl +++ b/templates/de/html/admin/admin_list_task_rows.tpl @@ -1,6 +1,6 @@ - + $content[admin] diff --git a/templates/de/html/admin/admin_lock_sponsor.tpl b/templates/de/html/admin/admin_lock_sponsor.tpl index 185e17face..3adb307f6b 100644 --- a/templates/de/html/admin/admin_lock_sponsor.tpl +++ b/templates/de/html/admin/admin_lock_sponsor.tpl @@ -26,8 +26,8 @@   - - + + diff --git a/templates/de/html/admin/admin_lock_user.tpl b/templates/de/html/admin/admin_lock_user.tpl index 59cfedd8bd..7982c58e37 100644 --- a/templates/de/html/admin/admin_lock_user.tpl +++ b/templates/de/html/admin/admin_lock_user.tpl @@ -31,8 +31,8 @@   - diff --git a/templates/de/html/admin/admin_login_form.tpl b/templates/de/html/admin/admin_login_form.tpl index dfae0df6e8..42562065bb 100644 --- a/templates/de/html/admin/admin_login_form.tpl +++ b/templates/de/html/admin/admin_login_form.tpl @@ -18,7 +18,7 @@ {--ENTER_ADMIN_LOGIN--}:   - {!__MSG_LOGIN!} @@ -28,7 +28,7 @@ {--ENTER_ADMIN_PASS--}:   - + @@ -53,9 +53,9 @@   - - diff --git a/templates/de/html/admin/admin_logout_form.tpl b/templates/de/html/admin/admin_logout_form.tpl index 0b43b2b802..c22e253763 100644 --- a/templates/de/html/admin/admin_logout_form.tpl +++ b/templates/de/html/admin/admin_logout_form.tpl @@ -23,9 +23,9 @@   - - + diff --git a/templates/de/html/admin/admin_maintenance_form.tpl b/templates/de/html/admin/admin_maintenance_form.tpl index 5679c42bdc..c47304883c 100644 --- a/templates/de/html/admin/admin_maintenance_form.tpl +++ b/templates/de/html/admin/admin_maintenance_form.tpl @@ -16,7 +16,7 @@   - diff --git a/templates/de/html/admin/admin_member_add.tpl b/templates/de/html/admin/admin_member_add.tpl index 51aa988bea..0790660938 100644 --- a/templates/de/html/admin/admin_member_add.tpl +++ b/templates/de/html/admin/admin_member_add.tpl @@ -7,7 +7,7 @@   {--ENTER_TITLE--}:   -   @@ -81,8 +81,8 @@   -   diff --git a/templates/de/html/admin/admin_member_selection_box.tpl b/templates/de/html/admin/admin_member_selection_box.tpl index 01b07a6294..45c65533c2 100644 --- a/templates/de/html/admin/admin_member_selection_box.tpl +++ b/templates/de/html/admin/admin_member_selection_box.tpl @@ -10,8 +10,8 @@ - - + + {--ADMIN_SELECT_USER--}: - + + diff --git a/templates/de/html/admin/admin_menu_overview_row.tpl b/templates/de/html/admin/admin_menu_overview_row.tpl index 89aa4f7224..7178ec4a4f 100644 --- a/templates/de/html/admin/admin_menu_overview_row.tpl +++ b/templates/de/html/admin/admin_menu_overview_row.tpl @@ -1,6 +1,6 @@ - + $content[action] diff --git a/templates/de/html/admin/admin_menu_status_row.tpl b/templates/de/html/admin/admin_menu_status_row.tpl index 4dc1ab9241..5a0bcc9f62 100644 --- a/templates/de/html/admin/admin_menu_status_row.tpl +++ b/templates/de/html/admin/admin_menu_status_row.tpl @@ -2,7 +2,7 @@ $content[cnt]. {--ENTRY_MODIFY--}:   - $content[menu] {--IS_VISIBLE--}  $content[visible] diff --git a/templates/de/html/admin/admin_mmenu_delete.tpl b/templates/de/html/admin/admin_mmenu_delete.tpl index 86daea0449..253588b35f 100644 --- a/templates/de/html/admin/admin_mmenu_delete.tpl +++ b/templates/de/html/admin/admin_mmenu_delete.tpl @@ -12,9 +12,9 @@ {!__MENU_ROWS!} - diff --git a/templates/de/html/admin/admin_mmenu_delete_row.tpl b/templates/de/html/admin/admin_mmenu_delete_row.tpl index e94ecc4f6b..23ec82ddd2 100644 --- a/templates/de/html/admin/admin_mmenu_delete_row.tpl +++ b/templates/de/html/admin/admin_mmenu_delete_row.tpl @@ -1,6 +1,6 @@ $content[cnt]. {--ENTRY_DELETE--}:   - $content[title] $content[title] \ No newline at end of file diff --git a/templates/de/html/admin/admin_mmenu_edit.tpl b/templates/de/html/admin/admin_mmenu_edit.tpl index c3a337d3c5..6d34368999 100644 --- a/templates/de/html/admin/admin_mmenu_edit.tpl +++ b/templates/de/html/admin/admin_mmenu_edit.tpl @@ -11,11 +11,11 @@ {!__MENU_ROWS!} - - diff --git a/templates/de/html/admin/admin_mmenu_edit_row.tpl b/templates/de/html/admin/admin_mmenu_edit_row.tpl index 2820c2fc1d..48f41dd5bd 100644 --- a/templates/de/html/admin/admin_mmenu_edit_row.tpl +++ b/templates/de/html/admin/admin_mmenu_edit_row.tpl @@ -27,7 +27,7 @@ {--EDIT_TITLE--}:   - diff --git a/templates/de/html/admin/admin_mmenu_overview.tpl b/templates/de/html/admin/admin_mmenu_overview.tpl index c83a1eff3d..827f4a1dbf 100644 --- a/templates/de/html/admin/admin_mmenu_overview.tpl +++ b/templates/de/html/admin/admin_mmenu_overview.tpl @@ -11,10 +11,10 @@ {!__MENU_ROWS!} - - - - + + + + diff --git a/templates/de/html/admin/admin_mmenu_status.tpl b/templates/de/html/admin/admin_mmenu_status.tpl index 422248404f..62cb4ce106 100644 --- a/templates/de/html/admin/admin_mmenu_status.tpl +++ b/templates/de/html/admin/admin_mmenu_status.tpl @@ -15,10 +15,10 @@ {!__MENU_ROWS!} - - diff --git a/templates/de/html/admin/admin_mods_edit.tpl b/templates/de/html/admin/admin_mods_edit.tpl index 1b3333cf1b..7cfe2cf4da 100644 --- a/templates/de/html/admin/admin_mods_edit.tpl +++ b/templates/de/html/admin/admin_mods_edit.tpl @@ -12,9 +12,9 @@ {!__MODS_ROWS!} - - diff --git a/templates/de/html/admin/admin_mods_edit_row.tpl b/templates/de/html/admin/admin_mods_edit_row.tpl index c2382522c1..97b153fce7 100644 --- a/templates/de/html/admin/admin_mods_edit_row.tpl +++ b/templates/de/html/admin/admin_mods_edit_row.tpl @@ -1,8 +1,8 @@ -  $content[mod] - diff --git a/templates/de/html/admin/admin_mods_list.tpl b/templates/de/html/admin/admin_mods_list.tpl index ca80224487..cc19c48aab 100644 --- a/templates/de/html/admin/admin_mods_list.tpl +++ b/templates/de/html/admin/admin_mods_list.tpl @@ -12,8 +12,8 @@ {!__MODS_ROWS!} - - + + diff --git a/templates/de/html/admin/admin_mods_list_row.tpl b/templates/de/html/admin/admin_mods_list_row.tpl index 85930d2574..632ff4430c 100644 --- a/templates/de/html/admin/admin_mods_list_row.tpl +++ b/templates/de/html/admin/admin_mods_list_row.tpl @@ -1,6 +1,6 @@ - +  $content[mod] diff --git a/templates/de/html/admin/admin_newsletter.tpl b/templates/de/html/admin/admin_newsletter.tpl index 912cd4ee50..cb64e5d48a 100644 --- a/templates/de/html/admin/admin_newsletter.tpl +++ b/templates/de/html/admin/admin_newsletter.tpl @@ -13,7 +13,7 @@   {--ENTER_NL_SUBJECT--}:   -   @@ -29,12 +29,12 @@ - -
    {--NL_MODE_TEXT--}  
    {--NL_MODE_HTML--}  
    @@ -52,10 +52,10 @@ - -
    {--YES--}   {--NO--}  
    @@ -78,9 +78,9 @@   - -   diff --git a/templates/de/html/admin/admin_newsletter_nohtml.tpl b/templates/de/html/admin/admin_newsletter_nohtml.tpl index 9c854efbaf..c7c374278c 100644 --- a/templates/de/html/admin/admin_newsletter_nohtml.tpl +++ b/templates/de/html/admin/admin_newsletter_nohtml.tpl @@ -13,7 +13,7 @@   {--ENTER_NL_SUBJECT--}:   -   @@ -29,10 +29,10 @@ - -
    {--YES--}   {--NO--}  
    @@ -55,10 +55,10 @@   - - - +   diff --git a/templates/de/html/admin/admin_newsletter_tsk.tpl b/templates/de/html/admin/admin_newsletter_tsk.tpl index a8df99826d..f4bb52b5f2 100644 --- a/templates/de/html/admin/admin_newsletter_tsk.tpl +++ b/templates/de/html/admin/admin_newsletter_tsk.tpl @@ -1,6 +1,6 @@
    diff --git a/templates/de/html/admin/admin_overview_footer.tpl b/templates/de/html/admin/admin_overview_footer.tpl index 6face678cc..ec0a4594ed 100644 --- a/templates/de/html/admin/admin_overview_footer.tpl +++ b/templates/de/html/admin/admin_overview_footer.tpl @@ -1,10 +1,10 @@ - - - - - + + + + + diff --git a/templates/de/html/admin/admin_overview_footer_task.tpl b/templates/de/html/admin/admin_overview_footer_task.tpl index ad8893ed93..2fd49dff79 100644 --- a/templates/de/html/admin/admin_overview_footer_task.tpl +++ b/templates/de/html/admin/admin_overview_footer_task.tpl @@ -1,10 +1,10 @@ - - - - - + + + + + diff --git a/templates/de/html/admin/admin_overview_list_ext_rows.tpl b/templates/de/html/admin/admin_overview_list_ext_rows.tpl index e683157115..1195f29b9d 100644 --- a/templates/de/html/admin/admin_overview_list_ext_rows.tpl +++ b/templates/de/html/admin/admin_overview_list_ext_rows.tpl @@ -1,6 +1,6 @@ - + $content[admin] diff --git a/templates/de/html/admin/admin_overview_list_rows.tpl b/templates/de/html/admin/admin_overview_list_rows.tpl index 0b990c9862..9a8e24ca67 100644 --- a/templates/de/html/admin/admin_overview_list_rows.tpl +++ b/templates/de/html/admin/admin_overview_list_rows.tpl @@ -1,6 +1,6 @@ - + $content[admin] diff --git a/templates/de/html/admin/admin_overview_task.tpl b/templates/de/html/admin/admin_overview_task.tpl index 8a18f7061b..f28a176262 100644 --- a/templates/de/html/admin/admin_overview_task.tpl +++ b/templates/de/html/admin/admin_overview_task.tpl @@ -129,7 +129,7 @@ - {!__OVERVIEW_EXTRA_table!} + {!__OVERVIEW_EXTRA_TABLE!}   diff --git a/templates/de/html/admin/admin_payments_list_row.tpl b/templates/de/html/admin/admin_payments_list_row.tpl index 38060c43aa..c0c257877a 100644 --- a/templates/de/html/admin/admin_payments_list_row.tpl +++ b/templates/de/html/admin/admin_payments_list_row.tpl @@ -1,6 +1,6 @@ - + $content[time] {--_SECONDS--} diff --git a/templates/de/html/admin/admin_payout_accept_form.tpl b/templates/de/html/admin/admin_payout_accept_form.tpl index 08dd132424..52a65b88a7 100644 --- a/templates/de/html/admin/admin_payout_accept_form.tpl +++ b/templates/de/html/admin/admin_payout_accept_form.tpl @@ -29,8 +29,8 @@   - diff --git a/templates/de/html/admin/admin_payout_add_new.tpl b/templates/de/html/admin/admin_payout_add_new.tpl index 56247a86f1..17505881cb 100644 --- a/templates/de/html/admin/admin_payout_add_new.tpl +++ b/templates/de/html/admin/admin_payout_add_new.tpl @@ -11,7 +11,7 @@ {--ADMIN_PAYOUT_TITLE--}:   - @@ -20,7 +20,7 @@ {--ADMIN_PAYOUT_RATE--}   -
      ({--ADMIN_PAYOUT_VALUE_NOTE--})
    @@ -29,7 +29,7 @@ {--ADMIN_PAYOUT_MIN_POINTS--}:   -
      ({--ADMIN_PAYOUT_VALUE_NOTE--})
    @@ -56,7 +56,7 @@ {--ADMIN_PAYOUT_YOUR_ACCOUNT--}:   - @@ -65,7 +65,7 @@ {--ADMIN_PAYOUT_YOUR_PASSWORD--}:   - @@ -74,7 +74,7 @@ {--ADMIN_PAYOUT_YOUR_URL--}:   - @@ -83,7 +83,7 @@ {--ADMIN_PAYOUT_YOUR_RET_DONE--}:   - @@ -92,7 +92,7 @@ {--ADMIN_PAYOUT_YOUR_RET_FAILED--}:   - @@ -111,8 +111,8 @@   -    diff --git a/templates/de/html/admin/admin_payout_overview_form.tpl b/templates/de/html/admin/admin_payout_overview_form.tpl index e088241aac..271f018a9b 100644 --- a/templates/de/html/admin/admin_payout_overview_form.tpl +++ b/templates/de/html/admin/admin_payout_overview_form.tpl @@ -1,9 +1,9 @@

    diff --git a/templates/de/html/admin/admin_payout_reject_form.tpl b/templates/de/html/admin/admin_payout_reject_form.tpl index f7ce2b113c..7830926836 100644 --- a/templates/de/html/admin/admin_payout_reject_form.tpl +++ b/templates/de/html/admin/admin_payout_reject_form.tpl @@ -29,8 +29,8 @@   - diff --git a/templates/de/html/admin/admin_points.tpl b/templates/de/html/admin/admin_points.tpl index d0d03efe04..f07dd6f7c6 100644 --- a/templates/de/html/admin/admin_points.tpl +++ b/templates/de/html/admin/admin_points.tpl @@ -14,9 +14,9 @@ {!__LEVEL_ROWS!} - - - + + + diff --git a/templates/de/html/admin/admin_points_del.tpl b/templates/de/html/admin/admin_points_del.tpl index 50d501592a..db0542e0f7 100644 --- a/templates/de/html/admin/admin_points_del.tpl +++ b/templates/de/html/admin/admin_points_del.tpl @@ -6,8 +6,8 @@ {!__LEVEL_ROWS!} - diff --git a/templates/de/html/admin/admin_points_del_row.tpl b/templates/de/html/admin/admin_points_del_row.tpl index 729bb94e27..0962a04100 100644 --- a/templates/de/html/admin/admin_points_del_row.tpl +++ b/templates/de/html/admin/admin_points_del_row.tpl @@ -11,7 +11,7 @@ $content[per]%
    ({--ID_SELECT--} $content[id])
    - + diff --git a/templates/de/html/admin/admin_points_edit.tpl b/templates/de/html/admin/admin_points_edit.tpl index ade5a86541..91c7a38f8e 100644 --- a/templates/de/html/admin/admin_points_edit.tpl +++ b/templates/de/html/admin/admin_points_edit.tpl @@ -7,9 +7,9 @@ {!__LEVEL_ROWS!} - - diff --git a/templates/de/html/admin/admin_points_edit_row.tpl b/templates/de/html/admin/admin_points_edit_row.tpl index 3e6c8edd84..20b2e0b3d7 100644 --- a/templates/de/html/admin/admin_points_edit_row.tpl +++ b/templates/de/html/admin/admin_points_edit_row.tpl @@ -7,7 +7,7 @@ {--REF_LEVEL--}:  - @@ -16,7 +16,7 @@ {--REF_PERCENT--}:  - % diff --git a/templates/de/html/admin/admin_points_row.tpl b/templates/de/html/admin/admin_points_row.tpl index bc27751ef0..20081e5349 100644 --- a/templates/de/html/admin/admin_points_row.tpl +++ b/templates/de/html/admin/admin_points_row.tpl @@ -1,6 +1,6 @@ - + $content[lvl] diff --git a/templates/de/html/admin/admin_refbanner.tpl b/templates/de/html/admin/admin_refbanner.tpl index c571bf1e86..2ae4fca935 100644 --- a/templates/de/html/admin/admin_refbanner.tpl +++ b/templates/de/html/admin/admin_refbanner.tpl @@ -20,10 +20,10 @@ {!__BANNER_ROWS!}   - -   diff --git a/templates/de/html/admin/admin_refbanner_edit.tpl b/templates/de/html/admin/admin_refbanner_edit.tpl index 09be7e99d4..fba1b669c0 100644 --- a/templates/de/html/admin/admin_refbanner_edit.tpl +++ b/templates/de/html/admin/admin_refbanner_edit.tpl @@ -10,9 +10,9 @@ {!__BANNER_ROWS!}   - -   diff --git a/templates/de/html/admin/admin_refbanner_edit_row.tpl b/templates/de/html/admin/admin_refbanner_edit_row.tpl index 9b8e4d3bfc..0e6181082c 100644 --- a/templates/de/html/admin/admin_refbanner_edit_row.tpl +++ b/templates/de/html/admin/admin_refbanner_edit_row.tpl @@ -5,8 +5,8 @@   {--ADMIN_EDIT_BANNER_URL--}:   -   @@ -18,7 +18,7 @@   {--ADMIN_EDIT_ALTERNATE--}:   -   diff --git a/templates/de/html/admin/admin_refbanner_row.tpl b/templates/de/html/admin/admin_refbanner_row.tpl index 04a343e7d3..c7f5bf4f6e 100644 --- a/templates/de/html/admin/admin_refbanner_row.tpl +++ b/templates/de/html/admin/admin_refbanner_row.tpl @@ -1,9 +1,9 @@ - + - $content[alt] + $content[alt] $content[alt] diff --git a/templates/de/html/admin/admin_reg_form.tpl b/templates/de/html/admin/admin_reg_form.tpl index 3fa7b5b5b1..042782009a 100644 --- a/templates/de/html/admin/admin_reg_form.tpl +++ b/templates/de/html/admin/admin_reg_form.tpl @@ -3,7 +3,7 @@ @@ -13,7 +13,7 @@ {!__MSG_LOGIN!} @@ -23,7 +23,7 @@ {!__MSG_PASS!} @@ -32,8 +32,8 @@ diff --git a/templates/de/html/admin/admin_reset_password.tpl b/templates/de/html/admin/admin_reset_password.tpl index ef69f1985f..da16877a10 100644 --- a/templates/de/html/admin/admin_reset_password.tpl +++ b/templates/de/html/admin/admin_reset_password.tpl @@ -10,13 +10,13 @@ {--ADMIN_ENTER_EMAIL--}
    -
    {--ADMIN_NOT_REGISTERED--}
    +
    {--ADMIN_NOT_REGISTERED--}

    {--ADMIN_REGISTER_NOW--}
    {--ADMIN_LOGIN--}:   - +
    {--ADMIN_PASS--}:   - +
    - - + +
    - +
    diff --git a/templates/de/html/admin/admin_reset_password_form.tpl b/templates/de/html/admin/admin_reset_password_form.tpl index 40788e7d4f..311e323bd2 100644 --- a/templates/de/html/admin/admin_reset_password_form.tpl +++ b/templates/de/html/admin/admin_reset_password_form.tpl @@ -19,7 +19,7 @@ {--ADMIN_ENTER_PASSWORD1--} - + @@ -27,15 +27,15 @@ {--ADMIN_ENTER_PASSWORD2--} - + - - - - + + + + diff --git a/templates/de/html/admin/admin_send_bonus_form.tpl b/templates/de/html/admin/admin_send_bonus_form.tpl index 73ff4e7450..dd0cc6a208 100644 --- a/templates/de/html/admin/admin_send_bonus_form.tpl +++ b/templates/de/html/admin/admin_send_bonus_form.tpl @@ -21,7 +21,7 @@   {--ENTER_RECEIVER--}:   -   @@ -32,7 +32,7 @@   {--ENTER_POINTS--}:   -   @@ -43,7 +43,7 @@   {--ENTER_SECONDS--}:   -   @@ -54,7 +54,7 @@   {--ENTER_SUBJECT--}:   -   @@ -76,7 +76,7 @@   {--MEMBER_ENTER_URL--}:   -   @@ -85,8 +85,8 @@   -   diff --git a/templates/de/html/admin/admin_send_bonus_select.tpl b/templates/de/html/admin/admin_send_bonus_select.tpl index 108da3b053..5adcaf8eef 100644 --- a/templates/de/html/admin/admin_send_bonus_select.tpl +++ b/templates/de/html/admin/admin_send_bonus_select.tpl @@ -4,14 +4,14 @@ · · {--ADMIN_SEND_BONUS_NORMAL--}

    {--ADMIN_SEND_BONUS_NORMAL_NOTES--}
    - · · {--ADMIN_SEND_BONUS_HTML--}

    {--ADMIN_SEND_BONUS_HTML_NOTES--}
    diff --git a/templates/de/html/admin/admin_send_reset_link.tpl b/templates/de/html/admin/admin_send_reset_link.tpl index 41d035273f..c0e4501ce0 100644 --- a/templates/de/html/admin/admin_send_reset_link.tpl +++ b/templates/de/html/admin/admin_send_reset_link.tpl @@ -10,13 +10,13 @@ {--ADMIN_ENTER_EMAIL--} - + - - + + diff --git a/templates/de/html/admin/admin_sub_points.tpl b/templates/de/html/admin/admin_sub_points.tpl index 373eba2545..c51708aa83 100644 --- a/templates/de/html/admin/admin_sub_points.tpl +++ b/templates/de/html/admin/admin_sub_points.tpl @@ -18,7 +18,7 @@ {--ENTER_POINTS_SUB--}:   - @@ -37,8 +37,8 @@   -    diff --git a/templates/de/html/admin/admin_sub_points_all.tpl b/templates/de/html/admin/admin_sub_points_all.tpl index d162873213..7ff14f4cd1 100644 --- a/templates/de/html/admin/admin_sub_points_all.tpl +++ b/templates/de/html/admin/admin_sub_points_all.tpl @@ -18,7 +18,7 @@ {--ENTER_POINTS_SUB--}:   - @@ -37,8 +37,8 @@   -    diff --git a/templates/de/html/admin/admin_theme_edit.tpl b/templates/de/html/admin/admin_theme_edit.tpl index cbcc9fb847..bbed5dce9b 100644 --- a/templates/de/html/admin/admin_theme_edit.tpl +++ b/templates/de/html/admin/admin_theme_edit.tpl @@ -12,10 +12,10 @@ {!__THEME_LIST!} - - diff --git a/templates/de/html/admin/admin_theme_edit_row.tpl b/templates/de/html/admin/admin_theme_edit_row.tpl index 0526296c63..eb30b094aa 100644 --- a/templates/de/html/admin/admin_theme_edit_row.tpl +++ b/templates/de/html/admin/admin_theme_edit_row.tpl @@ -1,7 +1,7 @@ - - + + $content[link] diff --git a/templates/de/html/admin/admin_unlock_emails.tpl b/templates/de/html/admin/admin_unlock_emails.tpl index f372160b93..3814fee9fe 100644 --- a/templates/de/html/admin/admin_unlock_emails.tpl +++ b/templates/de/html/admin/admin_unlock_emails.tpl @@ -4,7 +4,7 @@ class="admin_table dashed" width="99%">
    {--ADMIN_UNLOCK_EMAILS--} + height="35">
    {--ADMIN_UNLOCK_EMAILS--}
    @@ -20,15 +20,15 @@ {!__UNLOCK_ROWS!} - {--ADMIN_ENTER_REDIRECT_URL--}: - - + diff --git a/templates/de/html/admin/admin_unlock_emails_redir.tpl b/templates/de/html/admin/admin_unlock_emails_redir.tpl index 4874855f9c..c68f36156e 100644 --- a/templates/de/html/admin/admin_unlock_emails_redir.tpl +++ b/templates/de/html/admin/admin_unlock_emails_redir.tpl @@ -13,8 +13,8 @@   - - +   diff --git a/templates/de/html/admin/admin_unlock_emails_redir_row.tpl b/templates/de/html/admin/admin_unlock_emails_redir_row.tpl index e02e444a0e..fcc312dcb1 100644 --- a/templates/de/html/admin/admin_unlock_emails_redir_row.tpl +++ b/templates/de/html/admin/admin_unlock_emails_redir_row.tpl @@ -1,7 +1,7 @@   - + $content[url]   diff --git a/templates/de/html/admin/admin_unlock_emails_row.tpl b/templates/de/html/admin/admin_unlock_emails_row.tpl index 529751d4c6..fe6a9719c2 100644 --- a/templates/de/html/admin/admin_unlock_emails_row.tpl +++ b/templates/de/html/admin/admin_unlock_emails_row.tpl @@ -1,8 +1,8 @@ - - - + + + $content[u_link] diff --git a/templates/de/html/admin/admin_unlock_sponsor.tpl b/templates/de/html/admin/admin_unlock_sponsor.tpl index 5953437a4f..521a71880c 100644 --- a/templates/de/html/admin/admin_unlock_sponsor.tpl +++ b/templates/de/html/admin/admin_unlock_sponsor.tpl @@ -15,8 +15,8 @@ {!__SPONSOR_ROWS!} - - + + diff --git a/templates/de/html/admin/admin_unlock_sponsor_row.tpl b/templates/de/html/admin/admin_unlock_sponsor_row.tpl index a12c0251bd..b16a3f2fbc 100644 --- a/templates/de/html/admin/admin_unlock_sponsor_row.tpl +++ b/templates/de/html/admin/admin_unlock_sponsor_row.tpl @@ -1,6 +1,6 @@ - + $content[gender] $content[surname] $content[family] diff --git a/templates/de/html/admin/admin_unlock_surfbar_urls.tpl b/templates/de/html/admin/admin_unlock_surfbar_urls.tpl index 146534a946..15849d75e9 100644 --- a/templates/de/html/admin/admin_unlock_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_unlock_surfbar_urls.tpl @@ -16,9 +16,9 @@ $content - - - + + + diff --git a/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl b/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl index 4daef0decf..4f865f7bc8 100644 --- a/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl @@ -1,6 +1,6 @@ - + $content[userid] diff --git a/templates/de/html/admin/admin_validate_reset_hash_form.tpl b/templates/de/html/admin/admin_validate_reset_hash_form.tpl index 7ef070ddd2..c25cf0261e 100644 --- a/templates/de/html/admin/admin_validate_reset_hash_form.tpl +++ b/templates/de/html/admin/admin_validate_reset_hash_form.tpl @@ -10,14 +10,14 @@ {--ADMIN_ENTER_LOGIN--} - + - - - + + + diff --git a/templates/de/html/doubler/doubler_index.tpl b/templates/de/html/doubler/doubler_index.tpl index c69638a263..b9d7b68809 100644 --- a/templates/de/html/doubler/doubler_index.tpl +++ b/templates/de/html/doubler/doubler_index.tpl @@ -5,7 +5,7 @@ -

    {!POINTS!}-{--DOUBLER_TITLE--} - {!MAIN_TITLE!}

    +

    {!POINTS!}-{--DOUBLER_TITLE--} - {!MAIN_TITLE!}


    {--DOUBLER_ENTER_LOGIN_DATA--}
    {--DOUBLER_NOTE_FOR_PASSWORD--}
    @@ -25,19 +25,19 @@ {--DOUBLER_ENTER_LOGIN--}:  - {--GUEST_ENTER_PASSWORD--}:  - {--DOUBLER_ENTER_POINTS--}:  - @@ -45,8 +45,8 @@ - - + diff --git a/templates/de/html/guest/guest_cat_row.tpl b/templates/de/html/guest/guest_cat_row.tpl index 240829dba4..28e79ce942 100644 --- a/templates/de/html/guest/guest_cat_row.tpl +++ b/templates/de/html/guest/guest_cat_row.tpl @@ -2,10 +2,10 @@     $content[cat]   - {--YES--}  - {--NO--}    diff --git a/templates/de/html/guest/guest_confirm_link.tpl b/templates/de/html/guest/guest_confirm_link.tpl index 55cdd50afd..f5b92c85c3 100644 --- a/templates/de/html/guest/guest_confirm_link.tpl +++ b/templates/de/html/guest/guest_confirm_link.tpl @@ -19,15 +19,15 @@ {--GUEST_ENTER_EMAIL--}:   -   -    diff --git a/templates/de/html/guest/guest_frametester.tpl b/templates/de/html/guest/guest_frametester.tpl index bc589f0636..8cd09f5c21 100644 --- a/templates/de/html/guest/guest_frametester.tpl +++ b/templates/de/html/guest/guest_frametester.tpl @@ -1,6 +1,6 @@ - - + - - \ No newline at end of file + frameborder="no" scrolling="no" noresize /> + + \ No newline at end of file diff --git a/templates/de/html/guest/guest_header.tpl b/templates/de/html/guest/guest_header.tpl index 738341e6af..f92e2bf82b 100644 --- a/templates/de/html/guest/guest_header.tpl +++ b/templates/de/html/guest/guest_header.tpl @@ -3,10 +3,10 @@ class="guest"> - - - + name="TOP"> - - - {!MAIN_TITLE!} - - -
    + class="guest_header">{!MAIN_TITLE!} - - -

    - - @@ -58,8 +58,8 @@ - @@ -90,7 +90,7 @@ - @@ -101,7 +101,7 @@ - @@ -110,8 +110,8 @@ - diff --git a/templates/de/html/guest/guest_menu_whats.tpl b/templates/de/html/guest/guest_menu_whats.tpl index 387fd7754f..51ef4021cf 100644 --- a/templates/de/html/guest/guest_menu_whats.tpl +++ b/templates/de/html/guest/guest_menu_whats.tpl @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/templates/de/html/guest/guest_nickname_login.tpl b/templates/de/html/guest/guest_nickname_login.tpl index 6bf7da4d0c..86995436ed 100644 --- a/templates/de/html/guest/guest_nickname_login.tpl +++ b/templates/de/html/guest/guest_nickname_login.tpl @@ -15,12 +15,12 @@ - - @@ -55,8 +55,8 @@ - @@ -81,7 +81,7 @@ - @@ -92,7 +92,7 @@ - @@ -101,8 +101,8 @@ - diff --git a/templates/de/html/guest/guest_register.tpl b/templates/de/html/guest/guest_register.tpl index 87da8e4706..a59f4f61c9 100644 --- a/templates/de/html/guest/guest_register.tpl +++ b/templates/de/html/guest/guest_register.tpl @@ -32,9 +32,9 @@ - @@ -44,7 +44,7 @@ - @@ -56,9 +56,9 @@ {--COUNTRY--}{!MUST_CNTRY!}, {--ZIP--}{!MUST_ZIP!}, {--CITY--}{!MUST_CITY!}:   @@ -67,7 +67,7 @@ - @@ -114,9 +114,9 @@ - @@ -143,18 +143,18 @@ - -
      Hallo diff --git a/templates/de/html/guest/guest_login.tpl b/templates/de/html/guest/guest_login.tpl index 2c8557b832..2ffeecd3a0 100644 --- a/templates/de/html/guest/guest_login.tpl +++ b/templates/de/html/guest/guest_login.tpl @@ -18,12 +18,12 @@
      {--GUEST_ENTER_LOGIN--}:     {--GUEST_ENTER_PASSWORD--}:    
           {--GUEST_ENTER_LOGIN--}:    {--_OR--}  
      {--GUEST_ENTER_EMAIL--}:    
         
     ·  $content ·  $content
      {--GUEST_ENTER_LOGIN_NICKNAME--}:     {--GUEST_ENTER_PASSWORD--}:    
      {--GUEST_ENTER_LOGIN_NICKNAME--}:    {--_OR--}  
      {--GUEST_ENTER_EMAIL--}:    
    {--SURNAME--}{!MUST_SURNAME!}, {--FAMILY_NAME--}{!MUST_FAMILY_NAME!}:     
    {--STREET_NR--}{!MUST_STREET_NR!}:  
    - {!__COUNTRY_CONTENT!}    -
    {--ADDY--}{!MUST_ADDY!}:  
    {--PASS_1--}, {--PASS_2--}:    -
    {--AGREE_TO_THIS--}:  {--YES--}: {--YES--}:   - {--NO--}:
     
    diff --git a/templates/de/html/guest/guest_register_refid.tpl b/templates/de/html/guest/guest_register_refid.tpl index 9e3977735e..84d6abac34 100644 --- a/templates/de/html/guest/guest_register_refid.tpl +++ b/templates/de/html/guest/guest_register_refid.tpl @@ -2,6 +2,6 @@ {--REFID_BY--}:   - + diff --git a/templates/de/html/guest/guest_register_refid_hide.tpl b/templates/de/html/guest/guest_register_refid_hide.tpl index 4bd9561e5a..dafabe60db 100644 --- a/templates/de/html/guest/guest_register_refid_hide.tpl +++ b/templates/de/html/guest/guest_register_refid_hide.tpl @@ -3,6 +3,6 @@ {--REFID_BY--}:   $content - + diff --git a/templates/de/html/guest/guest_sponsor_activate.tpl b/templates/de/html/guest/guest_sponsor_activate.tpl index f8fe10a280..42ac7e515c 100644 --- a/templates/de/html/guest/guest_sponsor_activate.tpl +++ b/templates/de/html/guest/guest_sponsor_activate.tpl @@ -6,21 +6,23 @@ {--SPONSOR_SEND_ACTIVATION_LINK--} -  + +   + {--SPONSOR_ENTER_EMAIL--}: - +   - - + + diff --git a/templates/de/html/guest/guest_sponsor_login.tpl b/templates/de/html/guest/guest_sponsor_login.tpl index c1a73be94a..8b3f8ba665 100644 --- a/templates/de/html/guest/guest_sponsor_login.tpl +++ b/templates/de/html/guest/guest_sponsor_login.tpl @@ -6,13 +6,13 @@ {--SPONSOR_LOGIN_WELCOME--} -  +  {--SPONSOR_ENTER_ID--}: - + @@ -20,14 +20,14 @@ {--SPONSOR_ENTER_PASSWORD--}: - +   - - + + diff --git a/templates/de/html/guest/guest_sponsor_lost.tpl b/templates/de/html/guest/guest_sponsor_lost.tpl index 66525e21f3..a84dd7371f 100644 --- a/templates/de/html/guest/guest_sponsor_lost.tpl +++ b/templates/de/html/guest/guest_sponsor_lost.tpl @@ -12,7 +12,7 @@ {--SPONSOR_ENTER_ID--}: - + @@ -20,15 +20,15 @@ {--SPONSOR_ENTER_EMAIL--}: - +   - - + + diff --git a/templates/de/html/guest/guest_sponsor_reg.tpl b/templates/de/html/guest/guest_sponsor_reg.tpl index efbf3e920a..a1403c0cdb 100644 --- a/templates/de/html/guest/guest_sponsor_reg.tpl +++ b/templates/de/html/guest/guest_sponsor_reg.tpl @@ -31,7 +31,7 @@   - +   @@ -43,7 +43,7 @@   - +   @@ -55,7 +55,7 @@   - +   @@ -91,7 +91,7 @@   - +   @@ -103,7 +103,7 @@   - +   @@ -123,7 +123,7 @@   - +   @@ -135,7 +135,7 @@   - +   @@ -147,8 +147,8 @@   - - - + - +   @@ -160,7 +160,7 @@   - +   @@ -172,7 +172,7 @@   - +   @@ -184,7 +184,7 @@   - +   @@ -196,7 +196,7 @@   - +   @@ -208,7 +208,7 @@   - +   @@ -228,8 +228,8 @@   - - + +   @@ -328,7 +328,7 @@   -   +     @@ -340,9 +340,9 @@   - - - + + +   diff --git a/templates/de/html/index.tpl b/templates/de/html/index.tpl index 0b0eefc991..4a11d3cb4f 100644 --- a/templates/de/html/index.tpl +++ b/templates/de/html/index.tpl @@ -7,7 +7,7 @@ - +
    {!MAIN_TITLE!}
    diff --git a/templates/de/html/install/install_finished.tpl b/templates/de/html/install/install_finished.tpl index ec1e936b2c..2f8ee3deff 100644 --- a/templates/de/html/install/install_finished.tpl +++ b/templates/de/html/install/install_finished.tpl @@ -3,6 +3,6 @@ {--INSTALL_FIN_SECU--}

    - - + +
    diff --git a/templates/de/html/install/install_page1.tpl b/templates/de/html/install/install_page1.tpl index 504c0cd35b..20d34bbe05 100644 --- a/templates/de/html/install/install_page1.tpl +++ b/templates/de/html/install/install_page1.tpl @@ -19,7 +19,7 @@ {--SERVER_PATH--} :  - @@ -28,7 +28,7 @@ {--BASE_URL--} :  ({--BASE_URL_NOTE--}) - @@ -36,7 +36,7 @@ {--HP_TITLE--} :  - @@ -44,7 +44,7 @@ {--HP_SLOGAN--} :  - @@ -52,14 +52,14 @@ {--HP_EMAIL--} :  -   - diff --git a/templates/de/html/install/install_page2.tpl b/templates/de/html/install/install_page2.tpl index 5cfced3d59..a59638fab3 100644 --- a/templates/de/html/install/install_page2.tpl +++ b/templates/de/html/install/install_page2.tpl @@ -17,7 +17,7 @@ {--MYSQL_HOST--} :  - @@ -25,7 +25,7 @@ {--MYSQL_DBASE--} :  - @@ -33,7 +33,7 @@ {--MYSQL_PREFIX--} :  - @@ -41,7 +41,7 @@ {--MYSQL_LOGIN--} :  - @@ -49,7 +49,7 @@ {--MYSQL_PASS1--} :  - @@ -57,19 +57,19 @@ {--MYSQL_PASS2--} :  -   - diff --git a/templates/de/html/install/install_page3.tpl b/templates/de/html/install/install_page3.tpl index 451059e074..02454b0ef4 100644 --- a/templates/de/html/install/install_page3.tpl +++ b/templates/de/html/install/install_page3.tpl @@ -17,7 +17,7 @@ {--TEXT_SMTP_HOST--} :  - + @@ -26,7 +26,7 @@ {--TEXT_SMTP_USER--} :  - + @@ -35,7 +35,7 @@ {--TEXT_SMTP_PASS1--} :  - + @@ -44,7 +44,7 @@ {--TEXT_SMTP_PASS2--} :  - + @@ -52,18 +52,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/templates/de/html/install/install_welcome.tpl b/templates/de/html/install/install_welcome.tpl index 52c9c8cdf7..2745b382a5 100644 --- a/templates/de/html/install/install_welcome.tpl +++ b/templates/de/html/install/install_welcome.tpl @@ -16,8 +16,8 @@ -
    diff --git a/templates/de/html/loader.tpl b/templates/de/html/loader.tpl index 545250c735..580029bab8 100644 --- a/templates/de/html/loader.tpl +++ b/templates/de/html/loader.tpl @@ -1,4 +1,4 @@ -D E R E F E R R E R  -  {!MAIN_TITLE!} +D E R E F E R R E R  -  {!MAIN_TITLE!}


    diff --git a/templates/de/html/mailid/mailid_confirm_buttom.tpl b/templates/de/html/mailid/mailid_confirm_buttom.tpl index aa171a05dc..0b3264adeb 100644 --- a/templates/de/html/mailid/mailid_confirm_buttom.tpl +++ b/templates/de/html/mailid/mailid_confirm_buttom.tpl @@ -7,8 +7,8 @@ action="{!URL!}/mailid_top.php?uid={!_UID_VALUE!}&{!_TYPE_VALUE!}={!_DATA_VALUE!}&mode=add&code={!_CODE_VALUE!}" method="POST" style="margin-bottom: 0px"> {--MAILID_CLICK_BUTTON--}:
    - - +   diff --git a/templates/de/html/mailid/mailid_enter_code.tpl b/templates/de/html/mailid/mailid_enter_code.tpl index 235a18de5a..b654d67958 100644 --- a/templates/de/html/mailid/mailid_enter_code.tpl +++ b/templates/de/html/mailid/mailid_enter_code.tpl @@ -7,8 +7,8 @@ action="{!URL!}/mailid_top.php?uid={!_UID_VALUE!}&{!_TYPE_VALUE!}={!_DATA_VALUE!}&mode=add&code={--_CODE_VALUE!}" method="POST" style="margin-bottom: 0px">{--ENTER_CODE--}: {--_IMAGE_CODE--}
    -   diff --git a/templates/de/html/mailid/mailid_points_done.tpl b/templates/de/html/mailid/mailid_points_done.tpl index af9d27d0a1..a9e7bbb1dd 100644 --- a/templates/de/html/mailid/mailid_points_done.tpl +++ b/templates/de/html/mailid/mailid_points_done.tpl @@ -1,26 +1,26 @@ - - - - - - - + class="member_mailidtop"> + + + + + + +
     {--THANX_POINTS_ADDED_1--}{--_POINTS_VALUE!} {--THANX_POINTS_ADDED_2--}
    - {--MAILID_TOTAL_POINTS1--}
    {!__TOTAL_POINTS!} - {!POINTS!} {--MAILID_TOTAL_POINTS2--}
      - - - - - - - - - - -
     
    {--_TEMPLATE_BANNER--}
     
    -
     
     {--THANX_POINTS_ADDED_1--}{--_POINTS_VALUE!} {--THANX_POINTS_ADDED_2--}
    + {--MAILID_TOTAL_POINTS1--}
    {!__TOTAL_POINTS!} +{!POINTS!}
    {--MAILID_TOTAL_POINTS2--}
      + + + + + + + + + + +
     
    {--_TEMPLATE_BANNER--}
     
    +
     
    \ No newline at end of file diff --git a/templates/de/html/mailid/mailid_timer.tpl b/templates/de/html/mailid/mailid_timer.tpl index f1f6dca6b3..a95f42e73d 100644 --- a/templates/de/html/mailid/mailid_timer.tpl +++ b/templates/de/html/mailid/mailid_timer.tpl @@ -33,7 +33,7 @@ function StartCounter() {
    - {--MEMBER_TIME_COUNTER_1--}  {--_SECONDS--} {--MEMBER_TIME_COUNTER_2--}
    diff --git a/templates/de/html/member/member_cat_row.tpl b/templates/de/html/member/member_cat_row.tpl index 0fb6308815..eabaeb6295 100644 --- a/templates/de/html/member/member_cat_row.tpl +++ b/templates/de/html/member/member_cat_row.tpl @@ -1,9 +1,9 @@ $content[cat]     - {--YES--} {--YES--}   - {--NO--} diff --git a/templates/de/html/member/member_cats_footer.tpl b/templates/de/html/member/member_cats_footer.tpl index 1e80dea491..f8741cb2d2 100644 --- a/templates/de/html/member/member_cats_footer.tpl +++ b/templates/de/html/member/member_cats_footer.tpl @@ -1,7 +1,7 @@ - - + diff --git a/templates/de/html/member/member_header.tpl b/templates/de/html/member/member_header.tpl index 7bbf7cbc0b..98557a27a1 100644 --- a/templates/de/html/member/member_header.tpl +++ b/templates/de/html/member/member_header.tpl @@ -5,9 +5,9 @@ diff --git a/templates/de/html/member/member_holiday_deactivate.tpl b/templates/de/html/member/member_holiday_deactivate.tpl index 90cf521bb1..682e2b6c2e 100644 --- a/templates/de/html/member/member_holiday_deactivate.tpl +++ b/templates/de/html/member/member_holiday_deactivate.tpl @@ -45,8 +45,8 @@
    - - - - - - - {!MAIN_TITLE!} - - - + class="member_header">{!MAIN_TITLE!} - - -
    diff --git a/templates/de/html/member/member_holiday_form.tpl b/templates/de/html/member/member_holiday_form.tpl index 463bbcef37..a8a36cb756 100644 --- a/templates/de/html/member/member_holiday_form.tpl +++ b/templates/de/html/member/member_holiday_form.tpl @@ -59,9 +59,9 @@   - - diff --git a/templates/de/html/member/member_html_mail_settings.tpl b/templates/de/html/member/member_html_mail_settings.tpl index 9ac07fc2ea..94ebefe00d 100644 --- a/templates/de/html/member/member_html_mail_settings.tpl +++ b/templates/de/html/member/member_html_mail_settings.tpl @@ -14,17 +14,17 @@   - {--YES--}: {--YES--}:    -   {--NO--}:   {--NO--}:    -    diff --git a/templates/de/html/member/member_menu_whats.tpl b/templates/de/html/member/member_menu_whats.tpl index 2f557b653a..3c21927bc2 100644 --- a/templates/de/html/member/member_menu_whats.tpl +++ b/templates/de/html/member/member_menu_whats.tpl @@ -1,3 +1,3 @@ -  ·  $content +  ·  $content \ No newline at end of file diff --git a/templates/de/html/member/member_mydata_button.tpl b/templates/de/html/member/member_mydata_button.tpl index 9321d33c78..a8bbced231 100644 --- a/templates/de/html/member/member_mydata_button.tpl +++ b/templates/de/html/member/member_mydata_button.tpl @@ -1,4 +1,4 @@
    diff --git a/templates/de/html/member/member_mydata_edit.tpl b/templates/de/html/member/member_mydata_edit.tpl index ee36689a73..c6b8867751 100644 --- a/templates/de/html/member/member_mydata_edit.tpl +++ b/templates/de/html/member/member_mydata_edit.tpl @@ -30,8 +30,8 @@ {--SURNAME--}, {--FAMILY_NAME--}:   -     @@ -41,7 +41,7 @@ {--STREET_NR--}:   - @@ -50,9 +50,9 @@ {--COUNTRY--}, {--ZIP--}, {--CITY--}:   - {!__COUNTRY_CONTENT!}  {!__COUNTRY_CONTENT!}    - @@ -61,7 +61,7 @@ {--ADDY--}:   - @@ -97,7 +97,7 @@ {--PASS_1--}:   - @@ -106,15 +106,15 @@ {--PASS_2--}:   -   -    diff --git a/templates/de/html/member/member_newsletter.tpl b/templates/de/html/member/member_newsletter.tpl index 6577b6c106..00fafda7d1 100644 --- a/templates/de/html/member/member_newsletter.tpl +++ b/templates/de/html/member/member_newsletter.tpl @@ -16,9 +16,9 @@ style="padding-top: 10px; padding-bottom: 10px">
    {--NL_MEMBER_NOTE--}
    - - diff --git a/templates/de/html/member/member_nickname_form.tpl b/templates/de/html/member/member_nickname_form.tpl index 9cf02cd15c..adfdd903be 100644 --- a/templates/de/html/member/member_nickname_form.tpl +++ b/templates/de/html/member/member_nickname_form.tpl @@ -22,7 +22,7 @@ {--NICKNAME_ENTER_NICKNAME--}:   - +   @@ -39,8 +39,8 @@   -      diff --git a/templates/de/html/member/member_order-back.tpl b/templates/de/html/member/member_order-back.tpl index 0325a07dd4..933e8f3ca4 100644 --- a/templates/de/html/member/member_order-back.tpl +++ b/templates/de/html/member/member_order-back.tpl @@ -1,8 +1,8 @@ -
    {--MEMBER_THANX_ORDER--}


    -
    \ No newline at end of file diff --git a/templates/de/html/member/member_order-html_ext.tpl b/templates/de/html/member/member_order-html_ext.tpl index 2819a0a38d..09b4ea0244 100644 --- a/templates/de/html/member/member_order-html_ext.tpl +++ b/templates/de/html/member/member_order-html_ext.tpl @@ -1,7 +1,7 @@   {--MEMBER_HTML_VALID_TAGS--}:
    - $content + $content   diff --git a/templates/de/html/member/member_order-html_intro.tpl b/templates/de/html/member/member_order-html_intro.tpl index 8e77d1464f..8d396439fb 100644 --- a/templates/de/html/member/member_order-html_intro.tpl +++ b/templates/de/html/member/member_order-html_intro.tpl @@ -6,8 +6,8 @@   - {--MEMBER_HTML_MSG--}: {--MEMBER_HTML_MSG--}:    -   {--MEMBER_NORMAL_MSG--}:   {--MEMBER_NORMAL_MSG--}:  \ No newline at end of file diff --git a/templates/de/html/member/member_order-zip1.tpl b/templates/de/html/member/member_order-zip1.tpl index 9db71260c3..21c41ada05 100644 --- a/templates/de/html/member/member_order-zip1.tpl +++ b/templates/de/html/member/member_order-zip1.tpl @@ -26,7 +26,7 @@ {--MEMBER_ENTER_ZIP_CODE--}:   - $content[add] diff --git a/templates/de/html/member/member_order-zip2.tpl b/templates/de/html/member/member_order-zip2.tpl index 491a547fff..35f6ee9af2 100644 --- a/templates/de/html/member/member_order-zip2.tpl +++ b/templates/de/html/member/member_order-zip2.tpl @@ -14,7 +14,7 @@   {--MEMBER_ENTER_ZIP_CODE--}   -   diff --git a/templates/de/html/member/member_order_back.tpl b/templates/de/html/member/member_order_back.tpl index c1775ffa34..212950ddc3 100644 --- a/templates/de/html/member/member_order_back.tpl +++ b/templates/de/html/member/member_order_back.tpl @@ -1,5 +1,5 @@
    -
    \ No newline at end of file diff --git a/templates/de/html/member/member_order_frametester.tpl b/templates/de/html/member/member_order_frametester.tpl index e7527afc96..a973ac8df0 100644 --- a/templates/de/html/member/member_order_frametester.tpl +++ b/templates/de/html/member/member_order_frametester.tpl @@ -1,9 +1,9 @@ - - + - - + + - + frameborder="no" scrolling="no" noresize /> + diff --git a/templates/de/html/member/member_order_page1.tpl b/templates/de/html/member/member_order_page1.tpl index ac24524c68..7fc9e83384 100644 --- a/templates/de/html/member/member_order_page1.tpl +++ b/templates/de/html/member/member_order_page1.tpl @@ -7,8 +7,8 @@   -    diff --git a/templates/de/html/member/member_order_page2.tpl b/templates/de/html/member/member_order_page2.tpl index 61a8de80e0..ea82f30d2d 100644 --- a/templates/de/html/member/member_order_page2.tpl +++ b/templates/de/html/member/member_order_page2.tpl @@ -37,7 +37,7 @@ {--ENTER_RECEIVER--}: {--MEMBER_MIN_RECS_1--} {!__MIN_VALUE!}{--MEMBER_MIN_RECS_2--}   -   @@ -48,7 +48,7 @@   {--ENTER_SUBJECT--}:   -   @@ -110,15 +110,15 @@   {--MEMBER_ENTER_URL--}:   -     -      diff --git a/templates/de/html/member/member_payout_form.tpl b/templates/de/html/member/member_payout_form.tpl index fdabf77f18..c739582546 100644 --- a/templates/de/html/member/member_payout_form.tpl +++ b/templates/de/html/member/member_payout_form.tpl @@ -20,33 +20,33 @@ {--PAYOUT_WANT_PAYOUT--}:   - {--PAYOUT_TARGET_ACCOUNT--}:   - {--PAYOUT_TARGET_BANK--}:   - {--PAYOUT_OPTIONAL_PASSWORD--}:   -   -    diff --git a/templates/de/html/member/member_payout_form_banner.tpl b/templates/de/html/member/member_payout_form_banner.tpl index 317c7efcd0..d46c123ec3 100644 --- a/templates/de/html/member/member_payout_form_banner.tpl +++ b/templates/de/html/member/member_payout_form_banner.tpl @@ -20,33 +20,33 @@ {--PAYOUT_WANT_PAYOUT--}:   - {--PAYOUT_TARGET_URL--}:   - {--PAYOUT_ALTERNATE_TEXT--}:   - {--PAYOUT_OPTIONAL_BANNER--}:   -  (*)   -    diff --git a/templates/de/html/member/member_primera_form.tpl b/templates/de/html/member/member_primera_form.tpl index fb8b1152ac..1260f8e000 100644 --- a/templates/de/html/member/member_primera_form.tpl +++ b/templates/de/html/member/member_primera_form.tpl @@ -18,27 +18,27 @@ {--PRIMERA_WANT_PRIMERA--}:   - {--PRIMERA_TARGET_ACCOUNT--}:   - {--PRIMERA_OPTIONAL_PASSWORD--}:   -   -    diff --git a/templates/de/html/member/member_primera_mode_pay.tpl b/templates/de/html/member/member_primera_mode_pay.tpl index dd6962d2ae..7b2cfddf38 100644 --- a/templates/de/html/member/member_primera_mode_pay.tpl +++ b/templates/de/html/member/member_primera_mode_pay.tpl @@ -20,25 +20,25 @@ {--PRIMERA_MEMBER_NICKNAME--}   - + {--PRIMERA_MEMBER_PASSWORD--}   - + {--PRIMERA_MEMBER_AMOUNT--}   - +   - - + + diff --git a/templates/de/html/member/member_reflinks_row.tpl b/templates/de/html/member/member_reflinks_row.tpl index 47574aabba..110b811bb8 100644 --- a/templates/de/html/member/member_reflinks_row.tpl +++ b/templates/de/html/member/member_reflinks_row.tpl @@ -1,7 +1,7 @@   - $content[alt]
    + $content[alt]
    {--REFBANNER_TOTALS--}: $content[cnt] {--REF_VIEWS--} / $content[cks] {--REF_CLIX--} diff --git a/templates/de/html/member/member_support_contcted.tpl b/templates/de/html/member/member_support_contcted.tpl index 09cfd97822..112ed41b72 100644 --- a/templates/de/html/member/member_support_contcted.tpl +++ b/templates/de/html/member/member_support_contcted.tpl @@ -4,8 +4,8 @@   - Vielen Dank, dass Sie uns kontaktiert haben! + Vielen Dank, dass Sie uns kontaktiert haben!   diff --git a/templates/de/html/member/member_support_form.tpl b/templates/de/html/member/member_support_form.tpl index af9e0d9160..a818774936 100644 --- a/templates/de/html/member/member_support_form.tpl +++ b/templates/de/html/member/member_support_form.tpl @@ -8,7 +8,7 @@ Sie haben eine Frage an unseren Support?
    -
    +
    Hallo Support-Team,
    Meine ID bei Ihrem {!MT_WORD!} lautet: $content[userid]
    @@ -37,9 +37,9 @@
    Mit freundlichem Gruss,
         Ihr $username
     
    -
    - - + + diff --git a/templates/de/html/member/member_themes.tpl b/templates/de/html/member/member_themes.tpl index b5001fe508..94c50724f5 100644 --- a/templates/de/html/member/member_themes.tpl +++ b/templates/de/html/member/member_themes.tpl @@ -15,9 +15,9 @@ {!__THEME_LIST!} - - diff --git a/templates/de/html/member/member_transfer_new.tpl b/templates/de/html/member/member_transfer_new.tpl index dcda3e05bd..67ef34ff26 100644 --- a/templates/de/html/member/member_transfer_new.tpl +++ b/templates/de/html/member/member_transfer_new.tpl @@ -20,7 +20,7 @@     - {!POINTS!} @@ -30,7 +30,7 @@     - @@ -47,14 +47,14 @@     - - - diff --git a/templates/de/html/member/member_transfer_settings.tpl b/templates/de/html/member/member_transfer_settings.tpl index cd1992d5b0..78c79dcc8d 100644 --- a/templates/de/html/member/member_transfer_settings.tpl +++ b/templates/de/html/member/member_transfer_settings.tpl @@ -6,14 +6,14 @@ {--TRANSFER_ALLOW_OPT_IN--} - {--YES--}:  - {--NO--}:  - diff --git a/templates/de/html/member/member_welcome.tpl b/templates/de/html/member/member_welcome.tpl index 57fe6cf436..75882c524c 100644 --- a/templates/de/html/member/member_welcome.tpl +++ b/templates/de/html/member/member_welcome.tpl @@ -1,2 +1,2 @@ Hier könnten Ihre News stehen. Das Template finden Sie unter -{!PATH!}/templates/de/html/member/member_welcome.tpl. +{!PATH!}/templates/de/html/member/member_welcome.tpl. diff --git a/templates/de/html/profile-update.tpl b/templates/de/html/profile-update.tpl index 46623e8feb..742b3e66c5 100644 --- a/templates/de/html/profile-update.tpl +++ b/templates/de/html/profile-update.tpl @@ -34,13 +34,13 @@
    diff --git a/templates/de/html/sponsor/sponsor_account_form.tpl b/templates/de/html/sponsor/sponsor_account_form.tpl index 8ec494a344..89c8d09196 100644 --- a/templates/de/html/sponsor/sponsor_account_form.tpl +++ b/templates/de/html/sponsor/sponsor_account_form.tpl @@ -11,7 +11,7 @@ {--SPONSOR_ENTER_COMPANY_TITLE--}:  -   +   @@ -19,7 +19,7 @@ {--SPONSOR_ENTER_COMPANY_POSITION--}:  -   +   @@ -27,7 +27,7 @@ {--SPONSOR_ENTER_TAX_IDENT--}:  -   +   @@ -52,7 +52,7 @@ {--GUEST_SURNAME--}:  -   +   @@ -60,7 +60,7 @@ {--GUEST_FAMILY--}:  -   +   @@ -73,7 +73,7 @@ {--SPONSOR_ENTER_STREET_NR1--}:  -   +   @@ -81,7 +81,7 @@ {--SPONSOR_ENTER_STREET_NR2--}:  -   +   @@ -89,8 +89,8 @@ {--SPONSOR_ENTER_CNTRY_ZIP_CITY--}:  -  - - +  - + @@ -98,7 +98,7 @@ {--SPONSOR_ENTER_PHONE--}:  -   +   @@ -106,7 +106,7 @@ {--SPONSOR_ENTER_FAX--}:  -   +   @@ -114,7 +114,7 @@ {--SPONSOR_ENTER_CELL--}:  -   +   @@ -122,7 +122,7 @@ {--SPONSOR_ENTER_EMAIL--}:  -   +   @@ -130,7 +130,7 @@ {--SPONSOR_ENTER_URL--}:  -   +   @@ -143,7 +143,7 @@ {--SPONSOR_ENTER_PASSWORD--}:  -   +   @@ -156,8 +156,8 @@ {--SPONSOR_ENTER_PASSWORDS--}:  -   - +   + @@ -167,8 +167,8 @@ - - + + diff --git a/templates/de/html/sponsor/sponsor_fillup_form.tpl b/templates/de/html/sponsor/sponsor_fillup_form.tpl index 39b40ec172..f564a4e430 100644 --- a/templates/de/html/sponsor/sponsor_fillup_form.tpl +++ b/templates/de/html/sponsor/sponsor_fillup_form.tpl @@ -32,8 +32,8 @@ - - + + diff --git a/templates/de/html/sponsor/sponsor_settings_form.tpl b/templates/de/html/sponsor/sponsor_settings_form.tpl index 7574897e52..9abbc142c8 100644 --- a/templates/de/html/sponsor/sponsor_settings_form.tpl +++ b/templates/de/html/sponsor/sponsor_settings_form.tpl @@ -11,8 +11,8 @@ {--GUEST_SPONSOR_RECEIVE_WARNINGS--} - {--YES--} - {--NO--} + {--YES--} + {--NO--} @@ -36,13 +36,13 @@ {--SPONSOR_ENTER_PASSWORD--}:  -   +   - - + + diff --git a/templates/de/html/sponsor/sponsor_what.tpl b/templates/de/html/sponsor/sponsor_what.tpl index 9e75a53446..79b7acaecb 100644 --- a/templates/de/html/sponsor/sponsor_what.tpl +++ b/templates/de/html/sponsor/sponsor_what.tpl @@ -2,7 +2,7 @@ -  · $content[title] +  · $content[title] diff --git a/templates/de/html/theme_select_form.tpl b/templates/de/html/theme_select_form.tpl index a26b3d1c19..bf57dcf32f 100644 --- a/templates/de/html/theme_select_form.tpl +++ b/templates/de/html/theme_select_form.tpl @@ -2,5 +2,5 @@
    - diff --git a/view.php b/view.php index 57eb0a77f1..e6ed28fa25 100644 --- a/view.php +++ b/view.php @@ -49,11 +49,13 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b $VIEW = 1; // for later things... ;-) - $result = SQL_QUERY_ESC("SELECT url FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT url FROM `{!MYSQL_PREFIX!}_refbanner` WHERE id=%s LIMIT 1", + array(bigintval($_GET['banner'])), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($url) = SQL_FETCHROW($result); SQL_FREERESULT($result); - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET counter=counter+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_refbanner` SET counter=counter+1 WHERE id=%s LIMIT 1", + array(bigintval($_GET['banner'])), __FILE__, __LINE__); $type = substr($url, -3); @header ("Content-Type: image/".$type); -- 2.39.5